-
Notifications
You must be signed in to change notification settings - Fork 8
/
ExampleOracleSimple.json
165 lines (165 loc) · 16 KB
/
ExampleOracleSimple.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
"contractName": "ExampleOracleSimple",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "factory",
"type": "address"
},
{
"internalType": "address",
"name": "tokenA",
"type": "address"
},
{
"internalType": "address",
"name": "tokenB",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "PERIOD",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "blockTimestampLast",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountIn",
"type": "uint256"
}
],
"name": "consult",
"outputs": [
{
"internalType": "uint256",
"name": "amountOut",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "price0Average",
"outputs": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "price0CumulativeLast",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "price1Average",
"outputs": [
{
"internalType": "uint224",
"name": "_x",
"type": "uint224"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "price1CumulativeLast",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "token0",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "token1",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "update",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60e06040523480156200001157600080fd5b5060405162000f9c38038062000f9c833981810160405260608110156200003757600080fd5b508051602080830151604090930151919291906000906200006790859085908590620007996200037d821b17901c565b9050806001600160a01b03166080816001600160a01b031660601b81525050806001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015620000c057600080fd5b505afa158015620000d5573d6000803e3d6000fd5b505050506040513d6020811015620000ec57600080fd5b505160601b6001600160601b03191660a0526040805163d21220a760e01b815290516001600160a01b0383169163d21220a7916004808301926020929190829003018186803b1580156200013f57600080fd5b505afa15801562000154573d6000803e3d6000fd5b505050506040513d60208110156200016b57600080fd5b505160601b6001600160601b03191660c05260408051635909c0d560e01b815290516001600160a01b03831691635909c0d5916004808301926020929190829003018186803b158015620001be57600080fd5b505afa158015620001d3573d6000803e3d6000fd5b505050506040513d6020811015620001ea57600080fd5b505160005560408051635a3d549360e01b815290516001600160a01b03831691635a3d5493916004808301926020929190829003018186803b1580156200023057600080fd5b505afa15801562000245573d6000803e3d6000fd5b505050506040513d60208110156200025c57600080fd5b505160015560408051630240bc6b60e21b8152905160009182916001600160a01b03851691630902f1ac916004808301926060929190829003018186803b158015620002a757600080fd5b505afa158015620002bc573d6000803e3d6000fd5b505050506040513d6060811015620002d357600080fd5b50805160208201516040909201516002805463ffffffff191663ffffffff909216919091179055925090506001600160701b038216158015906200031f57506001600160701b03811615155b62000371576040805162461bcd60e51b815260206004820181905260248201527f4578616d706c654f7261636c6553696d706c653a204e4f5f5245534552564553604482015290519081900360640190fd5b5050505050506200053d565b600080806200039685856001600160e01b036200045a16565b604080516001600160601b0319606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f3e587aafa830ed6729f6ad31bd15f244a5938c6c3dc057d4fcf2cbc0b1046987609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b03161415620004b05760405162461bcd60e51b815260040180806020018281038252602381526020018062000f796023913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610620004d2578284620004d5565b83835b90925090506001600160a01b03821662000536576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a205a45524f5f4144445245535300000000604482015290519081900360640190fd5b9250929050565b60805160601c60a05160601c60c05160601c6109fc6200057d60003980610220528061044452508061017e52806101a45250806102f252506109fc6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a2e6204511610066578063a2e6204514610139578063a6bb453914610143578063b4d1d7951461014b578063c5700a0214610153578063d21220a7146101745761009e565b80630dfe1681146100a35780633ddac953146100c75780635909c0d5146101055780635a3d54931461010d5780635e6aaf2c14610115575b600080fd5b6100ab61017c565b604080516001600160a01b039092168252519081900360200190f35b6100f3600480360360408110156100dd57600080fd5b506001600160a01b0381351690602001356101a0565b60408051918252519081900360200190f35b6100f36102cd565b6100f36102d3565b61011d6102d9565b604080516001600160e01b039092168252519081900360200190f35b6101416102e8565b005b61011d610420565b6100f361042f565b61015b610436565b6040805163ffffffff9092168252519081900360200190f35b6100ab610442565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316141561021e5760408051602081019091526003546001600160e01b0316815261020e90610209908463ffffffff61046616565b6104e4565b6001600160901b031690506102c7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461028e5760405162461bcd60e51b815260040180806020018281038252602281526020018061095b6022913960400191505060405180910390fd5b60408051602081019091526004546001600160e01b031681526102bb90610209908463ffffffff61046616565b6001600160901b031690505b92915050565b60005481565b60015481565b6004546001600160e01b031681565b60008060006103167f00000000000000000000000000000000000000000000000000000000000000006104eb565b600254929550909350915063ffffffff9081168203906201518090821610156103705760405162461bcd60e51b815260040180806020018281038252602781526020018061097d6027913960400191505060405180910390fd5b60405180602001604052808263ffffffff1660005487038161038e57fe5b046001600160e01b039081169091529051600380546001600160e01b031916919092161790556040805160208101909152600154819063ffffffff8416908603816103d557fe5b046001600160e01b039081169091529051600480546001600160e01b03191691909216179055506000929092556001556002805463ffffffff191663ffffffff909216919091179055565b6003546001600160e01b031681565b6201518081565b60025463ffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b61046e610774565b600082158061049457505082516001600160e01b03168281029083828161049157fe5b04145b6104cf5760405162461bcd60e51b81526004018080602001828103825260238152602001806109a46023913960400191505060405180910390fd5b60408051602081019091529081529392505050565b5160701c90565b60008060006104f86106ba565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b15801561053357600080fd5b505afa158015610547573d6000803e3d6000fd5b505050506040513d602081101561055d57600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b1580156105a357600080fd5b505afa1580156105b7573d6000803e3d6000fd5b505050506040513d60208110156105cd57600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b15801561061957600080fd5b505afa15801561062d573d6000803e3d6000fd5b505050506040513d606081101561064357600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146106b05780840363ffffffff811661067d84866106c4565b516001600160e01b031602969096019563ffffffff811661069e85856106c4565b516001600160e01b0316029590950194505b5050509193909250565b63ffffffff421690565b6106cc610787565b6000826001600160701b03161161072a576040805162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b168161075f57fe5b046001600160e01b0316815250905092915050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b60008060006107a88585610859565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f3e587aafa830ed6729f6ad31bd15f244a5938c6c3dc057d4fcf2cbc0b1046987609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b031614156108ad5760405162461bcd60e51b81526004018080602001828103825260238152602001806109386023913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b0316106108cd5782846108d0565b83835b90925090506001600160a01b038216610930576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a205a45524f5f4144445245535300000000604482015290519081900360640190fd5b925092905056fe50616e63616b654c6962726172793a204944454e544943414c5f4144445245535345534578616d706c654f7261636c6553696d706c653a20494e56414c49445f544f4b454e4578616d706c654f7261636c6553696d706c653a20504552494f445f4e4f545f454c41505345444669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a26469706673582212207d10a97885b9180e0ad3ab0b14440bacb9a3073f1fd9a2db64cddc5668238e9e64736f6c6343000606003350616e63616b654c6962726172793a204944454e544943414c5f414444524553534553",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a2e6204511610066578063a2e6204514610139578063a6bb453914610143578063b4d1d7951461014b578063c5700a0214610153578063d21220a7146101745761009e565b80630dfe1681146100a35780633ddac953146100c75780635909c0d5146101055780635a3d54931461010d5780635e6aaf2c14610115575b600080fd5b6100ab61017c565b604080516001600160a01b039092168252519081900360200190f35b6100f3600480360360408110156100dd57600080fd5b506001600160a01b0381351690602001356101a0565b60408051918252519081900360200190f35b6100f36102cd565b6100f36102d3565b61011d6102d9565b604080516001600160e01b039092168252519081900360200190f35b6101416102e8565b005b61011d610420565b6100f361042f565b61015b610436565b6040805163ffffffff9092168252519081900360200190f35b6100ab610442565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316141561021e5760408051602081019091526003546001600160e01b0316815261020e90610209908463ffffffff61046616565b6104e4565b6001600160901b031690506102c7565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461028e5760405162461bcd60e51b815260040180806020018281038252602281526020018061095b6022913960400191505060405180910390fd5b60408051602081019091526004546001600160e01b031681526102bb90610209908463ffffffff61046616565b6001600160901b031690505b92915050565b60005481565b60015481565b6004546001600160e01b031681565b60008060006103167f00000000000000000000000000000000000000000000000000000000000000006104eb565b600254929550909350915063ffffffff9081168203906201518090821610156103705760405162461bcd60e51b815260040180806020018281038252602781526020018061097d6027913960400191505060405180910390fd5b60405180602001604052808263ffffffff1660005487038161038e57fe5b046001600160e01b039081169091529051600380546001600160e01b031916919092161790556040805160208101909152600154819063ffffffff8416908603816103d557fe5b046001600160e01b039081169091529051600480546001600160e01b03191691909216179055506000929092556001556002805463ffffffff191663ffffffff909216919091179055565b6003546001600160e01b031681565b6201518081565b60025463ffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b61046e610774565b600082158061049457505082516001600160e01b03168281029083828161049157fe5b04145b6104cf5760405162461bcd60e51b81526004018080602001828103825260238152602001806109a46023913960400191505060405180910390fd5b60408051602081019091529081529392505050565b5160701c90565b60008060006104f86106ba565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b15801561053357600080fd5b505afa158015610547573d6000803e3d6000fd5b505050506040513d602081101561055d57600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b1580156105a357600080fd5b505afa1580156105b7573d6000803e3d6000fd5b505050506040513d60208110156105cd57600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b15801561061957600080fd5b505afa15801561062d573d6000803e3d6000fd5b505050506040513d606081101561064357600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146106b05780840363ffffffff811661067d84866106c4565b516001600160e01b031602969096019563ffffffff811661069e85856106c4565b516001600160e01b0316029590950194505b5050509193909250565b63ffffffff421690565b6106cc610787565b6000826001600160701b03161161072a576040805162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b168161075f57fe5b046001600160e01b0316815250905092915050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b60008060006107a88585610859565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f3e587aafa830ed6729f6ad31bd15f244a5938c6c3dc057d4fcf2cbc0b1046987609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b031614156108ad5760405162461bcd60e51b81526004018080602001828103825260238152602001806109386023913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b0316106108cd5782846108d0565b83835b90925090506001600160a01b038216610930576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a205a45524f5f4144445245535300000000604482015290519081900360640190fd5b925092905056fe50616e63616b654c6962726172793a204944454e544943414c5f4144445245535345534578616d706c654f7261636c6553696d706c653a20494e56414c49445f544f4b454e4578616d706c654f7261636c6553696d706c653a20504552494f445f4e4f545f454c41505345444669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a26469706673582212207d10a97885b9180e0ad3ab0b14440bacb9a3073f1fd9a2db64cddc5668238e9e64736f6c63430006060033",
"linkReferences": {},
"deployedLinkReferences": {}
}