/
Memory.go
255 lines (215 loc) · 10.8 KB
/
Memory.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
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
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package Memory
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"
)
// Reference imports to suppress errors if they are not otherwise used.
var (
_ = errors.New
_ = big.NewInt
_ = strings.NewReader
_ = ethereum.NotFound
_ = bind.Bind
_ = common.Big1
_ = types.BloomLookup
_ = event.NewSubscription
_ = abi.ConvertType
)
// MemoryMetaData contains all meta data concerning the Memory contract.
var MemoryMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"name\":\"resStatic\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"testStaticEcrecover\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x60806040526000805460ff19166001179055348015601c57600080fd5b5060a68061002b6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c8063038d60c9146037578063ad2d9aa114603f575b600080fd5b603d605f565b005b600054604b9060ff1681565b604051901515815260200160405180910390f35b602060a06080602060015afa60005556fea2646970667358221220c4544ea533c4ffff4c27a677423b513b061c35401bc8915d3ffec8a8a3fab05f64736f6c634300080c0033",
}
// MemoryABI is the input ABI used to generate the binding from.
// Deprecated: Use MemoryMetaData.ABI instead.
var MemoryABI = MemoryMetaData.ABI
// MemoryBin is the compiled bytecode used for deploying new contracts.
// Deprecated: Use MemoryMetaData.Bin instead.
var MemoryBin = MemoryMetaData.Bin
// DeployMemory deploys a new Ethereum contract, binding an instance of Memory to it.
func DeployMemory(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Memory, error) {
parsed, err := MemoryMetaData.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(MemoryBin), backend)
if err != nil {
return common.Address{}, nil, nil, err
}
return address, tx, &Memory{MemoryCaller: MemoryCaller{contract: contract}, MemoryTransactor: MemoryTransactor{contract: contract}, MemoryFilterer: MemoryFilterer{contract: contract}}, nil
}
// Memory is an auto generated Go binding around an Ethereum contract.
type Memory struct {
MemoryCaller // Read-only binding to the contract
MemoryTransactor // Write-only binding to the contract
MemoryFilterer // Log filterer for contract events
}
// MemoryCaller is an auto generated read-only Go binding around an Ethereum contract.
type MemoryCaller struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// MemoryTransactor is an auto generated write-only Go binding around an Ethereum contract.
type MemoryTransactor struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// MemoryFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type MemoryFilterer struct {
contract *bind.BoundContract // Generic contract wrapper for the low level calls
}
// MemorySession is an auto generated Go binding around an Ethereum contract,
// with pre-set call and transact options.
type MemorySession struct {
Contract *Memory // Generic contract binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// MemoryCallerSession is an auto generated read-only Go binding around an Ethereum contract,
// with pre-set call options.
type MemoryCallerSession struct {
Contract *MemoryCaller // Generic contract caller binding to set the session for
CallOpts bind.CallOpts // Call options to use throughout this session
}
// MemoryTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
// with pre-set transact options.
type MemoryTransactorSession struct {
Contract *MemoryTransactor // Generic contract transactor binding to set the session for
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}
// MemoryRaw is an auto generated low-level Go binding around an Ethereum contract.
type MemoryRaw struct {
Contract *Memory // Generic contract binding to access the raw methods on
}
// MemoryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type MemoryCallerRaw struct {
Contract *MemoryCaller // Generic read-only contract binding to access the raw methods on
}
// MemoryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type MemoryTransactorRaw struct {
Contract *MemoryTransactor // Generic write-only contract binding to access the raw methods on
}
// NewMemory creates a new instance of Memory, bound to a specific deployed contract.
func NewMemory(address common.Address, backend bind.ContractBackend) (*Memory, error) {
contract, err := bindMemory(address, backend, backend, backend)
if err != nil {
return nil, err
}
return &Memory{MemoryCaller: MemoryCaller{contract: contract}, MemoryTransactor: MemoryTransactor{contract: contract}, MemoryFilterer: MemoryFilterer{contract: contract}}, nil
}
// NewMemoryCaller creates a new read-only instance of Memory, bound to a specific deployed contract.
func NewMemoryCaller(address common.Address, caller bind.ContractCaller) (*MemoryCaller, error) {
contract, err := bindMemory(address, caller, nil, nil)
if err != nil {
return nil, err
}
return &MemoryCaller{contract: contract}, nil
}
// NewMemoryTransactor creates a new write-only instance of Memory, bound to a specific deployed contract.
func NewMemoryTransactor(address common.Address, transactor bind.ContractTransactor) (*MemoryTransactor, error) {
contract, err := bindMemory(address, nil, transactor, nil)
if err != nil {
return nil, err
}
return &MemoryTransactor{contract: contract}, nil
}
// NewMemoryFilterer creates a new log filterer instance of Memory, bound to a specific deployed contract.
func NewMemoryFilterer(address common.Address, filterer bind.ContractFilterer) (*MemoryFilterer, error) {
contract, err := bindMemory(address, nil, nil, filterer)
if err != nil {
return nil, err
}
return &MemoryFilterer{contract: contract}, nil
}
// bindMemory binds a generic wrapper to an already deployed contract.
func bindMemory(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
parsed, err := MemoryMetaData.GetAbi()
if err != nil {
return nil, err
}
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Memory *MemoryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Memory.Contract.MemoryCaller.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Memory *MemoryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Memory.Contract.MemoryTransactor.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Memory *MemoryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Memory.Contract.MemoryTransactor.contract.Transact(opts, method, params...)
}
// Call invokes the (constant) contract method with params as input values and
// sets the output to result. The result type might be a single field for simple
// returns, a slice of interfaces for anonymous returns and a struct for named
// returns.
func (_Memory *MemoryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
return _Memory.Contract.contract.Call(opts, result, method, params...)
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
func (_Memory *MemoryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Memory.Contract.contract.Transfer(opts)
}
// Transact invokes the (paid) contract method with params as input values.
func (_Memory *MemoryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _Memory.Contract.contract.Transact(opts, method, params...)
}
// ResStatic is a free data retrieval call binding the contract method 0xad2d9aa1.
//
// Solidity: function resStatic() view returns(bool)
func (_Memory *MemoryCaller) ResStatic(opts *bind.CallOpts) (bool, error) {
var out []interface{}
err := _Memory.contract.Call(opts, &out, "resStatic")
if err != nil {
return *new(bool), err
}
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
return out0, err
}
// ResStatic is a free data retrieval call binding the contract method 0xad2d9aa1.
//
// Solidity: function resStatic() view returns(bool)
func (_Memory *MemorySession) ResStatic() (bool, error) {
return _Memory.Contract.ResStatic(&_Memory.CallOpts)
}
// ResStatic is a free data retrieval call binding the contract method 0xad2d9aa1.
//
// Solidity: function resStatic() view returns(bool)
func (_Memory *MemoryCallerSession) ResStatic() (bool, error) {
return _Memory.Contract.ResStatic(&_Memory.CallOpts)
}
// TestStaticEcrecover is a paid mutator transaction binding the contract method 0x038d60c9.
//
// Solidity: function testStaticEcrecover() returns()
func (_Memory *MemoryTransactor) TestStaticEcrecover(opts *bind.TransactOpts) (*types.Transaction, error) {
return _Memory.contract.Transact(opts, "testStaticEcrecover")
}
// TestStaticEcrecover is a paid mutator transaction binding the contract method 0x038d60c9.
//
// Solidity: function testStaticEcrecover() returns()
func (_Memory *MemorySession) TestStaticEcrecover() (*types.Transaction, error) {
return _Memory.Contract.TestStaticEcrecover(&_Memory.TransactOpts)
}
// TestStaticEcrecover is a paid mutator transaction binding the contract method 0x038d60c9.
//
// Solidity: function testStaticEcrecover() returns()
func (_Memory *MemoryTransactorSession) TestStaticEcrecover() (*types.Transaction, error) {
return _Memory.Contract.TestStaticEcrecover(&_Memory.TransactOpts)
}