-
Notifications
You must be signed in to change notification settings - Fork 39
/
OmniVotingEscrowAdaptor.json
270 lines (270 loc) · 20.8 KB
/
OmniVotingEscrowAdaptor.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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
{
"_format": "hh-sol-artifact-1",
"contractName": "OmniVotingEscrowAdaptor",
"sourceName": "contracts/OmniVotingEscrowAdaptor.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract IVault",
"name": "vault",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes",
"name": "newAdapterParams",
"type": "bytes"
}
],
"name": "AdapterParamsUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "contract IOmniVotingEscrow",
"name": "newOmniVotingEscrow",
"type": "address"
}
],
"name": "OmniVotingEscrowUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "newUseZero",
"type": "bool"
}
],
"name": "UseZeroUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "newZeroPaymentAddress",
"type": "address"
}
],
"name": "ZeroPaymentAddressUpdated",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint16",
"name": "_dstChainId",
"type": "uint16"
}
],
"name": "estimateSendUserBalance",
"outputs": [
{
"internalType": "uint256",
"name": "nativeFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "zroFee",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "selector",
"type": "bytes4"
}
],
"name": "getActionId",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAdapterParams",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAuthorizer",
"outputs": [
{
"internalType": "contract IAuthorizer",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getOmniVotingEscrow",
"outputs": [
{
"internalType": "contract IOmniVotingEscrow",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getUseZero",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getVault",
"outputs": [
{
"internalType": "contract IVault",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getZeroPaymentAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_user",
"type": "address"
},
{
"internalType": "uint16",
"name": "_dstChainId",
"type": "uint16"
},
{
"internalType": "address payable",
"name": "_refundAddress",
"type": "address"
}
],
"name": "sendUserBalance",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "adapterParams",
"type": "bytes"
}
],
"name": "setAdapterParams",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract IOmniVotingEscrow",
"name": "omniVotingEscrow",
"type": "address"
}
],
"name": "setOmniVotingEscrow",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bool",
"name": "useZro",
"type": "bool"
}
],
"name": "setUseZero",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "paymentAddress",
"type": "address"
}
],
"name": "setZeroPaymentAddress",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60c060405234801561001057600080fd5b50604051610f77380380610f778339818101604052602081101561003357600080fd5b5051306080819052606082901b6001600160601b03191660a052906001600160a01b0316610f03610074600039806108b35250806108465250610f036000f3fe6080604052600436106100d15760003560e01c806357fb83451161007f578063aaabadc511610059578063aaabadc514610304578063d56b6a4a14610319578063e241e489146103cc578063ecc4c5831461040c576100d1565b806357fb83451461024a578063851c1bb3146102915780638d928af8146102ef576100d1565b8063299fd6fc116100b0578063299fd6fc1461017f5780634cfde448146101ab578063550f2f7f14610235576100d1565b8062986fe0146100d65780630943b7b8146100ff57806309d401f91461013d575b600080fd5b3480156100e257600080fd5b506100eb610453565b604080519115158252519081900360200190f35b34801561010b57600080fd5b50610114610474565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014957600080fd5b5061017d6004803603602081101561016057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610490565b005b34801561018b57600080fd5b5061017d600480360360208110156101a257600080fd5b50351515610505565b3480156101b757600080fd5b506101c061058c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101fa5781810151838201526020016101e2565b50505050905090810190601f1680156102275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024157600080fd5b5061011461063f565b61017d6004803603606081101561026057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169161ffff602082013516916040909101351661065b565b34801561029d57600080fd5b506102dd600480360360208110156102b457600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610840565b60408051918252519081900360200190f35b3480156102fb57600080fd5b506101146108b1565b34801561031057600080fd5b506101146108d5565b34801561032557600080fd5b5061017d6004803603602081101561033c57600080fd5b81019060208101813564010000000081111561035757600080fd5b82018360208201111561036957600080fd5b8035906020019184600183028401116401000000008311171561038b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610955945050505050565b3480156103d857600080fd5b5061017d600480360360208110156103ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a0d565b34801561041857600080fd5b5061043a6004803603602081101561042f57600080fd5b503561ffff16610a84565b6040805192835260208301919091528051918290030190f35b60005474010000000000000000000000000000000000000000900460ff1690565b60025473ffffffffffffffffffffffffffffffffffffffff1690565b610498610c87565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917fe8bb344458d00606347f5b2f5b6f6de2a6f0beeb7aa331c6b90549adc7c093c091a250565b61050d610c87565b600080548215157401000000000000000000000000000000000000000081027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9092169190911790915560408051918252517fc22a8ea88c11878d4bbc93fc8deeaae9120fa8540716f449ba01e0b79a1b020c9181900360200190a150565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106355780601f1061060a57610100808354040283529160200191610635565b820191906000526020600020905b81548152906001019060200180831161061857829003601f168201915b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600061066561063f565b905073ffffffffffffffffffffffffffffffffffffffff81166106e957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4f6d6e6920766f74696e6720657363726f77206e6f7420736574000000000000604482015290519081900360640190fd5b600280546040517f4a75948900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830190815261ffff8816602484015286821660448401529281166064830181905260a060848401908152600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818316156101000201169690960460a4850181905292871695634a7594899534958c958c958c9590949392909160c490910190849080156107fe5780601f106107d3576101008083540402835291602001916107fe565b820191906000526020600020905b8154815290600101906020018083116107e157829003601f168201915b505096505050505050506000604051808303818588803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b505050505050505050565b604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffff000000000000000000000000000000000000000000000000000000008416828401528251602481840301815260449092019092528051910120919050565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006108df6108b1565b73ffffffffffffffffffffffffffffffffffffffff1663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b15801561092457600080fd5b505afa158015610938573d6000803e3d6000fd5b505050506040513d602081101561094e57600080fd5b5051905090565b61095d610c87565b8051610970906001906020840190610e3a565b507f89eee6f0981b5afc30154f85e504f26bc7b53645844dcb29588946e5cf35d9f4816040518080602001828103825283818151815260200191508051906020019080838360005b838110156109d05781810151838201526020016109b8565b50505050905090810190601f1680156109fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390a150565b610a15610c87565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa7bee2b81c8995421ba22c824cb2b9a80372d577f8220162fe395c089a2782ca90600090a250565b6000806000610a9161063f565b905073ffffffffffffffffffffffffffffffffffffffff8116610b1557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4f6d6e6920766f74696e6720657363726f77206e6f7420736574000000000000604482015290519081900360640190fd5b6000546040517f65d092d000000000000000000000000000000000000000000000000000000000815261ffff8616600482019081527401000000000000000000000000000000000000000090920460ff16801515602483015260606044830190815260018054600261010082841615027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909116046064850181905273ffffffffffffffffffffffffffffffffffffffff8716956365d092d0958b9594919260849091019084908015610c2a5780601f10610bff57610100808354040283529160200191610c2a565b820191906000526020600020905b815481529060010190602001808311610c0d57829003601f168201915b5050945050505050604080518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6040811015610c7357600080fd5b508051602090910151909350915050915091565b6000610cb66000357fffffffff0000000000000000000000000000000000000000000000000000000016610840565b9050610ccd610cc58233610cd0565b610191610d99565b50565b6000610cda6108d5565b73ffffffffffffffffffffffffffffffffffffffff16639be2a8848484306040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060206040518083038186803b158015610d6657600080fd5b505afa158015610d7a573d6000803e3d6000fd5b505050506040513d6020811015610d9057600080fd5b50519392505050565b81610da757610da781610dab565b5050565b7f08c379a000000000000000000000000000000000000000000000000000000000600090815260206004526007602452600a808304818106603090810160081b83860601918390049283060160101b016642414c230000300160c81b604452610ccd917f42414c0000000000000000000000000000000000000000000000000000000000906242414c90606490fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610e7b57805160ff1916838001178555610ea8565b82800160010185558215610ea8579182015b82811115610ea8578251825591602001919060010190610e8d565b50610eb4929150610eb8565b5090565b5b80821115610eb45760008155600101610eb956fea26469706673582212208d4263c41355faae676cee10a526b47ebb5f554edc4fbce57f8f5a1f93d5119864736f6c63430007010033",
"deployedBytecode": "0x6080604052600436106100d15760003560e01c806357fb83451161007f578063aaabadc511610059578063aaabadc514610304578063d56b6a4a14610319578063e241e489146103cc578063ecc4c5831461040c576100d1565b806357fb83451461024a578063851c1bb3146102915780638d928af8146102ef576100d1565b8063299fd6fc116100b0578063299fd6fc1461017f5780634cfde448146101ab578063550f2f7f14610235576100d1565b8062986fe0146100d65780630943b7b8146100ff57806309d401f91461013d575b600080fd5b3480156100e257600080fd5b506100eb610453565b604080519115158252519081900360200190f35b34801561010b57600080fd5b50610114610474565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561014957600080fd5b5061017d6004803603602081101561016057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610490565b005b34801561018b57600080fd5b5061017d600480360360208110156101a257600080fd5b50351515610505565b3480156101b757600080fd5b506101c061058c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101fa5781810151838201526020016101e2565b50505050905090810190601f1680156102275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024157600080fd5b5061011461063f565b61017d6004803603606081101561026057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169161ffff602082013516916040909101351661065b565b34801561029d57600080fd5b506102dd600480360360208110156102b457600080fd5b50357fffffffff0000000000000000000000000000000000000000000000000000000016610840565b60408051918252519081900360200190f35b3480156102fb57600080fd5b506101146108b1565b34801561031057600080fd5b506101146108d5565b34801561032557600080fd5b5061017d6004803603602081101561033c57600080fd5b81019060208101813564010000000081111561035757600080fd5b82018360208201111561036957600080fd5b8035906020019184600183028401116401000000008311171561038b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610955945050505050565b3480156103d857600080fd5b5061017d600480360360208110156103ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a0d565b34801561041857600080fd5b5061043a6004803603602081101561042f57600080fd5b503561ffff16610a84565b6040805192835260208301919091528051918290030190f35b60005474010000000000000000000000000000000000000000900460ff1690565b60025473ffffffffffffffffffffffffffffffffffffffff1690565b610498610c87565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917fe8bb344458d00606347f5b2f5b6f6de2a6f0beeb7aa331c6b90549adc7c093c091a250565b61050d610c87565b600080548215157401000000000000000000000000000000000000000081027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9092169190911790915560408051918252517fc22a8ea88c11878d4bbc93fc8deeaae9120fa8540716f449ba01e0b79a1b020c9181900360200190a150565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156106355780601f1061060a57610100808354040283529160200191610635565b820191906000526020600020905b81548152906001019060200180831161061857829003601f168201915b5050505050905090565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600061066561063f565b905073ffffffffffffffffffffffffffffffffffffffff81166106e957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4f6d6e6920766f74696e6720657363726f77206e6f7420736574000000000000604482015290519081900360640190fd5b600280546040517f4a75948900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830190815261ffff8816602484015286821660448401529281166064830181905260a060848401908152600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818316156101000201169690960460a4850181905292871695634a7594899534958c958c958c9590949392909160c490910190849080156107fe5780601f106107d3576101008083540402835291602001916107fe565b820191906000526020600020905b8154815290600101906020018083116107e157829003601f168201915b505096505050505050506000604051808303818588803b15801561082157600080fd5b505af1158015610835573d6000803e3d6000fd5b505050505050505050565b604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527fffffffff000000000000000000000000000000000000000000000000000000008416828401528251602481840301815260449092019092528051910120919050565b7f000000000000000000000000000000000000000000000000000000000000000090565b60006108df6108b1565b73ffffffffffffffffffffffffffffffffffffffff1663aaabadc56040518163ffffffff1660e01b815260040160206040518083038186803b15801561092457600080fd5b505afa158015610938573d6000803e3d6000fd5b505050506040513d602081101561094e57600080fd5b5051905090565b61095d610c87565b8051610970906001906020840190610e3a565b507f89eee6f0981b5afc30154f85e504f26bc7b53645844dcb29588946e5cf35d9f4816040518080602001828103825283818151815260200191508051906020019080838360005b838110156109d05781810151838201526020016109b8565b50505050905090810190601f1680156109fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390a150565b610a15610c87565b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517fa7bee2b81c8995421ba22c824cb2b9a80372d577f8220162fe395c089a2782ca90600090a250565b6000806000610a9161063f565b905073ffffffffffffffffffffffffffffffffffffffff8116610b1557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4f6d6e6920766f74696e6720657363726f77206e6f7420736574000000000000604482015290519081900360640190fd5b6000546040517f65d092d000000000000000000000000000000000000000000000000000000000815261ffff8616600482019081527401000000000000000000000000000000000000000090920460ff16801515602483015260606044830190815260018054600261010082841615027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909116046064850181905273ffffffffffffffffffffffffffffffffffffffff8716956365d092d0958b9594919260849091019084908015610c2a5780601f10610bff57610100808354040283529160200191610c2a565b820191906000526020600020905b815481529060010190602001808311610c0d57829003601f168201915b5050945050505050604080518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6040811015610c7357600080fd5b508051602090910151909350915050915091565b6000610cb66000357fffffffff0000000000000000000000000000000000000000000000000000000016610840565b9050610ccd610cc58233610cd0565b610191610d99565b50565b6000610cda6108d5565b73ffffffffffffffffffffffffffffffffffffffff16639be2a8848484306040518463ffffffff1660e01b8152600401808481526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060206040518083038186803b158015610d6657600080fd5b505afa158015610d7a573d6000803e3d6000fd5b505050506040513d6020811015610d9057600080fd5b50519392505050565b81610da757610da781610dab565b5050565b7f08c379a000000000000000000000000000000000000000000000000000000000600090815260206004526007602452600a808304818106603090810160081b83860601918390049283060160101b016642414c230000300160c81b604452610ccd917f42414c0000000000000000000000000000000000000000000000000000000000906242414c90606490fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610e7b57805160ff1916838001178555610ea8565b82800160010185558215610ea8579182015b82811115610ea8578251825591602001919060010190610e8d565b50610eb4929150610eb8565b5090565b5b80821115610eb45760008155600101610eb956fea26469706673582212208d4263c41355faae676cee10a526b47ebb5f554edc4fbce57f8f5a1f93d5119864736f6c63430007010033",
"linkReferences": {},
"deployedLinkReferences": {}
}