useDAppuseDApp
  • 开始
  • 指南
  • 代币
⌘ K
ERC-20 代币标准
ERC-721 代币标准
Oracle Coin
最后更新时间:
帮助改进此文档
Made with ❤️ by 紫升
  • 合约地址:0x2f48CDe4CFd0FB4f5C873291D5cf2Dc9e61f2Db0
  • 合约名字:Oracle

JSON API

[
{
"inputs": [
{ "internalType": "address", "name": "factory_", "type": "address" },
{ "internalType": "bytes32", "name": "INIT_CODE_HASH_", "type": "bytes32" },
{ "internalType": "address", "name": "priceUpdater_", "type": "address" }
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "CYCLE",
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "tokenIn", "type": "address" },
{ "internalType": "uint256", "name": "amountIn", "type": "uint256" },
{ "internalType": "address", "name": "tokenOut", "type": "address" }
],
"name": "consult",
"outputs": [{ "internalType": "uint256", "name": "amountOut", "type": "uint256" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "tokenA", "type": "address" },
{ "internalType": "address", "name": "tokenB", "type": "address" }
],
"name": "pairFor",
"outputs": [{ "internalType": "address", "name": "pair", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
"name": "pairObservations",
"outputs": [
{ "internalType": "uint256", "name": "timestamp", "type": "uint256" },
{ "internalType": "uint256", "name": "price0Cumulative", "type": "uint256" },
{ "internalType": "uint256", "name": "price1Cumulative", "type": "uint256" }
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceUpdater",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "tokenA", "type": "address" },
{ "internalType": "address", "name": "tokenB", "type": "address" }
],
"name": "sortTokens",
"outputs": [
{ "internalType": "address", "name": "token0", "type": "address" },
{ "internalType": "address", "name": "token1", "type": "address" }
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{ "internalType": "address", "name": "tokenA", "type": "address" },
{ "internalType": "address", "name": "tokenB", "type": "address" }
],
"name": "update",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]