-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* smart contract added * env updated * Save current progress on price feed * getCurrentPrice in progress * listenToAmountChange() is working * code clean * getCurrentPriceOfNativeToken added * priceInUsd is working * setUpPriceCurrentPrice improved * priceInUsdEnabled added * saving progress * cleaning code progress * setUpPriceCurrentPrice fixed * tokenConversionRate added in the receipt * code cleaning * tokenConversionRate added * payment receipt is clean * PaymentRequestMakerComponent improvement * Pay on USD conversion is working * Before code cleaning * Enum added * todo done * package updated * apollo updated
- Loading branch information
1 parent
263f48a
commit 018f703
Showing
46 changed files
with
1,098 additions
and
327 deletions.
There are no files selected for viewing
113 changes: 113 additions & 0 deletions
113
...inlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
[ | ||
{ | ||
"inputs": [], | ||
"name": "decimals", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint8", | ||
"name": "", | ||
"type": "uint8" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "description", | ||
"outputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "", | ||
"type": "string" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint80", | ||
"name": "_roundId", | ||
"type": "uint80" | ||
} | ||
], | ||
"name": "getRoundData", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint80", | ||
"name": "roundId", | ||
"type": "uint80" | ||
}, | ||
{ | ||
"internalType": "int256", | ||
"name": "answer", | ||
"type": "int256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "startedAt", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "updatedAt", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint80", | ||
"name": "answeredInRound", | ||
"type": "uint80" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "latestRoundData", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint80", | ||
"name": "roundId", | ||
"type": "uint80" | ||
}, | ||
{ | ||
"internalType": "int256", | ||
"name": "answer", | ||
"type": "int256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "startedAt", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "updatedAt", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint80", | ||
"name": "answeredInRound", | ||
"type": "uint80" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "version", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] |
41 changes: 41 additions & 0 deletions
41
SmartContracts/abi/contracts/PriceFeed.sol/DataConsumerV3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "aggregator", | ||
"type": "address" | ||
} | ||
], | ||
"name": "getLatestDataFrom", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint80", | ||
"name": "roundId", | ||
"type": "uint80" | ||
}, | ||
{ | ||
"internalType": "int256", | ||
"name": "answer", | ||
"type": "int256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "startedAt", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "updatedAt", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint80", | ||
"name": "answeredInRound", | ||
"type": "uint80" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.7; | ||
|
||
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | ||
|
||
contract DataConsumerV3 { | ||
/** | ||
* Returns the latest answer from the specified aggregator. | ||
*/ | ||
function getLatestDataFrom( | ||
address aggregator | ||
) | ||
public | ||
view | ||
returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound) | ||
{ | ||
AggregatorV3Interface dataFeed = AggregatorV3Interface(aggregator); | ||
return dataFeed.latestRoundData(); | ||
} | ||
} |
Oops, something went wrong.