-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
mock_aggregator_proxy.go
215 lines (171 loc) · 8.95 KB
/
mock_aggregator_proxy.go
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
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package mock_aggregator_proxy
import (
"errors"
"math/big"
"strings"
ethereum "github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
)
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
)
var MockAggregatorProxyMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"aggregator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"aggregator\",\"type\":\"address\"}],\"name\":\"updateAggregator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b5060405161019138038061019183398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b60ff806100926000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c8063245a7bfc1460375780639fe4ee47146063575b600080fd5b6000546040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60b5606e36600460b7565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b005b60006020828403121560c857600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811460eb57600080fd5b939250505056fea164736f6c6343000806000a",
}
var MockAggregatorProxyABI = MockAggregatorProxyMetaData.ABI
var MockAggregatorProxyBin = MockAggregatorProxyMetaData.Bin
func DeployMockAggregatorProxy(auth *bind.TransactOpts, backend bind.ContractBackend, aggregator common.Address) (common.Address, *types.Transaction, *MockAggregatorProxy, error) {
parsed, err := MockAggregatorProxyMetaData.GetAbi()
if err != nil {
return common.Address{}, nil, nil, err
}
if parsed == nil {
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
}
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MockAggregatorProxyBin), backend, aggregator)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &MockAggregatorProxy{MockAggregatorProxyCaller: MockAggregatorProxyCaller{contract: contract}, MockAggregatorProxyTransactor: MockAggregatorProxyTransactor{contract: contract}, MockAggregatorProxyFilterer: MockAggregatorProxyFilterer{contract: contract}}, nil
}
type MockAggregatorProxy struct {
address common.Address
abi abi.ABI
MockAggregatorProxyCaller
MockAggregatorProxyTransactor
MockAggregatorProxyFilterer
}
type MockAggregatorProxyCaller struct {
contract *bind.BoundContract
}
type MockAggregatorProxyTransactor struct {
contract *bind.BoundContract
}
type MockAggregatorProxyFilterer struct {
contract *bind.BoundContract
}
type MockAggregatorProxySession struct {
Contract *MockAggregatorProxy
CallOpts bind.CallOpts
TransactOpts bind.TransactOpts
}
type MockAggregatorProxyCallerSession struct {
Contract *MockAggregatorProxyCaller
CallOpts bind.CallOpts
}
type MockAggregatorProxyTransactorSession struct {
Contract *MockAggregatorProxyTransactor
TransactOpts bind.TransactOpts
}
type MockAggregatorProxyRaw struct {
Contract *MockAggregatorProxy
}
type MockAggregatorProxyCallerRaw struct {
Contract *MockAggregatorProxyCaller
}
type MockAggregatorProxyTransactorRaw struct {
Contract *MockAggregatorProxyTransactor
}
func NewMockAggregatorProxy(address common.Address, backend bind.ContractBackend) (*MockAggregatorProxy, error) {
abi, err := abi.JSON(strings.NewReader(MockAggregatorProxyABI))
if err != nil {
return nil, err
}
contract, err := bindMockAggregatorProxy(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &MockAggregatorProxy{address: address, abi: abi, MockAggregatorProxyCaller: MockAggregatorProxyCaller{contract: contract}, MockAggregatorProxyTransactor: MockAggregatorProxyTransactor{contract: contract}, MockAggregatorProxyFilterer: MockAggregatorProxyFilterer{contract: contract}}, nil
}
func NewMockAggregatorProxyCaller(address common.Address, caller bind.ContractCaller) (*MockAggregatorProxyCaller, error) {
contract, err := bindMockAggregatorProxy(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &MockAggregatorProxyCaller{contract: contract}, nil
}
func NewMockAggregatorProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*MockAggregatorProxyTransactor, error) {
contract, err := bindMockAggregatorProxy(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &MockAggregatorProxyTransactor{contract: contract}, nil
}
func NewMockAggregatorProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*MockAggregatorProxyFilterer, error) {
contract, err := bindMockAggregatorProxy(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &MockAggregatorProxyFilterer{contract: contract}, nil
}
func bindMockAggregatorProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := abi.JSON(strings.NewReader(MockAggregatorProxyABI))
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
}
func (_MockAggregatorProxy *MockAggregatorProxyRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _MockAggregatorProxy.Contract.MockAggregatorProxyCaller.contract.Call(opts, result, method, params...)
}
func (_MockAggregatorProxy *MockAggregatorProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _MockAggregatorProxy.Contract.MockAggregatorProxyTransactor.contract.Transfer(opts)
}
func (_MockAggregatorProxy *MockAggregatorProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _MockAggregatorProxy.Contract.MockAggregatorProxyTransactor.contract.Transact(opts, method, params...)
}
func (_MockAggregatorProxy *MockAggregatorProxyCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _MockAggregatorProxy.Contract.contract.Call(opts, result, method, params...)
}
func (_MockAggregatorProxy *MockAggregatorProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _MockAggregatorProxy.Contract.contract.Transfer(opts)
}
func (_MockAggregatorProxy *MockAggregatorProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _MockAggregatorProxy.Contract.contract.Transact(opts, method, params...)
}
func (_MockAggregatorProxy *MockAggregatorProxyCaller) Aggregator(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _MockAggregatorProxy.contract.Call(opts, &out, "aggregator")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
func (_MockAggregatorProxy *MockAggregatorProxySession) Aggregator() (common.Address, error) {
return _MockAggregatorProxy.Contract.Aggregator(&_MockAggregatorProxy.CallOpts)
}
func (_MockAggregatorProxy *MockAggregatorProxyCallerSession) Aggregator() (common.Address, error) {
return _MockAggregatorProxy.Contract.Aggregator(&_MockAggregatorProxy.CallOpts)
}
func (_MockAggregatorProxy *MockAggregatorProxyTransactor) UpdateAggregator(opts *bind.TransactOpts, aggregator common.Address) (*types.Transaction, error) {
return _MockAggregatorProxy.contract.Transact(opts, "updateAggregator", aggregator)
}
func (_MockAggregatorProxy *MockAggregatorProxySession) UpdateAggregator(aggregator common.Address) (*types.Transaction, error) {
return _MockAggregatorProxy.Contract.UpdateAggregator(&_MockAggregatorProxy.TransactOpts, aggregator)
}
func (_MockAggregatorProxy *MockAggregatorProxyTransactorSession) UpdateAggregator(aggregator common.Address) (*types.Transaction, error) {
return _MockAggregatorProxy.Contract.UpdateAggregator(&_MockAggregatorProxy.TransactOpts, aggregator)
}
func (_MockAggregatorProxy *MockAggregatorProxy) Address() common.Address {
return _MockAggregatorProxy.address
}
type MockAggregatorProxyInterface interface {
Aggregator(opts *bind.CallOpts) (common.Address, error)
UpdateAggregator(opts *bind.TransactOpts, aggregator common.Address) (*types.Transaction, error)
Address() common.Address
}