blobstream-contracts 0.0.1-security → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of blobstream-contracts might be problematic. Click here for more details.
- package/.codecov.yml +51 -0
- package/.github/CODEOWNERS +7 -0
- package/.github/dependabot.yml +18 -0
- package/.github/workflows/code-analysis.yml +41 -0
- package/.github/workflows/contract-inheritance-check.yml +28 -0
- package/.github/workflows/go-check.yml +25 -0
- package/.github/workflows/labels.yml +19 -0
- package/.github/workflows/lint.yml +37 -0
- package/.github/workflows/tests.yml +72 -0
- package/.gitmodules +12 -0
- package/.golangci.yml +64 -0
- package/.markdownlint.yaml +5 -0
- package/.markdownlint.yml +4 -0
- package/.markdownlintignore +1 -0
- package/.prettierrc.json +11 -0
- package/LICENSE +201 -0
- package/Makefile +18 -0
- package/README.md +102 -5
- package/docs/inclusion-proofs.md +69 -0
- package/foundry.toml +4 -0
- package/go.mod +34 -0
- package/go.sum +212 -0
- package/hardhat.config.ts +46 -0
- package/index.js +94 -0
- package/package.json +31 -3
- package/remappings.txt +6 -0
- package/scripts/Dockerfile_Environment +39 -0
- package/scripts/deploy.ts +12 -0
- package/scripts/gen.sh +34 -0
- package/scripts/upgradability_check.sh +22 -0
- package/slither.config.json +3 -0
- package/src/Blobstream.sol +366 -0
- package/src/Constants.sol +10 -0
- package/src/DataRootTuple.sol +15 -0
- package/src/IDAOracle.sol +18 -0
- package/src/lib/tree/Constants.sol +23 -0
- package/src/lib/tree/Types.sol +37 -0
- package/src/lib/tree/Utils.sol +106 -0
- package/src/lib/tree/binary/BinaryMerkleMultiproof.sol +12 -0
- package/src/lib/tree/binary/BinaryMerkleProof.sol +12 -0
- package/src/lib/tree/binary/BinaryMerkleTree.sol +256 -0
- package/src/lib/tree/binary/TreeHasher.sol +23 -0
- package/src/lib/tree/binary/test/BinaryMerkleTree.t.sol +365 -0
- package/src/lib/tree/binary/test/TreeHasher.t.sol +40 -0
- package/src/lib/tree/namespace/NamespaceMerkleMultiproof.sol +14 -0
- package/src/lib/tree/namespace/NamespaceMerkleProof.sol +14 -0
- package/src/lib/tree/namespace/NamespaceMerkleTree.sol +306 -0
- package/src/lib/tree/namespace/NamespaceNode.sol +23 -0
- package/src/lib/tree/namespace/TreeHasher.sol +69 -0
- package/src/lib/tree/namespace/test/NamespaceMerkleMultiproof.t.sol +108 -0
- package/src/lib/tree/namespace/test/NamespaceMerkleTree.t.sol +644 -0
- package/src/lib/tree/namespace/test/TreeHasher.t.sol +66 -0
- package/src/lib/tree/test/Utils.t.sol +48 -0
- package/src/lib/tree/test/blob.dat +0 -0
- package/src/lib/tree/test/header.dat +0 -0
- package/src/lib/tree/test/proofs.json +1 -0
- package/src/lib/verifier/DAVerifier.sol +328 -0
- package/src/lib/verifier/test/DAVerifier.t.sol +396 -0
- package/src/lib/verifier/test/RollupInclusionProofs.t.sol +589 -0
- package/src/test/Blobstream.t.sol +200 -0
- package/src/test/BlobstreamBenchmark.t.sol +137 -0
- package/tsconfig.json +11 -0
- package/wrappers/Blobstream.sol/wrapper.go +1325 -0
- package/wrappers/ERC1967Proxy.sol/wrapper.go +668 -0
@@ -0,0 +1,668 @@
|
|
1
|
+
// Code generated - DO NOT EDIT.
|
2
|
+
// This file is a generated binding and any manual changes will be lost.
|
3
|
+
|
4
|
+
package wrappers
|
5
|
+
|
6
|
+
import (
|
7
|
+
"errors"
|
8
|
+
"math/big"
|
9
|
+
"strings"
|
10
|
+
|
11
|
+
ethereum "github.com/ethereum/go-ethereum"
|
12
|
+
"github.com/ethereum/go-ethereum/accounts/abi"
|
13
|
+
"github.com/ethereum/go-ethereum/accounts/abi/bind"
|
14
|
+
"github.com/ethereum/go-ethereum/common"
|
15
|
+
"github.com/ethereum/go-ethereum/core/types"
|
16
|
+
"github.com/ethereum/go-ethereum/event"
|
17
|
+
)
|
18
|
+
|
19
|
+
// Reference imports to suppress errors if they are not otherwise used.
|
20
|
+
var (
|
21
|
+
_ = errors.New
|
22
|
+
_ = big.NewInt
|
23
|
+
_ = strings.NewReader
|
24
|
+
_ = ethereum.NotFound
|
25
|
+
_ = bind.Bind
|
26
|
+
_ = common.Big1
|
27
|
+
_ = types.BloomLookup
|
28
|
+
_ = event.NewSubscription
|
29
|
+
_ = abi.ConvertType
|
30
|
+
)
|
31
|
+
|
32
|
+
// WrappersMetaData contains all meta data concerning the Wrappers contract.
|
33
|
+
var WrappersMetaData = &bind.MetaData{
|
34
|
+
ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"_logic\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"payable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"event\",\"name\":\"AdminChanged\",\"inputs\":[{\"name\":\"previousAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"newAdmin\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BeaconUpgraded\",\"inputs\":[{\"name\":\"beacon\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false}]",
|
35
|
+
Bin: "0x608060405261001561000f6101b5565b906102f9565b61001d61002b565b61010c610853823961010c90f35b60405190565b601f801991011690565b634e487b7160e01b5f52604160045260245ffd5b9061005990610031565b810190811060018060401b0382111761007157604052565b61003b565b9061008961008261002b565b928361004f565b565b5f80fd5b5f80fd5b60018060a01b031690565b6100a790610093565b90565b6100b38161009e565b036100ba57565b5f80fd5b905051906100cb826100aa565b565b5f80fd5b5f80fd5b60018060401b0381116100f1576100ed602091610031565b0190565b61003b565b5f5b838110610108575050905f910152565b8060209183015181850152016100f8565b9092919261012e610129826100d5565b610076565b9381855260208501908284011161014a57610148926100f6565b565b6100d1565b9080601f8301121561016d5781602061016a93519101610119565b90565b6100cd565b9190916040818403126101b05761018b835f83016100be565b92602082015160018060401b0381116101ab576101a8920161014f565b90565b61008f565b61008b565b6101d361095f803803806101c881610076565b928339810190610172565b9091565b90565b90565b5f1b90565b6101f66101f16101fb926101d7565b6101dd565b6101da565b90565b6102277f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6101e2565b90565b5f1c90565b90565b90565b61024961024461024e9261022f565b610232565b61022f565b90565b61025d6102629161022a565b610235565b90565b90565b61027c61027761028192610265565b610232565b61022f565b90565b634e487b7160e01b5f52601160045260245ffd5b6102a76102ad9193929361022f565b9261022f565b82039182116102b857565b610284565b6102d16102cc6102d69261022f565b6101dd565b6101da565b90565b634e487b7160e01b5f52600160045260245ffd5b156102f457565b6102d9565b9061036c916103646103096101fe565b61035e61035861035361034e61033e7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610251565b6103486001610268565b90610298565b6102bd565b6101da565b916101da565b146102ed565b905f91610391565b565b5190565b90565b61038961038461038e92610372565b610232565b61022f565b90565b9161039b8361041b565b6103a48261036e565b6103b66103b05f610375565b9161022f565b119081156103da575b506103c9575b5050565b6103d291610514565b505f806103c5565b90505f6103bf565b6103f66103f16103fb92610093565b610232565b610093565b90565b610407906103e2565b90565b610413906103fe565b90565b5f0190565b61042481610623565b61044e7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9161040a565b9061045761002b565b8061046181610416565b0390a2565b606090565b60018060401b03811161048757610483602091610031565b0190565b61003b565b9061049e6104998361046b565b610076565b918252565b60207f206661696c656400000000000000000000000000000000000000000000000000917f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c5f8201520152565b6104fa602761048c565b90610507602083016104a3565b565b6105116104f0565b90565b9061053191610521610466565b509061052b610509565b91610739565b90565b60209181520190565b60207f6f74206120636f6e747261637400000000000000000000000000000000000000917f455243313936373a206e657720696d706c656d656e746174696f6e206973206e5f8201520152565b610597602d604092610534565b6105a08161053d565b0190565b6105b99060208101905f81830391015261058a565b90565b156105c357565b6105cb61002b565b62461bcd60e51b8152806105e1600482016105a4565b0390fd5b906105f660018060a01b03916101dd565b9181191691161790565b90565b9061061861061361061f9261040a565b610600565b82546105e5565b9055565b61064f906106386106338261077c565b6105bc565b5f6106496106446101fe565b61079c565b01610603565b565b60207f6e74726163740000000000000000000000000000000000000000000000000000917f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f5f8201520152565b6106ab6026604092610534565b6106b481610651565b0190565b6106cd9060208101905f81830391015261069e565b90565b156106d757565b6106df61002b565b62461bcd60e51b8152806106f5600482016106b8565b0390fd5b9061070b610706836100d5565b610076565b918252565b3d5f1461072b576107203d6106f9565b903d5f602084013e5b565b610733610466565b90610729565b5f61077593928192610749610466565b5061075b6107568261077c565b6106d0565b90602081019051915af49061076e610710565b90916107ec565b90565b5f90565b610784610778565b503b6107986107925f610375565b9161022f565b1190565b90565b5190565b6107c26107cb6020936107d0936107b98161079f565b93848093610534565b958691016100f6565b610031565b0190565b6107e99160208201915f8184039101526107a3565b90565b9190916107f7610466565b505f14610802575090565b61080b8261036e565b61081d6108175f610375565b9161022f565b115f1461082d5750805190602001fd5b61084e9061083961002b565b91829162461bcd60e51b8352600483016107d4565b0390fdfe6080604052600a6012565b6022565b5f90565b6018600e565b50601f60b5565b90565b5f8091368280378136915af43d5f803e5f14603b573d5ff35b3d5ffd5b90565b90565b5f1b90565b60596055605d92603f565b6045565b6042565b90565b60877f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc604a565b90565b5f1c90565b60018060a01b031690565b60a360a791608a565b608f565b90565b60b29054609a565b90565b60bb600e565b5060d05f60cb60c76060565b60d3565b0160aa565b90565b9056fea2646970667358221220d931939e53377533841dcd2138196534e48e81e93470d07d5a0cbd05246a364164736f6c63430008160033",
|
36
|
+
}
|
37
|
+
|
38
|
+
// WrappersABI is the input ABI used to generate the binding from.
|
39
|
+
// Deprecated: Use WrappersMetaData.ABI instead.
|
40
|
+
var WrappersABI = WrappersMetaData.ABI
|
41
|
+
|
42
|
+
// WrappersBin is the compiled bytecode used for deploying new contracts.
|
43
|
+
// Deprecated: Use WrappersMetaData.Bin instead.
|
44
|
+
var WrappersBin = WrappersMetaData.Bin
|
45
|
+
|
46
|
+
// DeployWrappers deploys a new Ethereum contract, binding an instance of Wrappers to it.
|
47
|
+
func DeployWrappers(auth *bind.TransactOpts, backend bind.ContractBackend, _logic common.Address, _data []byte) (common.Address, *types.Transaction, *Wrappers, error) {
|
48
|
+
parsed, err := WrappersMetaData.GetAbi()
|
49
|
+
if err != nil {
|
50
|
+
return common.Address{}, nil, nil, err
|
51
|
+
}
|
52
|
+
if parsed == nil {
|
53
|
+
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
|
54
|
+
}
|
55
|
+
|
56
|
+
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(WrappersBin), backend, _logic, _data)
|
57
|
+
if err != nil {
|
58
|
+
return common.Address{}, nil, nil, err
|
59
|
+
}
|
60
|
+
return address, tx, &Wrappers{WrappersCaller: WrappersCaller{contract: contract}, WrappersTransactor: WrappersTransactor{contract: contract}, WrappersFilterer: WrappersFilterer{contract: contract}}, nil
|
61
|
+
}
|
62
|
+
|
63
|
+
// Wrappers is an auto generated Go binding around an Ethereum contract.
|
64
|
+
type Wrappers struct {
|
65
|
+
WrappersCaller // Read-only binding to the contract
|
66
|
+
WrappersTransactor // Write-only binding to the contract
|
67
|
+
WrappersFilterer // Log filterer for contract events
|
68
|
+
}
|
69
|
+
|
70
|
+
// WrappersCaller is an auto generated read-only Go binding around an Ethereum contract.
|
71
|
+
type WrappersCaller struct {
|
72
|
+
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
73
|
+
}
|
74
|
+
|
75
|
+
// WrappersTransactor is an auto generated write-only Go binding around an Ethereum contract.
|
76
|
+
type WrappersTransactor struct {
|
77
|
+
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
78
|
+
}
|
79
|
+
|
80
|
+
// WrappersFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
|
81
|
+
type WrappersFilterer struct {
|
82
|
+
contract *bind.BoundContract // Generic contract wrapper for the low level calls
|
83
|
+
}
|
84
|
+
|
85
|
+
// WrappersSession is an auto generated Go binding around an Ethereum contract,
|
86
|
+
// with pre-set call and transact options.
|
87
|
+
type WrappersSession struct {
|
88
|
+
Contract *Wrappers // Generic contract binding to set the session for
|
89
|
+
CallOpts bind.CallOpts // Call options to use throughout this session
|
90
|
+
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
91
|
+
}
|
92
|
+
|
93
|
+
// WrappersCallerSession is an auto generated read-only Go binding around an Ethereum contract,
|
94
|
+
// with pre-set call options.
|
95
|
+
type WrappersCallerSession struct {
|
96
|
+
Contract *WrappersCaller // Generic contract caller binding to set the session for
|
97
|
+
CallOpts bind.CallOpts // Call options to use throughout this session
|
98
|
+
}
|
99
|
+
|
100
|
+
// WrappersTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
|
101
|
+
// with pre-set transact options.
|
102
|
+
type WrappersTransactorSession struct {
|
103
|
+
Contract *WrappersTransactor // Generic contract transactor binding to set the session for
|
104
|
+
TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
|
105
|
+
}
|
106
|
+
|
107
|
+
// WrappersRaw is an auto generated low-level Go binding around an Ethereum contract.
|
108
|
+
type WrappersRaw struct {
|
109
|
+
Contract *Wrappers // Generic contract binding to access the raw methods on
|
110
|
+
}
|
111
|
+
|
112
|
+
// WrappersCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
|
113
|
+
type WrappersCallerRaw struct {
|
114
|
+
Contract *WrappersCaller // Generic read-only contract binding to access the raw methods on
|
115
|
+
}
|
116
|
+
|
117
|
+
// WrappersTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
|
118
|
+
type WrappersTransactorRaw struct {
|
119
|
+
Contract *WrappersTransactor // Generic write-only contract binding to access the raw methods on
|
120
|
+
}
|
121
|
+
|
122
|
+
// NewWrappers creates a new instance of Wrappers, bound to a specific deployed contract.
|
123
|
+
func NewWrappers(address common.Address, backend bind.ContractBackend) (*Wrappers, error) {
|
124
|
+
contract, err := bindWrappers(address, backend, backend, backend)
|
125
|
+
if err != nil {
|
126
|
+
return nil, err
|
127
|
+
}
|
128
|
+
return &Wrappers{WrappersCaller: WrappersCaller{contract: contract}, WrappersTransactor: WrappersTransactor{contract: contract}, WrappersFilterer: WrappersFilterer{contract: contract}}, nil
|
129
|
+
}
|
130
|
+
|
131
|
+
// NewWrappersCaller creates a new read-only instance of Wrappers, bound to a specific deployed contract.
|
132
|
+
func NewWrappersCaller(address common.Address, caller bind.ContractCaller) (*WrappersCaller, error) {
|
133
|
+
contract, err := bindWrappers(address, caller, nil, nil)
|
134
|
+
if err != nil {
|
135
|
+
return nil, err
|
136
|
+
}
|
137
|
+
return &WrappersCaller{contract: contract}, nil
|
138
|
+
}
|
139
|
+
|
140
|
+
// NewWrappersTransactor creates a new write-only instance of Wrappers, bound to a specific deployed contract.
|
141
|
+
func NewWrappersTransactor(address common.Address, transactor bind.ContractTransactor) (*WrappersTransactor, error) {
|
142
|
+
contract, err := bindWrappers(address, nil, transactor, nil)
|
143
|
+
if err != nil {
|
144
|
+
return nil, err
|
145
|
+
}
|
146
|
+
return &WrappersTransactor{contract: contract}, nil
|
147
|
+
}
|
148
|
+
|
149
|
+
// NewWrappersFilterer creates a new log filterer instance of Wrappers, bound to a specific deployed contract.
|
150
|
+
func NewWrappersFilterer(address common.Address, filterer bind.ContractFilterer) (*WrappersFilterer, error) {
|
151
|
+
contract, err := bindWrappers(address, nil, nil, filterer)
|
152
|
+
if err != nil {
|
153
|
+
return nil, err
|
154
|
+
}
|
155
|
+
return &WrappersFilterer{contract: contract}, nil
|
156
|
+
}
|
157
|
+
|
158
|
+
// bindWrappers binds a generic wrapper to an already deployed contract.
|
159
|
+
func bindWrappers(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
|
160
|
+
parsed, err := WrappersMetaData.GetAbi()
|
161
|
+
if err != nil {
|
162
|
+
return nil, err
|
163
|
+
}
|
164
|
+
return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
|
165
|
+
}
|
166
|
+
|
167
|
+
// Call invokes the (constant) contract method with params as input values and
|
168
|
+
// sets the output to result. The result type might be a single field for simple
|
169
|
+
// returns, a slice of interfaces for anonymous returns and a struct for named
|
170
|
+
// returns.
|
171
|
+
func (_Wrappers *WrappersRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
172
|
+
return _Wrappers.Contract.WrappersCaller.contract.Call(opts, result, method, params...)
|
173
|
+
}
|
174
|
+
|
175
|
+
// Transfer initiates a plain transaction to move funds to the contract, calling
|
176
|
+
// its default method if one is available.
|
177
|
+
func (_Wrappers *WrappersRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
178
|
+
return _Wrappers.Contract.WrappersTransactor.contract.Transfer(opts)
|
179
|
+
}
|
180
|
+
|
181
|
+
// Transact invokes the (paid) contract method with params as input values.
|
182
|
+
func (_Wrappers *WrappersRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
183
|
+
return _Wrappers.Contract.WrappersTransactor.contract.Transact(opts, method, params...)
|
184
|
+
}
|
185
|
+
|
186
|
+
// Call invokes the (constant) contract method with params as input values and
|
187
|
+
// sets the output to result. The result type might be a single field for simple
|
188
|
+
// returns, a slice of interfaces for anonymous returns and a struct for named
|
189
|
+
// returns.
|
190
|
+
func (_Wrappers *WrappersCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
|
191
|
+
return _Wrappers.Contract.contract.Call(opts, result, method, params...)
|
192
|
+
}
|
193
|
+
|
194
|
+
// Transfer initiates a plain transaction to move funds to the contract, calling
|
195
|
+
// its default method if one is available.
|
196
|
+
func (_Wrappers *WrappersTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
|
197
|
+
return _Wrappers.Contract.contract.Transfer(opts)
|
198
|
+
}
|
199
|
+
|
200
|
+
// Transact invokes the (paid) contract method with params as input values.
|
201
|
+
func (_Wrappers *WrappersTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
|
202
|
+
return _Wrappers.Contract.contract.Transact(opts, method, params...)
|
203
|
+
}
|
204
|
+
|
205
|
+
// Fallback is a paid mutator transaction binding the contract fallback function.
|
206
|
+
//
|
207
|
+
// Solidity: fallback() payable returns()
|
208
|
+
func (_Wrappers *WrappersTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) {
|
209
|
+
return _Wrappers.contract.RawTransact(opts, calldata)
|
210
|
+
}
|
211
|
+
|
212
|
+
// Fallback is a paid mutator transaction binding the contract fallback function.
|
213
|
+
//
|
214
|
+
// Solidity: fallback() payable returns()
|
215
|
+
func (_Wrappers *WrappersSession) Fallback(calldata []byte) (*types.Transaction, error) {
|
216
|
+
return _Wrappers.Contract.Fallback(&_Wrappers.TransactOpts, calldata)
|
217
|
+
}
|
218
|
+
|
219
|
+
// Fallback is a paid mutator transaction binding the contract fallback function.
|
220
|
+
//
|
221
|
+
// Solidity: fallback() payable returns()
|
222
|
+
func (_Wrappers *WrappersTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) {
|
223
|
+
return _Wrappers.Contract.Fallback(&_Wrappers.TransactOpts, calldata)
|
224
|
+
}
|
225
|
+
|
226
|
+
// Receive is a paid mutator transaction binding the contract receive function.
|
227
|
+
//
|
228
|
+
// Solidity: receive() payable returns()
|
229
|
+
func (_Wrappers *WrappersTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) {
|
230
|
+
return _Wrappers.contract.RawTransact(opts, nil) // calldata is disallowed for receive function
|
231
|
+
}
|
232
|
+
|
233
|
+
// Receive is a paid mutator transaction binding the contract receive function.
|
234
|
+
//
|
235
|
+
// Solidity: receive() payable returns()
|
236
|
+
func (_Wrappers *WrappersSession) Receive() (*types.Transaction, error) {
|
237
|
+
return _Wrappers.Contract.Receive(&_Wrappers.TransactOpts)
|
238
|
+
}
|
239
|
+
|
240
|
+
// Receive is a paid mutator transaction binding the contract receive function.
|
241
|
+
//
|
242
|
+
// Solidity: receive() payable returns()
|
243
|
+
func (_Wrappers *WrappersTransactorSession) Receive() (*types.Transaction, error) {
|
244
|
+
return _Wrappers.Contract.Receive(&_Wrappers.TransactOpts)
|
245
|
+
}
|
246
|
+
|
247
|
+
// WrappersAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the Wrappers contract.
|
248
|
+
type WrappersAdminChangedIterator struct {
|
249
|
+
Event *WrappersAdminChanged // Event containing the contract specifics and raw log
|
250
|
+
|
251
|
+
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
252
|
+
event string // Event name to use for unpacking event data
|
253
|
+
|
254
|
+
logs chan types.Log // Log channel receiving the found contract events
|
255
|
+
sub ethereum.Subscription // Subscription for errors, completion and termination
|
256
|
+
done bool // Whether the subscription completed delivering logs
|
257
|
+
fail error // Occurred error to stop iteration
|
258
|
+
}
|
259
|
+
|
260
|
+
// Next advances the iterator to the subsequent event, returning whether there
|
261
|
+
// are any more events found. In case of a retrieval or parsing error, false is
|
262
|
+
// returned and Error() can be queried for the exact failure.
|
263
|
+
func (it *WrappersAdminChangedIterator) Next() bool {
|
264
|
+
// If the iterator failed, stop iterating
|
265
|
+
if it.fail != nil {
|
266
|
+
return false
|
267
|
+
}
|
268
|
+
// If the iterator completed, deliver directly whatever's available
|
269
|
+
if it.done {
|
270
|
+
select {
|
271
|
+
case log := <-it.logs:
|
272
|
+
it.Event = new(WrappersAdminChanged)
|
273
|
+
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
274
|
+
it.fail = err
|
275
|
+
return false
|
276
|
+
}
|
277
|
+
it.Event.Raw = log
|
278
|
+
return true
|
279
|
+
|
280
|
+
default:
|
281
|
+
return false
|
282
|
+
}
|
283
|
+
}
|
284
|
+
// Iterator still in progress, wait for either a data or an error event
|
285
|
+
select {
|
286
|
+
case log := <-it.logs:
|
287
|
+
it.Event = new(WrappersAdminChanged)
|
288
|
+
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
289
|
+
it.fail = err
|
290
|
+
return false
|
291
|
+
}
|
292
|
+
it.Event.Raw = log
|
293
|
+
return true
|
294
|
+
|
295
|
+
case err := <-it.sub.Err():
|
296
|
+
it.done = true
|
297
|
+
it.fail = err
|
298
|
+
return it.Next()
|
299
|
+
}
|
300
|
+
}
|
301
|
+
|
302
|
+
// Error returns any retrieval or parsing error occurred during filtering.
|
303
|
+
func (it *WrappersAdminChangedIterator) Error() error {
|
304
|
+
return it.fail
|
305
|
+
}
|
306
|
+
|
307
|
+
// Close terminates the iteration process, releasing any pending underlying
|
308
|
+
// resources.
|
309
|
+
func (it *WrappersAdminChangedIterator) Close() error {
|
310
|
+
it.sub.Unsubscribe()
|
311
|
+
return nil
|
312
|
+
}
|
313
|
+
|
314
|
+
// WrappersAdminChanged represents a AdminChanged event raised by the Wrappers contract.
|
315
|
+
type WrappersAdminChanged struct {
|
316
|
+
PreviousAdmin common.Address
|
317
|
+
NewAdmin common.Address
|
318
|
+
Raw types.Log // Blockchain specific contextual infos
|
319
|
+
}
|
320
|
+
|
321
|
+
// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
|
322
|
+
//
|
323
|
+
// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
|
324
|
+
func (_Wrappers *WrappersFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*WrappersAdminChangedIterator, error) {
|
325
|
+
|
326
|
+
logs, sub, err := _Wrappers.contract.FilterLogs(opts, "AdminChanged")
|
327
|
+
if err != nil {
|
328
|
+
return nil, err
|
329
|
+
}
|
330
|
+
return &WrappersAdminChangedIterator{contract: _Wrappers.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
|
331
|
+
}
|
332
|
+
|
333
|
+
// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
|
334
|
+
//
|
335
|
+
// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
|
336
|
+
func (_Wrappers *WrappersFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *WrappersAdminChanged) (event.Subscription, error) {
|
337
|
+
|
338
|
+
logs, sub, err := _Wrappers.contract.WatchLogs(opts, "AdminChanged")
|
339
|
+
if err != nil {
|
340
|
+
return nil, err
|
341
|
+
}
|
342
|
+
return event.NewSubscription(func(quit <-chan struct{}) error {
|
343
|
+
defer sub.Unsubscribe()
|
344
|
+
for {
|
345
|
+
select {
|
346
|
+
case log := <-logs:
|
347
|
+
// New log arrived, parse the event and forward to the user
|
348
|
+
event := new(WrappersAdminChanged)
|
349
|
+
if err := _Wrappers.contract.UnpackLog(event, "AdminChanged", log); err != nil {
|
350
|
+
return err
|
351
|
+
}
|
352
|
+
event.Raw = log
|
353
|
+
|
354
|
+
select {
|
355
|
+
case sink <- event:
|
356
|
+
case err := <-sub.Err():
|
357
|
+
return err
|
358
|
+
case <-quit:
|
359
|
+
return nil
|
360
|
+
}
|
361
|
+
case err := <-sub.Err():
|
362
|
+
return err
|
363
|
+
case <-quit:
|
364
|
+
return nil
|
365
|
+
}
|
366
|
+
}
|
367
|
+
}), nil
|
368
|
+
}
|
369
|
+
|
370
|
+
// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
|
371
|
+
//
|
372
|
+
// Solidity: event AdminChanged(address previousAdmin, address newAdmin)
|
373
|
+
func (_Wrappers *WrappersFilterer) ParseAdminChanged(log types.Log) (*WrappersAdminChanged, error) {
|
374
|
+
event := new(WrappersAdminChanged)
|
375
|
+
if err := _Wrappers.contract.UnpackLog(event, "AdminChanged", log); err != nil {
|
376
|
+
return nil, err
|
377
|
+
}
|
378
|
+
event.Raw = log
|
379
|
+
return event, nil
|
380
|
+
}
|
381
|
+
|
382
|
+
// WrappersBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the Wrappers contract.
|
383
|
+
type WrappersBeaconUpgradedIterator struct {
|
384
|
+
Event *WrappersBeaconUpgraded // Event containing the contract specifics and raw log
|
385
|
+
|
386
|
+
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
387
|
+
event string // Event name to use for unpacking event data
|
388
|
+
|
389
|
+
logs chan types.Log // Log channel receiving the found contract events
|
390
|
+
sub ethereum.Subscription // Subscription for errors, completion and termination
|
391
|
+
done bool // Whether the subscription completed delivering logs
|
392
|
+
fail error // Occurred error to stop iteration
|
393
|
+
}
|
394
|
+
|
395
|
+
// Next advances the iterator to the subsequent event, returning whether there
|
396
|
+
// are any more events found. In case of a retrieval or parsing error, false is
|
397
|
+
// returned and Error() can be queried for the exact failure.
|
398
|
+
func (it *WrappersBeaconUpgradedIterator) Next() bool {
|
399
|
+
// If the iterator failed, stop iterating
|
400
|
+
if it.fail != nil {
|
401
|
+
return false
|
402
|
+
}
|
403
|
+
// If the iterator completed, deliver directly whatever's available
|
404
|
+
if it.done {
|
405
|
+
select {
|
406
|
+
case log := <-it.logs:
|
407
|
+
it.Event = new(WrappersBeaconUpgraded)
|
408
|
+
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
409
|
+
it.fail = err
|
410
|
+
return false
|
411
|
+
}
|
412
|
+
it.Event.Raw = log
|
413
|
+
return true
|
414
|
+
|
415
|
+
default:
|
416
|
+
return false
|
417
|
+
}
|
418
|
+
}
|
419
|
+
// Iterator still in progress, wait for either a data or an error event
|
420
|
+
select {
|
421
|
+
case log := <-it.logs:
|
422
|
+
it.Event = new(WrappersBeaconUpgraded)
|
423
|
+
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
424
|
+
it.fail = err
|
425
|
+
return false
|
426
|
+
}
|
427
|
+
it.Event.Raw = log
|
428
|
+
return true
|
429
|
+
|
430
|
+
case err := <-it.sub.Err():
|
431
|
+
it.done = true
|
432
|
+
it.fail = err
|
433
|
+
return it.Next()
|
434
|
+
}
|
435
|
+
}
|
436
|
+
|
437
|
+
// Error returns any retrieval or parsing error occurred during filtering.
|
438
|
+
func (it *WrappersBeaconUpgradedIterator) Error() error {
|
439
|
+
return it.fail
|
440
|
+
}
|
441
|
+
|
442
|
+
// Close terminates the iteration process, releasing any pending underlying
|
443
|
+
// resources.
|
444
|
+
func (it *WrappersBeaconUpgradedIterator) Close() error {
|
445
|
+
it.sub.Unsubscribe()
|
446
|
+
return nil
|
447
|
+
}
|
448
|
+
|
449
|
+
// WrappersBeaconUpgraded represents a BeaconUpgraded event raised by the Wrappers contract.
|
450
|
+
type WrappersBeaconUpgraded struct {
|
451
|
+
Beacon common.Address
|
452
|
+
Raw types.Log // Blockchain specific contextual infos
|
453
|
+
}
|
454
|
+
|
455
|
+
// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
|
456
|
+
//
|
457
|
+
// Solidity: event BeaconUpgraded(address indexed beacon)
|
458
|
+
func (_Wrappers *WrappersFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*WrappersBeaconUpgradedIterator, error) {
|
459
|
+
|
460
|
+
var beaconRule []interface{}
|
461
|
+
for _, beaconItem := range beacon {
|
462
|
+
beaconRule = append(beaconRule, beaconItem)
|
463
|
+
}
|
464
|
+
|
465
|
+
logs, sub, err := _Wrappers.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule)
|
466
|
+
if err != nil {
|
467
|
+
return nil, err
|
468
|
+
}
|
469
|
+
return &WrappersBeaconUpgradedIterator{contract: _Wrappers.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil
|
470
|
+
}
|
471
|
+
|
472
|
+
// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
|
473
|
+
//
|
474
|
+
// Solidity: event BeaconUpgraded(address indexed beacon)
|
475
|
+
func (_Wrappers *WrappersFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *WrappersBeaconUpgraded, beacon []common.Address) (event.Subscription, error) {
|
476
|
+
|
477
|
+
var beaconRule []interface{}
|
478
|
+
for _, beaconItem := range beacon {
|
479
|
+
beaconRule = append(beaconRule, beaconItem)
|
480
|
+
}
|
481
|
+
|
482
|
+
logs, sub, err := _Wrappers.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule)
|
483
|
+
if err != nil {
|
484
|
+
return nil, err
|
485
|
+
}
|
486
|
+
return event.NewSubscription(func(quit <-chan struct{}) error {
|
487
|
+
defer sub.Unsubscribe()
|
488
|
+
for {
|
489
|
+
select {
|
490
|
+
case log := <-logs:
|
491
|
+
// New log arrived, parse the event and forward to the user
|
492
|
+
event := new(WrappersBeaconUpgraded)
|
493
|
+
if err := _Wrappers.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
|
494
|
+
return err
|
495
|
+
}
|
496
|
+
event.Raw = log
|
497
|
+
|
498
|
+
select {
|
499
|
+
case sink <- event:
|
500
|
+
case err := <-sub.Err():
|
501
|
+
return err
|
502
|
+
case <-quit:
|
503
|
+
return nil
|
504
|
+
}
|
505
|
+
case err := <-sub.Err():
|
506
|
+
return err
|
507
|
+
case <-quit:
|
508
|
+
return nil
|
509
|
+
}
|
510
|
+
}
|
511
|
+
}), nil
|
512
|
+
}
|
513
|
+
|
514
|
+
// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e.
|
515
|
+
//
|
516
|
+
// Solidity: event BeaconUpgraded(address indexed beacon)
|
517
|
+
func (_Wrappers *WrappersFilterer) ParseBeaconUpgraded(log types.Log) (*WrappersBeaconUpgraded, error) {
|
518
|
+
event := new(WrappersBeaconUpgraded)
|
519
|
+
if err := _Wrappers.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil {
|
520
|
+
return nil, err
|
521
|
+
}
|
522
|
+
event.Raw = log
|
523
|
+
return event, nil
|
524
|
+
}
|
525
|
+
|
526
|
+
// WrappersUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Wrappers contract.
|
527
|
+
type WrappersUpgradedIterator struct {
|
528
|
+
Event *WrappersUpgraded // Event containing the contract specifics and raw log
|
529
|
+
|
530
|
+
contract *bind.BoundContract // Generic contract to use for unpacking event data
|
531
|
+
event string // Event name to use for unpacking event data
|
532
|
+
|
533
|
+
logs chan types.Log // Log channel receiving the found contract events
|
534
|
+
sub ethereum.Subscription // Subscription for errors, completion and termination
|
535
|
+
done bool // Whether the subscription completed delivering logs
|
536
|
+
fail error // Occurred error to stop iteration
|
537
|
+
}
|
538
|
+
|
539
|
+
// Next advances the iterator to the subsequent event, returning whether there
|
540
|
+
// are any more events found. In case of a retrieval or parsing error, false is
|
541
|
+
// returned and Error() can be queried for the exact failure.
|
542
|
+
func (it *WrappersUpgradedIterator) Next() bool {
|
543
|
+
// If the iterator failed, stop iterating
|
544
|
+
if it.fail != nil {
|
545
|
+
return false
|
546
|
+
}
|
547
|
+
// If the iterator completed, deliver directly whatever's available
|
548
|
+
if it.done {
|
549
|
+
select {
|
550
|
+
case log := <-it.logs:
|
551
|
+
it.Event = new(WrappersUpgraded)
|
552
|
+
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
553
|
+
it.fail = err
|
554
|
+
return false
|
555
|
+
}
|
556
|
+
it.Event.Raw = log
|
557
|
+
return true
|
558
|
+
|
559
|
+
default:
|
560
|
+
return false
|
561
|
+
}
|
562
|
+
}
|
563
|
+
// Iterator still in progress, wait for either a data or an error event
|
564
|
+
select {
|
565
|
+
case log := <-it.logs:
|
566
|
+
it.Event = new(WrappersUpgraded)
|
567
|
+
if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
|
568
|
+
it.fail = err
|
569
|
+
return false
|
570
|
+
}
|
571
|
+
it.Event.Raw = log
|
572
|
+
return true
|
573
|
+
|
574
|
+
case err := <-it.sub.Err():
|
575
|
+
it.done = true
|
576
|
+
it.fail = err
|
577
|
+
return it.Next()
|
578
|
+
}
|
579
|
+
}
|
580
|
+
|
581
|
+
// Error returns any retrieval or parsing error occurred during filtering.
|
582
|
+
func (it *WrappersUpgradedIterator) Error() error {
|
583
|
+
return it.fail
|
584
|
+
}
|
585
|
+
|
586
|
+
// Close terminates the iteration process, releasing any pending underlying
|
587
|
+
// resources.
|
588
|
+
func (it *WrappersUpgradedIterator) Close() error {
|
589
|
+
it.sub.Unsubscribe()
|
590
|
+
return nil
|
591
|
+
}
|
592
|
+
|
593
|
+
// WrappersUpgraded represents a Upgraded event raised by the Wrappers contract.
|
594
|
+
type WrappersUpgraded struct {
|
595
|
+
Implementation common.Address
|
596
|
+
Raw types.Log // Blockchain specific contextual infos
|
597
|
+
}
|
598
|
+
|
599
|
+
// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
|
600
|
+
//
|
601
|
+
// Solidity: event Upgraded(address indexed implementation)
|
602
|
+
func (_Wrappers *WrappersFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*WrappersUpgradedIterator, error) {
|
603
|
+
|
604
|
+
var implementationRule []interface{}
|
605
|
+
for _, implementationItem := range implementation {
|
606
|
+
implementationRule = append(implementationRule, implementationItem)
|
607
|
+
}
|
608
|
+
|
609
|
+
logs, sub, err := _Wrappers.contract.FilterLogs(opts, "Upgraded", implementationRule)
|
610
|
+
if err != nil {
|
611
|
+
return nil, err
|
612
|
+
}
|
613
|
+
return &WrappersUpgradedIterator{contract: _Wrappers.contract, event: "Upgraded", logs: logs, sub: sub}, nil
|
614
|
+
}
|
615
|
+
|
616
|
+
// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
|
617
|
+
//
|
618
|
+
// Solidity: event Upgraded(address indexed implementation)
|
619
|
+
func (_Wrappers *WrappersFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *WrappersUpgraded, implementation []common.Address) (event.Subscription, error) {
|
620
|
+
|
621
|
+
var implementationRule []interface{}
|
622
|
+
for _, implementationItem := range implementation {
|
623
|
+
implementationRule = append(implementationRule, implementationItem)
|
624
|
+
}
|
625
|
+
|
626
|
+
logs, sub, err := _Wrappers.contract.WatchLogs(opts, "Upgraded", implementationRule)
|
627
|
+
if err != nil {
|
628
|
+
return nil, err
|
629
|
+
}
|
630
|
+
return event.NewSubscription(func(quit <-chan struct{}) error {
|
631
|
+
defer sub.Unsubscribe()
|
632
|
+
for {
|
633
|
+
select {
|
634
|
+
case log := <-logs:
|
635
|
+
// New log arrived, parse the event and forward to the user
|
636
|
+
event := new(WrappersUpgraded)
|
637
|
+
if err := _Wrappers.contract.UnpackLog(event, "Upgraded", log); err != nil {
|
638
|
+
return err
|
639
|
+
}
|
640
|
+
event.Raw = log
|
641
|
+
|
642
|
+
select {
|
643
|
+
case sink <- event:
|
644
|
+
case err := <-sub.Err():
|
645
|
+
return err
|
646
|
+
case <-quit:
|
647
|
+
return nil
|
648
|
+
}
|
649
|
+
case err := <-sub.Err():
|
650
|
+
return err
|
651
|
+
case <-quit:
|
652
|
+
return nil
|
653
|
+
}
|
654
|
+
}
|
655
|
+
}), nil
|
656
|
+
}
|
657
|
+
|
658
|
+
// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
|
659
|
+
//
|
660
|
+
// Solidity: event Upgraded(address indexed implementation)
|
661
|
+
func (_Wrappers *WrappersFilterer) ParseUpgraded(log types.Log) (*WrappersUpgraded, error) {
|
662
|
+
event := new(WrappersUpgraded)
|
663
|
+
if err := _Wrappers.contract.UnpackLog(event, "Upgraded", log); err != nil {
|
664
|
+
return nil, err
|
665
|
+
}
|
666
|
+
event.Raw = log
|
667
|
+
return event, nil
|
668
|
+
}
|