diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 0000000..1e28840 --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,71 @@ +name: Create release + +on: + push: + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + fetch-depth: "0" + + - name: Create artifacts files + run: | + docker compose -f docker/build-docker-compose.yml build + docker compose -f docker/build-docker-compose.yml up + docker compose -f docker/build-docker-compose.yml down -v + + - name: Package build output + run: | + BUILD_DIR=${GITHUB_WORKSPACE}/artifacts/contracts + APP_VER_SHORT=$(git describe --tags) + ARCHIVE="artifacts_""$APP_VER_SHORT"".zip" + + echo "ARCHIVE=${ARCHIVE}" >> $GITHUB_ENV + + sudo chown -R $USER: ${BUILD_DIR} + chmod -R 755 ${BUILD_DIR} + ls -al ${BUILD_DIR} + zip -r -j ${ARCHIVE} ${BUILD_DIR} + + - name: Save artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ env.ARCHIVE }} + path: ${{ env.ARCHIVE }} + if-no-files-found: error + release: + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + + # https://docs.github.com/en/free-pro-team@latest/actions/guides/storing-workflow-data-as-artifacts#downloading-or-deleting-artifacts + # A directory for each artifact is created using its name + - name: Download all workflow run artifacts + uses: actions/download-artifact@v3 + with: + path: ${GITHUB_WORKSPACE} + + - name: Display structure of downloaded files + run: ls -R + working-directory: ${GITHUB_WORKSPACE} + + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create --draft --notes="Release draft from Github Actions" vNext + sleep 10 + for i in $(find ${GITHUB_WORKSPACE} -name '*.zip' -type f); do + gh release upload vNext ${i} + done diff --git a/Makefile b/Makefile index c89c38b..641ca90 100644 --- a/Makefile +++ b/Makefile @@ -6,3 +6,8 @@ generate-all: run-tests: cd ./scripts && bash ./tests.sh + +run-tests-in-docker: + @docker compose -f docker/tests-docker-compose.yml build + @docker compose -f docker/tests-docker-compose.yml up + @docker compose -f docker/tests-docker-compose.yml down -v diff --git a/abi/contracts/Bridge/Bridge.abi.json b/abi/contracts/Bridge/Bridge.abi.json deleted file mode 100644 index bf15d5f..0000000 --- a/abi/contracts/Bridge/Bridge.abi.json +++ /dev/null @@ -1,567 +0,0 @@ -[ - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminRoleTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "isPause", - "type": "bool" - } - ], - "name": "Pause", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "quorum", - "type": "uint256" - } - ], - "name": "QuorumChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RelayerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RelayerRemoved", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "addRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSettleBlockCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "crossTransferStatuses", - "outputs": [ - { - "internalType": "uint256", - "name": "createdBlockNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "recipients", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "depositNonces", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "batchNonceMvx", - "type": "uint256" - }, - { - "internalType": "bytes[]", - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "executeTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "executedBatches", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getBatch", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "uint64", - "name": "blockNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastUpdatedBlockNumber", - "type": "uint64" - }, - { - "internalType": "uint16", - "name": "depositsCount", - "type": "uint16" - } - ], - "internalType": "struct Batch", - "name": "", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "isBatchFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getBatchDeposits", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "enum DepositStatus", - "name": "status", - "type": "uint8" - } - ], - "internalType": "struct Deposit[]", - "name": "", - "type": "tuple[]" - }, - { - "internalType": "bool", - "name": "areDepositsFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRelayer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRelayers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRelayersCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonceMvx", - "type": "uint256" - } - ], - "name": "getStatusesAfterExecution", - "outputs": [ - { - "internalType": "enum DepositStatus[]", - "name": "", - "type": "uint8[]" - }, - { - "internalType": "bool", - "name": "isFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "board", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "initialQuorum", - "type": "uint256" - }, - { - "internalType": "contract ERC20Safe", - "name": "erc20Safe", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isRelayer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "removeRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newBatchSettleLimit", - "type": "uint8" - } - ], - "name": "setBatchSettleLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newQuorum", - "type": "uint256" - } - ], - "name": "setQuorum", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "transferAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonceMvx", - "type": "uint256" - } - ], - "name": "wasBatchExecuted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/abi/contracts/Bridge/Bridge.go b/abi/contracts/Bridge/Bridge.go deleted file mode 100644 index ed1a6dd..0000000 --- a/abi/contracts/Bridge/Bridge.go +++ /dev/null @@ -1,1728 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contract - -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 -) - -// Batch is an auto generated low-level Go binding around an user-defined struct. -type Batch struct { - Nonce *big.Int - BlockNumber uint64 - LastUpdatedBlockNumber uint64 - DepositsCount uint16 -} - -// Deposit is an auto generated low-level Go binding around an user-defined struct. -type Deposit struct { - Nonce *big.Int - TokenAddress common.Address - Amount *big.Int - Depositor common.Address - Recipient [32]byte - Status uint8 -} - -// BridgeMetaData contains all meta data concerning the Bridge contract. -var BridgeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminRoleTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isPause\",\"type\":\"bool\"}],\"name\":\"Pause\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"quorum\",\"type\":\"uint256\"}],\"name\":\"QuorumChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RelayerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RelayerRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"addRelayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchSettleBlockCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"crossTransferStatuses\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"createdBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"depositNonces\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"batchNonceMvx\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"executeTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"executedBatches\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNonce\",\"type\":\"uint256\"}],\"name\":\"getBatch\",\"outputs\":[{\"components\":[{\"internalType\":\"uint112\",\"name\":\"nonce\",\"type\":\"uint112\"},{\"internalType\":\"uint64\",\"name\":\"blockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastUpdatedBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"depositsCount\",\"type\":\"uint16\"}],\"internalType\":\"structBatch\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"isBatchFinal\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNonce\",\"type\":\"uint256\"}],\"name\":\"getBatchDeposits\",\"outputs\":[{\"components\":[{\"internalType\":\"uint112\",\"name\":\"nonce\",\"type\":\"uint112\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"enumDepositStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"internalType\":\"structDeposit[]\",\"name\":\"\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"areDepositsFinal\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRelayer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRelayers\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRelayersCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNonceMvx\",\"type\":\"uint256\"}],\"name\":\"getStatusesAfterExecution\",\"outputs\":[{\"internalType\":\"enumDepositStatus[]\",\"name\":\"\",\"type\":\"uint8[]\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"board\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"initialQuorum\",\"type\":\"uint256\"},{\"internalType\":\"contractERC20Safe\",\"name\":\"erc20Safe\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isRelayer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"quorum\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"removeRelayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRelayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newBatchSettleLimit\",\"type\":\"uint8\"}],\"name\":\"setBatchSettleLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newQuorum\",\"type\":\"uint256\"}],\"name\":\"setQuorum\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNonceMvx\",\"type\":\"uint256\"}],\"name\":\"wasBatchExecuted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -// BridgeABI is the input ABI used to generate the binding from. -// Deprecated: Use BridgeMetaData.ABI instead. -var BridgeABI = BridgeMetaData.ABI - -// Bridge is an auto generated Go binding around an Ethereum contract. -type Bridge struct { - BridgeCaller // Read-only binding to the contract - BridgeTransactor // Write-only binding to the contract - BridgeFilterer // Log filterer for contract events -} - -// BridgeCaller is an auto generated read-only Go binding around an Ethereum contract. -type BridgeCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. -type BridgeTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type BridgeFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// BridgeSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type BridgeSession struct { - Contract *Bridge // 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 -} - -// BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type BridgeCallerSession struct { - Contract *BridgeCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type BridgeTransactorSession struct { - Contract *BridgeTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// BridgeRaw is an auto generated low-level Go binding around an Ethereum contract. -type BridgeRaw struct { - Contract *Bridge // Generic contract binding to access the raw methods on -} - -// BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type BridgeCallerRaw struct { - Contract *BridgeCaller // Generic read-only contract binding to access the raw methods on -} - -// BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type BridgeTransactorRaw struct { - Contract *BridgeTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewBridge creates a new instance of Bridge, bound to a specific deployed contract. -func NewBridge(address common.Address, backend bind.ContractBackend) (*Bridge, error) { - contract, err := bindBridge(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Bridge{BridgeCaller: BridgeCaller{contract: contract}, BridgeTransactor: BridgeTransactor{contract: contract}, BridgeFilterer: BridgeFilterer{contract: contract}}, nil -} - -// NewBridgeCaller creates a new read-only instance of Bridge, bound to a specific deployed contract. -func NewBridgeCaller(address common.Address, caller bind.ContractCaller) (*BridgeCaller, error) { - contract, err := bindBridge(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &BridgeCaller{contract: contract}, nil -} - -// NewBridgeTransactor creates a new write-only instance of Bridge, bound to a specific deployed contract. -func NewBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeTransactor, error) { - contract, err := bindBridge(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &BridgeTransactor{contract: contract}, nil -} - -// NewBridgeFilterer creates a new log filterer instance of Bridge, bound to a specific deployed contract. -func NewBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeFilterer, error) { - contract, err := bindBridge(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &BridgeFilterer{contract: contract}, nil -} - -// bindBridge binds a generic wrapper to an already deployed contract. -func bindBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := BridgeMetaData.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 (_Bridge *BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Bridge.Contract.BridgeCaller.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 (_Bridge *BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Bridge.Contract.BridgeTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Bridge *BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Bridge.Contract.BridgeTransactor.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 (_Bridge *BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Bridge.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 (_Bridge *BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Bridge.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Bridge *BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Bridge.Contract.contract.Transact(opts, method, params...) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Bridge *BridgeCaller) Admin(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "admin") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Bridge *BridgeSession) Admin() (common.Address, error) { - return _Bridge.Contract.Admin(&_Bridge.CallOpts) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_Bridge *BridgeCallerSession) Admin() (common.Address, error) { - return _Bridge.Contract.Admin(&_Bridge.CallOpts) -} - -// BatchSettleBlockCount is a free data retrieval call binding the contract method 0x4ab3867f. -// -// Solidity: function batchSettleBlockCount() view returns(uint256) -func (_Bridge *BridgeCaller) BatchSettleBlockCount(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "batchSettleBlockCount") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BatchSettleBlockCount is a free data retrieval call binding the contract method 0x4ab3867f. -// -// Solidity: function batchSettleBlockCount() view returns(uint256) -func (_Bridge *BridgeSession) BatchSettleBlockCount() (*big.Int, error) { - return _Bridge.Contract.BatchSettleBlockCount(&_Bridge.CallOpts) -} - -// BatchSettleBlockCount is a free data retrieval call binding the contract method 0x4ab3867f. -// -// Solidity: function batchSettleBlockCount() view returns(uint256) -func (_Bridge *BridgeCallerSession) BatchSettleBlockCount() (*big.Int, error) { - return _Bridge.Contract.BatchSettleBlockCount(&_Bridge.CallOpts) -} - -// CrossTransferStatuses is a free data retrieval call binding the contract method 0xb2c79ca3. -// -// Solidity: function crossTransferStatuses(uint256 ) view returns(uint256 createdBlockNumber) -func (_Bridge *BridgeCaller) CrossTransferStatuses(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "crossTransferStatuses", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// CrossTransferStatuses is a free data retrieval call binding the contract method 0xb2c79ca3. -// -// Solidity: function crossTransferStatuses(uint256 ) view returns(uint256 createdBlockNumber) -func (_Bridge *BridgeSession) CrossTransferStatuses(arg0 *big.Int) (*big.Int, error) { - return _Bridge.Contract.CrossTransferStatuses(&_Bridge.CallOpts, arg0) -} - -// CrossTransferStatuses is a free data retrieval call binding the contract method 0xb2c79ca3. -// -// Solidity: function crossTransferStatuses(uint256 ) view returns(uint256 createdBlockNumber) -func (_Bridge *BridgeCallerSession) CrossTransferStatuses(arg0 *big.Int) (*big.Int, error) { - return _Bridge.Contract.CrossTransferStatuses(&_Bridge.CallOpts, arg0) -} - -// ExecutedBatches is a free data retrieval call binding the contract method 0x7039e21b. -// -// Solidity: function executedBatches(uint256 ) view returns(bool) -func (_Bridge *BridgeCaller) ExecutedBatches(opts *bind.CallOpts, arg0 *big.Int) (bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "executedBatches", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// ExecutedBatches is a free data retrieval call binding the contract method 0x7039e21b. -// -// Solidity: function executedBatches(uint256 ) view returns(bool) -func (_Bridge *BridgeSession) ExecutedBatches(arg0 *big.Int) (bool, error) { - return _Bridge.Contract.ExecutedBatches(&_Bridge.CallOpts, arg0) -} - -// ExecutedBatches is a free data retrieval call binding the contract method 0x7039e21b. -// -// Solidity: function executedBatches(uint256 ) view returns(bool) -func (_Bridge *BridgeCallerSession) ExecutedBatches(arg0 *big.Int) (bool, error) { - return _Bridge.Contract.ExecutedBatches(&_Bridge.CallOpts, arg0) -} - -// GetBatch is a free data retrieval call binding the contract method 0x5ac44282. -// -// Solidity: function getBatch(uint256 batchNonce) view returns((uint112,uint64,uint64,uint16), bool isBatchFinal) -func (_Bridge *BridgeCaller) GetBatch(opts *bind.CallOpts, batchNonce *big.Int) (Batch, bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "getBatch", batchNonce) - - if err != nil { - return *new(Batch), *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(Batch)).(*Batch) - out1 := *abi.ConvertType(out[1], new(bool)).(*bool) - - return out0, out1, err - -} - -// GetBatch is a free data retrieval call binding the contract method 0x5ac44282. -// -// Solidity: function getBatch(uint256 batchNonce) view returns((uint112,uint64,uint64,uint16), bool isBatchFinal) -func (_Bridge *BridgeSession) GetBatch(batchNonce *big.Int) (Batch, bool, error) { - return _Bridge.Contract.GetBatch(&_Bridge.CallOpts, batchNonce) -} - -// GetBatch is a free data retrieval call binding the contract method 0x5ac44282. -// -// Solidity: function getBatch(uint256 batchNonce) view returns((uint112,uint64,uint64,uint16), bool isBatchFinal) -func (_Bridge *BridgeCallerSession) GetBatch(batchNonce *big.Int) (Batch, bool, error) { - return _Bridge.Contract.GetBatch(&_Bridge.CallOpts, batchNonce) -} - -// GetBatchDeposits is a free data retrieval call binding the contract method 0x90924da7. -// -// Solidity: function getBatchDeposits(uint256 batchNonce) view returns((uint112,address,uint256,address,bytes32,uint8)[], bool areDepositsFinal) -func (_Bridge *BridgeCaller) GetBatchDeposits(opts *bind.CallOpts, batchNonce *big.Int) ([]Deposit, bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "getBatchDeposits", batchNonce) - - if err != nil { - return *new([]Deposit), *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new([]Deposit)).(*[]Deposit) - out1 := *abi.ConvertType(out[1], new(bool)).(*bool) - - return out0, out1, err - -} - -// GetBatchDeposits is a free data retrieval call binding the contract method 0x90924da7. -// -// Solidity: function getBatchDeposits(uint256 batchNonce) view returns((uint112,address,uint256,address,bytes32,uint8)[], bool areDepositsFinal) -func (_Bridge *BridgeSession) GetBatchDeposits(batchNonce *big.Int) ([]Deposit, bool, error) { - return _Bridge.Contract.GetBatchDeposits(&_Bridge.CallOpts, batchNonce) -} - -// GetBatchDeposits is a free data retrieval call binding the contract method 0x90924da7. -// -// Solidity: function getBatchDeposits(uint256 batchNonce) view returns((uint112,address,uint256,address,bytes32,uint8)[], bool areDepositsFinal) -func (_Bridge *BridgeCallerSession) GetBatchDeposits(batchNonce *big.Int) ([]Deposit, bool, error) { - return _Bridge.Contract.GetBatchDeposits(&_Bridge.CallOpts, batchNonce) -} - -// GetRelayer is a free data retrieval call binding the contract method 0xbee2e4dd. -// -// Solidity: function getRelayer(uint256 index) view returns(address) -func (_Bridge *BridgeCaller) GetRelayer(opts *bind.CallOpts, index *big.Int) (common.Address, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "getRelayer", index) - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// GetRelayer is a free data retrieval call binding the contract method 0xbee2e4dd. -// -// Solidity: function getRelayer(uint256 index) view returns(address) -func (_Bridge *BridgeSession) GetRelayer(index *big.Int) (common.Address, error) { - return _Bridge.Contract.GetRelayer(&_Bridge.CallOpts, index) -} - -// GetRelayer is a free data retrieval call binding the contract method 0xbee2e4dd. -// -// Solidity: function getRelayer(uint256 index) view returns(address) -func (_Bridge *BridgeCallerSession) GetRelayer(index *big.Int) (common.Address, error) { - return _Bridge.Contract.GetRelayer(&_Bridge.CallOpts, index) -} - -// GetRelayers is a free data retrieval call binding the contract method 0x179ff4b2. -// -// Solidity: function getRelayers() view returns(address[]) -func (_Bridge *BridgeCaller) GetRelayers(opts *bind.CallOpts) ([]common.Address, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "getRelayers") - - if err != nil { - return *new([]common.Address), err - } - - out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) - - return out0, err - -} - -// GetRelayers is a free data retrieval call binding the contract method 0x179ff4b2. -// -// Solidity: function getRelayers() view returns(address[]) -func (_Bridge *BridgeSession) GetRelayers() ([]common.Address, error) { - return _Bridge.Contract.GetRelayers(&_Bridge.CallOpts) -} - -// GetRelayers is a free data retrieval call binding the contract method 0x179ff4b2. -// -// Solidity: function getRelayers() view returns(address[]) -func (_Bridge *BridgeCallerSession) GetRelayers() ([]common.Address, error) { - return _Bridge.Contract.GetRelayers(&_Bridge.CallOpts) -} - -// GetRelayersCount is a free data retrieval call binding the contract method 0xd3d9ec01. -// -// Solidity: function getRelayersCount() view returns(uint256) -func (_Bridge *BridgeCaller) GetRelayersCount(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "getRelayersCount") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetRelayersCount is a free data retrieval call binding the contract method 0xd3d9ec01. -// -// Solidity: function getRelayersCount() view returns(uint256) -func (_Bridge *BridgeSession) GetRelayersCount() (*big.Int, error) { - return _Bridge.Contract.GetRelayersCount(&_Bridge.CallOpts) -} - -// GetRelayersCount is a free data retrieval call binding the contract method 0xd3d9ec01. -// -// Solidity: function getRelayersCount() view returns(uint256) -func (_Bridge *BridgeCallerSession) GetRelayersCount() (*big.Int, error) { - return _Bridge.Contract.GetRelayersCount(&_Bridge.CallOpts) -} - -// GetStatusesAfterExecution is a free data retrieval call binding the contract method 0xdb626c2d. -// -// Solidity: function getStatusesAfterExecution(uint256 batchNonceMvx) view returns(uint8[], bool isFinal) -func (_Bridge *BridgeCaller) GetStatusesAfterExecution(opts *bind.CallOpts, batchNonceMvx *big.Int) ([]uint8, bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "getStatusesAfterExecution", batchNonceMvx) - - if err != nil { - return *new([]uint8), *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new([]uint8)).(*[]uint8) - out1 := *abi.ConvertType(out[1], new(bool)).(*bool) - - return out0, out1, err - -} - -// GetStatusesAfterExecution is a free data retrieval call binding the contract method 0xdb626c2d. -// -// Solidity: function getStatusesAfterExecution(uint256 batchNonceMvx) view returns(uint8[], bool isFinal) -func (_Bridge *BridgeSession) GetStatusesAfterExecution(batchNonceMvx *big.Int) ([]uint8, bool, error) { - return _Bridge.Contract.GetStatusesAfterExecution(&_Bridge.CallOpts, batchNonceMvx) -} - -// GetStatusesAfterExecution is a free data retrieval call binding the contract method 0xdb626c2d. -// -// Solidity: function getStatusesAfterExecution(uint256 batchNonceMvx) view returns(uint8[], bool isFinal) -func (_Bridge *BridgeCallerSession) GetStatusesAfterExecution(batchNonceMvx *big.Int) ([]uint8, bool, error) { - return _Bridge.Contract.GetStatusesAfterExecution(&_Bridge.CallOpts, batchNonceMvx) -} - -// IsRelayer is a free data retrieval call binding the contract method 0x541d5548. -// -// Solidity: function isRelayer(address account) view returns(bool) -func (_Bridge *BridgeCaller) IsRelayer(opts *bind.CallOpts, account common.Address) (bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "isRelayer", account) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsRelayer is a free data retrieval call binding the contract method 0x541d5548. -// -// Solidity: function isRelayer(address account) view returns(bool) -func (_Bridge *BridgeSession) IsRelayer(account common.Address) (bool, error) { - return _Bridge.Contract.IsRelayer(&_Bridge.CallOpts, account) -} - -// IsRelayer is a free data retrieval call binding the contract method 0x541d5548. -// -// Solidity: function isRelayer(address account) view returns(bool) -func (_Bridge *BridgeCallerSession) IsRelayer(account common.Address) (bool, error) { - return _Bridge.Contract.IsRelayer(&_Bridge.CallOpts, account) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Bridge *BridgeCaller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Bridge *BridgeSession) Paused() (bool, error) { - return _Bridge.Contract.Paused(&_Bridge.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_Bridge *BridgeCallerSession) Paused() (bool, error) { - return _Bridge.Contract.Paused(&_Bridge.CallOpts) -} - -// Quorum is a free data retrieval call binding the contract method 0x1703a018. -// -// Solidity: function quorum() view returns(uint256) -func (_Bridge *BridgeCaller) Quorum(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "quorum") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Quorum is a free data retrieval call binding the contract method 0x1703a018. -// -// Solidity: function quorum() view returns(uint256) -func (_Bridge *BridgeSession) Quorum() (*big.Int, error) { - return _Bridge.Contract.Quorum(&_Bridge.CallOpts) -} - -// Quorum is a free data retrieval call binding the contract method 0x1703a018. -// -// Solidity: function quorum() view returns(uint256) -func (_Bridge *BridgeCallerSession) Quorum() (*big.Int, error) { - return _Bridge.Contract.Quorum(&_Bridge.CallOpts) -} - -// WasBatchExecuted is a free data retrieval call binding the contract method 0x84aa1ad0. -// -// Solidity: function wasBatchExecuted(uint256 batchNonceMvx) view returns(bool) -func (_Bridge *BridgeCaller) WasBatchExecuted(opts *bind.CallOpts, batchNonceMvx *big.Int) (bool, error) { - var out []interface{} - err := _Bridge.contract.Call(opts, &out, "wasBatchExecuted", batchNonceMvx) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// WasBatchExecuted is a free data retrieval call binding the contract method 0x84aa1ad0. -// -// Solidity: function wasBatchExecuted(uint256 batchNonceMvx) view returns(bool) -func (_Bridge *BridgeSession) WasBatchExecuted(batchNonceMvx *big.Int) (bool, error) { - return _Bridge.Contract.WasBatchExecuted(&_Bridge.CallOpts, batchNonceMvx) -} - -// WasBatchExecuted is a free data retrieval call binding the contract method 0x84aa1ad0. -// -// Solidity: function wasBatchExecuted(uint256 batchNonceMvx) view returns(bool) -func (_Bridge *BridgeCallerSession) WasBatchExecuted(batchNonceMvx *big.Int) (bool, error) { - return _Bridge.Contract.WasBatchExecuted(&_Bridge.CallOpts, batchNonceMvx) -} - -// AddRelayer is a paid mutator transaction binding the contract method 0xdd39f00d. -// -// Solidity: function addRelayer(address account) returns() -func (_Bridge *BridgeTransactor) AddRelayer(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "addRelayer", account) -} - -// AddRelayer is a paid mutator transaction binding the contract method 0xdd39f00d. -// -// Solidity: function addRelayer(address account) returns() -func (_Bridge *BridgeSession) AddRelayer(account common.Address) (*types.Transaction, error) { - return _Bridge.Contract.AddRelayer(&_Bridge.TransactOpts, account) -} - -// AddRelayer is a paid mutator transaction binding the contract method 0xdd39f00d. -// -// Solidity: function addRelayer(address account) returns() -func (_Bridge *BridgeTransactorSession) AddRelayer(account common.Address) (*types.Transaction, error) { - return _Bridge.Contract.AddRelayer(&_Bridge.TransactOpts, account) -} - -// ExecuteTransfer is a paid mutator transaction binding the contract method 0x51db0518. -// -// Solidity: function executeTransfer(address[] tokens, address[] recipients, uint256[] amounts, uint256[] depositNonces, uint256 batchNonceMvx, bytes[] signatures) returns() -func (_Bridge *BridgeTransactor) ExecuteTransfer(opts *bind.TransactOpts, tokens []common.Address, recipients []common.Address, amounts []*big.Int, depositNonces []*big.Int, batchNonceMvx *big.Int, signatures [][]byte) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "executeTransfer", tokens, recipients, amounts, depositNonces, batchNonceMvx, signatures) -} - -// ExecuteTransfer is a paid mutator transaction binding the contract method 0x51db0518. -// -// Solidity: function executeTransfer(address[] tokens, address[] recipients, uint256[] amounts, uint256[] depositNonces, uint256 batchNonceMvx, bytes[] signatures) returns() -func (_Bridge *BridgeSession) ExecuteTransfer(tokens []common.Address, recipients []common.Address, amounts []*big.Int, depositNonces []*big.Int, batchNonceMvx *big.Int, signatures [][]byte) (*types.Transaction, error) { - return _Bridge.Contract.ExecuteTransfer(&_Bridge.TransactOpts, tokens, recipients, amounts, depositNonces, batchNonceMvx, signatures) -} - -// ExecuteTransfer is a paid mutator transaction binding the contract method 0x51db0518. -// -// Solidity: function executeTransfer(address[] tokens, address[] recipients, uint256[] amounts, uint256[] depositNonces, uint256 batchNonceMvx, bytes[] signatures) returns() -func (_Bridge *BridgeTransactorSession) ExecuteTransfer(tokens []common.Address, recipients []common.Address, amounts []*big.Int, depositNonces []*big.Int, batchNonceMvx *big.Int, signatures [][]byte) (*types.Transaction, error) { - return _Bridge.Contract.ExecuteTransfer(&_Bridge.TransactOpts, tokens, recipients, amounts, depositNonces, batchNonceMvx, signatures) -} - -// Initialize is a paid mutator transaction binding the contract method 0x72483bf9. -// -// Solidity: function initialize(address[] board, uint256 initialQuorum, address erc20Safe) returns() -func (_Bridge *BridgeTransactor) Initialize(opts *bind.TransactOpts, board []common.Address, initialQuorum *big.Int, erc20Safe common.Address) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "initialize", board, initialQuorum, erc20Safe) -} - -// Initialize is a paid mutator transaction binding the contract method 0x72483bf9. -// -// Solidity: function initialize(address[] board, uint256 initialQuorum, address erc20Safe) returns() -func (_Bridge *BridgeSession) Initialize(board []common.Address, initialQuorum *big.Int, erc20Safe common.Address) (*types.Transaction, error) { - return _Bridge.Contract.Initialize(&_Bridge.TransactOpts, board, initialQuorum, erc20Safe) -} - -// Initialize is a paid mutator transaction binding the contract method 0x72483bf9. -// -// Solidity: function initialize(address[] board, uint256 initialQuorum, address erc20Safe) returns() -func (_Bridge *BridgeTransactorSession) Initialize(board []common.Address, initialQuorum *big.Int, erc20Safe common.Address) (*types.Transaction, error) { - return _Bridge.Contract.Initialize(&_Bridge.TransactOpts, board, initialQuorum, erc20Safe) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_Bridge *BridgeTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_Bridge *BridgeSession) Pause() (*types.Transaction, error) { - return _Bridge.Contract.Pause(&_Bridge.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_Bridge *BridgeTransactorSession) Pause() (*types.Transaction, error) { - return _Bridge.Contract.Pause(&_Bridge.TransactOpts) -} - -// RemoveRelayer is a paid mutator transaction binding the contract method 0x60f0a5ac. -// -// Solidity: function removeRelayer(address account) returns() -func (_Bridge *BridgeTransactor) RemoveRelayer(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "removeRelayer", account) -} - -// RemoveRelayer is a paid mutator transaction binding the contract method 0x60f0a5ac. -// -// Solidity: function removeRelayer(address account) returns() -func (_Bridge *BridgeSession) RemoveRelayer(account common.Address) (*types.Transaction, error) { - return _Bridge.Contract.RemoveRelayer(&_Bridge.TransactOpts, account) -} - -// RemoveRelayer is a paid mutator transaction binding the contract method 0x60f0a5ac. -// -// Solidity: function removeRelayer(address account) returns() -func (_Bridge *BridgeTransactorSession) RemoveRelayer(account common.Address) (*types.Transaction, error) { - return _Bridge.Contract.RemoveRelayer(&_Bridge.TransactOpts, account) -} - -// RenounceAdmin is a paid mutator transaction binding the contract method 0x8bad0c0a. -// -// Solidity: function renounceAdmin() returns() -func (_Bridge *BridgeTransactor) RenounceAdmin(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "renounceAdmin") -} - -// RenounceAdmin is a paid mutator transaction binding the contract method 0x8bad0c0a. -// -// Solidity: function renounceAdmin() returns() -func (_Bridge *BridgeSession) RenounceAdmin() (*types.Transaction, error) { - return _Bridge.Contract.RenounceAdmin(&_Bridge.TransactOpts) -} - -// RenounceAdmin is a paid mutator transaction binding the contract method 0x8bad0c0a. -// -// Solidity: function renounceAdmin() returns() -func (_Bridge *BridgeTransactorSession) RenounceAdmin() (*types.Transaction, error) { - return _Bridge.Contract.RenounceAdmin(&_Bridge.TransactOpts) -} - -// RenounceRelayer is a paid mutator transaction binding the contract method 0x475ed4d0. -// -// Solidity: function renounceRelayer(address account) returns() -func (_Bridge *BridgeTransactor) RenounceRelayer(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "renounceRelayer", account) -} - -// RenounceRelayer is a paid mutator transaction binding the contract method 0x475ed4d0. -// -// Solidity: function renounceRelayer(address account) returns() -func (_Bridge *BridgeSession) RenounceRelayer(account common.Address) (*types.Transaction, error) { - return _Bridge.Contract.RenounceRelayer(&_Bridge.TransactOpts, account) -} - -// RenounceRelayer is a paid mutator transaction binding the contract method 0x475ed4d0. -// -// Solidity: function renounceRelayer(address account) returns() -func (_Bridge *BridgeTransactorSession) RenounceRelayer(account common.Address) (*types.Transaction, error) { - return _Bridge.Contract.RenounceRelayer(&_Bridge.TransactOpts, account) -} - -// SetBatchSettleLimit is a paid mutator transaction binding the contract method 0xf2e0ec48. -// -// Solidity: function setBatchSettleLimit(uint8 newBatchSettleLimit) returns() -func (_Bridge *BridgeTransactor) SetBatchSettleLimit(opts *bind.TransactOpts, newBatchSettleLimit uint8) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "setBatchSettleLimit", newBatchSettleLimit) -} - -// SetBatchSettleLimit is a paid mutator transaction binding the contract method 0xf2e0ec48. -// -// Solidity: function setBatchSettleLimit(uint8 newBatchSettleLimit) returns() -func (_Bridge *BridgeSession) SetBatchSettleLimit(newBatchSettleLimit uint8) (*types.Transaction, error) { - return _Bridge.Contract.SetBatchSettleLimit(&_Bridge.TransactOpts, newBatchSettleLimit) -} - -// SetBatchSettleLimit is a paid mutator transaction binding the contract method 0xf2e0ec48. -// -// Solidity: function setBatchSettleLimit(uint8 newBatchSettleLimit) returns() -func (_Bridge *BridgeTransactorSession) SetBatchSettleLimit(newBatchSettleLimit uint8) (*types.Transaction, error) { - return _Bridge.Contract.SetBatchSettleLimit(&_Bridge.TransactOpts, newBatchSettleLimit) -} - -// SetQuorum is a paid mutator transaction binding the contract method 0xc1ba4e59. -// -// Solidity: function setQuorum(uint256 newQuorum) returns() -func (_Bridge *BridgeTransactor) SetQuorum(opts *bind.TransactOpts, newQuorum *big.Int) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "setQuorum", newQuorum) -} - -// SetQuorum is a paid mutator transaction binding the contract method 0xc1ba4e59. -// -// Solidity: function setQuorum(uint256 newQuorum) returns() -func (_Bridge *BridgeSession) SetQuorum(newQuorum *big.Int) (*types.Transaction, error) { - return _Bridge.Contract.SetQuorum(&_Bridge.TransactOpts, newQuorum) -} - -// SetQuorum is a paid mutator transaction binding the contract method 0xc1ba4e59. -// -// Solidity: function setQuorum(uint256 newQuorum) returns() -func (_Bridge *BridgeTransactorSession) SetQuorum(newQuorum *big.Int) (*types.Transaction, error) { - return _Bridge.Contract.SetQuorum(&_Bridge.TransactOpts, newQuorum) -} - -// TransferAdmin is a paid mutator transaction binding the contract method 0x75829def. -// -// Solidity: function transferAdmin(address newAdmin) returns() -func (_Bridge *BridgeTransactor) TransferAdmin(opts *bind.TransactOpts, newAdmin common.Address) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "transferAdmin", newAdmin) -} - -// TransferAdmin is a paid mutator transaction binding the contract method 0x75829def. -// -// Solidity: function transferAdmin(address newAdmin) returns() -func (_Bridge *BridgeSession) TransferAdmin(newAdmin common.Address) (*types.Transaction, error) { - return _Bridge.Contract.TransferAdmin(&_Bridge.TransactOpts, newAdmin) -} - -// TransferAdmin is a paid mutator transaction binding the contract method 0x75829def. -// -// Solidity: function transferAdmin(address newAdmin) returns() -func (_Bridge *BridgeTransactorSession) TransferAdmin(newAdmin common.Address) (*types.Transaction, error) { - return _Bridge.Contract.TransferAdmin(&_Bridge.TransactOpts, newAdmin) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_Bridge *BridgeTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Bridge.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_Bridge *BridgeSession) Unpause() (*types.Transaction, error) { - return _Bridge.Contract.Unpause(&_Bridge.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_Bridge *BridgeTransactorSession) Unpause() (*types.Transaction, error) { - return _Bridge.Contract.Unpause(&_Bridge.TransactOpts) -} - -// BridgeAdminRoleTransferredIterator is returned from FilterAdminRoleTransferred and is used to iterate over the raw logs and unpacked data for AdminRoleTransferred events raised by the Bridge contract. -type BridgeAdminRoleTransferredIterator struct { - Event *BridgeAdminRoleTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BridgeAdminRoleTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BridgeAdminRoleTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BridgeAdminRoleTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BridgeAdminRoleTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BridgeAdminRoleTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BridgeAdminRoleTransferred represents a AdminRoleTransferred event raised by the Bridge contract. -type BridgeAdminRoleTransferred struct { - PreviousAdmin common.Address - NewAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAdminRoleTransferred is a free log retrieval operation binding the contract event 0xe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd. -// -// Solidity: event AdminRoleTransferred(address indexed previousAdmin, address indexed newAdmin) -func (_Bridge *BridgeFilterer) FilterAdminRoleTransferred(opts *bind.FilterOpts, previousAdmin []common.Address, newAdmin []common.Address) (*BridgeAdminRoleTransferredIterator, error) { - - var previousAdminRule []interface{} - for _, previousAdminItem := range previousAdmin { - previousAdminRule = append(previousAdminRule, previousAdminItem) - } - var newAdminRule []interface{} - for _, newAdminItem := range newAdmin { - newAdminRule = append(newAdminRule, newAdminItem) - } - - logs, sub, err := _Bridge.contract.FilterLogs(opts, "AdminRoleTransferred", previousAdminRule, newAdminRule) - if err != nil { - return nil, err - } - return &BridgeAdminRoleTransferredIterator{contract: _Bridge.contract, event: "AdminRoleTransferred", logs: logs, sub: sub}, nil -} - -// WatchAdminRoleTransferred is a free log subscription operation binding the contract event 0xe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd. -// -// Solidity: event AdminRoleTransferred(address indexed previousAdmin, address indexed newAdmin) -func (_Bridge *BridgeFilterer) WatchAdminRoleTransferred(opts *bind.WatchOpts, sink chan<- *BridgeAdminRoleTransferred, previousAdmin []common.Address, newAdmin []common.Address) (event.Subscription, error) { - - var previousAdminRule []interface{} - for _, previousAdminItem := range previousAdmin { - previousAdminRule = append(previousAdminRule, previousAdminItem) - } - var newAdminRule []interface{} - for _, newAdminItem := range newAdmin { - newAdminRule = append(newAdminRule, newAdminItem) - } - - logs, sub, err := _Bridge.contract.WatchLogs(opts, "AdminRoleTransferred", previousAdminRule, newAdminRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BridgeAdminRoleTransferred) - if err := _Bridge.contract.UnpackLog(event, "AdminRoleTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAdminRoleTransferred is a log parse operation binding the contract event 0xe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd. -// -// Solidity: event AdminRoleTransferred(address indexed previousAdmin, address indexed newAdmin) -func (_Bridge *BridgeFilterer) ParseAdminRoleTransferred(log types.Log) (*BridgeAdminRoleTransferred, error) { - event := new(BridgeAdminRoleTransferred) - if err := _Bridge.contract.UnpackLog(event, "AdminRoleTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Bridge contract. -type BridgeInitializedIterator struct { - Event *BridgeInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BridgeInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BridgeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BridgeInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BridgeInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BridgeInitialized represents a Initialized event raised by the Bridge contract. -type BridgeInitialized struct { - Version uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_Bridge *BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeInitializedIterator, error) { - - logs, sub, err := _Bridge.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &BridgeInitializedIterator{contract: _Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeInitialized) (event.Subscription, error) { - - logs, sub, err := _Bridge.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BridgeInitialized) - if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_Bridge *BridgeFilterer) ParseInitialized(log types.Log) (*BridgeInitialized, error) { - event := new(BridgeInitialized) - if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BridgePauseIterator is returned from FilterPause and is used to iterate over the raw logs and unpacked data for Pause events raised by the Bridge contract. -type BridgePauseIterator struct { - Event *BridgePause // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BridgePauseIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BridgePause) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BridgePause) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BridgePauseIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BridgePauseIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BridgePause represents a Pause event raised by the Bridge contract. -type BridgePause struct { - IsPause bool - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPause is a free log retrieval operation binding the contract event 0x9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304. -// -// Solidity: event Pause(bool isPause) -func (_Bridge *BridgeFilterer) FilterPause(opts *bind.FilterOpts) (*BridgePauseIterator, error) { - - logs, sub, err := _Bridge.contract.FilterLogs(opts, "Pause") - if err != nil { - return nil, err - } - return &BridgePauseIterator{contract: _Bridge.contract, event: "Pause", logs: logs, sub: sub}, nil -} - -// WatchPause is a free log subscription operation binding the contract event 0x9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304. -// -// Solidity: event Pause(bool isPause) -func (_Bridge *BridgeFilterer) WatchPause(opts *bind.WatchOpts, sink chan<- *BridgePause) (event.Subscription, error) { - - logs, sub, err := _Bridge.contract.WatchLogs(opts, "Pause") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BridgePause) - if err := _Bridge.contract.UnpackLog(event, "Pause", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParsePause is a log parse operation binding the contract event 0x9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304. -// -// Solidity: event Pause(bool isPause) -func (_Bridge *BridgeFilterer) ParsePause(log types.Log) (*BridgePause, error) { - event := new(BridgePause) - if err := _Bridge.contract.UnpackLog(event, "Pause", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BridgeQuorumChangedIterator is returned from FilterQuorumChanged and is used to iterate over the raw logs and unpacked data for QuorumChanged events raised by the Bridge contract. -type BridgeQuorumChangedIterator struct { - Event *BridgeQuorumChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BridgeQuorumChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BridgeQuorumChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BridgeQuorumChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BridgeQuorumChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BridgeQuorumChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BridgeQuorumChanged represents a QuorumChanged event raised by the Bridge contract. -type BridgeQuorumChanged struct { - Quorum *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterQuorumChanged is a free log retrieval operation binding the contract event 0x027863d12a407097e086a48e36475bfc859d0b200b7e6f65b5fd3b218e46632e. -// -// Solidity: event QuorumChanged(uint256 quorum) -func (_Bridge *BridgeFilterer) FilterQuorumChanged(opts *bind.FilterOpts) (*BridgeQuorumChangedIterator, error) { - - logs, sub, err := _Bridge.contract.FilterLogs(opts, "QuorumChanged") - if err != nil { - return nil, err - } - return &BridgeQuorumChangedIterator{contract: _Bridge.contract, event: "QuorumChanged", logs: logs, sub: sub}, nil -} - -// WatchQuorumChanged is a free log subscription operation binding the contract event 0x027863d12a407097e086a48e36475bfc859d0b200b7e6f65b5fd3b218e46632e. -// -// Solidity: event QuorumChanged(uint256 quorum) -func (_Bridge *BridgeFilterer) WatchQuorumChanged(opts *bind.WatchOpts, sink chan<- *BridgeQuorumChanged) (event.Subscription, error) { - - logs, sub, err := _Bridge.contract.WatchLogs(opts, "QuorumChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BridgeQuorumChanged) - if err := _Bridge.contract.UnpackLog(event, "QuorumChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseQuorumChanged is a log parse operation binding the contract event 0x027863d12a407097e086a48e36475bfc859d0b200b7e6f65b5fd3b218e46632e. -// -// Solidity: event QuorumChanged(uint256 quorum) -func (_Bridge *BridgeFilterer) ParseQuorumChanged(log types.Log) (*BridgeQuorumChanged, error) { - event := new(BridgeQuorumChanged) - if err := _Bridge.contract.UnpackLog(event, "QuorumChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BridgeRelayerAddedIterator is returned from FilterRelayerAdded and is used to iterate over the raw logs and unpacked data for RelayerAdded events raised by the Bridge contract. -type BridgeRelayerAddedIterator struct { - Event *BridgeRelayerAdded // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BridgeRelayerAddedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BridgeRelayerAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BridgeRelayerAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BridgeRelayerAddedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BridgeRelayerAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BridgeRelayerAdded represents a RelayerAdded event raised by the Bridge contract. -type BridgeRelayerAdded struct { - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRelayerAdded is a free log retrieval operation binding the contract event 0xd756b9aee10d6f2c80dc42c5031beb0e0847f6e1d6ba50199bdfc3f0de5cc0cc. -// -// Solidity: event RelayerAdded(address indexed account, address indexed sender) -func (_Bridge *BridgeFilterer) FilterRelayerAdded(opts *bind.FilterOpts, account []common.Address, sender []common.Address) (*BridgeRelayerAddedIterator, error) { - - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Bridge.contract.FilterLogs(opts, "RelayerAdded", accountRule, senderRule) - if err != nil { - return nil, err - } - return &BridgeRelayerAddedIterator{contract: _Bridge.contract, event: "RelayerAdded", logs: logs, sub: sub}, nil -} - -// WatchRelayerAdded is a free log subscription operation binding the contract event 0xd756b9aee10d6f2c80dc42c5031beb0e0847f6e1d6ba50199bdfc3f0de5cc0cc. -// -// Solidity: event RelayerAdded(address indexed account, address indexed sender) -func (_Bridge *BridgeFilterer) WatchRelayerAdded(opts *bind.WatchOpts, sink chan<- *BridgeRelayerAdded, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Bridge.contract.WatchLogs(opts, "RelayerAdded", accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BridgeRelayerAdded) - if err := _Bridge.contract.UnpackLog(event, "RelayerAdded", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRelayerAdded is a log parse operation binding the contract event 0xd756b9aee10d6f2c80dc42c5031beb0e0847f6e1d6ba50199bdfc3f0de5cc0cc. -// -// Solidity: event RelayerAdded(address indexed account, address indexed sender) -func (_Bridge *BridgeFilterer) ParseRelayerAdded(log types.Log) (*BridgeRelayerAdded, error) { - event := new(BridgeRelayerAdded) - if err := _Bridge.contract.UnpackLog(event, "RelayerAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// BridgeRelayerRemovedIterator is returned from FilterRelayerRemoved and is used to iterate over the raw logs and unpacked data for RelayerRemoved events raised by the Bridge contract. -type BridgeRelayerRemovedIterator struct { - Event *BridgeRelayerRemoved // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *BridgeRelayerRemovedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(BridgeRelayerRemoved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(BridgeRelayerRemoved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *BridgeRelayerRemovedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *BridgeRelayerRemovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// BridgeRelayerRemoved represents a RelayerRemoved event raised by the Bridge contract. -type BridgeRelayerRemoved struct { - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRelayerRemoved is a free log retrieval operation binding the contract event 0x0bdcf1d6f29aa87af8131cc81dcbb295fcf98d71cfcdc79cc5d965317bae1d0a. -// -// Solidity: event RelayerRemoved(address indexed account, address indexed sender) -func (_Bridge *BridgeFilterer) FilterRelayerRemoved(opts *bind.FilterOpts, account []common.Address, sender []common.Address) (*BridgeRelayerRemovedIterator, error) { - - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Bridge.contract.FilterLogs(opts, "RelayerRemoved", accountRule, senderRule) - if err != nil { - return nil, err - } - return &BridgeRelayerRemovedIterator{contract: _Bridge.contract, event: "RelayerRemoved", logs: logs, sub: sub}, nil -} - -// WatchRelayerRemoved is a free log subscription operation binding the contract event 0x0bdcf1d6f29aa87af8131cc81dcbb295fcf98d71cfcdc79cc5d965317bae1d0a. -// -// Solidity: event RelayerRemoved(address indexed account, address indexed sender) -func (_Bridge *BridgeFilterer) WatchRelayerRemoved(opts *bind.WatchOpts, sink chan<- *BridgeRelayerRemoved, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _Bridge.contract.WatchLogs(opts, "RelayerRemoved", accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(BridgeRelayerRemoved) - if err := _Bridge.contract.UnpackLog(event, "RelayerRemoved", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRelayerRemoved is a log parse operation binding the contract event 0x0bdcf1d6f29aa87af8131cc81dcbb295fcf98d71cfcdc79cc5d965317bae1d0a. -// -// Solidity: event RelayerRemoved(address indexed account, address indexed sender) -func (_Bridge *BridgeFilterer) ParseRelayerRemoved(log types.Log) (*BridgeRelayerRemoved, error) { - event := new(BridgeRelayerRemoved) - if err := _Bridge.contract.UnpackLog(event, "RelayerRemoved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/abi/contracts/Bridge/Bridge.hex b/abi/contracts/Bridge/Bridge.hex deleted file mode 100644 index b5abdfc..0000000 --- a/abi/contracts/Bridge/Bridge.hex +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561001057600080fd5b50612477806100206000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806375829def116100de578063bee2e4dd11610097578063db626c2d11610071578063db626c2d14610391578063dd39f00d146103b2578063f2e0ec48146103c5578063f851a440146103d857600080fd5b8063bee2e4dd1461034b578063c1ba4e5914610376578063d3d9ec011461038957600080fd5b806375829def146102c15780638456cb59146102d457806384aa1ad0146102dc5780638bad0c0a146102ff57806390924da714610307578063b2c79ca31461032857600080fd5b8063541d554811610130578063541d5548146101e25780635ac44282146102055780635c975abb1461026d57806360f0a5ac146102785780637039e21b1461028b57806372483bf9146102ae57600080fd5b80631703a01814610178578063179ff4b2146101945780633f4ba83a146101a9578063475ed4d0146101b35780634ab3867f146101c657806351db0518146101cf575b600080fd5b61018160055481565b6040519081526020015b60405180910390f35b61019c6103e9565b60405161018b9190611ac7565b6101b161044e565b005b6101b16101c1366004611b29565b6104d1565b61018160045481565b6101b16101dd366004611b91565b61054a565b6101f56101f0366004611b29565b61091e565b604051901515815260200161018b565b610218610213366004611c8d565b610931565b6040805183516001600160701b031681526020808501516001600160401b039081169183019190915284830151169181019190915260609283015161ffff16928101929092521515608082015260a00161018b565b60035460ff166101f5565b6101b1610286366004611b29565b6109cc565b6101f5610299366004611c8d565b60076020526000908152604090205460ff1681565b6101b16102bc366004611d47565b610a05565b6101b16102cf366004611b29565b610b1f565b6101b1610c1a565b6101f56102ea366004611c8d565b60009081526007602052604090205460ff1690565b6101b1610c93565b61031a610315366004611c8d565b610d16565b60405161018b929190611e36565b610181610336366004611c8d565b60086020526000908152604090206001015481565b61035e610359366004611c8d565b610d8d565b6040516001600160a01b03909116815260200161018b565b6101b1610384366004611c8d565b610d9a565b610181610e54565b6103a461039f366004611c8d565b610e64565b60405161018b929190611ee0565b6101b16103c0366004611b29565b610f28565b6101b16103d3366004611f32565b610f6a565b6000546001600160a01b031661035e565b6060600160000180548060200260200160405190810160405280929190818152602001828054801561044457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610426575b5050505050905090565b336104616000546001600160a01b031690565b6001600160a01b0316146104905760405162461bcd60e51b815260040161048790611f55565b60405180910390fd5b6003805460ff19169055604051600081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020015b60405180910390a1565b6001600160a01b038116331461053e5760405162461bcd60e51b815260206004820152602c60248201527f52656c61796572526f6c653a2063616e206f6e6c792072656e6f756e6365207260448201526b37b632903337b91039b2b63360a11b6064820152608401610487565b610547816110de565b50565b60035460ff16156105905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610487565b6105993361091e565b6105f35760405162461bcd60e51b815260206004820152602560248201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f742052656044820152643630bcb2b960d91b6064820152608401610487565b6005548110156106555760405162461bcd60e51b815260206004820152602760248201527f4e6f7420656e6f756768207369676e61747572657320746f20616368696576656044820152662071756f72756d60c81b6064820152608401610487565b60008381526007602052604090205460ff16156106ad5760405162461bcd60e51b815260206004820152601660248201527510985d18da08185b1c9958591e48195e1958dd5d195960521b6044820152606401610487565b6000838152600760205260409020805460ff191660011790556107406106d38284611f98565b61073b8b8b8f8f8d8d8d8d8d6040518060400160405280601681526020017522bc32b1baba32a130ba31b432b22a3930b739b332b960511b8152506040516020016107279a99989796959493929190612101565b60405160208183030381529060405261117c565b6111ea565b60008a6001600160401b0381111561075a5761075a611ca6565b604051908082528060200260200182016040528015610783578160200160208202803683370190505b50905060005b8b8110156108e4576006546001600160a01b031663dbba0f018e8e848181106107b4576107b4612193565b90506020020160208101906107c99190611b29565b8b8b858181106107db576107db612193565b905060200201358e8e868181106107f4576107f4612193565b90506020020160208101906108099190611b29565b60405160e085901b6001600160e01b03191681526001600160a01b039384166004820152602481019290925290911660448201526064016020604051808303816000875af115801561085f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088391906121b9565b61088e576004610891565b60035b8282815181106108a3576108a3612193565b602002602001019060048111156108bc576108bc611dfe565b908160048111156108cf576108cf611dfe565b905250806108dc816121ea565b915050610789565b506000848152600860209081526040909120825190916109089183918501906119fe565b5043600190910155505050505050505050505050565b600061092b60018361137c565b92915050565b604080516080810182526000808252602082018190529181018290526060810191909152600654604051632d62214160e11b8152600481018490526000916001600160a01b031690635ac442829060240160a060405180830381865afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190612231565b91509150915091565b336109df6000546001600160a01b031690565b6001600160a01b03161461053e5760405162461bcd60e51b815260040161048790611f55565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015610a4a5750825b90506000826001600160401b03166001148015610a665750303b155b905081158015610a74575080155b15610a925760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610abc57845460ff60401b1916600160401b1785555b610ac46113a1565b610acf8888886113bb565b8315610b1557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b33610b326000546001600160a01b031690565b6001600160a01b031614610b585760405162461bcd60e51b815260040161048790611f55565b6001600160a01b038116610bbf5760405162461bcd60e51b815260206004820152602860248201527f41646d696e526f6c653a206e65772061646d696e20697320746865207a65726f604482015267206164647265737360c01b6064820152608401610487565b600080546040516001600160a01b03808516939216917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610c2d6000546001600160a01b031690565b6001600160a01b031614610c535760405162461bcd60e51b815260040161048790611f55565b6003805460ff191660019081179091556040519081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020016104c7565b33610ca66000546001600160a01b031690565b6001600160a01b031614610ccc5760405162461bcd60e51b815260040161048790611f55565b600080546040516001600160a01b03909116907fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908390a3600080546001600160a01b0319169055565b60065460405163085c967f60e01b8152600481018390526060916000916001600160a01b039091169063085c967f90602401600060405180830381865afa158015610d65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109c391908101906122e6565b600061092b6001836114a6565b33610dad6000546001600160a01b031690565b6001600160a01b031614610dd35760405162461bcd60e51b815260040161048790611f55565b6003811015610e195760405162461bcd60e51b815260206004820152601260248201527128bab7b93ab69034b9903a37b7903637bb9760711b6044820152606401610487565b60058190556040518181527f027863d12a407097e086a48e36475bfc859d0b200b7e6f65b5fd3b218e46632e9060200160405180910390a150565b6000610e5f60015490565b905090565b60008181526008602090815260408083208151815493840281016060908101845292810184815292949384939192918391839083890182828015610ef757602002820191906000526020600020906000905b82829054906101000a900460ff166004811115610ed557610ed5611dfe565b815260206001928301818104948501949093039092029101808411610eb65790505b5050505050815260200160018201548152505090508060000151610f1e8260200151611535565b9250925050915091565b33610f3b6000546001600160a01b031690565b6001600160a01b031614610f615760405162461bcd60e51b815260040161048790611f55565b6105478161155e565b33610f7d6000546001600160a01b031690565b6001600160a01b031614610fa35760405162461bcd60e51b815260040161048790611f55565b60035460ff16610fec5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610487565b600660009054906101000a90046001600160a01b03166001600160a01b031663821461386040518163ffffffff1660e01b8152600401602060405180830381865afa15801561103f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106391906121b9565b156110d65760405162461bcd60e51b815260206004820152603860248201527f43616e6e6f74206368616e6765206261746368536574746c65426c6f636b436f60448201527f756e7420776974682070656e64696e67206261746368657300000000000000006064820152608401610487565b60ff16600455565b6110e9600182611609565b6111435760405162461bcd60e51b815260206004820152602560248201527f52656c61796572526f6c653a2061646472657373206973206e6f7420612072656044820152643630bcb2b960d91b6064820152608401610487565b60405133906001600160a01b038316907f0bdcf1d6f29aa87af8131cc81dcbb295fcf98d71cfcdc79cc5d965317bae1d0a90600090a350565b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525082805190602001206040516020016111cd9291906123f3565b604051602081830303815290604052805190602001209050919050565b60008083516001600160401b0381111561120657611206611ca6565b60405190808252806020026020018201604052801561122f578160200160208202803683370190505b50905060005b845181101561132e57600061126386838151811061125557611255612193565b60200260200101518661174b565b905061126e8161091e565b611278575061131c565b6000805b84518110156112d257826001600160a01b03168582815181106112a1576112a1612193565b60200260200101516001600160a01b0316036112c057600191506112d2565b806112ca816121ea565b91505061127c565b508061131957846112e2816121ea565b955050818484815181106112f8576112f8612193565b60200260200101906001600160a01b031690816001600160a01b0316815250505b50505b80611326816121ea565b915050611235565b506005548210156113765760405162461bcd60e51b8152602060048201526012602482015271145d5bdc9d5b481dd85cc81b9bdd081b595d60721b6044820152606401610487565b50505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6113a9611831565b6113b161187a565b6113b961188a565b565b6113c3611831565b60038210156114095760405162461bcd60e51b815260206004820152601260248201527128bab7b93ab69034b9903a37b7903637bb9760711b6044820152606401610487565b81835110156114705760405162461bcd60e51b815260206004820152602d60248201527f54686520626f6172642073686f756c64206265206174206c656173742074686560448201526c1038bab7b93ab69039b4bd329760991b6064820152608401610487565b61147983611892565b600591909155600680546001600160a01b0319166001600160a01b03909216919091179055506028600455565b815460009082106115045760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610487565b82600001828154811061151957611519612193565b6000918252602090912001546001600160a01b03169392505050565b60008160000361154757506000919050565b43600454836115569190612415565b111592915050565b611567816118d6565b611572600182611941565b6115d05760405162461bcd60e51b815260206004820152602960248201527f52656c61796572526f6c653a206164647265737320697320616c72656164792060448201526830903932b630bcb2b960b91b6064820152608401610487565b60405133906001600160a01b038316907fd756b9aee10d6f2c80dc42c5031beb0e0847f6e1d6ba50199bdfc3f0de5cc0cc90600090a350565b6001600160a01b03811660009081526001830160205260408120548015611741576000611637600183612428565b855490915060009061164b90600190612428565b9050600086600001828154811061166457611664612193565b60009182526020909120015487546001600160a01b039091169150819088908590811061169357611693612193565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790556116c7836001612415565b6001600160a01b038216600090815260018901602052604090205586548790806116f3576116f361243b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260018981019091526040822091909155945061092b9350505050565b600091505061092b565b600082516041146117945760405162461bcd60e51b81526020600482015260136024820152724d616c666f726d6564207369676e617475726560681b6044820152606401610487565b60208301516040840151606085015160001a8015806117b657508060ff166001145b156117c9576117c6601b82612451565b90505b60408051600081526020810180835287905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa15801561181c573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166113b957604051631afcd79f60e31b815260040160405180910390fd5b611882611831565b6113b96119b3565b6113b9611831565b60005b81518110156118d2576118c08282815181106118b3576118b3612193565b602002602001015161155e565b806118ca816121ea565b915050611895565b5050565b6001600160a01b0381166105475760405162461bcd60e51b815260206004820152602c60248201527f52656c61796572526f6c653a206163636f756e742063616e6e6f74206265207460448201526b68652030206164647265737360a01b6064820152608401610487565b6001600160a01b03811660009081526001830160205260408120546119ab57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b0386169081179091558554908252828601909352604090209190915561092b565b50600061092b565b6119bb611831565b600080546001600160a01b031916339081178255604051909182917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908290a350565b82805482825590600052602060002090601f01602090048101928215611aa25791602002820160005b83821115611a7357835183826101000a81548160ff02191690836004811115611a5257611a52611dfe565b02179055509260200192600101602081600001049283019260010302611a27565b8015611aa05782816101000a81549060ff0219169055600101602081600001049283019260010302611a73565b505b50611aae929150611ab2565b5090565b5b80821115611aae5760008155600101611ab3565b6020808252825182820181905260009190848201906040850190845b81811015611b085783516001600160a01b031683529284019291840191600101611ae3565b50909695505050505050565b6001600160a01b038116811461054757600080fd5b600060208284031215611b3b57600080fd5b813561139a81611b14565b60008083601f840112611b5857600080fd5b5081356001600160401b03811115611b6f57600080fd5b6020830191508360208260051b8501011115611b8a57600080fd5b9250929050565b600080600080600080600080600080600060c08c8e031215611bb257600080fd5b6001600160401b03808d351115611bc857600080fd5b611bd58e8e358f01611b46565b909c509a5060208d0135811015611beb57600080fd5b611bfb8e60208f01358f01611b46565b909a50985060408d0135811015611c1157600080fd5b611c218e60408f01358f01611b46565b909850965060608d0135811015611c3757600080fd5b611c478e60608f01358f01611b46565b909650945060808d0135935060a08d0135811015611c6457600080fd5b50611c758d60a08e01358e01611b46565b81935080925050509295989b509295989b9093969950565b600060208284031215611c9f57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715611cde57611cde611ca6565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d0c57611d0c611ca6565b604052919050565b60006001600160401b03821115611d2d57611d2d611ca6565b5060051b60200190565b8035611d4281611b14565b919050565b600080600060608486031215611d5c57600080fd5b83356001600160401b03811115611d7257600080fd5b8401601f81018613611d8357600080fd5b80356020611d98611d9383611d14565b611ce4565b82815260059290921b83018101918181019089841115611db757600080fd5b938201935b83851015611dde578435611dcf81611b14565b82529382019390820190611dbc565b9650508601359350611df591505060408501611d37565b90509250925092565b634e487b7160e01b600052602160045260246000fd5b60058110611e3257634e487b7160e01b600052602160045260246000fd5b9052565b6040808252835182820181905260009190606090818501906020808901865b83811015611ec257815180516001600160701b03168652838101516001600160a01b039081168588015288820151898801528782015116878701526080808201519087015260a09081015190611ead81880183611e14565b505060c0949094019390820190600101611e55565b5050829550611ed48188018915159052565b50505050509392505050565b604080825283519082018190526000906020906060840190828701845b82811015611f2057611f10848351611e14565b9284019290840190600101611efd565b50505093151592019190915250919050565b600060208284031215611f4457600080fd5b813560ff8116811461139a57600080fd5b60208082526023908201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f7420416460408201526236b4b760e91b606082015260800190565b6000611fa6611d9384611d14565b80848252602080830192508560051b850136811115611fc457600080fd5b855b818110156120565780356001600160401b0380821115611fe65760008081fd5b90880190601f3681840112611ffb5760008081fd5b82358281111561200d5761200d611ca6565b61201e818301601f19168801611ce4565b9250808352368782860101111561203757600091508182fd5b8087850188850137600090830187015250865250938201938201611fc6565b50919695505050505050565b8183526000602080850194508260005b858110156120a057813561208581611b14565b6001600160a01b031687529582019590820190600101612072565b509495945050505050565b81835260006001600160fb1b038311156120c457600080fd5b8260051b80836020870137939093016020019392505050565b60005b838110156120f85781810151838201526020016120e0565b50506000910152565b60c08152600061211560c083018c8e612062565b8281036020840152612128818b8d612062565b9050828103604084015261213d81898b6120ab565b905082810360608401526121528187896120ab565b905084608084015282810360a084015283518082526121788160208401602088016120dd565b601f01601f1916016020019c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b80518015158114611d4257600080fd5b6000602082840312156121cb57600080fd5b61139a826121a9565b634e487b7160e01b600052601160045260246000fd5b6000600182016121fc576121fc6121d4565b5060010190565b80516001600160701b0381168114611d4257600080fd5b80516001600160401b0381168114611d4257600080fd5b60008082840360a081121561224557600080fd5b608081121561225357600080fd5b50604051608081018181106001600160401b038211171561227657612276611ca6565b60405261228284612203565b81526122906020850161221a565b60208201526122a16040850161221a565b6040820152606084015161ffff811681146122bb57600080fd5b606082015291506122ce608084016121a9565b90509250929050565b805160058110611d4257600080fd5b60008060408084860312156122fa57600080fd5b83516001600160401b0381111561231057600080fd5b8401601f8101861361232157600080fd5b80516020612331611d9383611d14565b82815260c0928302840182019282820191908a85111561235057600080fd5b948301945b848610156123d65780868c03121561236d5760008081fd5b612375611cbc565b61237e87612203565b81528487015161238d81611b14565b8186015286880151888201526060808801516123a881611b14565b908201526080878101519082015260a06123c38189016122d7565b9082015283529485019491830191612355565b5096506123e690508782016121a9565b9450505050509250929050565b600083516124058184602088016120dd565b9190910191825250602001919050565b8082018082111561092b5761092b6121d4565b8181038181111561092b5761092b6121d4565b634e487b7160e01b600052603160045260246000fd5b60ff818116838216019081111561092b5761092b6121d456fea164736f6c6343000814000a diff --git a/abi/contracts/Bridge/Bridge.json b/abi/contracts/Bridge/Bridge.json deleted file mode 100644 index c93e176..0000000 --- a/abi/contracts/Bridge/Bridge.json +++ /dev/null @@ -1,576 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Bridge", - "sourceName": "contracts/Bridge.sol", - "abi": [ - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminRoleTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "isPause", - "type": "bool" - } - ], - "name": "Pause", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "quorum", - "type": "uint256" - } - ], - "name": "QuorumChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RelayerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RelayerRemoved", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "addRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSettleBlockCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "crossTransferStatuses", - "outputs": [ - { - "internalType": "uint256", - "name": "createdBlockNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "tokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "recipients", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "depositNonces", - "type": "uint256[]" - }, - { - "internalType": "uint256", - "name": "batchNonceMvx", - "type": "uint256" - }, - { - "internalType": "bytes[]", - "name": "signatures", - "type": "bytes[]" - } - ], - "name": "executeTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "executedBatches", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getBatch", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "uint64", - "name": "blockNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastUpdatedBlockNumber", - "type": "uint64" - }, - { - "internalType": "uint16", - "name": "depositsCount", - "type": "uint16" - } - ], - "internalType": "struct Batch", - "name": "", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "isBatchFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getBatchDeposits", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "enum DepositStatus", - "name": "status", - "type": "uint8" - } - ], - "internalType": "struct Deposit[]", - "name": "", - "type": "tuple[]" - }, - { - "internalType": "bool", - "name": "areDepositsFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRelayer", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRelayers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRelayersCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonceMvx", - "type": "uint256" - } - ], - "name": "getStatusesAfterExecution", - "outputs": [ - { - "internalType": "enum DepositStatus[]", - "name": "", - "type": "uint8[]" - }, - { - "internalType": "bool", - "name": "isFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "board", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "initialQuorum", - "type": "uint256" - }, - { - "internalType": "contract ERC20Safe", - "name": "erc20Safe", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isRelayer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "quorum", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "removeRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRelayer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newBatchSettleLimit", - "type": "uint8" - } - ], - "name": "setBatchSettleLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newQuorum", - "type": "uint256" - } - ], - "name": "setQuorum", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "transferAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonceMvx", - "type": "uint256" - } - ], - "name": "wasBatchExecuted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50612477806100206000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806375829def116100de578063bee2e4dd11610097578063db626c2d11610071578063db626c2d14610391578063dd39f00d146103b2578063f2e0ec48146103c5578063f851a440146103d857600080fd5b8063bee2e4dd1461034b578063c1ba4e5914610376578063d3d9ec011461038957600080fd5b806375829def146102c15780638456cb59146102d457806384aa1ad0146102dc5780638bad0c0a146102ff57806390924da714610307578063b2c79ca31461032857600080fd5b8063541d554811610130578063541d5548146101e25780635ac44282146102055780635c975abb1461026d57806360f0a5ac146102785780637039e21b1461028b57806372483bf9146102ae57600080fd5b80631703a01814610178578063179ff4b2146101945780633f4ba83a146101a9578063475ed4d0146101b35780634ab3867f146101c657806351db0518146101cf575b600080fd5b61018160055481565b6040519081526020015b60405180910390f35b61019c6103e9565b60405161018b9190611ac7565b6101b161044e565b005b6101b16101c1366004611b29565b6104d1565b61018160045481565b6101b16101dd366004611b91565b61054a565b6101f56101f0366004611b29565b61091e565b604051901515815260200161018b565b610218610213366004611c8d565b610931565b6040805183516001600160701b031681526020808501516001600160401b039081169183019190915284830151169181019190915260609283015161ffff16928101929092521515608082015260a00161018b565b60035460ff166101f5565b6101b1610286366004611b29565b6109cc565b6101f5610299366004611c8d565b60076020526000908152604090205460ff1681565b6101b16102bc366004611d47565b610a05565b6101b16102cf366004611b29565b610b1f565b6101b1610c1a565b6101f56102ea366004611c8d565b60009081526007602052604090205460ff1690565b6101b1610c93565b61031a610315366004611c8d565b610d16565b60405161018b929190611e36565b610181610336366004611c8d565b60086020526000908152604090206001015481565b61035e610359366004611c8d565b610d8d565b6040516001600160a01b03909116815260200161018b565b6101b1610384366004611c8d565b610d9a565b610181610e54565b6103a461039f366004611c8d565b610e64565b60405161018b929190611ee0565b6101b16103c0366004611b29565b610f28565b6101b16103d3366004611f32565b610f6a565b6000546001600160a01b031661035e565b6060600160000180548060200260200160405190810160405280929190818152602001828054801561044457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610426575b5050505050905090565b336104616000546001600160a01b031690565b6001600160a01b0316146104905760405162461bcd60e51b815260040161048790611f55565b60405180910390fd5b6003805460ff19169055604051600081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020015b60405180910390a1565b6001600160a01b038116331461053e5760405162461bcd60e51b815260206004820152602c60248201527f52656c61796572526f6c653a2063616e206f6e6c792072656e6f756e6365207260448201526b37b632903337b91039b2b63360a11b6064820152608401610487565b610547816110de565b50565b60035460ff16156105905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610487565b6105993361091e565b6105f35760405162461bcd60e51b815260206004820152602560248201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f742052656044820152643630bcb2b960d91b6064820152608401610487565b6005548110156106555760405162461bcd60e51b815260206004820152602760248201527f4e6f7420656e6f756768207369676e61747572657320746f20616368696576656044820152662071756f72756d60c81b6064820152608401610487565b60008381526007602052604090205460ff16156106ad5760405162461bcd60e51b815260206004820152601660248201527510985d18da08185b1c9958591e48195e1958dd5d195960521b6044820152606401610487565b6000838152600760205260409020805460ff191660011790556107406106d38284611f98565b61073b8b8b8f8f8d8d8d8d8d6040518060400160405280601681526020017522bc32b1baba32a130ba31b432b22a3930b739b332b960511b8152506040516020016107279a99989796959493929190612101565b60405160208183030381529060405261117c565b6111ea565b60008a6001600160401b0381111561075a5761075a611ca6565b604051908082528060200260200182016040528015610783578160200160208202803683370190505b50905060005b8b8110156108e4576006546001600160a01b031663dbba0f018e8e848181106107b4576107b4612193565b90506020020160208101906107c99190611b29565b8b8b858181106107db576107db612193565b905060200201358e8e868181106107f4576107f4612193565b90506020020160208101906108099190611b29565b60405160e085901b6001600160e01b03191681526001600160a01b039384166004820152602481019290925290911660448201526064016020604051808303816000875af115801561085f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088391906121b9565b61088e576004610891565b60035b8282815181106108a3576108a3612193565b602002602001019060048111156108bc576108bc611dfe565b908160048111156108cf576108cf611dfe565b905250806108dc816121ea565b915050610789565b506000848152600860209081526040909120825190916109089183918501906119fe565b5043600190910155505050505050505050505050565b600061092b60018361137c565b92915050565b604080516080810182526000808252602082018190529181018290526060810191909152600654604051632d62214160e11b8152600481018490526000916001600160a01b031690635ac442829060240160a060405180830381865afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190612231565b91509150915091565b336109df6000546001600160a01b031690565b6001600160a01b03161461053e5760405162461bcd60e51b815260040161048790611f55565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015610a4a5750825b90506000826001600160401b03166001148015610a665750303b155b905081158015610a74575080155b15610a925760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610abc57845460ff60401b1916600160401b1785555b610ac46113a1565b610acf8888886113bb565b8315610b1557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b33610b326000546001600160a01b031690565b6001600160a01b031614610b585760405162461bcd60e51b815260040161048790611f55565b6001600160a01b038116610bbf5760405162461bcd60e51b815260206004820152602860248201527f41646d696e526f6c653a206e65772061646d696e20697320746865207a65726f604482015267206164647265737360c01b6064820152608401610487565b600080546040516001600160a01b03808516939216917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610c2d6000546001600160a01b031690565b6001600160a01b031614610c535760405162461bcd60e51b815260040161048790611f55565b6003805460ff191660019081179091556040519081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020016104c7565b33610ca66000546001600160a01b031690565b6001600160a01b031614610ccc5760405162461bcd60e51b815260040161048790611f55565b600080546040516001600160a01b03909116907fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908390a3600080546001600160a01b0319169055565b60065460405163085c967f60e01b8152600481018390526060916000916001600160a01b039091169063085c967f90602401600060405180830381865afa158015610d65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109c391908101906122e6565b600061092b6001836114a6565b33610dad6000546001600160a01b031690565b6001600160a01b031614610dd35760405162461bcd60e51b815260040161048790611f55565b6003811015610e195760405162461bcd60e51b815260206004820152601260248201527128bab7b93ab69034b9903a37b7903637bb9760711b6044820152606401610487565b60058190556040518181527f027863d12a407097e086a48e36475bfc859d0b200b7e6f65b5fd3b218e46632e9060200160405180910390a150565b6000610e5f60015490565b905090565b60008181526008602090815260408083208151815493840281016060908101845292810184815292949384939192918391839083890182828015610ef757602002820191906000526020600020906000905b82829054906101000a900460ff166004811115610ed557610ed5611dfe565b815260206001928301818104948501949093039092029101808411610eb65790505b5050505050815260200160018201548152505090508060000151610f1e8260200151611535565b9250925050915091565b33610f3b6000546001600160a01b031690565b6001600160a01b031614610f615760405162461bcd60e51b815260040161048790611f55565b6105478161155e565b33610f7d6000546001600160a01b031690565b6001600160a01b031614610fa35760405162461bcd60e51b815260040161048790611f55565b60035460ff16610fec5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610487565b600660009054906101000a90046001600160a01b03166001600160a01b031663821461386040518163ffffffff1660e01b8152600401602060405180830381865afa15801561103f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106391906121b9565b156110d65760405162461bcd60e51b815260206004820152603860248201527f43616e6e6f74206368616e6765206261746368536574746c65426c6f636b436f60448201527f756e7420776974682070656e64696e67206261746368657300000000000000006064820152608401610487565b60ff16600455565b6110e9600182611609565b6111435760405162461bcd60e51b815260206004820152602560248201527f52656c61796572526f6c653a2061646472657373206973206e6f7420612072656044820152643630bcb2b960d91b6064820152608401610487565b60405133906001600160a01b038316907f0bdcf1d6f29aa87af8131cc81dcbb295fcf98d71cfcdc79cc5d965317bae1d0a90600090a350565b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525082805190602001206040516020016111cd9291906123f3565b604051602081830303815290604052805190602001209050919050565b60008083516001600160401b0381111561120657611206611ca6565b60405190808252806020026020018201604052801561122f578160200160208202803683370190505b50905060005b845181101561132e57600061126386838151811061125557611255612193565b60200260200101518661174b565b905061126e8161091e565b611278575061131c565b6000805b84518110156112d257826001600160a01b03168582815181106112a1576112a1612193565b60200260200101516001600160a01b0316036112c057600191506112d2565b806112ca816121ea565b91505061127c565b508061131957846112e2816121ea565b955050818484815181106112f8576112f8612193565b60200260200101906001600160a01b031690816001600160a01b0316815250505b50505b80611326816121ea565b915050611235565b506005548210156113765760405162461bcd60e51b8152602060048201526012602482015271145d5bdc9d5b481dd85cc81b9bdd081b595d60721b6044820152606401610487565b50505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6113a9611831565b6113b161187a565b6113b961188a565b565b6113c3611831565b60038210156114095760405162461bcd60e51b815260206004820152601260248201527128bab7b93ab69034b9903a37b7903637bb9760711b6044820152606401610487565b81835110156114705760405162461bcd60e51b815260206004820152602d60248201527f54686520626f6172642073686f756c64206265206174206c656173742074686560448201526c1038bab7b93ab69039b4bd329760991b6064820152608401610487565b61147983611892565b600591909155600680546001600160a01b0319166001600160a01b03909216919091179055506028600455565b815460009082106115045760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610487565b82600001828154811061151957611519612193565b6000918252602090912001546001600160a01b03169392505050565b60008160000361154757506000919050565b43600454836115569190612415565b111592915050565b611567816118d6565b611572600182611941565b6115d05760405162461bcd60e51b815260206004820152602960248201527f52656c61796572526f6c653a206164647265737320697320616c72656164792060448201526830903932b630bcb2b960b91b6064820152608401610487565b60405133906001600160a01b038316907fd756b9aee10d6f2c80dc42c5031beb0e0847f6e1d6ba50199bdfc3f0de5cc0cc90600090a350565b6001600160a01b03811660009081526001830160205260408120548015611741576000611637600183612428565b855490915060009061164b90600190612428565b9050600086600001828154811061166457611664612193565b60009182526020909120015487546001600160a01b039091169150819088908590811061169357611693612193565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790556116c7836001612415565b6001600160a01b038216600090815260018901602052604090205586548790806116f3576116f361243b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260018981019091526040822091909155945061092b9350505050565b600091505061092b565b600082516041146117945760405162461bcd60e51b81526020600482015260136024820152724d616c666f726d6564207369676e617475726560681b6044820152606401610487565b60208301516040840151606085015160001a8015806117b657508060ff166001145b156117c9576117c6601b82612451565b90505b60408051600081526020810180835287905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa15801561181c573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166113b957604051631afcd79f60e31b815260040160405180910390fd5b611882611831565b6113b96119b3565b6113b9611831565b60005b81518110156118d2576118c08282815181106118b3576118b3612193565b602002602001015161155e565b806118ca816121ea565b915050611895565b5050565b6001600160a01b0381166105475760405162461bcd60e51b815260206004820152602c60248201527f52656c61796572526f6c653a206163636f756e742063616e6e6f74206265207460448201526b68652030206164647265737360a01b6064820152608401610487565b6001600160a01b03811660009081526001830160205260408120546119ab57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b0386169081179091558554908252828601909352604090209190915561092b565b50600061092b565b6119bb611831565b600080546001600160a01b031916339081178255604051909182917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908290a350565b82805482825590600052602060002090601f01602090048101928215611aa25791602002820160005b83821115611a7357835183826101000a81548160ff02191690836004811115611a5257611a52611dfe565b02179055509260200192600101602081600001049283019260010302611a27565b8015611aa05782816101000a81549060ff0219169055600101602081600001049283019260010302611a73565b505b50611aae929150611ab2565b5090565b5b80821115611aae5760008155600101611ab3565b6020808252825182820181905260009190848201906040850190845b81811015611b085783516001600160a01b031683529284019291840191600101611ae3565b50909695505050505050565b6001600160a01b038116811461054757600080fd5b600060208284031215611b3b57600080fd5b813561139a81611b14565b60008083601f840112611b5857600080fd5b5081356001600160401b03811115611b6f57600080fd5b6020830191508360208260051b8501011115611b8a57600080fd5b9250929050565b600080600080600080600080600080600060c08c8e031215611bb257600080fd5b6001600160401b03808d351115611bc857600080fd5b611bd58e8e358f01611b46565b909c509a5060208d0135811015611beb57600080fd5b611bfb8e60208f01358f01611b46565b909a50985060408d0135811015611c1157600080fd5b611c218e60408f01358f01611b46565b909850965060608d0135811015611c3757600080fd5b611c478e60608f01358f01611b46565b909650945060808d0135935060a08d0135811015611c6457600080fd5b50611c758d60a08e01358e01611b46565b81935080925050509295989b509295989b9093969950565b600060208284031215611c9f57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715611cde57611cde611ca6565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d0c57611d0c611ca6565b604052919050565b60006001600160401b03821115611d2d57611d2d611ca6565b5060051b60200190565b8035611d4281611b14565b919050565b600080600060608486031215611d5c57600080fd5b83356001600160401b03811115611d7257600080fd5b8401601f81018613611d8357600080fd5b80356020611d98611d9383611d14565b611ce4565b82815260059290921b83018101918181019089841115611db757600080fd5b938201935b83851015611dde578435611dcf81611b14565b82529382019390820190611dbc565b9650508601359350611df591505060408501611d37565b90509250925092565b634e487b7160e01b600052602160045260246000fd5b60058110611e3257634e487b7160e01b600052602160045260246000fd5b9052565b6040808252835182820181905260009190606090818501906020808901865b83811015611ec257815180516001600160701b03168652838101516001600160a01b039081168588015288820151898801528782015116878701526080808201519087015260a09081015190611ead81880183611e14565b505060c0949094019390820190600101611e55565b5050829550611ed48188018915159052565b50505050509392505050565b604080825283519082018190526000906020906060840190828701845b82811015611f2057611f10848351611e14565b9284019290840190600101611efd565b50505093151592019190915250919050565b600060208284031215611f4457600080fd5b813560ff8116811461139a57600080fd5b60208082526023908201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f7420416460408201526236b4b760e91b606082015260800190565b6000611fa6611d9384611d14565b80848252602080830192508560051b850136811115611fc457600080fd5b855b818110156120565780356001600160401b0380821115611fe65760008081fd5b90880190601f3681840112611ffb5760008081fd5b82358281111561200d5761200d611ca6565b61201e818301601f19168801611ce4565b9250808352368782860101111561203757600091508182fd5b8087850188850137600090830187015250865250938201938201611fc6565b50919695505050505050565b8183526000602080850194508260005b858110156120a057813561208581611b14565b6001600160a01b031687529582019590820190600101612072565b509495945050505050565b81835260006001600160fb1b038311156120c457600080fd5b8260051b80836020870137939093016020019392505050565b60005b838110156120f85781810151838201526020016120e0565b50506000910152565b60c08152600061211560c083018c8e612062565b8281036020840152612128818b8d612062565b9050828103604084015261213d81898b6120ab565b905082810360608401526121528187896120ab565b905084608084015282810360a084015283518082526121788160208401602088016120dd565b601f01601f1916016020019c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b80518015158114611d4257600080fd5b6000602082840312156121cb57600080fd5b61139a826121a9565b634e487b7160e01b600052601160045260246000fd5b6000600182016121fc576121fc6121d4565b5060010190565b80516001600160701b0381168114611d4257600080fd5b80516001600160401b0381168114611d4257600080fd5b60008082840360a081121561224557600080fd5b608081121561225357600080fd5b50604051608081018181106001600160401b038211171561227657612276611ca6565b60405261228284612203565b81526122906020850161221a565b60208201526122a16040850161221a565b6040820152606084015161ffff811681146122bb57600080fd5b606082015291506122ce608084016121a9565b90509250929050565b805160058110611d4257600080fd5b60008060408084860312156122fa57600080fd5b83516001600160401b0381111561231057600080fd5b8401601f8101861361232157600080fd5b80516020612331611d9383611d14565b82815260c0928302840182019282820191908a85111561235057600080fd5b948301945b848610156123d65780868c03121561236d5760008081fd5b612375611cbc565b61237e87612203565b81528487015161238d81611b14565b8186015286880151888201526060808801516123a881611b14565b908201526080878101519082015260a06123c38189016122d7565b9082015283529485019491830191612355565b5096506123e690508782016121a9565b9450505050509250929050565b600083516124058184602088016120dd565b9190910191825250602001919050565b8082018082111561092b5761092b6121d4565b8181038181111561092b5761092b6121d4565b634e487b7160e01b600052603160045260246000fd5b60ff818116838216019081111561092b5761092b6121d456fea164736f6c6343000814000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101735760003560e01c806375829def116100de578063bee2e4dd11610097578063db626c2d11610071578063db626c2d14610391578063dd39f00d146103b2578063f2e0ec48146103c5578063f851a440146103d857600080fd5b8063bee2e4dd1461034b578063c1ba4e5914610376578063d3d9ec011461038957600080fd5b806375829def146102c15780638456cb59146102d457806384aa1ad0146102dc5780638bad0c0a146102ff57806390924da714610307578063b2c79ca31461032857600080fd5b8063541d554811610130578063541d5548146101e25780635ac44282146102055780635c975abb1461026d57806360f0a5ac146102785780637039e21b1461028b57806372483bf9146102ae57600080fd5b80631703a01814610178578063179ff4b2146101945780633f4ba83a146101a9578063475ed4d0146101b35780634ab3867f146101c657806351db0518146101cf575b600080fd5b61018160055481565b6040519081526020015b60405180910390f35b61019c6103e9565b60405161018b9190611ac7565b6101b161044e565b005b6101b16101c1366004611b29565b6104d1565b61018160045481565b6101b16101dd366004611b91565b61054a565b6101f56101f0366004611b29565b61091e565b604051901515815260200161018b565b610218610213366004611c8d565b610931565b6040805183516001600160701b031681526020808501516001600160401b039081169183019190915284830151169181019190915260609283015161ffff16928101929092521515608082015260a00161018b565b60035460ff166101f5565b6101b1610286366004611b29565b6109cc565b6101f5610299366004611c8d565b60076020526000908152604090205460ff1681565b6101b16102bc366004611d47565b610a05565b6101b16102cf366004611b29565b610b1f565b6101b1610c1a565b6101f56102ea366004611c8d565b60009081526007602052604090205460ff1690565b6101b1610c93565b61031a610315366004611c8d565b610d16565b60405161018b929190611e36565b610181610336366004611c8d565b60086020526000908152604090206001015481565b61035e610359366004611c8d565b610d8d565b6040516001600160a01b03909116815260200161018b565b6101b1610384366004611c8d565b610d9a565b610181610e54565b6103a461039f366004611c8d565b610e64565b60405161018b929190611ee0565b6101b16103c0366004611b29565b610f28565b6101b16103d3366004611f32565b610f6a565b6000546001600160a01b031661035e565b6060600160000180548060200260200160405190810160405280929190818152602001828054801561044457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610426575b5050505050905090565b336104616000546001600160a01b031690565b6001600160a01b0316146104905760405162461bcd60e51b815260040161048790611f55565b60405180910390fd5b6003805460ff19169055604051600081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020015b60405180910390a1565b6001600160a01b038116331461053e5760405162461bcd60e51b815260206004820152602c60248201527f52656c61796572526f6c653a2063616e206f6e6c792072656e6f756e6365207260448201526b37b632903337b91039b2b63360a11b6064820152608401610487565b610547816110de565b50565b60035460ff16156105905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610487565b6105993361091e565b6105f35760405162461bcd60e51b815260206004820152602560248201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f742052656044820152643630bcb2b960d91b6064820152608401610487565b6005548110156106555760405162461bcd60e51b815260206004820152602760248201527f4e6f7420656e6f756768207369676e61747572657320746f20616368696576656044820152662071756f72756d60c81b6064820152608401610487565b60008381526007602052604090205460ff16156106ad5760405162461bcd60e51b815260206004820152601660248201527510985d18da08185b1c9958591e48195e1958dd5d195960521b6044820152606401610487565b6000838152600760205260409020805460ff191660011790556107406106d38284611f98565b61073b8b8b8f8f8d8d8d8d8d6040518060400160405280601681526020017522bc32b1baba32a130ba31b432b22a3930b739b332b960511b8152506040516020016107279a99989796959493929190612101565b60405160208183030381529060405261117c565b6111ea565b60008a6001600160401b0381111561075a5761075a611ca6565b604051908082528060200260200182016040528015610783578160200160208202803683370190505b50905060005b8b8110156108e4576006546001600160a01b031663dbba0f018e8e848181106107b4576107b4612193565b90506020020160208101906107c99190611b29565b8b8b858181106107db576107db612193565b905060200201358e8e868181106107f4576107f4612193565b90506020020160208101906108099190611b29565b60405160e085901b6001600160e01b03191681526001600160a01b039384166004820152602481019290925290911660448201526064016020604051808303816000875af115801561085f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088391906121b9565b61088e576004610891565b60035b8282815181106108a3576108a3612193565b602002602001019060048111156108bc576108bc611dfe565b908160048111156108cf576108cf611dfe565b905250806108dc816121ea565b915050610789565b506000848152600860209081526040909120825190916109089183918501906119fe565b5043600190910155505050505050505050505050565b600061092b60018361137c565b92915050565b604080516080810182526000808252602082018190529181018290526060810191909152600654604051632d62214160e11b8152600481018490526000916001600160a01b031690635ac442829060240160a060405180830381865afa15801561099f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c39190612231565b91509150915091565b336109df6000546001600160a01b031690565b6001600160a01b03161461053e5760405162461bcd60e51b815260040161048790611f55565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b0316600081158015610a4a5750825b90506000826001600160401b03166001148015610a665750303b155b905081158015610a74575080155b15610a925760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610abc57845460ff60401b1916600160401b1785555b610ac46113a1565b610acf8888886113bb565b8315610b1557845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b33610b326000546001600160a01b031690565b6001600160a01b031614610b585760405162461bcd60e51b815260040161048790611f55565b6001600160a01b038116610bbf5760405162461bcd60e51b815260206004820152602860248201527f41646d696e526f6c653a206e65772061646d696e20697320746865207a65726f604482015267206164647265737360c01b6064820152608401610487565b600080546040516001600160a01b03808516939216917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610c2d6000546001600160a01b031690565b6001600160a01b031614610c535760405162461bcd60e51b815260040161048790611f55565b6003805460ff191660019081179091556040519081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020016104c7565b33610ca66000546001600160a01b031690565b6001600160a01b031614610ccc5760405162461bcd60e51b815260040161048790611f55565b600080546040516001600160a01b03909116907fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908390a3600080546001600160a01b0319169055565b60065460405163085c967f60e01b8152600481018390526060916000916001600160a01b039091169063085c967f90602401600060405180830381865afa158015610d65573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109c391908101906122e6565b600061092b6001836114a6565b33610dad6000546001600160a01b031690565b6001600160a01b031614610dd35760405162461bcd60e51b815260040161048790611f55565b6003811015610e195760405162461bcd60e51b815260206004820152601260248201527128bab7b93ab69034b9903a37b7903637bb9760711b6044820152606401610487565b60058190556040518181527f027863d12a407097e086a48e36475bfc859d0b200b7e6f65b5fd3b218e46632e9060200160405180910390a150565b6000610e5f60015490565b905090565b60008181526008602090815260408083208151815493840281016060908101845292810184815292949384939192918391839083890182828015610ef757602002820191906000526020600020906000905b82829054906101000a900460ff166004811115610ed557610ed5611dfe565b815260206001928301818104948501949093039092029101808411610eb65790505b5050505050815260200160018201548152505090508060000151610f1e8260200151611535565b9250925050915091565b33610f3b6000546001600160a01b031690565b6001600160a01b031614610f615760405162461bcd60e51b815260040161048790611f55565b6105478161155e565b33610f7d6000546001600160a01b031690565b6001600160a01b031614610fa35760405162461bcd60e51b815260040161048790611f55565b60035460ff16610fec5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610487565b600660009054906101000a90046001600160a01b03166001600160a01b031663821461386040518163ffffffff1660e01b8152600401602060405180830381865afa15801561103f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106391906121b9565b156110d65760405162461bcd60e51b815260206004820152603860248201527f43616e6e6f74206368616e6765206261746368536574746c65426c6f636b436f60448201527f756e7420776974682070656e64696e67206261746368657300000000000000006064820152608401610487565b60ff16600455565b6110e9600182611609565b6111435760405162461bcd60e51b815260206004820152602560248201527f52656c61796572526f6c653a2061646472657373206973206e6f7420612072656044820152643630bcb2b960d91b6064820152608401610487565b60405133906001600160a01b038316907f0bdcf1d6f29aa87af8131cc81dcbb295fcf98d71cfcdc79cc5d965317bae1d0a90600090a350565b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525082805190602001206040516020016111cd9291906123f3565b604051602081830303815290604052805190602001209050919050565b60008083516001600160401b0381111561120657611206611ca6565b60405190808252806020026020018201604052801561122f578160200160208202803683370190505b50905060005b845181101561132e57600061126386838151811061125557611255612193565b60200260200101518661174b565b905061126e8161091e565b611278575061131c565b6000805b84518110156112d257826001600160a01b03168582815181106112a1576112a1612193565b60200260200101516001600160a01b0316036112c057600191506112d2565b806112ca816121ea565b91505061127c565b508061131957846112e2816121ea565b955050818484815181106112f8576112f8612193565b60200260200101906001600160a01b031690816001600160a01b0316815250505b50505b80611326816121ea565b915050611235565b506005548210156113765760405162461bcd60e51b8152602060048201526012602482015271145d5bdc9d5b481dd85cc81b9bdd081b595d60721b6044820152606401610487565b50505050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6113a9611831565b6113b161187a565b6113b961188a565b565b6113c3611831565b60038210156114095760405162461bcd60e51b815260206004820152601260248201527128bab7b93ab69034b9903a37b7903637bb9760711b6044820152606401610487565b81835110156114705760405162461bcd60e51b815260206004820152602d60248201527f54686520626f6172642073686f756c64206265206174206c656173742074686560448201526c1038bab7b93ab69039b4bd329760991b6064820152608401610487565b61147983611892565b600591909155600680546001600160a01b0319166001600160a01b03909216919091179055506028600455565b815460009082106115045760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610487565b82600001828154811061151957611519612193565b6000918252602090912001546001600160a01b03169392505050565b60008160000361154757506000919050565b43600454836115569190612415565b111592915050565b611567816118d6565b611572600182611941565b6115d05760405162461bcd60e51b815260206004820152602960248201527f52656c61796572526f6c653a206164647265737320697320616c72656164792060448201526830903932b630bcb2b960b91b6064820152608401610487565b60405133906001600160a01b038316907fd756b9aee10d6f2c80dc42c5031beb0e0847f6e1d6ba50199bdfc3f0de5cc0cc90600090a350565b6001600160a01b03811660009081526001830160205260408120548015611741576000611637600183612428565b855490915060009061164b90600190612428565b9050600086600001828154811061166457611664612193565b60009182526020909120015487546001600160a01b039091169150819088908590811061169357611693612193565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790556116c7836001612415565b6001600160a01b038216600090815260018901602052604090205586548790806116f3576116f361243b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b038816825260018981019091526040822091909155945061092b9350505050565b600091505061092b565b600082516041146117945760405162461bcd60e51b81526020600482015260136024820152724d616c666f726d6564207369676e617475726560681b6044820152606401610487565b60208301516040840151606085015160001a8015806117b657508060ff166001145b156117c9576117c6601b82612451565b90505b60408051600081526020810180835287905260ff831691810191909152606081018490526080810183905260019060a0016020604051602081039080840390855afa15801561181c573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166113b957604051631afcd79f60e31b815260040160405180910390fd5b611882611831565b6113b96119b3565b6113b9611831565b60005b81518110156118d2576118c08282815181106118b3576118b3612193565b602002602001015161155e565b806118ca816121ea565b915050611895565b5050565b6001600160a01b0381166105475760405162461bcd60e51b815260206004820152602c60248201527f52656c61796572526f6c653a206163636f756e742063616e6e6f74206265207460448201526b68652030206164647265737360a01b6064820152608401610487565b6001600160a01b03811660009081526001830160205260408120546119ab57508154600180820184556000848152602080822090930180546001600160a01b0319166001600160a01b0386169081179091558554908252828601909352604090209190915561092b565b50600061092b565b6119bb611831565b600080546001600160a01b031916339081178255604051909182917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908290a350565b82805482825590600052602060002090601f01602090048101928215611aa25791602002820160005b83821115611a7357835183826101000a81548160ff02191690836004811115611a5257611a52611dfe565b02179055509260200192600101602081600001049283019260010302611a27565b8015611aa05782816101000a81549060ff0219169055600101602081600001049283019260010302611a73565b505b50611aae929150611ab2565b5090565b5b80821115611aae5760008155600101611ab3565b6020808252825182820181905260009190848201906040850190845b81811015611b085783516001600160a01b031683529284019291840191600101611ae3565b50909695505050505050565b6001600160a01b038116811461054757600080fd5b600060208284031215611b3b57600080fd5b813561139a81611b14565b60008083601f840112611b5857600080fd5b5081356001600160401b03811115611b6f57600080fd5b6020830191508360208260051b8501011115611b8a57600080fd5b9250929050565b600080600080600080600080600080600060c08c8e031215611bb257600080fd5b6001600160401b03808d351115611bc857600080fd5b611bd58e8e358f01611b46565b909c509a5060208d0135811015611beb57600080fd5b611bfb8e60208f01358f01611b46565b909a50985060408d0135811015611c1157600080fd5b611c218e60408f01358f01611b46565b909850965060608d0135811015611c3757600080fd5b611c478e60608f01358f01611b46565b909650945060808d0135935060a08d0135811015611c6457600080fd5b50611c758d60a08e01358e01611b46565b81935080925050509295989b509295989b9093969950565b600060208284031215611c9f57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715611cde57611cde611ca6565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611d0c57611d0c611ca6565b604052919050565b60006001600160401b03821115611d2d57611d2d611ca6565b5060051b60200190565b8035611d4281611b14565b919050565b600080600060608486031215611d5c57600080fd5b83356001600160401b03811115611d7257600080fd5b8401601f81018613611d8357600080fd5b80356020611d98611d9383611d14565b611ce4565b82815260059290921b83018101918181019089841115611db757600080fd5b938201935b83851015611dde578435611dcf81611b14565b82529382019390820190611dbc565b9650508601359350611df591505060408501611d37565b90509250925092565b634e487b7160e01b600052602160045260246000fd5b60058110611e3257634e487b7160e01b600052602160045260246000fd5b9052565b6040808252835182820181905260009190606090818501906020808901865b83811015611ec257815180516001600160701b03168652838101516001600160a01b039081168588015288820151898801528782015116878701526080808201519087015260a09081015190611ead81880183611e14565b505060c0949094019390820190600101611e55565b5050829550611ed48188018915159052565b50505050509392505050565b604080825283519082018190526000906020906060840190828701845b82811015611f2057611f10848351611e14565b9284019290840190600101611efd565b50505093151592019190915250919050565b600060208284031215611f4457600080fd5b813560ff8116811461139a57600080fd5b60208082526023908201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f7420416460408201526236b4b760e91b606082015260800190565b6000611fa6611d9384611d14565b80848252602080830192508560051b850136811115611fc457600080fd5b855b818110156120565780356001600160401b0380821115611fe65760008081fd5b90880190601f3681840112611ffb5760008081fd5b82358281111561200d5761200d611ca6565b61201e818301601f19168801611ce4565b9250808352368782860101111561203757600091508182fd5b8087850188850137600090830187015250865250938201938201611fc6565b50919695505050505050565b8183526000602080850194508260005b858110156120a057813561208581611b14565b6001600160a01b031687529582019590820190600101612072565b509495945050505050565b81835260006001600160fb1b038311156120c457600080fd5b8260051b80836020870137939093016020019392505050565b60005b838110156120f85781810151838201526020016120e0565b50506000910152565b60c08152600061211560c083018c8e612062565b8281036020840152612128818b8d612062565b9050828103604084015261213d81898b6120ab565b905082810360608401526121528187896120ab565b905084608084015282810360a084015283518082526121788160208401602088016120dd565b601f01601f1916016020019c9b505050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b80518015158114611d4257600080fd5b6000602082840312156121cb57600080fd5b61139a826121a9565b634e487b7160e01b600052601160045260246000fd5b6000600182016121fc576121fc6121d4565b5060010190565b80516001600160701b0381168114611d4257600080fd5b80516001600160401b0381168114611d4257600080fd5b60008082840360a081121561224557600080fd5b608081121561225357600080fd5b50604051608081018181106001600160401b038211171561227657612276611ca6565b60405261228284612203565b81526122906020850161221a565b60208201526122a16040850161221a565b6040820152606084015161ffff811681146122bb57600080fd5b606082015291506122ce608084016121a9565b90509250929050565b805160058110611d4257600080fd5b60008060408084860312156122fa57600080fd5b83516001600160401b0381111561231057600080fd5b8401601f8101861361232157600080fd5b80516020612331611d9383611d14565b82815260c0928302840182019282820191908a85111561235057600080fd5b948301945b848610156123d65780868c03121561236d5760008081fd5b612375611cbc565b61237e87612203565b81528487015161238d81611b14565b8186015286880151888201526060808801516123a881611b14565b908201526080878101519082015260a06123c38189016122d7565b9082015283529485019491830191612355565b5096506123e690508782016121a9565b9450505050509250929050565b600083516124058184602088016120dd565b9190910191825250602001919050565b8082018082111561092b5761092b6121d4565b8181038181111561092b5761092b6121d4565b634e487b7160e01b600052603160045260246000fd5b60ff818116838216019081111561092b5761092b6121d456fea164736f6c6343000814000a", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/abi/contracts/ERC20Safe/ERC20Safe.abi.json b/abi/contracts/ERC20Safe/ERC20Safe.abi.json deleted file mode 100644 index 1fa194b..0000000 --- a/abi/contracts/ERC20Safe/ERC20Safe.abi.json +++ /dev/null @@ -1,955 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "SafeERC20FailedOperation", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminRoleTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousBridge", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newBridge", - "type": "address" - } - ], - "name": "BridgeTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint112", - "name": "batchId", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "depositNonce", - "type": "uint112" - } - ], - "name": "ERC20Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint112", - "name": "batchId", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "depositNonce", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "callData", - "type": "bytes" - } - ], - "name": "ERC20SCDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "isPause", - "type": "bool" - } - ], - "name": "Pause", - "type": "event" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchBlockLimit", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "batchDeposits", - "outputs": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "enum DepositStatus", - "name": "status", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSettleLimit", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSize", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "batches", - "outputs": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "uint64", - "name": "blockNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastUpdatedBlockNumber", - "type": "uint64" - }, - { - "internalType": "uint16", - "name": "depositsCount", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchesCount", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "burnBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "recipientAddress", - "type": "bytes32" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "recipientAddress", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - } - ], - "name": "depositWithSCExecution", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositsCount", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getBatch", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "uint64", - "name": "blockNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastUpdatedBlockNumber", - "type": "uint64" - }, - { - "internalType": "uint16", - "name": "depositsCount", - "type": "uint16" - } - ], - "internalType": "struct Batch", - "name": "", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "isBatchFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getDeposits", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "enum DepositStatus", - "name": "status", - "type": "uint8" - } - ], - "internalType": "struct Deposit[]", - "name": "", - "type": "tuple[]" - }, - { - "internalType": "bool", - "name": "areDepositsFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTokenMaxLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTokenMinLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "initSupply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isAnyBatchInProgress", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "isTokenWhitelisted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "mintBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "mintBurnTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nativeTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "recoverLostFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "removeTokenFromWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newBatchBlockLimit", - "type": "uint8" - } - ], - "name": "setBatchBlockLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newBatchSettleLimit", - "type": "uint8" - } - ], - "name": "setBatchSettleLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "newBatchSize", - "type": "uint16" - } - ], - "name": "setBatchSize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newBridge", - "type": "address" - } - ], - "name": "setBridge", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setTokenMaxLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setTokenMinLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenMaxLimits", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenMinLimits", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipientAddress", - "type": "address" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "transferAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minimumAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maximumAmount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintBurn", - "type": "bool" - }, - { - "internalType": "bool", - "name": "native", - "type": "bool" - } - ], - "name": "whitelistToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "whitelistedTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } -] diff --git a/abi/contracts/ERC20Safe/ERC20Safe.go b/abi/contracts/ERC20Safe/ERC20Safe.go deleted file mode 100644 index 7756390..0000000 --- a/abi/contracts/ERC20Safe/ERC20Safe.go +++ /dev/null @@ -1,2236 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contract - -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 -) - -// Batch is an auto generated low-level Go binding around an user-defined struct. -type Batch struct { - Nonce *big.Int - BlockNumber uint64 - LastUpdatedBlockNumber uint64 - DepositsCount uint16 -} - -// Deposit is an auto generated low-level Go binding around an user-defined struct. -type Deposit struct { - Nonce *big.Int - TokenAddress common.Address - Amount *big.Int - Depositor common.Address - Recipient [32]byte - Status uint8 -} - -// ERC20SafeMetaData contains all meta data concerning the ERC20Safe contract. -var ERC20SafeMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminRoleTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousBridge\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newBridge\",\"type\":\"address\"}],\"name\":\"BridgeTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"batchId\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"depositNonce\",\"type\":\"uint112\"}],\"name\":\"ERC20Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint112\",\"name\":\"batchId\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"uint112\",\"name\":\"depositNonce\",\"type\":\"uint112\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"ERC20SCDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isPause\",\"type\":\"bool\"}],\"name\":\"Pause\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchBlockLimit\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"batchDeposits\",\"outputs\":[{\"internalType\":\"uint112\",\"name\":\"nonce\",\"type\":\"uint112\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"enumDepositStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchSettleLimit\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchSize\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"batches\",\"outputs\":[{\"internalType\":\"uint112\",\"name\":\"nonce\",\"type\":\"uint112\"},{\"internalType\":\"uint64\",\"name\":\"blockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastUpdatedBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"depositsCount\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"batchesCount\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bridge\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"burnBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"recipientAddress\",\"type\":\"bytes32\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"recipientAddress\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"depositWithSCExecution\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositsCount\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNonce\",\"type\":\"uint256\"}],\"name\":\"getBatch\",\"outputs\":[{\"components\":[{\"internalType\":\"uint112\",\"name\":\"nonce\",\"type\":\"uint112\"},{\"internalType\":\"uint64\",\"name\":\"blockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"lastUpdatedBlockNumber\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"depositsCount\",\"type\":\"uint16\"}],\"internalType\":\"structBatch\",\"name\":\"\",\"type\":\"tuple\"},{\"internalType\":\"bool\",\"name\":\"isBatchFinal\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"batchNonce\",\"type\":\"uint256\"}],\"name\":\"getDeposits\",\"outputs\":[{\"components\":[{\"internalType\":\"uint112\",\"name\":\"nonce\",\"type\":\"uint112\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"recipient\",\"type\":\"bytes32\"},{\"internalType\":\"enumDepositStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"internalType\":\"structDeposit[]\",\"name\":\"\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"areDepositsFinal\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenMaxLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getTokenMinLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"initSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isAnyBatchInProgress\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isTokenWhitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"mintBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"mintBurnTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"nativeTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"recoverLostFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"removeTokenFromWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newBatchBlockLimit\",\"type\":\"uint8\"}],\"name\":\"setBatchBlockLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"newBatchSettleLimit\",\"type\":\"uint8\"}],\"name\":\"setBatchSettleLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"newBatchSize\",\"type\":\"uint16\"}],\"name\":\"setBatchSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newBridge\",\"type\":\"address\"}],\"name\":\"setBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setTokenMaxLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setTokenMinLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMaxLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenMinLimits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"totalBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"recipientAddress\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"transferAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minimumAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maximumAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"mintBurn\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"native\",\"type\":\"bool\"}],\"name\":\"whitelistToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"whitelistedTokens\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", -} - -// ERC20SafeABI is the input ABI used to generate the binding from. -// Deprecated: Use ERC20SafeMetaData.ABI instead. -var ERC20SafeABI = ERC20SafeMetaData.ABI - -// ERC20Safe is an auto generated Go binding around an Ethereum contract. -type ERC20Safe struct { - ERC20SafeCaller // Read-only binding to the contract - ERC20SafeTransactor // Write-only binding to the contract - ERC20SafeFilterer // Log filterer for contract events -} - -// ERC20SafeCaller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20SafeCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20SafeTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20SafeTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20SafeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20SafeFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20SafeSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20SafeSession struct { - Contract *ERC20Safe // 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 -} - -// ERC20SafeCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20SafeCallerSession struct { - Contract *ERC20SafeCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20SafeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20SafeTransactorSession struct { - Contract *ERC20SafeTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20SafeRaw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20SafeRaw struct { - Contract *ERC20Safe // Generic contract binding to access the raw methods on -} - -// ERC20SafeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20SafeCallerRaw struct { - Contract *ERC20SafeCaller // Generic read-only contract binding to access the raw methods on -} - -// ERC20SafeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20SafeTransactorRaw struct { - Contract *ERC20SafeTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20Safe creates a new instance of ERC20Safe, bound to a specific deployed contract. -func NewERC20Safe(address common.Address, backend bind.ContractBackend) (*ERC20Safe, error) { - contract, err := bindERC20Safe(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20Safe{ERC20SafeCaller: ERC20SafeCaller{contract: contract}, ERC20SafeTransactor: ERC20SafeTransactor{contract: contract}, ERC20SafeFilterer: ERC20SafeFilterer{contract: contract}}, nil -} - -// NewERC20SafeCaller creates a new read-only instance of ERC20Safe, bound to a specific deployed contract. -func NewERC20SafeCaller(address common.Address, caller bind.ContractCaller) (*ERC20SafeCaller, error) { - contract, err := bindERC20Safe(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20SafeCaller{contract: contract}, nil -} - -// NewERC20SafeTransactor creates a new write-only instance of ERC20Safe, bound to a specific deployed contract. -func NewERC20SafeTransactor(address common.Address, transactor bind.ContractTransactor) (*ERC20SafeTransactor, error) { - contract, err := bindERC20Safe(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20SafeTransactor{contract: contract}, nil -} - -// NewERC20SafeFilterer creates a new log filterer instance of ERC20Safe, bound to a specific deployed contract. -func NewERC20SafeFilterer(address common.Address, filterer bind.ContractFilterer) (*ERC20SafeFilterer, error) { - contract, err := bindERC20Safe(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20SafeFilterer{contract: contract}, nil -} - -// bindERC20Safe binds a generic wrapper to an already deployed contract. -func bindERC20Safe(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ERC20SafeMetaData.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 (_ERC20Safe *ERC20SafeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ERC20Safe.Contract.ERC20SafeCaller.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 (_ERC20Safe *ERC20SafeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Safe.Contract.ERC20SafeTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Safe *ERC20SafeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Safe.Contract.ERC20SafeTransactor.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 (_ERC20Safe *ERC20SafeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ERC20Safe.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 (_ERC20Safe *ERC20SafeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Safe.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20Safe *ERC20SafeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20Safe.Contract.contract.Transact(opts, method, params...) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_ERC20Safe *ERC20SafeCaller) Admin(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "admin") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_ERC20Safe *ERC20SafeSession) Admin() (common.Address, error) { - return _ERC20Safe.Contract.Admin(&_ERC20Safe.CallOpts) -} - -// Admin is a free data retrieval call binding the contract method 0xf851a440. -// -// Solidity: function admin() view returns(address) -func (_ERC20Safe *ERC20SafeCallerSession) Admin() (common.Address, error) { - return _ERC20Safe.Contract.Admin(&_ERC20Safe.CallOpts) -} - -// BatchBlockLimit is a free data retrieval call binding the contract method 0x9ab7cfaa. -// -// Solidity: function batchBlockLimit() view returns(uint8) -func (_ERC20Safe *ERC20SafeCaller) BatchBlockLimit(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "batchBlockLimit") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// BatchBlockLimit is a free data retrieval call binding the contract method 0x9ab7cfaa. -// -// Solidity: function batchBlockLimit() view returns(uint8) -func (_ERC20Safe *ERC20SafeSession) BatchBlockLimit() (uint8, error) { - return _ERC20Safe.Contract.BatchBlockLimit(&_ERC20Safe.CallOpts) -} - -// BatchBlockLimit is a free data retrieval call binding the contract method 0x9ab7cfaa. -// -// Solidity: function batchBlockLimit() view returns(uint8) -func (_ERC20Safe *ERC20SafeCallerSession) BatchBlockLimit() (uint8, error) { - return _ERC20Safe.Contract.BatchBlockLimit(&_ERC20Safe.CallOpts) -} - -// BatchDeposits is a free data retrieval call binding the contract method 0x284c0c44. -// -// Solidity: function batchDeposits(uint256 , uint256 ) view returns(uint112 nonce, address tokenAddress, uint256 amount, address depositor, bytes32 recipient, uint8 status) -func (_ERC20Safe *ERC20SafeCaller) BatchDeposits(opts *bind.CallOpts, arg0 *big.Int, arg1 *big.Int) (struct { - Nonce *big.Int - TokenAddress common.Address - Amount *big.Int - Depositor common.Address - Recipient [32]byte - Status uint8 -}, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "batchDeposits", arg0, arg1) - - outstruct := new(struct { - Nonce *big.Int - TokenAddress common.Address - Amount *big.Int - Depositor common.Address - Recipient [32]byte - Status uint8 - }) - if err != nil { - return *outstruct, err - } - - outstruct.Nonce = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.TokenAddress = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) - outstruct.Amount = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.Depositor = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - outstruct.Recipient = *abi.ConvertType(out[4], new([32]byte)).(*[32]byte) - outstruct.Status = *abi.ConvertType(out[5], new(uint8)).(*uint8) - - return *outstruct, err - -} - -// BatchDeposits is a free data retrieval call binding the contract method 0x284c0c44. -// -// Solidity: function batchDeposits(uint256 , uint256 ) view returns(uint112 nonce, address tokenAddress, uint256 amount, address depositor, bytes32 recipient, uint8 status) -func (_ERC20Safe *ERC20SafeSession) BatchDeposits(arg0 *big.Int, arg1 *big.Int) (struct { - Nonce *big.Int - TokenAddress common.Address - Amount *big.Int - Depositor common.Address - Recipient [32]byte - Status uint8 -}, error) { - return _ERC20Safe.Contract.BatchDeposits(&_ERC20Safe.CallOpts, arg0, arg1) -} - -// BatchDeposits is a free data retrieval call binding the contract method 0x284c0c44. -// -// Solidity: function batchDeposits(uint256 , uint256 ) view returns(uint112 nonce, address tokenAddress, uint256 amount, address depositor, bytes32 recipient, uint8 status) -func (_ERC20Safe *ERC20SafeCallerSession) BatchDeposits(arg0 *big.Int, arg1 *big.Int) (struct { - Nonce *big.Int - TokenAddress common.Address - Amount *big.Int - Depositor common.Address - Recipient [32]byte - Status uint8 -}, error) { - return _ERC20Safe.Contract.BatchDeposits(&_ERC20Safe.CallOpts, arg0, arg1) -} - -// BatchSettleLimit is a free data retrieval call binding the contract method 0x2325b5f7. -// -// Solidity: function batchSettleLimit() view returns(uint8) -func (_ERC20Safe *ERC20SafeCaller) BatchSettleLimit(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "batchSettleLimit") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// BatchSettleLimit is a free data retrieval call binding the contract method 0x2325b5f7. -// -// Solidity: function batchSettleLimit() view returns(uint8) -func (_ERC20Safe *ERC20SafeSession) BatchSettleLimit() (uint8, error) { - return _ERC20Safe.Contract.BatchSettleLimit(&_ERC20Safe.CallOpts) -} - -// BatchSettleLimit is a free data retrieval call binding the contract method 0x2325b5f7. -// -// Solidity: function batchSettleLimit() view returns(uint8) -func (_ERC20Safe *ERC20SafeCallerSession) BatchSettleLimit() (uint8, error) { - return _ERC20Safe.Contract.BatchSettleLimit(&_ERC20Safe.CallOpts) -} - -// BatchSize is a free data retrieval call binding the contract method 0xf4daaba1. -// -// Solidity: function batchSize() view returns(uint16) -func (_ERC20Safe *ERC20SafeCaller) BatchSize(opts *bind.CallOpts) (uint16, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "batchSize") - - if err != nil { - return *new(uint16), err - } - - out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) - - return out0, err - -} - -// BatchSize is a free data retrieval call binding the contract method 0xf4daaba1. -// -// Solidity: function batchSize() view returns(uint16) -func (_ERC20Safe *ERC20SafeSession) BatchSize() (uint16, error) { - return _ERC20Safe.Contract.BatchSize(&_ERC20Safe.CallOpts) -} - -// BatchSize is a free data retrieval call binding the contract method 0xf4daaba1. -// -// Solidity: function batchSize() view returns(uint16) -func (_ERC20Safe *ERC20SafeCallerSession) BatchSize() (uint16, error) { - return _ERC20Safe.Contract.BatchSize(&_ERC20Safe.CallOpts) -} - -// Batches is a free data retrieval call binding the contract method 0xb32c4d8d. -// -// Solidity: function batches(uint256 ) view returns(uint112 nonce, uint64 blockNumber, uint64 lastUpdatedBlockNumber, uint16 depositsCount) -func (_ERC20Safe *ERC20SafeCaller) Batches(opts *bind.CallOpts, arg0 *big.Int) (struct { - Nonce *big.Int - BlockNumber uint64 - LastUpdatedBlockNumber uint64 - DepositsCount uint16 -}, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "batches", arg0) - - outstruct := new(struct { - Nonce *big.Int - BlockNumber uint64 - LastUpdatedBlockNumber uint64 - DepositsCount uint16 - }) - if err != nil { - return *outstruct, err - } - - outstruct.Nonce = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - outstruct.BlockNumber = *abi.ConvertType(out[1], new(uint64)).(*uint64) - outstruct.LastUpdatedBlockNumber = *abi.ConvertType(out[2], new(uint64)).(*uint64) - outstruct.DepositsCount = *abi.ConvertType(out[3], new(uint16)).(*uint16) - - return *outstruct, err - -} - -// Batches is a free data retrieval call binding the contract method 0xb32c4d8d. -// -// Solidity: function batches(uint256 ) view returns(uint112 nonce, uint64 blockNumber, uint64 lastUpdatedBlockNumber, uint16 depositsCount) -func (_ERC20Safe *ERC20SafeSession) Batches(arg0 *big.Int) (struct { - Nonce *big.Int - BlockNumber uint64 - LastUpdatedBlockNumber uint64 - DepositsCount uint16 -}, error) { - return _ERC20Safe.Contract.Batches(&_ERC20Safe.CallOpts, arg0) -} - -// Batches is a free data retrieval call binding the contract method 0xb32c4d8d. -// -// Solidity: function batches(uint256 ) view returns(uint112 nonce, uint64 blockNumber, uint64 lastUpdatedBlockNumber, uint16 depositsCount) -func (_ERC20Safe *ERC20SafeCallerSession) Batches(arg0 *big.Int) (struct { - Nonce *big.Int - BlockNumber uint64 - LastUpdatedBlockNumber uint64 - DepositsCount uint16 -}, error) { - return _ERC20Safe.Contract.Batches(&_ERC20Safe.CallOpts, arg0) -} - -// BatchesCount is a free data retrieval call binding the contract method 0x87ea0961. -// -// Solidity: function batchesCount() view returns(uint64) -func (_ERC20Safe *ERC20SafeCaller) BatchesCount(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "batchesCount") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// BatchesCount is a free data retrieval call binding the contract method 0x87ea0961. -// -// Solidity: function batchesCount() view returns(uint64) -func (_ERC20Safe *ERC20SafeSession) BatchesCount() (uint64, error) { - return _ERC20Safe.Contract.BatchesCount(&_ERC20Safe.CallOpts) -} - -// BatchesCount is a free data retrieval call binding the contract method 0x87ea0961. -// -// Solidity: function batchesCount() view returns(uint64) -func (_ERC20Safe *ERC20SafeCallerSession) BatchesCount() (uint64, error) { - return _ERC20Safe.Contract.BatchesCount(&_ERC20Safe.CallOpts) -} - -// Bridge is a free data retrieval call binding the contract method 0xe78cea92. -// -// Solidity: function bridge() view returns(address) -func (_ERC20Safe *ERC20SafeCaller) Bridge(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "bridge") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Bridge is a free data retrieval call binding the contract method 0xe78cea92. -// -// Solidity: function bridge() view returns(address) -func (_ERC20Safe *ERC20SafeSession) Bridge() (common.Address, error) { - return _ERC20Safe.Contract.Bridge(&_ERC20Safe.CallOpts) -} - -// Bridge is a free data retrieval call binding the contract method 0xe78cea92. -// -// Solidity: function bridge() view returns(address) -func (_ERC20Safe *ERC20SafeCallerSession) Bridge() (common.Address, error) { - return _ERC20Safe.Contract.Bridge(&_ERC20Safe.CallOpts) -} - -// BurnBalances is a free data retrieval call binding the contract method 0xcf6682a2. -// -// Solidity: function burnBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) BurnBalances(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "burnBalances", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BurnBalances is a free data retrieval call binding the contract method 0xcf6682a2. -// -// Solidity: function burnBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) BurnBalances(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.BurnBalances(&_ERC20Safe.CallOpts, arg0) -} - -// BurnBalances is a free data retrieval call binding the contract method 0xcf6682a2. -// -// Solidity: function burnBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) BurnBalances(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.BurnBalances(&_ERC20Safe.CallOpts, arg0) -} - -// DepositsCount is a free data retrieval call binding the contract method 0x4506e935. -// -// Solidity: function depositsCount() view returns(uint64) -func (_ERC20Safe *ERC20SafeCaller) DepositsCount(opts *bind.CallOpts) (uint64, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "depositsCount") - - if err != nil { - return *new(uint64), err - } - - out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) - - return out0, err - -} - -// DepositsCount is a free data retrieval call binding the contract method 0x4506e935. -// -// Solidity: function depositsCount() view returns(uint64) -func (_ERC20Safe *ERC20SafeSession) DepositsCount() (uint64, error) { - return _ERC20Safe.Contract.DepositsCount(&_ERC20Safe.CallOpts) -} - -// DepositsCount is a free data retrieval call binding the contract method 0x4506e935. -// -// Solidity: function depositsCount() view returns(uint64) -func (_ERC20Safe *ERC20SafeCallerSession) DepositsCount() (uint64, error) { - return _ERC20Safe.Contract.DepositsCount(&_ERC20Safe.CallOpts) -} - -// GetBatch is a free data retrieval call binding the contract method 0x5ac44282. -// -// Solidity: function getBatch(uint256 batchNonce) view returns((uint112,uint64,uint64,uint16), bool isBatchFinal) -func (_ERC20Safe *ERC20SafeCaller) GetBatch(opts *bind.CallOpts, batchNonce *big.Int) (Batch, bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "getBatch", batchNonce) - - if err != nil { - return *new(Batch), *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(Batch)).(*Batch) - out1 := *abi.ConvertType(out[1], new(bool)).(*bool) - - return out0, out1, err - -} - -// GetBatch is a free data retrieval call binding the contract method 0x5ac44282. -// -// Solidity: function getBatch(uint256 batchNonce) view returns((uint112,uint64,uint64,uint16), bool isBatchFinal) -func (_ERC20Safe *ERC20SafeSession) GetBatch(batchNonce *big.Int) (Batch, bool, error) { - return _ERC20Safe.Contract.GetBatch(&_ERC20Safe.CallOpts, batchNonce) -} - -// GetBatch is a free data retrieval call binding the contract method 0x5ac44282. -// -// Solidity: function getBatch(uint256 batchNonce) view returns((uint112,uint64,uint64,uint16), bool isBatchFinal) -func (_ERC20Safe *ERC20SafeCallerSession) GetBatch(batchNonce *big.Int) (Batch, bool, error) { - return _ERC20Safe.Contract.GetBatch(&_ERC20Safe.CallOpts, batchNonce) -} - -// GetDeposits is a free data retrieval call binding the contract method 0x085c967f. -// -// Solidity: function getDeposits(uint256 batchNonce) view returns((uint112,address,uint256,address,bytes32,uint8)[], bool areDepositsFinal) -func (_ERC20Safe *ERC20SafeCaller) GetDeposits(opts *bind.CallOpts, batchNonce *big.Int) ([]Deposit, bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "getDeposits", batchNonce) - - if err != nil { - return *new([]Deposit), *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new([]Deposit)).(*[]Deposit) - out1 := *abi.ConvertType(out[1], new(bool)).(*bool) - - return out0, out1, err - -} - -// GetDeposits is a free data retrieval call binding the contract method 0x085c967f. -// -// Solidity: function getDeposits(uint256 batchNonce) view returns((uint112,address,uint256,address,bytes32,uint8)[], bool areDepositsFinal) -func (_ERC20Safe *ERC20SafeSession) GetDeposits(batchNonce *big.Int) ([]Deposit, bool, error) { - return _ERC20Safe.Contract.GetDeposits(&_ERC20Safe.CallOpts, batchNonce) -} - -// GetDeposits is a free data retrieval call binding the contract method 0x085c967f. -// -// Solidity: function getDeposits(uint256 batchNonce) view returns((uint112,address,uint256,address,bytes32,uint8)[], bool areDepositsFinal) -func (_ERC20Safe *ERC20SafeCallerSession) GetDeposits(batchNonce *big.Int) ([]Deposit, bool, error) { - return _ERC20Safe.Contract.GetDeposits(&_ERC20Safe.CallOpts, batchNonce) -} - -// GetTokenMaxLimit is a free data retrieval call binding the contract method 0xc652a0b5. -// -// Solidity: function getTokenMaxLimit(address token) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) GetTokenMaxLimit(opts *bind.CallOpts, token common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "getTokenMaxLimit", token) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetTokenMaxLimit is a free data retrieval call binding the contract method 0xc652a0b5. -// -// Solidity: function getTokenMaxLimit(address token) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) GetTokenMaxLimit(token common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.GetTokenMaxLimit(&_ERC20Safe.CallOpts, token) -} - -// GetTokenMaxLimit is a free data retrieval call binding the contract method 0xc652a0b5. -// -// Solidity: function getTokenMaxLimit(address token) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) GetTokenMaxLimit(token common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.GetTokenMaxLimit(&_ERC20Safe.CallOpts, token) -} - -// GetTokenMinLimit is a free data retrieval call binding the contract method 0x9f0ebb93. -// -// Solidity: function getTokenMinLimit(address token) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) GetTokenMinLimit(opts *bind.CallOpts, token common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "getTokenMinLimit", token) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// GetTokenMinLimit is a free data retrieval call binding the contract method 0x9f0ebb93. -// -// Solidity: function getTokenMinLimit(address token) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) GetTokenMinLimit(token common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.GetTokenMinLimit(&_ERC20Safe.CallOpts, token) -} - -// GetTokenMinLimit is a free data retrieval call binding the contract method 0x9f0ebb93. -// -// Solidity: function getTokenMinLimit(address token) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) GetTokenMinLimit(token common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.GetTokenMinLimit(&_ERC20Safe.CallOpts, token) -} - -// IsAnyBatchInProgress is a free data retrieval call binding the contract method 0x82146138. -// -// Solidity: function isAnyBatchInProgress() view returns(bool) -func (_ERC20Safe *ERC20SafeCaller) IsAnyBatchInProgress(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "isAnyBatchInProgress") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsAnyBatchInProgress is a free data retrieval call binding the contract method 0x82146138. -// -// Solidity: function isAnyBatchInProgress() view returns(bool) -func (_ERC20Safe *ERC20SafeSession) IsAnyBatchInProgress() (bool, error) { - return _ERC20Safe.Contract.IsAnyBatchInProgress(&_ERC20Safe.CallOpts) -} - -// IsAnyBatchInProgress is a free data retrieval call binding the contract method 0x82146138. -// -// Solidity: function isAnyBatchInProgress() view returns(bool) -func (_ERC20Safe *ERC20SafeCallerSession) IsAnyBatchInProgress() (bool, error) { - return _ERC20Safe.Contract.IsAnyBatchInProgress(&_ERC20Safe.CallOpts) -} - -// IsTokenWhitelisted is a free data retrieval call binding the contract method 0xb5af090f. -// -// Solidity: function isTokenWhitelisted(address token) view returns(bool) -func (_ERC20Safe *ERC20SafeCaller) IsTokenWhitelisted(opts *bind.CallOpts, token common.Address) (bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "isTokenWhitelisted", token) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// IsTokenWhitelisted is a free data retrieval call binding the contract method 0xb5af090f. -// -// Solidity: function isTokenWhitelisted(address token) view returns(bool) -func (_ERC20Safe *ERC20SafeSession) IsTokenWhitelisted(token common.Address) (bool, error) { - return _ERC20Safe.Contract.IsTokenWhitelisted(&_ERC20Safe.CallOpts, token) -} - -// IsTokenWhitelisted is a free data retrieval call binding the contract method 0xb5af090f. -// -// Solidity: function isTokenWhitelisted(address token) view returns(bool) -func (_ERC20Safe *ERC20SafeCallerSession) IsTokenWhitelisted(token common.Address) (bool, error) { - return _ERC20Safe.Contract.IsTokenWhitelisted(&_ERC20Safe.CallOpts, token) -} - -// MintBalances is a free data retrieval call binding the contract method 0xbc56602f. -// -// Solidity: function mintBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) MintBalances(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "mintBalances", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// MintBalances is a free data retrieval call binding the contract method 0xbc56602f. -// -// Solidity: function mintBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) MintBalances(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.MintBalances(&_ERC20Safe.CallOpts, arg0) -} - -// MintBalances is a free data retrieval call binding the contract method 0xbc56602f. -// -// Solidity: function mintBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) MintBalances(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.MintBalances(&_ERC20Safe.CallOpts, arg0) -} - -// MintBurnTokens is a free data retrieval call binding the contract method 0x90e0cfcb. -// -// Solidity: function mintBurnTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeCaller) MintBurnTokens(opts *bind.CallOpts, arg0 common.Address) (bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "mintBurnTokens", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// MintBurnTokens is a free data retrieval call binding the contract method 0x90e0cfcb. -// -// Solidity: function mintBurnTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeSession) MintBurnTokens(arg0 common.Address) (bool, error) { - return _ERC20Safe.Contract.MintBurnTokens(&_ERC20Safe.CallOpts, arg0) -} - -// MintBurnTokens is a free data retrieval call binding the contract method 0x90e0cfcb. -// -// Solidity: function mintBurnTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeCallerSession) MintBurnTokens(arg0 common.Address) (bool, error) { - return _ERC20Safe.Contract.MintBurnTokens(&_ERC20Safe.CallOpts, arg0) -} - -// NativeTokens is a free data retrieval call binding the contract method 0xc86726f6. -// -// Solidity: function nativeTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeCaller) NativeTokens(opts *bind.CallOpts, arg0 common.Address) (bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "nativeTokens", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// NativeTokens is a free data retrieval call binding the contract method 0xc86726f6. -// -// Solidity: function nativeTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeSession) NativeTokens(arg0 common.Address) (bool, error) { - return _ERC20Safe.Contract.NativeTokens(&_ERC20Safe.CallOpts, arg0) -} - -// NativeTokens is a free data retrieval call binding the contract method 0xc86726f6. -// -// Solidity: function nativeTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeCallerSession) NativeTokens(arg0 common.Address) (bool, error) { - return _ERC20Safe.Contract.NativeTokens(&_ERC20Safe.CallOpts, arg0) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_ERC20Safe *ERC20SafeCaller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_ERC20Safe *ERC20SafeSession) Paused() (bool, error) { - return _ERC20Safe.Contract.Paused(&_ERC20Safe.CallOpts) -} - -// Paused is a free data retrieval call binding the contract method 0x5c975abb. -// -// Solidity: function paused() view returns(bool) -func (_ERC20Safe *ERC20SafeCallerSession) Paused() (bool, error) { - return _ERC20Safe.Contract.Paused(&_ERC20Safe.CallOpts) -} - -// TokenMaxLimits is a free data retrieval call binding the contract method 0xc639651d. -// -// Solidity: function tokenMaxLimits(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) TokenMaxLimits(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "tokenMaxLimits", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TokenMaxLimits is a free data retrieval call binding the contract method 0xc639651d. -// -// Solidity: function tokenMaxLimits(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) TokenMaxLimits(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.TokenMaxLimits(&_ERC20Safe.CallOpts, arg0) -} - -// TokenMaxLimits is a free data retrieval call binding the contract method 0xc639651d. -// -// Solidity: function tokenMaxLimits(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) TokenMaxLimits(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.TokenMaxLimits(&_ERC20Safe.CallOpts, arg0) -} - -// TokenMinLimits is a free data retrieval call binding the contract method 0xf6246ea1. -// -// Solidity: function tokenMinLimits(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) TokenMinLimits(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "tokenMinLimits", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TokenMinLimits is a free data retrieval call binding the contract method 0xf6246ea1. -// -// Solidity: function tokenMinLimits(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) TokenMinLimits(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.TokenMinLimits(&_ERC20Safe.CallOpts, arg0) -} - -// TokenMinLimits is a free data retrieval call binding the contract method 0xf6246ea1. -// -// Solidity: function tokenMinLimits(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) TokenMinLimits(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.TokenMinLimits(&_ERC20Safe.CallOpts, arg0) -} - -// TotalBalances is a free data retrieval call binding the contract method 0xaee9c872. -// -// Solidity: function totalBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCaller) TotalBalances(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "totalBalances", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TotalBalances is a free data retrieval call binding the contract method 0xaee9c872. -// -// Solidity: function totalBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeSession) TotalBalances(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.TotalBalances(&_ERC20Safe.CallOpts, arg0) -} - -// TotalBalances is a free data retrieval call binding the contract method 0xaee9c872. -// -// Solidity: function totalBalances(address ) view returns(uint256) -func (_ERC20Safe *ERC20SafeCallerSession) TotalBalances(arg0 common.Address) (*big.Int, error) { - return _ERC20Safe.Contract.TotalBalances(&_ERC20Safe.CallOpts, arg0) -} - -// WhitelistedTokens is a free data retrieval call binding the contract method 0xdaf9c210. -// -// Solidity: function whitelistedTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeCaller) WhitelistedTokens(opts *bind.CallOpts, arg0 common.Address) (bool, error) { - var out []interface{} - err := _ERC20Safe.contract.Call(opts, &out, "whitelistedTokens", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// WhitelistedTokens is a free data retrieval call binding the contract method 0xdaf9c210. -// -// Solidity: function whitelistedTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeSession) WhitelistedTokens(arg0 common.Address) (bool, error) { - return _ERC20Safe.Contract.WhitelistedTokens(&_ERC20Safe.CallOpts, arg0) -} - -// WhitelistedTokens is a free data retrieval call binding the contract method 0xdaf9c210. -// -// Solidity: function whitelistedTokens(address ) view returns(bool) -func (_ERC20Safe *ERC20SafeCallerSession) WhitelistedTokens(arg0 common.Address) (bool, error) { - return _ERC20Safe.Contract.WhitelistedTokens(&_ERC20Safe.CallOpts, arg0) -} - -// Deposit is a paid mutator transaction binding the contract method 0x26b3293f. -// -// Solidity: function deposit(address tokenAddress, uint256 amount, bytes32 recipientAddress) returns() -func (_ERC20Safe *ERC20SafeTransactor) Deposit(opts *bind.TransactOpts, tokenAddress common.Address, amount *big.Int, recipientAddress [32]byte) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "deposit", tokenAddress, amount, recipientAddress) -} - -// Deposit is a paid mutator transaction binding the contract method 0x26b3293f. -// -// Solidity: function deposit(address tokenAddress, uint256 amount, bytes32 recipientAddress) returns() -func (_ERC20Safe *ERC20SafeSession) Deposit(tokenAddress common.Address, amount *big.Int, recipientAddress [32]byte) (*types.Transaction, error) { - return _ERC20Safe.Contract.Deposit(&_ERC20Safe.TransactOpts, tokenAddress, amount, recipientAddress) -} - -// Deposit is a paid mutator transaction binding the contract method 0x26b3293f. -// -// Solidity: function deposit(address tokenAddress, uint256 amount, bytes32 recipientAddress) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) Deposit(tokenAddress common.Address, amount *big.Int, recipientAddress [32]byte) (*types.Transaction, error) { - return _ERC20Safe.Contract.Deposit(&_ERC20Safe.TransactOpts, tokenAddress, amount, recipientAddress) -} - -// DepositWithSCExecution is a paid mutator transaction binding the contract method 0xc859b3fe. -// -// Solidity: function depositWithSCExecution(address tokenAddress, uint256 amount, bytes32 recipientAddress, bytes callData) returns() -func (_ERC20Safe *ERC20SafeTransactor) DepositWithSCExecution(opts *bind.TransactOpts, tokenAddress common.Address, amount *big.Int, recipientAddress [32]byte, callData []byte) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "depositWithSCExecution", tokenAddress, amount, recipientAddress, callData) -} - -// DepositWithSCExecution is a paid mutator transaction binding the contract method 0xc859b3fe. -// -// Solidity: function depositWithSCExecution(address tokenAddress, uint256 amount, bytes32 recipientAddress, bytes callData) returns() -func (_ERC20Safe *ERC20SafeSession) DepositWithSCExecution(tokenAddress common.Address, amount *big.Int, recipientAddress [32]byte, callData []byte) (*types.Transaction, error) { - return _ERC20Safe.Contract.DepositWithSCExecution(&_ERC20Safe.TransactOpts, tokenAddress, amount, recipientAddress, callData) -} - -// DepositWithSCExecution is a paid mutator transaction binding the contract method 0xc859b3fe. -// -// Solidity: function depositWithSCExecution(address tokenAddress, uint256 amount, bytes32 recipientAddress, bytes callData) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) DepositWithSCExecution(tokenAddress common.Address, amount *big.Int, recipientAddress [32]byte, callData []byte) (*types.Transaction, error) { - return _ERC20Safe.Contract.DepositWithSCExecution(&_ERC20Safe.TransactOpts, tokenAddress, amount, recipientAddress, callData) -} - -// InitSupply is a paid mutator transaction binding the contract method 0x4013c89c. -// -// Solidity: function initSupply(address tokenAddress, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeTransactor) InitSupply(opts *bind.TransactOpts, tokenAddress common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "initSupply", tokenAddress, amount) -} - -// InitSupply is a paid mutator transaction binding the contract method 0x4013c89c. -// -// Solidity: function initSupply(address tokenAddress, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeSession) InitSupply(tokenAddress common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.Contract.InitSupply(&_ERC20Safe.TransactOpts, tokenAddress, amount) -} - -// InitSupply is a paid mutator transaction binding the contract method 0x4013c89c. -// -// Solidity: function initSupply(address tokenAddress, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) InitSupply(tokenAddress common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.Contract.InitSupply(&_ERC20Safe.TransactOpts, tokenAddress, amount) -} - -// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. -// -// Solidity: function initialize() returns() -func (_ERC20Safe *ERC20SafeTransactor) Initialize(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "initialize") -} - -// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. -// -// Solidity: function initialize() returns() -func (_ERC20Safe *ERC20SafeSession) Initialize() (*types.Transaction, error) { - return _ERC20Safe.Contract.Initialize(&_ERC20Safe.TransactOpts) -} - -// Initialize is a paid mutator transaction binding the contract method 0x8129fc1c. -// -// Solidity: function initialize() returns() -func (_ERC20Safe *ERC20SafeTransactorSession) Initialize() (*types.Transaction, error) { - return _ERC20Safe.Contract.Initialize(&_ERC20Safe.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_ERC20Safe *ERC20SafeTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "pause") -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_ERC20Safe *ERC20SafeSession) Pause() (*types.Transaction, error) { - return _ERC20Safe.Contract.Pause(&_ERC20Safe.TransactOpts) -} - -// Pause is a paid mutator transaction binding the contract method 0x8456cb59. -// -// Solidity: function pause() returns() -func (_ERC20Safe *ERC20SafeTransactorSession) Pause() (*types.Transaction, error) { - return _ERC20Safe.Contract.Pause(&_ERC20Safe.TransactOpts) -} - -// RecoverLostFunds is a paid mutator transaction binding the contract method 0x770be784. -// -// Solidity: function recoverLostFunds(address tokenAddress) returns() -func (_ERC20Safe *ERC20SafeTransactor) RecoverLostFunds(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "recoverLostFunds", tokenAddress) -} - -// RecoverLostFunds is a paid mutator transaction binding the contract method 0x770be784. -// -// Solidity: function recoverLostFunds(address tokenAddress) returns() -func (_ERC20Safe *ERC20SafeSession) RecoverLostFunds(tokenAddress common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.RecoverLostFunds(&_ERC20Safe.TransactOpts, tokenAddress) -} - -// RecoverLostFunds is a paid mutator transaction binding the contract method 0x770be784. -// -// Solidity: function recoverLostFunds(address tokenAddress) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) RecoverLostFunds(tokenAddress common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.RecoverLostFunds(&_ERC20Safe.TransactOpts, tokenAddress) -} - -// RemoveTokenFromWhitelist is a paid mutator transaction binding the contract method 0x306275be. -// -// Solidity: function removeTokenFromWhitelist(address token) returns() -func (_ERC20Safe *ERC20SafeTransactor) RemoveTokenFromWhitelist(opts *bind.TransactOpts, token common.Address) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "removeTokenFromWhitelist", token) -} - -// RemoveTokenFromWhitelist is a paid mutator transaction binding the contract method 0x306275be. -// -// Solidity: function removeTokenFromWhitelist(address token) returns() -func (_ERC20Safe *ERC20SafeSession) RemoveTokenFromWhitelist(token common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.RemoveTokenFromWhitelist(&_ERC20Safe.TransactOpts, token) -} - -// RemoveTokenFromWhitelist is a paid mutator transaction binding the contract method 0x306275be. -// -// Solidity: function removeTokenFromWhitelist(address token) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) RemoveTokenFromWhitelist(token common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.RemoveTokenFromWhitelist(&_ERC20Safe.TransactOpts, token) -} - -// RenounceAdmin is a paid mutator transaction binding the contract method 0x8bad0c0a. -// -// Solidity: function renounceAdmin() returns() -func (_ERC20Safe *ERC20SafeTransactor) RenounceAdmin(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "renounceAdmin") -} - -// RenounceAdmin is a paid mutator transaction binding the contract method 0x8bad0c0a. -// -// Solidity: function renounceAdmin() returns() -func (_ERC20Safe *ERC20SafeSession) RenounceAdmin() (*types.Transaction, error) { - return _ERC20Safe.Contract.RenounceAdmin(&_ERC20Safe.TransactOpts) -} - -// RenounceAdmin is a paid mutator transaction binding the contract method 0x8bad0c0a. -// -// Solidity: function renounceAdmin() returns() -func (_ERC20Safe *ERC20SafeTransactorSession) RenounceAdmin() (*types.Transaction, error) { - return _ERC20Safe.Contract.RenounceAdmin(&_ERC20Safe.TransactOpts) -} - -// SetBatchBlockLimit is a paid mutator transaction binding the contract method 0xe8a70ee2. -// -// Solidity: function setBatchBlockLimit(uint8 newBatchBlockLimit) returns() -func (_ERC20Safe *ERC20SafeTransactor) SetBatchBlockLimit(opts *bind.TransactOpts, newBatchBlockLimit uint8) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "setBatchBlockLimit", newBatchBlockLimit) -} - -// SetBatchBlockLimit is a paid mutator transaction binding the contract method 0xe8a70ee2. -// -// Solidity: function setBatchBlockLimit(uint8 newBatchBlockLimit) returns() -func (_ERC20Safe *ERC20SafeSession) SetBatchBlockLimit(newBatchBlockLimit uint8) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBatchBlockLimit(&_ERC20Safe.TransactOpts, newBatchBlockLimit) -} - -// SetBatchBlockLimit is a paid mutator transaction binding the contract method 0xe8a70ee2. -// -// Solidity: function setBatchBlockLimit(uint8 newBatchBlockLimit) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) SetBatchBlockLimit(newBatchBlockLimit uint8) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBatchBlockLimit(&_ERC20Safe.TransactOpts, newBatchBlockLimit) -} - -// SetBatchSettleLimit is a paid mutator transaction binding the contract method 0xf2e0ec48. -// -// Solidity: function setBatchSettleLimit(uint8 newBatchSettleLimit) returns() -func (_ERC20Safe *ERC20SafeTransactor) SetBatchSettleLimit(opts *bind.TransactOpts, newBatchSettleLimit uint8) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "setBatchSettleLimit", newBatchSettleLimit) -} - -// SetBatchSettleLimit is a paid mutator transaction binding the contract method 0xf2e0ec48. -// -// Solidity: function setBatchSettleLimit(uint8 newBatchSettleLimit) returns() -func (_ERC20Safe *ERC20SafeSession) SetBatchSettleLimit(newBatchSettleLimit uint8) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBatchSettleLimit(&_ERC20Safe.TransactOpts, newBatchSettleLimit) -} - -// SetBatchSettleLimit is a paid mutator transaction binding the contract method 0xf2e0ec48. -// -// Solidity: function setBatchSettleLimit(uint8 newBatchSettleLimit) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) SetBatchSettleLimit(newBatchSettleLimit uint8) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBatchSettleLimit(&_ERC20Safe.TransactOpts, newBatchSettleLimit) -} - -// SetBatchSize is a paid mutator transaction binding the contract method 0xd4673de9. -// -// Solidity: function setBatchSize(uint16 newBatchSize) returns() -func (_ERC20Safe *ERC20SafeTransactor) SetBatchSize(opts *bind.TransactOpts, newBatchSize uint16) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "setBatchSize", newBatchSize) -} - -// SetBatchSize is a paid mutator transaction binding the contract method 0xd4673de9. -// -// Solidity: function setBatchSize(uint16 newBatchSize) returns() -func (_ERC20Safe *ERC20SafeSession) SetBatchSize(newBatchSize uint16) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBatchSize(&_ERC20Safe.TransactOpts, newBatchSize) -} - -// SetBatchSize is a paid mutator transaction binding the contract method 0xd4673de9. -// -// Solidity: function setBatchSize(uint16 newBatchSize) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) SetBatchSize(newBatchSize uint16) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBatchSize(&_ERC20Safe.TransactOpts, newBatchSize) -} - -// SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. -// -// Solidity: function setBridge(address newBridge) returns() -func (_ERC20Safe *ERC20SafeTransactor) SetBridge(opts *bind.TransactOpts, newBridge common.Address) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "setBridge", newBridge) -} - -// SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. -// -// Solidity: function setBridge(address newBridge) returns() -func (_ERC20Safe *ERC20SafeSession) SetBridge(newBridge common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBridge(&_ERC20Safe.TransactOpts, newBridge) -} - -// SetBridge is a paid mutator transaction binding the contract method 0x8dd14802. -// -// Solidity: function setBridge(address newBridge) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) SetBridge(newBridge common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetBridge(&_ERC20Safe.TransactOpts, newBridge) -} - -// SetTokenMaxLimit is a paid mutator transaction binding the contract method 0x7d7763ce. -// -// Solidity: function setTokenMaxLimit(address token, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeTransactor) SetTokenMaxLimit(opts *bind.TransactOpts, token common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "setTokenMaxLimit", token, amount) -} - -// SetTokenMaxLimit is a paid mutator transaction binding the contract method 0x7d7763ce. -// -// Solidity: function setTokenMaxLimit(address token, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeSession) SetTokenMaxLimit(token common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetTokenMaxLimit(&_ERC20Safe.TransactOpts, token, amount) -} - -// SetTokenMaxLimit is a paid mutator transaction binding the contract method 0x7d7763ce. -// -// Solidity: function setTokenMaxLimit(address token, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) SetTokenMaxLimit(token common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetTokenMaxLimit(&_ERC20Safe.TransactOpts, token, amount) -} - -// SetTokenMinLimit is a paid mutator transaction binding the contract method 0x920b0308. -// -// Solidity: function setTokenMinLimit(address token, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeTransactor) SetTokenMinLimit(opts *bind.TransactOpts, token common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "setTokenMinLimit", token, amount) -} - -// SetTokenMinLimit is a paid mutator transaction binding the contract method 0x920b0308. -// -// Solidity: function setTokenMinLimit(address token, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeSession) SetTokenMinLimit(token common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetTokenMinLimit(&_ERC20Safe.TransactOpts, token, amount) -} - -// SetTokenMinLimit is a paid mutator transaction binding the contract method 0x920b0308. -// -// Solidity: function setTokenMinLimit(address token, uint256 amount) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) SetTokenMinLimit(token common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20Safe.Contract.SetTokenMinLimit(&_ERC20Safe.TransactOpts, token, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. -// -// Solidity: function transfer(address tokenAddress, uint256 amount, address recipientAddress) returns(bool) -func (_ERC20Safe *ERC20SafeTransactor) Transfer(opts *bind.TransactOpts, tokenAddress common.Address, amount *big.Int, recipientAddress common.Address) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "transfer", tokenAddress, amount, recipientAddress) -} - -// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. -// -// Solidity: function transfer(address tokenAddress, uint256 amount, address recipientAddress) returns(bool) -func (_ERC20Safe *ERC20SafeSession) Transfer(tokenAddress common.Address, amount *big.Int, recipientAddress common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.Transfer(&_ERC20Safe.TransactOpts, tokenAddress, amount, recipientAddress) -} - -// Transfer is a paid mutator transaction binding the contract method 0xdbba0f01. -// -// Solidity: function transfer(address tokenAddress, uint256 amount, address recipientAddress) returns(bool) -func (_ERC20Safe *ERC20SafeTransactorSession) Transfer(tokenAddress common.Address, amount *big.Int, recipientAddress common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.Transfer(&_ERC20Safe.TransactOpts, tokenAddress, amount, recipientAddress) -} - -// TransferAdmin is a paid mutator transaction binding the contract method 0x75829def. -// -// Solidity: function transferAdmin(address newAdmin) returns() -func (_ERC20Safe *ERC20SafeTransactor) TransferAdmin(opts *bind.TransactOpts, newAdmin common.Address) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "transferAdmin", newAdmin) -} - -// TransferAdmin is a paid mutator transaction binding the contract method 0x75829def. -// -// Solidity: function transferAdmin(address newAdmin) returns() -func (_ERC20Safe *ERC20SafeSession) TransferAdmin(newAdmin common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.TransferAdmin(&_ERC20Safe.TransactOpts, newAdmin) -} - -// TransferAdmin is a paid mutator transaction binding the contract method 0x75829def. -// -// Solidity: function transferAdmin(address newAdmin) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) TransferAdmin(newAdmin common.Address) (*types.Transaction, error) { - return _ERC20Safe.Contract.TransferAdmin(&_ERC20Safe.TransactOpts, newAdmin) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_ERC20Safe *ERC20SafeTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "unpause") -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_ERC20Safe *ERC20SafeSession) Unpause() (*types.Transaction, error) { - return _ERC20Safe.Contract.Unpause(&_ERC20Safe.TransactOpts) -} - -// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. -// -// Solidity: function unpause() returns() -func (_ERC20Safe *ERC20SafeTransactorSession) Unpause() (*types.Transaction, error) { - return _ERC20Safe.Contract.Unpause(&_ERC20Safe.TransactOpts) -} - -// WhitelistToken is a paid mutator transaction binding the contract method 0xa7c3a06f. -// -// Solidity: function whitelistToken(address token, uint256 minimumAmount, uint256 maximumAmount, bool mintBurn, bool native) returns() -func (_ERC20Safe *ERC20SafeTransactor) WhitelistToken(opts *bind.TransactOpts, token common.Address, minimumAmount *big.Int, maximumAmount *big.Int, mintBurn bool, native bool) (*types.Transaction, error) { - return _ERC20Safe.contract.Transact(opts, "whitelistToken", token, minimumAmount, maximumAmount, mintBurn, native) -} - -// WhitelistToken is a paid mutator transaction binding the contract method 0xa7c3a06f. -// -// Solidity: function whitelistToken(address token, uint256 minimumAmount, uint256 maximumAmount, bool mintBurn, bool native) returns() -func (_ERC20Safe *ERC20SafeSession) WhitelistToken(token common.Address, minimumAmount *big.Int, maximumAmount *big.Int, mintBurn bool, native bool) (*types.Transaction, error) { - return _ERC20Safe.Contract.WhitelistToken(&_ERC20Safe.TransactOpts, token, minimumAmount, maximumAmount, mintBurn, native) -} - -// WhitelistToken is a paid mutator transaction binding the contract method 0xa7c3a06f. -// -// Solidity: function whitelistToken(address token, uint256 minimumAmount, uint256 maximumAmount, bool mintBurn, bool native) returns() -func (_ERC20Safe *ERC20SafeTransactorSession) WhitelistToken(token common.Address, minimumAmount *big.Int, maximumAmount *big.Int, mintBurn bool, native bool) (*types.Transaction, error) { - return _ERC20Safe.Contract.WhitelistToken(&_ERC20Safe.TransactOpts, token, minimumAmount, maximumAmount, mintBurn, native) -} - -// ERC20SafeAdminRoleTransferredIterator is returned from FilterAdminRoleTransferred and is used to iterate over the raw logs and unpacked data for AdminRoleTransferred events raised by the ERC20Safe contract. -type ERC20SafeAdminRoleTransferredIterator struct { - Event *ERC20SafeAdminRoleTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20SafeAdminRoleTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ERC20SafeAdminRoleTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ERC20SafeAdminRoleTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ERC20SafeAdminRoleTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20SafeAdminRoleTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20SafeAdminRoleTransferred represents a AdminRoleTransferred event raised by the ERC20Safe contract. -type ERC20SafeAdminRoleTransferred struct { - PreviousAdmin common.Address - NewAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAdminRoleTransferred is a free log retrieval operation binding the contract event 0xe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd. -// -// Solidity: event AdminRoleTransferred(address indexed previousAdmin, address indexed newAdmin) -func (_ERC20Safe *ERC20SafeFilterer) FilterAdminRoleTransferred(opts *bind.FilterOpts, previousAdmin []common.Address, newAdmin []common.Address) (*ERC20SafeAdminRoleTransferredIterator, error) { - - var previousAdminRule []interface{} - for _, previousAdminItem := range previousAdmin { - previousAdminRule = append(previousAdminRule, previousAdminItem) - } - var newAdminRule []interface{} - for _, newAdminItem := range newAdmin { - newAdminRule = append(newAdminRule, newAdminItem) - } - - logs, sub, err := _ERC20Safe.contract.FilterLogs(opts, "AdminRoleTransferred", previousAdminRule, newAdminRule) - if err != nil { - return nil, err - } - return &ERC20SafeAdminRoleTransferredIterator{contract: _ERC20Safe.contract, event: "AdminRoleTransferred", logs: logs, sub: sub}, nil -} - -// WatchAdminRoleTransferred is a free log subscription operation binding the contract event 0xe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd. -// -// Solidity: event AdminRoleTransferred(address indexed previousAdmin, address indexed newAdmin) -func (_ERC20Safe *ERC20SafeFilterer) WatchAdminRoleTransferred(opts *bind.WatchOpts, sink chan<- *ERC20SafeAdminRoleTransferred, previousAdmin []common.Address, newAdmin []common.Address) (event.Subscription, error) { - - var previousAdminRule []interface{} - for _, previousAdminItem := range previousAdmin { - previousAdminRule = append(previousAdminRule, previousAdminItem) - } - var newAdminRule []interface{} - for _, newAdminItem := range newAdmin { - newAdminRule = append(newAdminRule, newAdminItem) - } - - logs, sub, err := _ERC20Safe.contract.WatchLogs(opts, "AdminRoleTransferred", previousAdminRule, newAdminRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20SafeAdminRoleTransferred) - if err := _ERC20Safe.contract.UnpackLog(event, "AdminRoleTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAdminRoleTransferred is a log parse operation binding the contract event 0xe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd. -// -// Solidity: event AdminRoleTransferred(address indexed previousAdmin, address indexed newAdmin) -func (_ERC20Safe *ERC20SafeFilterer) ParseAdminRoleTransferred(log types.Log) (*ERC20SafeAdminRoleTransferred, error) { - event := new(ERC20SafeAdminRoleTransferred) - if err := _ERC20Safe.contract.UnpackLog(event, "AdminRoleTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ERC20SafeBridgeTransferredIterator is returned from FilterBridgeTransferred and is used to iterate over the raw logs and unpacked data for BridgeTransferred events raised by the ERC20Safe contract. -type ERC20SafeBridgeTransferredIterator struct { - Event *ERC20SafeBridgeTransferred // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20SafeBridgeTransferredIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ERC20SafeBridgeTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ERC20SafeBridgeTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ERC20SafeBridgeTransferredIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20SafeBridgeTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20SafeBridgeTransferred represents a BridgeTransferred event raised by the ERC20Safe contract. -type ERC20SafeBridgeTransferred struct { - PreviousBridge common.Address - NewBridge common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterBridgeTransferred is a free log retrieval operation binding the contract event 0xcca5fddab921a878ddbd4edb737a2cf3ac6df70864f108606647d1b37a5e07a0. -// -// Solidity: event BridgeTransferred(address indexed previousBridge, address indexed newBridge) -func (_ERC20Safe *ERC20SafeFilterer) FilterBridgeTransferred(opts *bind.FilterOpts, previousBridge []common.Address, newBridge []common.Address) (*ERC20SafeBridgeTransferredIterator, error) { - - var previousBridgeRule []interface{} - for _, previousBridgeItem := range previousBridge { - previousBridgeRule = append(previousBridgeRule, previousBridgeItem) - } - var newBridgeRule []interface{} - for _, newBridgeItem := range newBridge { - newBridgeRule = append(newBridgeRule, newBridgeItem) - } - - logs, sub, err := _ERC20Safe.contract.FilterLogs(opts, "BridgeTransferred", previousBridgeRule, newBridgeRule) - if err != nil { - return nil, err - } - return &ERC20SafeBridgeTransferredIterator{contract: _ERC20Safe.contract, event: "BridgeTransferred", logs: logs, sub: sub}, nil -} - -// WatchBridgeTransferred is a free log subscription operation binding the contract event 0xcca5fddab921a878ddbd4edb737a2cf3ac6df70864f108606647d1b37a5e07a0. -// -// Solidity: event BridgeTransferred(address indexed previousBridge, address indexed newBridge) -func (_ERC20Safe *ERC20SafeFilterer) WatchBridgeTransferred(opts *bind.WatchOpts, sink chan<- *ERC20SafeBridgeTransferred, previousBridge []common.Address, newBridge []common.Address) (event.Subscription, error) { - - var previousBridgeRule []interface{} - for _, previousBridgeItem := range previousBridge { - previousBridgeRule = append(previousBridgeRule, previousBridgeItem) - } - var newBridgeRule []interface{} - for _, newBridgeItem := range newBridge { - newBridgeRule = append(newBridgeRule, newBridgeItem) - } - - logs, sub, err := _ERC20Safe.contract.WatchLogs(opts, "BridgeTransferred", previousBridgeRule, newBridgeRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20SafeBridgeTransferred) - if err := _ERC20Safe.contract.UnpackLog(event, "BridgeTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseBridgeTransferred is a log parse operation binding the contract event 0xcca5fddab921a878ddbd4edb737a2cf3ac6df70864f108606647d1b37a5e07a0. -// -// Solidity: event BridgeTransferred(address indexed previousBridge, address indexed newBridge) -func (_ERC20Safe *ERC20SafeFilterer) ParseBridgeTransferred(log types.Log) (*ERC20SafeBridgeTransferred, error) { - event := new(ERC20SafeBridgeTransferred) - if err := _ERC20Safe.contract.UnpackLog(event, "BridgeTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ERC20SafeERC20DepositIterator is returned from FilterERC20Deposit and is used to iterate over the raw logs and unpacked data for ERC20Deposit events raised by the ERC20Safe contract. -type ERC20SafeERC20DepositIterator struct { - Event *ERC20SafeERC20Deposit // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20SafeERC20DepositIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ERC20SafeERC20Deposit) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ERC20SafeERC20Deposit) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ERC20SafeERC20DepositIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20SafeERC20DepositIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20SafeERC20Deposit represents a ERC20Deposit event raised by the ERC20Safe contract. -type ERC20SafeERC20Deposit struct { - BatchId *big.Int - DepositNonce *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterERC20Deposit is a free log retrieval operation binding the contract event 0x6c15ce44793c685a79cde26a0bd5419ef4f3a337991f156be7b365962001b4a7. -// -// Solidity: event ERC20Deposit(uint112 batchId, uint112 depositNonce) -func (_ERC20Safe *ERC20SafeFilterer) FilterERC20Deposit(opts *bind.FilterOpts) (*ERC20SafeERC20DepositIterator, error) { - - logs, sub, err := _ERC20Safe.contract.FilterLogs(opts, "ERC20Deposit") - if err != nil { - return nil, err - } - return &ERC20SafeERC20DepositIterator{contract: _ERC20Safe.contract, event: "ERC20Deposit", logs: logs, sub: sub}, nil -} - -// WatchERC20Deposit is a free log subscription operation binding the contract event 0x6c15ce44793c685a79cde26a0bd5419ef4f3a337991f156be7b365962001b4a7. -// -// Solidity: event ERC20Deposit(uint112 batchId, uint112 depositNonce) -func (_ERC20Safe *ERC20SafeFilterer) WatchERC20Deposit(opts *bind.WatchOpts, sink chan<- *ERC20SafeERC20Deposit) (event.Subscription, error) { - - logs, sub, err := _ERC20Safe.contract.WatchLogs(opts, "ERC20Deposit") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20SafeERC20Deposit) - if err := _ERC20Safe.contract.UnpackLog(event, "ERC20Deposit", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseERC20Deposit is a log parse operation binding the contract event 0x6c15ce44793c685a79cde26a0bd5419ef4f3a337991f156be7b365962001b4a7. -// -// Solidity: event ERC20Deposit(uint112 batchId, uint112 depositNonce) -func (_ERC20Safe *ERC20SafeFilterer) ParseERC20Deposit(log types.Log) (*ERC20SafeERC20Deposit, error) { - event := new(ERC20SafeERC20Deposit) - if err := _ERC20Safe.contract.UnpackLog(event, "ERC20Deposit", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ERC20SafeERC20SCDepositIterator is returned from FilterERC20SCDeposit and is used to iterate over the raw logs and unpacked data for ERC20SCDeposit events raised by the ERC20Safe contract. -type ERC20SafeERC20SCDepositIterator struct { - Event *ERC20SafeERC20SCDeposit // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20SafeERC20SCDepositIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ERC20SafeERC20SCDeposit) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ERC20SafeERC20SCDeposit) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ERC20SafeERC20SCDepositIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20SafeERC20SCDepositIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20SafeERC20SCDeposit represents a ERC20SCDeposit event raised by the ERC20Safe contract. -type ERC20SafeERC20SCDeposit struct { - BatchId *big.Int - DepositNonce *big.Int - CallData []byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterERC20SCDeposit is a free log retrieval operation binding the contract event 0xce848da21487607afba5c5a500c2ad1002d9b8db97ca5512671309df071113b2. -// -// Solidity: event ERC20SCDeposit(uint112 indexed batchId, uint112 depositNonce, bytes callData) -func (_ERC20Safe *ERC20SafeFilterer) FilterERC20SCDeposit(opts *bind.FilterOpts, batchId []*big.Int) (*ERC20SafeERC20SCDepositIterator, error) { - - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - - logs, sub, err := _ERC20Safe.contract.FilterLogs(opts, "ERC20SCDeposit", batchIdRule) - if err != nil { - return nil, err - } - return &ERC20SafeERC20SCDepositIterator{contract: _ERC20Safe.contract, event: "ERC20SCDeposit", logs: logs, sub: sub}, nil -} - -// WatchERC20SCDeposit is a free log subscription operation binding the contract event 0xce848da21487607afba5c5a500c2ad1002d9b8db97ca5512671309df071113b2. -// -// Solidity: event ERC20SCDeposit(uint112 indexed batchId, uint112 depositNonce, bytes callData) -func (_ERC20Safe *ERC20SafeFilterer) WatchERC20SCDeposit(opts *bind.WatchOpts, sink chan<- *ERC20SafeERC20SCDeposit, batchId []*big.Int) (event.Subscription, error) { - - var batchIdRule []interface{} - for _, batchIdItem := range batchId { - batchIdRule = append(batchIdRule, batchIdItem) - } - - logs, sub, err := _ERC20Safe.contract.WatchLogs(opts, "ERC20SCDeposit", batchIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20SafeERC20SCDeposit) - if err := _ERC20Safe.contract.UnpackLog(event, "ERC20SCDeposit", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseERC20SCDeposit is a log parse operation binding the contract event 0xce848da21487607afba5c5a500c2ad1002d9b8db97ca5512671309df071113b2. -// -// Solidity: event ERC20SCDeposit(uint112 indexed batchId, uint112 depositNonce, bytes callData) -func (_ERC20Safe *ERC20SafeFilterer) ParseERC20SCDeposit(log types.Log) (*ERC20SafeERC20SCDeposit, error) { - event := new(ERC20SafeERC20SCDeposit) - if err := _ERC20Safe.contract.UnpackLog(event, "ERC20SCDeposit", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ERC20SafeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the ERC20Safe contract. -type ERC20SafeInitializedIterator struct { - Event *ERC20SafeInitialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20SafeInitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ERC20SafeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ERC20SafeInitialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ERC20SafeInitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20SafeInitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20SafeInitialized represents a Initialized event raised by the ERC20Safe contract. -type ERC20SafeInitialized struct { - Version uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_ERC20Safe *ERC20SafeFilterer) FilterInitialized(opts *bind.FilterOpts) (*ERC20SafeInitializedIterator, error) { - - logs, sub, err := _ERC20Safe.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &ERC20SafeInitializedIterator{contract: _ERC20Safe.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_ERC20Safe *ERC20SafeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *ERC20SafeInitialized) (event.Subscription, error) { - - logs, sub, err := _ERC20Safe.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20SafeInitialized) - if err := _ERC20Safe.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_ERC20Safe *ERC20SafeFilterer) ParseInitialized(log types.Log) (*ERC20SafeInitialized, error) { - event := new(ERC20SafeInitialized) - if err := _ERC20Safe.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ERC20SafePauseIterator is returned from FilterPause and is used to iterate over the raw logs and unpacked data for Pause events raised by the ERC20Safe contract. -type ERC20SafePauseIterator struct { - Event *ERC20SafePause // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ERC20SafePauseIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ERC20SafePause) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ERC20SafePause) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ERC20SafePauseIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20SafePauseIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20SafePause represents a Pause event raised by the ERC20Safe contract. -type ERC20SafePause struct { - IsPause bool - Raw types.Log // Blockchain specific contextual infos -} - -// FilterPause is a free log retrieval operation binding the contract event 0x9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304. -// -// Solidity: event Pause(bool isPause) -func (_ERC20Safe *ERC20SafeFilterer) FilterPause(opts *bind.FilterOpts) (*ERC20SafePauseIterator, error) { - - logs, sub, err := _ERC20Safe.contract.FilterLogs(opts, "Pause") - if err != nil { - return nil, err - } - return &ERC20SafePauseIterator{contract: _ERC20Safe.contract, event: "Pause", logs: logs, sub: sub}, nil -} - -// WatchPause is a free log subscription operation binding the contract event 0x9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304. -// -// Solidity: event Pause(bool isPause) -func (_ERC20Safe *ERC20SafeFilterer) WatchPause(opts *bind.WatchOpts, sink chan<- *ERC20SafePause) (event.Subscription, error) { - - logs, sub, err := _ERC20Safe.contract.WatchLogs(opts, "Pause") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ERC20SafePause) - if err := _ERC20Safe.contract.UnpackLog(event, "Pause", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParsePause is a log parse operation binding the contract event 0x9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304. -// -// Solidity: event Pause(bool isPause) -func (_ERC20Safe *ERC20SafeFilterer) ParsePause(log types.Log) (*ERC20SafePause, error) { - event := new(ERC20SafePause) - if err := _ERC20Safe.contract.UnpackLog(event, "Pause", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/abi/contracts/ERC20Safe/ERC20Safe.hex b/abi/contracts/ERC20Safe/ERC20Safe.hex deleted file mode 100644 index 5ef9237..0000000 --- a/abi/contracts/ERC20Safe/ERC20Safe.hex +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561001057600080fd5b50612d81806100206000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c80639ab7cfaa11610146578063c86726f6116100c3578063e78cea9211610087578063e78cea92146106c9578063e8a70ee2146106ee578063f2e0ec4814610701578063f4daaba114610714578063f6246ea11461073c578063f851a4401461075c57600080fd5b8063c86726f61461063d578063cf6682a214610660578063d4673de914610680578063daf9c21014610693578063dbba0f01146106b657600080fd5b8063b5af090f1161010a578063b5af090f14610595578063bc56602f146105c1578063c639651d146105e1578063c652a0b514610601578063c859b3fe1461062a57600080fd5b80639ab7cfaa146104885780639f0ebb931461049c578063a7c3a06f146104d3578063aee9c872146104e6578063b32c4d8d1461050657600080fd5b806375829def116101df5780638456cb59116101a35780638456cb591461041557806387ea09611461041d5780638bad0c0a146104375780638dd148021461043f57806390e0cfcb14610452578063920b03081461047557600080fd5b806375829def146103cc578063770be784146103df5780637d7763ce146103f25780638129fc1c14610405578063821461381461040d57600080fd5b80633f4ba83a116102265780633f4ba83a146103005780634013c89c146103085780634506e9351461031b5780635ac44282146103465780635c975abb146103ae57600080fd5b8063085c967f146102635780632325b5f71461028d57806326b3293f146102b3578063284c0c44146102c8578063306275be146102ed575b600080fd5b61027661027136600461284e565b61076d565b60405161028492919061289f565b60405180910390f35b6002546102a190600160581b900460ff1681565b60405160ff9091168152602001610284565b6102c66102c1366004612965565b6108f0565b005b6102db6102d6366004612998565b6109a1565b604051610284969594939291906129ba565b6102c66102fb366004612a07565b610a0e565b6102c6610a68565b6102c6610316366004612a22565b610ae5565b60025461032e906001600160401b031681565b6040516001600160401b039091168152602001610284565b61035961035436600461284e565b610d1d565b6040805183516001600160701b031681526020808501516001600160401b039081169183019190915284830151169181019190915260609283015161ffff16928101929092521515608082015260a001610284565b600154600160a01b900460ff165b6040519015158152602001610284565b6102c66103da366004612a07565b610dca565b6102c66103ed366004612a07565b610ec5565b6102c6610400366004612a22565b610fd7565b6102c661102c565b6103bc611144565b6102c6611224565b60015461032e90600160a81b90046001600160401b031681565b6102c66112a0565b6102c661044d366004612a07565b611323565b6103bc610460366004612a07565b60056020526000908152604090205460ff1681565b6102c6610483366004612a22565b6114e8565b6002546102a190600160501b900460ff1681565b6104c56104aa366004612a07565b6001600160a01b031660009081526007602052604090205490565b604051908152602001610284565b6102c66104e1366004612a5a565b61153d565b6104c56104f4366004612a07565b60096020526000908152604090205481565b61055a61051436600461284e565b6003602052600090815260409020546001600160701b038116906001600160401b03600160701b8204811691600160b01b81049091169061ffff600160f01b9091041684565b604080516001600160701b039590951685526001600160401b039384166020860152919092169083015261ffff166060820152608001610284565b6103bc6105a3366004612a07565b6001600160a01b031660009081526004602052604090205460ff1690565b6104c56105cf366004612a07565b600a6020526000908152604090205481565b6104c56105ef366004612a07565b60086020526000908152604090205481565b6104c561060f366004612a07565b6001600160a01b031660009081526008602052604090205490565b6102c6610638366004612ab7565b61163d565b6103bc61064b366004612a07565b60066020526000908152604090205460ff1681565b6104c561066e366004612a07565b600b6020526000908152604090205481565b6102c661068e366004612b4a565b6116ed565b6103bc6106a1366004612a07565b60046020526000908152604090205460ff1681565b6103bc6106c4366004612b6e565b611798565b6001546001600160a01b03165b6040516001600160a01b039091168152602001610284565b6102c66106fc366004612baa565b611995565b6102c661070f366004612baa565b611a74565b60025461072990600160401b900461ffff1681565b60405161ffff9091168152602001610284565b6104c561074a366004612a07565b60076020526000908152604090205481565b6000546001600160a01b03166106d6565b6060600080600381610780600187612be3565b815260208082019290925260409081016000908120825160808101845290546001600160701b0381168252600160701b81046001600160401b0390811695830195909552600160b01b810490941692810192909252600160f01b90920461ffff1660608201529150600c906107f6600187612be3565b815260200190815260200160002061080d82611c22565b81805480602002602001604051908101604052809291908181526020016000905b828210156108e05760008481526020908190206040805160c0810182526006860290920180546001600160701b0316835260018101546001600160a01b0390811694840194909452600281015491830191909152600381015490921660608201526004808301546080830152600583015491929160a084019160ff909116908111156108bc576108bc612867565b60048111156108cd576108cd612867565b815250508152602001906001019061082e565b5050505091509250925050915091565b600154600160a01b900460ff16156109425760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b600080610950858585611c53565b604080516001600160701b038084168252841660208201529294509092507f6c15ce44793c685a79cde26a0bd5419ef4f3a337991f156be7b365962001b4a791015b60405180910390a15050505050565b600c60205281600052604060002081815481106109bd57600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160701b0390941696506001600160a01b039283169550909391169160ff1686565b33610a216000546001600160a01b031690565b6001600160a01b031614610a475760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b33610a7b6000546001600160a01b031690565b6001600160a01b031614610aa15760405162461bcd60e51b815260040161093990612bf6565b6001805460ff60a01b19169055604051600081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020015b60405180910390a1565b33610af86000546001600160a01b031690565b6001600160a01b031614610b1e5760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03821660009081526004602052604090205460ff16610b7a5760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610939565b6001600160a01b03821660009081526005602052604090205460ff16610be3576001600160a01b03821660009081526009602052604081208054839290610bc2908490612c39565b90915550829050610bde6001600160a01b038216333085612287565b505050565b6001600160a01b03821660009081526006602052604090205460ff16610c89576001600160a01b0382166000908152600b6020526040902054610c27908290612c39565b6001600160a01b0383166000908152600a60205260409020541015610c895760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610939565b6001600160a01b0382166000908152600b602052604081208054839290610cb1908490612c39565b909155505060405163079cc67960e41b81523360048201526024810182905282906001600160a01b038216906379cc679090604401600060405180830381600087803b158015610d0057600080fd5b505af1158015610d14573d6000803e3d6000fd5b50505050505050565b60408051608081018252600080825260208201819052918101829052606081018290529080600381610d50600187612be3565b81526020808201929092526040908101600020815160808101835290546001600160701b0381168252600160701b81046001600160401b0390811694830194909452600160b01b810490931691810191909152600160f01b90910461ffff166060820152905080610dc081611c22565b9250925050915091565b33610ddd6000546001600160a01b031690565b6001600160a01b031614610e035760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b038116610e6a5760405162461bcd60e51b815260206004820152602860248201527f41646d696e526f6c653a206e65772061646d696e20697320746865207a65726f604482015267206164647265737360c01b6064820152608401610939565b600080546040516001600160a01b03808516939216917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610ed86000546001600160a01b031690565b6001600160a01b031614610efe5760405162461bcd60e51b815260040161093990612bf6565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6b9190612c4c565b6001600160a01b0384166000908152600460205260408120549192509060ff1615610fba576001600160a01b038416600090815260096020526040902054610fb39083612be3565b9050610fbd565b50805b610fd16001600160a01b03841633836122ee565b50505050565b33610fea6000546001600160a01b031690565b6001600160a01b0316146110105760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03909116600090815260086020526040902055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03166000811580156110715750825b90506000826001600160401b0316600114801561108d5750303b155b90508115801561109b575080155b156110b95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156110e357845460ff60401b1916600160401b1785555b6110eb61231f565b6110f3612339565b6110fb612351565b831561113d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602001610992565b5050505050565b600154600090600160a81b90046001600160401b031681036111665750600090565b60018054600091600391839161118b91600160a81b90046001600160401b0316612c65565b6001600160401b0390811682526020808301939093526040918201600020825160808101845290546001600160701b0381168252600160701b8104831694820194909452600160b01b840490911691810191909152600160f01b90910461ffff16606082015290506111fb61237e565b61120757600191505090565b61121081611c22565b61121c57600191505090565b600091505090565b336112376000546001600160a01b031690565b6001600160a01b03161461125d5760405162461bcd60e51b815260040161093990612bf6565b6001805460ff60a01b1916600160a01b1781556040519081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f45930490602001610adb565b336112b36000546001600160a01b031690565b6001600160a01b0316146112d95760405162461bcd60e51b815260040161093990612bf6565b600080546040516001600160a01b03909116907fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908390a3600080546001600160a01b0319169055565b336113366000546001600160a01b031690565b6001600160a01b03161461135c5760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b0381166113c55760405162461bcd60e51b815260206004820152602a60248201527f427269646765526f6c653a206e65772062726964676520697320746865207a65604482015269726f206164647265737360b01b6064820152608401610939565b6001546001600160a01b03908116908216036114235760405162461bcd60e51b815260206004820152601860248201527f427269646765526f6c653a2073616d65206164647265737300000000000000006044820152606401610939565b6001600160a01b0381163b61148c5760405162461bcd60e51b815260206004820152602960248201527f427269646765526f6c653a206e657720627269646765206d75737420626520616044820152680818dbdb9d1c9858dd60ba1b6064820152608401610939565b6001546040516001600160a01b038084169216907fcca5fddab921a878ddbd4edb737a2cf3ac6df70864f108606647d1b37a5e07a090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b336114fb6000546001600160a01b031690565b6001600160a01b0316146115215760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03909116600090815260076020526040902055565b336115506000546001600160a01b031690565b6001600160a01b0316146115765760405162461bcd60e51b815260040161093990612bf6565b816115d257806115d25760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206e617469766520746f6b656e732063616e2062652073746f7265646044820152602160f81b6064820152608401610939565b6001600160a01b039490941660009081526004602090815260408083208054600160ff19918216179091556005835281842080548216951515959095179094556006825280832080549094169615159690961790925560078252848120939093556008905291902055565b600154600160a01b900460ff161561168a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610939565b600080611698878787611c53565b60405191935091506001600160701b038316907fce848da21487607afba5c5a500c2ad1002d9b8db97ca5512671309df071113b2906116dc90849088908890612c8c565b60405180910390a250505050505050565b336117006000546001600160a01b031690565b6001600160a01b0316146117265760405162461bcd60e51b815260040161093990612bf6565b606461ffff821611156117715760405162461bcd60e51b8152602060048201526013602482015272084c2e8c6d040e6d2f4ca40e8dede40d0d2ced606b1b6044820152606401610939565b6002805461ffff909216600160401b0269ffff000000000000000019909216919091179055565b6000336117ad6001546001600160a01b031690565b6001600160a01b03161461180f5760405162461bcd60e51b8152602060048201526024808201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f742042726044820152636964676560e01b6064820152608401610939565b6001600160a01b03841660009081526005602052604090205460ff16611891578360006118466001600160a01b038316858761245d565b9050806118585760009250505061198e565b6001600160a01b03861660009081526009602052604081208054879290611880908490612be3565b909155506001935061198e92505050565b6001600160a01b03841660009081526006602052604090205460ff161561193d576001600160a01b0384166000908152600a60205260409020546118d6908490612c39565b6001600160a01b0385166000908152600b6020526040902054101561193d5760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768206275726e656420746f6b656e7300000000000000006044820152606401610939565b600061194a858486612544565b90508061195b57600091505061198e565b6001600160a01b0385166000908152600a602052604081208054869290611983908490612c39565b909155506001925050505b9392505050565b336119a86000546001600160a01b031690565b6001600160a01b0316146119ce5760405162461bcd60e51b815260040161093990612bf6565b60025460ff600160581b90910481169082161115611a545760405162461bcd60e51b815260206004820152603760248201527f43616e6e6f7420696e63726561736520626174636820626c6f636b206c696d6960448201527f74206f76657220736574746c656d656e74206c696d69740000000000000000006064820152608401610939565b6002805460ff909216600160501b0260ff60501b19909216919091179055565b33611a876000546001600160a01b031690565b6001600160a01b031614611aad5760405162461bcd60e51b815260040161093990612bf6565b600154600160a01b900460ff16611afd5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610939565b611b05611144565b15611b6e5760405162461bcd60e51b815260206004820152603360248201527f43616e6e6f74206368616e6765206261746368536574746c654c696d697420776044820152726974682070656e64696e67206261746368657360681b6064820152608401610939565b60025460ff600160501b90910481169082161015611c025760405162461bcd60e51b815260206004820152604560248201527f43616e6e6f74206465637265617365206261746368536574746c654c696d697460448201527f20756e646572207468652076616c7565206f6620626174636820626c6f636b206064820152641b1a5b5a5d60da1b608482015260a401610939565b6002805460ff909216600160581b0260ff60581b19909216919091179055565b60025460408201516000914391611c4391600160581b900460ff1690612ccb565b6001600160401b03161092915050565b6001600160a01b038316600090815260046020526040812054819060ff16611cb15760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610939565b6001600160a01b038516600090815260076020526040902054841015611d3f5760405162461bcd60e51b815260206004820152603c60248201527f547269656420746f206465706f73697420616e20616d6f756e742062656c6f7760448201527f20746865206d696e696d756d20737065636966696564206c696d6974000000006064820152608401610939565b6001600160a01b038516600090815260086020526040902054841115611dcd5760405162461bcd60e51b815260206004820152603c60248201527f547269656420746f206465706f73697420616e20616d6f756e742061626f766560448201527f20746865206d6178696d756d20737065636966696564206c696d6974000000006064820152608401610939565b436000611dd861237e565b15611e75575060018054600160a81b90046001600160401b0316600081815260036020526040902091611e0b9190612ccb565b81546001600160401b039182166001600160b01b031990911617600160701b8483160217825560018054600160a81b9004909116906015611e4b83612ceb565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050611eb3565b60018054600391600091611e999190600160a81b90046001600160401b0316612c65565b6001600160401b0316815260200190815260200160002090505b600254600090611ecd906001600160401b03166001612ccb565b6001600160401b03169050600c600060018060159054906101000a90046001600160401b0316611efd9190612c65565b6001600160401b031681526020019081526020016000206040518060c00160405280836001600160701b031681526020018a6001600160a01b03168152602001898152602001336001600160a01b0316815260200188815260200160016004811115611f6b57611f6b612867565b90528154600181810184556000938452602093849020835160069093020180546001600160701b039093166dffffffffffffffffffffffffffff199093169290921782559282015181840180546001600160a01b039283166001600160a01b031991821617909155604084015160028401556060840151600384018054919093169116179055608082015160048083019190915560a0830151600583018054949593949193909260ff1990921691849081111561202a5761202a612867565b021790555050825467ffffffffffffffff60b01b1916600160b01b6001600160401b0386160217808455600160f01b900461ffff16905082601e61206d83612d11565b825461ffff9182166101009390930a928302919092021990911617905550600280546001600160401b03169060006120a483612ceb565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506120eb886001600160a01b031660009081526005602052604090205460ff1690565b612139576001600160a01b03881660009081526009602052604081208054899290612117908490612c39565b909155508890506121336001600160a01b03821633308b612287565b50612270565b6001600160a01b03881660009081526006602052604090205460ff166121df576001600160a01b0388166000908152600b602052604090205461217d908890612c39565b6001600160a01b0389166000908152600a602052604090205410156121df5760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610939565b6001600160a01b0388166000908152600b602052604081208054899290612207908490612c39565b909155505060405163079cc67960e41b81523360048201526024810188905288906001600160a01b038216906379cc679090604401600060405180830381600087803b15801561225657600080fd5b505af115801561226a573d6000803e3d6000fd5b50505050505b90546001600160701b031697909650945050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610fd19186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506125bc565b6040516001600160a01b03838116602483015260448201839052610bde91859182169063a9059cbb906064016122bc565b61232761261f565b61232f612668565b612337612678565b565b61234161261f565b612349612668565b612337612680565b61235961261f565b600280546bffffffff000000000000000019166b2828000a0000000000000000179055565b600154600090600160a81b90046001600160401b031681036123a05750600190565b6001805460009160039183916123c591600160a81b90046001600160401b0316612c65565b6001600160401b0390811682526020808301939093526040918201600020825160808101845290546001600160701b0381168252600160701b81048316948201859052600160b01b810490921692810192909252600160f01b900461ffff16606082018190529092506124379161269d565b806124575750600254606082015161ffff600160401b9092048216911610155b91505090565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283928392918816916124bb9190612d28565b6000604051808303816000865af19150503d80600081146124f8576040519150601f19603f3d011682016040523d82523d6000602084013e6124fd565b606091505b5091509150816125125760009250505061198e565b80516000036125265760019250505061198e565b8080602001905181019061253a9190612d57565b9695505050505050565b6040516340c10f1960e01b81526001600160a01b0383811660048301526024820183905260009185918216906340c10f1990604401600060405180830381600087803b15801561259357600080fd5b505af19250505080156125a4575060015b6125b257600091505061198e565b600191505061198e565b60006125d16001600160a01b038416836126df565b905080516000141580156125f65750808060200190518101906125f49190612d57565b155b15610bde57604051635274afe760e01b81526001600160a01b0384166004820152602401610939565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661233757604051631afcd79f60e31b815260040160405180910390fd5b61267061261f565b6123376126ed565b61233761261f565b61268861261f565b6001805460ff60a01b1916600160a01b179055565b60008261ffff166000036126b3575060006126d9565b60025443906126cc90600160501b900460ff1684612ccb565b6001600160401b03161090505b92915050565b606061198e83836000612738565b6126f561261f565b600080546001600160a01b031916339081178255604051909182917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908290a350565b60608147101561275d5760405163cd78605960e01b8152306004820152602401610939565b600080856001600160a01b031684866040516127799190612d28565b60006040518083038185875af1925050503d80600081146127b6576040519150601f19603f3d011682016040523d82523d6000602084013e6127bb565b606091505b509150915061253a8683836060826127db576127d682612822565b61198e565b81511580156127f257506001600160a01b0384163b155b1561281b57604051639996b31560e01b81526001600160a01b0385166004820152602401610939565b508061198e565b8051156128325780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b60006020828403121561286057600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6005811061289b57634e487b7160e01b600052602160045260246000fd5b9052565b6040808252835182820181905260009190606090818501906020808901865b8381101561292b57815180516001600160701b03168652838101516001600160a01b039081168588015288820151898801528782015116878701526080808201519087015260a090810151906129168188018361287d565b505060c09490940193908201906001016128be565b505082955061293d8188018915159052565b50505050509392505050565b80356001600160a01b038116811461296057600080fd5b919050565b60008060006060848603121561297a57600080fd5b61298384612949565b95602085013595506040909401359392505050565b600080604083850312156129ab57600080fd5b50508035926020909101359150565b6001600160701b03871681526001600160a01b03868116602083015260408201869052841660608201526080810183905260c081016129fc60a083018461287d565b979650505050505050565b600060208284031215612a1957600080fd5b61198e82612949565b60008060408385031215612a3557600080fd5b612a3e83612949565b946020939093013593505050565b801515811461284b57600080fd5b600080600080600060a08688031215612a7257600080fd5b612a7b86612949565b945060208601359350604086013592506060860135612a9981612a4c565b91506080860135612aa981612a4c565b809150509295509295909350565b600080600080600060808688031215612acf57600080fd5b612ad886612949565b9450602086013593506040860135925060608601356001600160401b0380821115612b0257600080fd5b818801915088601f830112612b1657600080fd5b813581811115612b2557600080fd5b896020828501011115612b3757600080fd5b9699959850939650602001949392505050565b600060208284031215612b5c57600080fd5b813561ffff8116811461198e57600080fd5b600080600060608486031215612b8357600080fd5b612b8c84612949565b925060208401359150612ba160408501612949565b90509250925092565b600060208284031215612bbc57600080fd5b813560ff8116811461198e57600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156126d9576126d9612bcd565b60208082526023908201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f7420416460408201526236b4b760e91b606082015260800190565b808201808211156126d9576126d9612bcd565b600060208284031215612c5e57600080fd5b5051919050565b6001600160401b03828116828216039080821115612c8557612c85612bcd565b5092915050565b6001600160701b038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6001600160401b03818116838216019080821115612c8557612c85612bcd565b60006001600160401b03808316818103612d0757612d07612bcd565b6001019392505050565b600061ffff808316818103612d0757612d07612bcd565b6000825160005b81811015612d495760208186018101518583015201612d2f565b506000920191825250919050565b600060208284031215612d6957600080fd5b815161198e81612a4c56fea164736f6c6343000814000a diff --git a/abi/contracts/ERC20Safe/ERC20Safe.json b/abi/contracts/ERC20Safe/ERC20Safe.json deleted file mode 100644 index 3dd649c..0000000 --- a/abi/contracts/ERC20Safe/ERC20Safe.json +++ /dev/null @@ -1,964 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "ERC20Safe", - "sourceName": "contracts/ERC20Safe.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "AddressInsufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "SafeERC20FailedOperation", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminRoleTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousBridge", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newBridge", - "type": "address" - } - ], - "name": "BridgeTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint112", - "name": "batchId", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "depositNonce", - "type": "uint112" - } - ], - "name": "ERC20Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint112", - "name": "batchId", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "uint112", - "name": "depositNonce", - "type": "uint112" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "callData", - "type": "bytes" - } - ], - "name": "ERC20SCDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "isPause", - "type": "bool" - } - ], - "name": "Pause", - "type": "event" - }, - { - "inputs": [], - "name": "admin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchBlockLimit", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "batchDeposits", - "outputs": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "enum DepositStatus", - "name": "status", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSettleLimit", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchSize", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "batches", - "outputs": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "uint64", - "name": "blockNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastUpdatedBlockNumber", - "type": "uint64" - }, - { - "internalType": "uint16", - "name": "depositsCount", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "batchesCount", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "bridge", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "burnBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "recipientAddress", - "type": "bytes32" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "recipientAddress", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "callData", - "type": "bytes" - } - ], - "name": "depositWithSCExecution", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "depositsCount", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getBatch", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "uint64", - "name": "blockNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "lastUpdatedBlockNumber", - "type": "uint64" - }, - { - "internalType": "uint16", - "name": "depositsCount", - "type": "uint16" - } - ], - "internalType": "struct Batch", - "name": "", - "type": "tuple" - }, - { - "internalType": "bool", - "name": "isBatchFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "batchNonce", - "type": "uint256" - } - ], - "name": "getDeposits", - "outputs": [ - { - "components": [ - { - "internalType": "uint112", - "name": "nonce", - "type": "uint112" - }, - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "depositor", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "recipient", - "type": "bytes32" - }, - { - "internalType": "enum DepositStatus", - "name": "status", - "type": "uint8" - } - ], - "internalType": "struct Deposit[]", - "name": "", - "type": "tuple[]" - }, - { - "internalType": "bool", - "name": "areDepositsFinal", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTokenMaxLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "getTokenMinLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "initSupply", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "isAnyBatchInProgress", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "isTokenWhitelisted", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "mintBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "mintBurnTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "nativeTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - } - ], - "name": "recoverLostFunds", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "removeTokenFromWhitelist", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newBatchBlockLimit", - "type": "uint8" - } - ], - "name": "setBatchBlockLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "newBatchSettleLimit", - "type": "uint8" - } - ], - "name": "setBatchSettleLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "newBatchSize", - "type": "uint16" - } - ], - "name": "setBatchSize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newBridge", - "type": "address" - } - ], - "name": "setBridge", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setTokenMaxLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "setTokenMinLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenMaxLimits", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "tokenMinLimits", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "totalBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "tokenAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "recipientAddress", - "type": "address" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "transferAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "minimumAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maximumAmount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "mintBurn", - "type": "bool" - }, - { - "internalType": "bool", - "name": "native", - "type": "bool" - } - ], - "name": "whitelistToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "whitelistedTokens", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50612d81806100206000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c80639ab7cfaa11610146578063c86726f6116100c3578063e78cea9211610087578063e78cea92146106c9578063e8a70ee2146106ee578063f2e0ec4814610701578063f4daaba114610714578063f6246ea11461073c578063f851a4401461075c57600080fd5b8063c86726f61461063d578063cf6682a214610660578063d4673de914610680578063daf9c21014610693578063dbba0f01146106b657600080fd5b8063b5af090f1161010a578063b5af090f14610595578063bc56602f146105c1578063c639651d146105e1578063c652a0b514610601578063c859b3fe1461062a57600080fd5b80639ab7cfaa146104885780639f0ebb931461049c578063a7c3a06f146104d3578063aee9c872146104e6578063b32c4d8d1461050657600080fd5b806375829def116101df5780638456cb59116101a35780638456cb591461041557806387ea09611461041d5780638bad0c0a146104375780638dd148021461043f57806390e0cfcb14610452578063920b03081461047557600080fd5b806375829def146103cc578063770be784146103df5780637d7763ce146103f25780638129fc1c14610405578063821461381461040d57600080fd5b80633f4ba83a116102265780633f4ba83a146103005780634013c89c146103085780634506e9351461031b5780635ac44282146103465780635c975abb146103ae57600080fd5b8063085c967f146102635780632325b5f71461028d57806326b3293f146102b3578063284c0c44146102c8578063306275be146102ed575b600080fd5b61027661027136600461284e565b61076d565b60405161028492919061289f565b60405180910390f35b6002546102a190600160581b900460ff1681565b60405160ff9091168152602001610284565b6102c66102c1366004612965565b6108f0565b005b6102db6102d6366004612998565b6109a1565b604051610284969594939291906129ba565b6102c66102fb366004612a07565b610a0e565b6102c6610a68565b6102c6610316366004612a22565b610ae5565b60025461032e906001600160401b031681565b6040516001600160401b039091168152602001610284565b61035961035436600461284e565b610d1d565b6040805183516001600160701b031681526020808501516001600160401b039081169183019190915284830151169181019190915260609283015161ffff16928101929092521515608082015260a001610284565b600154600160a01b900460ff165b6040519015158152602001610284565b6102c66103da366004612a07565b610dca565b6102c66103ed366004612a07565b610ec5565b6102c6610400366004612a22565b610fd7565b6102c661102c565b6103bc611144565b6102c6611224565b60015461032e90600160a81b90046001600160401b031681565b6102c66112a0565b6102c661044d366004612a07565b611323565b6103bc610460366004612a07565b60056020526000908152604090205460ff1681565b6102c6610483366004612a22565b6114e8565b6002546102a190600160501b900460ff1681565b6104c56104aa366004612a07565b6001600160a01b031660009081526007602052604090205490565b604051908152602001610284565b6102c66104e1366004612a5a565b61153d565b6104c56104f4366004612a07565b60096020526000908152604090205481565b61055a61051436600461284e565b6003602052600090815260409020546001600160701b038116906001600160401b03600160701b8204811691600160b01b81049091169061ffff600160f01b9091041684565b604080516001600160701b039590951685526001600160401b039384166020860152919092169083015261ffff166060820152608001610284565b6103bc6105a3366004612a07565b6001600160a01b031660009081526004602052604090205460ff1690565b6104c56105cf366004612a07565b600a6020526000908152604090205481565b6104c56105ef366004612a07565b60086020526000908152604090205481565b6104c561060f366004612a07565b6001600160a01b031660009081526008602052604090205490565b6102c6610638366004612ab7565b61163d565b6103bc61064b366004612a07565b60066020526000908152604090205460ff1681565b6104c561066e366004612a07565b600b6020526000908152604090205481565b6102c661068e366004612b4a565b6116ed565b6103bc6106a1366004612a07565b60046020526000908152604090205460ff1681565b6103bc6106c4366004612b6e565b611798565b6001546001600160a01b03165b6040516001600160a01b039091168152602001610284565b6102c66106fc366004612baa565b611995565b6102c661070f366004612baa565b611a74565b60025461072990600160401b900461ffff1681565b60405161ffff9091168152602001610284565b6104c561074a366004612a07565b60076020526000908152604090205481565b6000546001600160a01b03166106d6565b6060600080600381610780600187612be3565b815260208082019290925260409081016000908120825160808101845290546001600160701b0381168252600160701b81046001600160401b0390811695830195909552600160b01b810490941692810192909252600160f01b90920461ffff1660608201529150600c906107f6600187612be3565b815260200190815260200160002061080d82611c22565b81805480602002602001604051908101604052809291908181526020016000905b828210156108e05760008481526020908190206040805160c0810182526006860290920180546001600160701b0316835260018101546001600160a01b0390811694840194909452600281015491830191909152600381015490921660608201526004808301546080830152600583015491929160a084019160ff909116908111156108bc576108bc612867565b60048111156108cd576108cd612867565b815250508152602001906001019061082e565b5050505091509250925050915091565b600154600160a01b900460ff16156109425760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b600080610950858585611c53565b604080516001600160701b038084168252841660208201529294509092507f6c15ce44793c685a79cde26a0bd5419ef4f3a337991f156be7b365962001b4a791015b60405180910390a15050505050565b600c60205281600052604060002081815481106109bd57600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160701b0390941696506001600160a01b039283169550909391169160ff1686565b33610a216000546001600160a01b031690565b6001600160a01b031614610a475760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b33610a7b6000546001600160a01b031690565b6001600160a01b031614610aa15760405162461bcd60e51b815260040161093990612bf6565b6001805460ff60a01b19169055604051600081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020015b60405180910390a1565b33610af86000546001600160a01b031690565b6001600160a01b031614610b1e5760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03821660009081526004602052604090205460ff16610b7a5760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610939565b6001600160a01b03821660009081526005602052604090205460ff16610be3576001600160a01b03821660009081526009602052604081208054839290610bc2908490612c39565b90915550829050610bde6001600160a01b038216333085612287565b505050565b6001600160a01b03821660009081526006602052604090205460ff16610c89576001600160a01b0382166000908152600b6020526040902054610c27908290612c39565b6001600160a01b0383166000908152600a60205260409020541015610c895760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610939565b6001600160a01b0382166000908152600b602052604081208054839290610cb1908490612c39565b909155505060405163079cc67960e41b81523360048201526024810182905282906001600160a01b038216906379cc679090604401600060405180830381600087803b158015610d0057600080fd5b505af1158015610d14573d6000803e3d6000fd5b50505050505050565b60408051608081018252600080825260208201819052918101829052606081018290529080600381610d50600187612be3565b81526020808201929092526040908101600020815160808101835290546001600160701b0381168252600160701b81046001600160401b0390811694830194909452600160b01b810490931691810191909152600160f01b90910461ffff166060820152905080610dc081611c22565b9250925050915091565b33610ddd6000546001600160a01b031690565b6001600160a01b031614610e035760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b038116610e6a5760405162461bcd60e51b815260206004820152602860248201527f41646d696e526f6c653a206e65772061646d696e20697320746865207a65726f604482015267206164647265737360c01b6064820152608401610939565b600080546040516001600160a01b03808516939216917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610ed86000546001600160a01b031690565b6001600160a01b031614610efe5760405162461bcd60e51b815260040161093990612bf6565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6b9190612c4c565b6001600160a01b0384166000908152600460205260408120549192509060ff1615610fba576001600160a01b038416600090815260096020526040902054610fb39083612be3565b9050610fbd565b50805b610fd16001600160a01b03841633836122ee565b50505050565b33610fea6000546001600160a01b031690565b6001600160a01b0316146110105760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03909116600090815260086020526040902055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03166000811580156110715750825b90506000826001600160401b0316600114801561108d5750303b155b90508115801561109b575080155b156110b95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156110e357845460ff60401b1916600160401b1785555b6110eb61231f565b6110f3612339565b6110fb612351565b831561113d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602001610992565b5050505050565b600154600090600160a81b90046001600160401b031681036111665750600090565b60018054600091600391839161118b91600160a81b90046001600160401b0316612c65565b6001600160401b0390811682526020808301939093526040918201600020825160808101845290546001600160701b0381168252600160701b8104831694820194909452600160b01b840490911691810191909152600160f01b90910461ffff16606082015290506111fb61237e565b61120757600191505090565b61121081611c22565b61121c57600191505090565b600091505090565b336112376000546001600160a01b031690565b6001600160a01b03161461125d5760405162461bcd60e51b815260040161093990612bf6565b6001805460ff60a01b1916600160a01b1781556040519081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f45930490602001610adb565b336112b36000546001600160a01b031690565b6001600160a01b0316146112d95760405162461bcd60e51b815260040161093990612bf6565b600080546040516001600160a01b03909116907fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908390a3600080546001600160a01b0319169055565b336113366000546001600160a01b031690565b6001600160a01b03161461135c5760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b0381166113c55760405162461bcd60e51b815260206004820152602a60248201527f427269646765526f6c653a206e65772062726964676520697320746865207a65604482015269726f206164647265737360b01b6064820152608401610939565b6001546001600160a01b03908116908216036114235760405162461bcd60e51b815260206004820152601860248201527f427269646765526f6c653a2073616d65206164647265737300000000000000006044820152606401610939565b6001600160a01b0381163b61148c5760405162461bcd60e51b815260206004820152602960248201527f427269646765526f6c653a206e657720627269646765206d75737420626520616044820152680818dbdb9d1c9858dd60ba1b6064820152608401610939565b6001546040516001600160a01b038084169216907fcca5fddab921a878ddbd4edb737a2cf3ac6df70864f108606647d1b37a5e07a090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b336114fb6000546001600160a01b031690565b6001600160a01b0316146115215760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03909116600090815260076020526040902055565b336115506000546001600160a01b031690565b6001600160a01b0316146115765760405162461bcd60e51b815260040161093990612bf6565b816115d257806115d25760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206e617469766520746f6b656e732063616e2062652073746f7265646044820152602160f81b6064820152608401610939565b6001600160a01b039490941660009081526004602090815260408083208054600160ff19918216179091556005835281842080548216951515959095179094556006825280832080549094169615159690961790925560078252848120939093556008905291902055565b600154600160a01b900460ff161561168a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610939565b600080611698878787611c53565b60405191935091506001600160701b038316907fce848da21487607afba5c5a500c2ad1002d9b8db97ca5512671309df071113b2906116dc90849088908890612c8c565b60405180910390a250505050505050565b336117006000546001600160a01b031690565b6001600160a01b0316146117265760405162461bcd60e51b815260040161093990612bf6565b606461ffff821611156117715760405162461bcd60e51b8152602060048201526013602482015272084c2e8c6d040e6d2f4ca40e8dede40d0d2ced606b1b6044820152606401610939565b6002805461ffff909216600160401b0269ffff000000000000000019909216919091179055565b6000336117ad6001546001600160a01b031690565b6001600160a01b03161461180f5760405162461bcd60e51b8152602060048201526024808201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f742042726044820152636964676560e01b6064820152608401610939565b6001600160a01b03841660009081526005602052604090205460ff16611891578360006118466001600160a01b038316858761245d565b9050806118585760009250505061198e565b6001600160a01b03861660009081526009602052604081208054879290611880908490612be3565b909155506001935061198e92505050565b6001600160a01b03841660009081526006602052604090205460ff161561193d576001600160a01b0384166000908152600a60205260409020546118d6908490612c39565b6001600160a01b0385166000908152600b6020526040902054101561193d5760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768206275726e656420746f6b656e7300000000000000006044820152606401610939565b600061194a858486612544565b90508061195b57600091505061198e565b6001600160a01b0385166000908152600a602052604081208054869290611983908490612c39565b909155506001925050505b9392505050565b336119a86000546001600160a01b031690565b6001600160a01b0316146119ce5760405162461bcd60e51b815260040161093990612bf6565b60025460ff600160581b90910481169082161115611a545760405162461bcd60e51b815260206004820152603760248201527f43616e6e6f7420696e63726561736520626174636820626c6f636b206c696d6960448201527f74206f76657220736574746c656d656e74206c696d69740000000000000000006064820152608401610939565b6002805460ff909216600160501b0260ff60501b19909216919091179055565b33611a876000546001600160a01b031690565b6001600160a01b031614611aad5760405162461bcd60e51b815260040161093990612bf6565b600154600160a01b900460ff16611afd5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610939565b611b05611144565b15611b6e5760405162461bcd60e51b815260206004820152603360248201527f43616e6e6f74206368616e6765206261746368536574746c654c696d697420776044820152726974682070656e64696e67206261746368657360681b6064820152608401610939565b60025460ff600160501b90910481169082161015611c025760405162461bcd60e51b815260206004820152604560248201527f43616e6e6f74206465637265617365206261746368536574746c654c696d697460448201527f20756e646572207468652076616c7565206f6620626174636820626c6f636b206064820152641b1a5b5a5d60da1b608482015260a401610939565b6002805460ff909216600160581b0260ff60581b19909216919091179055565b60025460408201516000914391611c4391600160581b900460ff1690612ccb565b6001600160401b03161092915050565b6001600160a01b038316600090815260046020526040812054819060ff16611cb15760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610939565b6001600160a01b038516600090815260076020526040902054841015611d3f5760405162461bcd60e51b815260206004820152603c60248201527f547269656420746f206465706f73697420616e20616d6f756e742062656c6f7760448201527f20746865206d696e696d756d20737065636966696564206c696d6974000000006064820152608401610939565b6001600160a01b038516600090815260086020526040902054841115611dcd5760405162461bcd60e51b815260206004820152603c60248201527f547269656420746f206465706f73697420616e20616d6f756e742061626f766560448201527f20746865206d6178696d756d20737065636966696564206c696d6974000000006064820152608401610939565b436000611dd861237e565b15611e75575060018054600160a81b90046001600160401b0316600081815260036020526040902091611e0b9190612ccb565b81546001600160401b039182166001600160b01b031990911617600160701b8483160217825560018054600160a81b9004909116906015611e4b83612ceb565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050611eb3565b60018054600391600091611e999190600160a81b90046001600160401b0316612c65565b6001600160401b0316815260200190815260200160002090505b600254600090611ecd906001600160401b03166001612ccb565b6001600160401b03169050600c600060018060159054906101000a90046001600160401b0316611efd9190612c65565b6001600160401b031681526020019081526020016000206040518060c00160405280836001600160701b031681526020018a6001600160a01b03168152602001898152602001336001600160a01b0316815260200188815260200160016004811115611f6b57611f6b612867565b90528154600181810184556000938452602093849020835160069093020180546001600160701b039093166dffffffffffffffffffffffffffff199093169290921782559282015181840180546001600160a01b039283166001600160a01b031991821617909155604084015160028401556060840151600384018054919093169116179055608082015160048083019190915560a0830151600583018054949593949193909260ff1990921691849081111561202a5761202a612867565b021790555050825467ffffffffffffffff60b01b1916600160b01b6001600160401b0386160217808455600160f01b900461ffff16905082601e61206d83612d11565b825461ffff9182166101009390930a928302919092021990911617905550600280546001600160401b03169060006120a483612ceb565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506120eb886001600160a01b031660009081526005602052604090205460ff1690565b612139576001600160a01b03881660009081526009602052604081208054899290612117908490612c39565b909155508890506121336001600160a01b03821633308b612287565b50612270565b6001600160a01b03881660009081526006602052604090205460ff166121df576001600160a01b0388166000908152600b602052604090205461217d908890612c39565b6001600160a01b0389166000908152600a602052604090205410156121df5760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610939565b6001600160a01b0388166000908152600b602052604081208054899290612207908490612c39565b909155505060405163079cc67960e41b81523360048201526024810188905288906001600160a01b038216906379cc679090604401600060405180830381600087803b15801561225657600080fd5b505af115801561226a573d6000803e3d6000fd5b50505050505b90546001600160701b031697909650945050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610fd19186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506125bc565b6040516001600160a01b03838116602483015260448201839052610bde91859182169063a9059cbb906064016122bc565b61232761261f565b61232f612668565b612337612678565b565b61234161261f565b612349612668565b612337612680565b61235961261f565b600280546bffffffff000000000000000019166b2828000a0000000000000000179055565b600154600090600160a81b90046001600160401b031681036123a05750600190565b6001805460009160039183916123c591600160a81b90046001600160401b0316612c65565b6001600160401b0390811682526020808301939093526040918201600020825160808101845290546001600160701b0381168252600160701b81048316948201859052600160b01b810490921692810192909252600160f01b900461ffff16606082018190529092506124379161269d565b806124575750600254606082015161ffff600160401b9092048216911610155b91505090565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283928392918816916124bb9190612d28565b6000604051808303816000865af19150503d80600081146124f8576040519150601f19603f3d011682016040523d82523d6000602084013e6124fd565b606091505b5091509150816125125760009250505061198e565b80516000036125265760019250505061198e565b8080602001905181019061253a9190612d57565b9695505050505050565b6040516340c10f1960e01b81526001600160a01b0383811660048301526024820183905260009185918216906340c10f1990604401600060405180830381600087803b15801561259357600080fd5b505af19250505080156125a4575060015b6125b257600091505061198e565b600191505061198e565b60006125d16001600160a01b038416836126df565b905080516000141580156125f65750808060200190518101906125f49190612d57565b155b15610bde57604051635274afe760e01b81526001600160a01b0384166004820152602401610939565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661233757604051631afcd79f60e31b815260040160405180910390fd5b61267061261f565b6123376126ed565b61233761261f565b61268861261f565b6001805460ff60a01b1916600160a01b179055565b60008261ffff166000036126b3575060006126d9565b60025443906126cc90600160501b900460ff1684612ccb565b6001600160401b03161090505b92915050565b606061198e83836000612738565b6126f561261f565b600080546001600160a01b031916339081178255604051909182917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908290a350565b60608147101561275d5760405163cd78605960e01b8152306004820152602401610939565b600080856001600160a01b031684866040516127799190612d28565b60006040518083038185875af1925050503d80600081146127b6576040519150601f19603f3d011682016040523d82523d6000602084013e6127bb565b606091505b509150915061253a8683836060826127db576127d682612822565b61198e565b81511580156127f257506001600160a01b0384163b155b1561281b57604051639996b31560e01b81526001600160a01b0385166004820152602401610939565b508061198e565b8051156128325780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b60006020828403121561286057600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6005811061289b57634e487b7160e01b600052602160045260246000fd5b9052565b6040808252835182820181905260009190606090818501906020808901865b8381101561292b57815180516001600160701b03168652838101516001600160a01b039081168588015288820151898801528782015116878701526080808201519087015260a090810151906129168188018361287d565b505060c09490940193908201906001016128be565b505082955061293d8188018915159052565b50505050509392505050565b80356001600160a01b038116811461296057600080fd5b919050565b60008060006060848603121561297a57600080fd5b61298384612949565b95602085013595506040909401359392505050565b600080604083850312156129ab57600080fd5b50508035926020909101359150565b6001600160701b03871681526001600160a01b03868116602083015260408201869052841660608201526080810183905260c081016129fc60a083018461287d565b979650505050505050565b600060208284031215612a1957600080fd5b61198e82612949565b60008060408385031215612a3557600080fd5b612a3e83612949565b946020939093013593505050565b801515811461284b57600080fd5b600080600080600060a08688031215612a7257600080fd5b612a7b86612949565b945060208601359350604086013592506060860135612a9981612a4c565b91506080860135612aa981612a4c565b809150509295509295909350565b600080600080600060808688031215612acf57600080fd5b612ad886612949565b9450602086013593506040860135925060608601356001600160401b0380821115612b0257600080fd5b818801915088601f830112612b1657600080fd5b813581811115612b2557600080fd5b896020828501011115612b3757600080fd5b9699959850939650602001949392505050565b600060208284031215612b5c57600080fd5b813561ffff8116811461198e57600080fd5b600080600060608486031215612b8357600080fd5b612b8c84612949565b925060208401359150612ba160408501612949565b90509250925092565b600060208284031215612bbc57600080fd5b813560ff8116811461198e57600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156126d9576126d9612bcd565b60208082526023908201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f7420416460408201526236b4b760e91b606082015260800190565b808201808211156126d9576126d9612bcd565b600060208284031215612c5e57600080fd5b5051919050565b6001600160401b03828116828216039080821115612c8557612c85612bcd565b5092915050565b6001600160701b038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6001600160401b03818116838216019080821115612c8557612c85612bcd565b60006001600160401b03808316818103612d0757612d07612bcd565b6001019392505050565b600061ffff808316818103612d0757612d07612bcd565b6000825160005b81811015612d495760208186018101518583015201612d2f565b506000920191825250919050565b600060208284031215612d6957600080fd5b815161198e81612a4c56fea164736f6c6343000814000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061025e5760003560e01c80639ab7cfaa11610146578063c86726f6116100c3578063e78cea9211610087578063e78cea92146106c9578063e8a70ee2146106ee578063f2e0ec4814610701578063f4daaba114610714578063f6246ea11461073c578063f851a4401461075c57600080fd5b8063c86726f61461063d578063cf6682a214610660578063d4673de914610680578063daf9c21014610693578063dbba0f01146106b657600080fd5b8063b5af090f1161010a578063b5af090f14610595578063bc56602f146105c1578063c639651d146105e1578063c652a0b514610601578063c859b3fe1461062a57600080fd5b80639ab7cfaa146104885780639f0ebb931461049c578063a7c3a06f146104d3578063aee9c872146104e6578063b32c4d8d1461050657600080fd5b806375829def116101df5780638456cb59116101a35780638456cb591461041557806387ea09611461041d5780638bad0c0a146104375780638dd148021461043f57806390e0cfcb14610452578063920b03081461047557600080fd5b806375829def146103cc578063770be784146103df5780637d7763ce146103f25780638129fc1c14610405578063821461381461040d57600080fd5b80633f4ba83a116102265780633f4ba83a146103005780634013c89c146103085780634506e9351461031b5780635ac44282146103465780635c975abb146103ae57600080fd5b8063085c967f146102635780632325b5f71461028d57806326b3293f146102b3578063284c0c44146102c8578063306275be146102ed575b600080fd5b61027661027136600461284e565b61076d565b60405161028492919061289f565b60405180910390f35b6002546102a190600160581b900460ff1681565b60405160ff9091168152602001610284565b6102c66102c1366004612965565b6108f0565b005b6102db6102d6366004612998565b6109a1565b604051610284969594939291906129ba565b6102c66102fb366004612a07565b610a0e565b6102c6610a68565b6102c6610316366004612a22565b610ae5565b60025461032e906001600160401b031681565b6040516001600160401b039091168152602001610284565b61035961035436600461284e565b610d1d565b6040805183516001600160701b031681526020808501516001600160401b039081169183019190915284830151169181019190915260609283015161ffff16928101929092521515608082015260a001610284565b600154600160a01b900460ff165b6040519015158152602001610284565b6102c66103da366004612a07565b610dca565b6102c66103ed366004612a07565b610ec5565b6102c6610400366004612a22565b610fd7565b6102c661102c565b6103bc611144565b6102c6611224565b60015461032e90600160a81b90046001600160401b031681565b6102c66112a0565b6102c661044d366004612a07565b611323565b6103bc610460366004612a07565b60056020526000908152604090205460ff1681565b6102c6610483366004612a22565b6114e8565b6002546102a190600160501b900460ff1681565b6104c56104aa366004612a07565b6001600160a01b031660009081526007602052604090205490565b604051908152602001610284565b6102c66104e1366004612a5a565b61153d565b6104c56104f4366004612a07565b60096020526000908152604090205481565b61055a61051436600461284e565b6003602052600090815260409020546001600160701b038116906001600160401b03600160701b8204811691600160b01b81049091169061ffff600160f01b9091041684565b604080516001600160701b039590951685526001600160401b039384166020860152919092169083015261ffff166060820152608001610284565b6103bc6105a3366004612a07565b6001600160a01b031660009081526004602052604090205460ff1690565b6104c56105cf366004612a07565b600a6020526000908152604090205481565b6104c56105ef366004612a07565b60086020526000908152604090205481565b6104c561060f366004612a07565b6001600160a01b031660009081526008602052604090205490565b6102c6610638366004612ab7565b61163d565b6103bc61064b366004612a07565b60066020526000908152604090205460ff1681565b6104c561066e366004612a07565b600b6020526000908152604090205481565b6102c661068e366004612b4a565b6116ed565b6103bc6106a1366004612a07565b60046020526000908152604090205460ff1681565b6103bc6106c4366004612b6e565b611798565b6001546001600160a01b03165b6040516001600160a01b039091168152602001610284565b6102c66106fc366004612baa565b611995565b6102c661070f366004612baa565b611a74565b60025461072990600160401b900461ffff1681565b60405161ffff9091168152602001610284565b6104c561074a366004612a07565b60076020526000908152604090205481565b6000546001600160a01b03166106d6565b6060600080600381610780600187612be3565b815260208082019290925260409081016000908120825160808101845290546001600160701b0381168252600160701b81046001600160401b0390811695830195909552600160b01b810490941692810192909252600160f01b90920461ffff1660608201529150600c906107f6600187612be3565b815260200190815260200160002061080d82611c22565b81805480602002602001604051908101604052809291908181526020016000905b828210156108e05760008481526020908190206040805160c0810182526006860290920180546001600160701b0316835260018101546001600160a01b0390811694840194909452600281015491830191909152600381015490921660608201526004808301546080830152600583015491929160a084019160ff909116908111156108bc576108bc612867565b60048111156108cd576108cd612867565b815250508152602001906001019061082e565b5050505091509250925050915091565b600154600160a01b900460ff16156109425760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064015b60405180910390fd5b600080610950858585611c53565b604080516001600160701b038084168252841660208201529294509092507f6c15ce44793c685a79cde26a0bd5419ef4f3a337991f156be7b365962001b4a791015b60405180910390a15050505050565b600c60205281600052604060002081815481106109bd57600080fd5b60009182526020909120600690910201805460018201546002830154600384015460048501546005909501546001600160701b0390941696506001600160a01b039283169550909391169160ff1686565b33610a216000546001600160a01b031690565b6001600160a01b031614610a475760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03166000908152600460205260409020805460ff19169055565b33610a7b6000546001600160a01b031690565b6001600160a01b031614610aa15760405162461bcd60e51b815260040161093990612bf6565b6001805460ff60a01b19169055604051600081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f459304906020015b60405180910390a1565b33610af86000546001600160a01b031690565b6001600160a01b031614610b1e5760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03821660009081526004602052604090205460ff16610b7a5760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610939565b6001600160a01b03821660009081526005602052604090205460ff16610be3576001600160a01b03821660009081526009602052604081208054839290610bc2908490612c39565b90915550829050610bde6001600160a01b038216333085612287565b505050565b6001600160a01b03821660009081526006602052604090205460ff16610c89576001600160a01b0382166000908152600b6020526040902054610c27908290612c39565b6001600160a01b0383166000908152600a60205260409020541015610c895760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610939565b6001600160a01b0382166000908152600b602052604081208054839290610cb1908490612c39565b909155505060405163079cc67960e41b81523360048201526024810182905282906001600160a01b038216906379cc679090604401600060405180830381600087803b158015610d0057600080fd5b505af1158015610d14573d6000803e3d6000fd5b50505050505050565b60408051608081018252600080825260208201819052918101829052606081018290529080600381610d50600187612be3565b81526020808201929092526040908101600020815160808101835290546001600160701b0381168252600160701b81046001600160401b0390811694830194909452600160b01b810490931691810191909152600160f01b90910461ffff166060820152905080610dc081611c22565b9250925050915091565b33610ddd6000546001600160a01b031690565b6001600160a01b031614610e035760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b038116610e6a5760405162461bcd60e51b815260206004820152602860248201527f41646d696e526f6c653a206e65772061646d696e20697320746865207a65726f604482015267206164647265737360c01b6064820152608401610939565b600080546040516001600160a01b03808516939216917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd91a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b33610ed86000546001600160a01b031690565b6001600160a01b031614610efe5760405162461bcd60e51b815260040161093990612bf6565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6b9190612c4c565b6001600160a01b0384166000908152600460205260408120549192509060ff1615610fba576001600160a01b038416600090815260096020526040902054610fb39083612be3565b9050610fbd565b50805b610fd16001600160a01b03841633836122ee565b50505050565b33610fea6000546001600160a01b031690565b6001600160a01b0316146110105760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03909116600090815260086020526040902055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff1615906001600160401b03166000811580156110715750825b90506000826001600160401b0316600114801561108d5750303b155b90508115801561109b575080155b156110b95760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156110e357845460ff60401b1916600160401b1785555b6110eb61231f565b6110f3612339565b6110fb612351565b831561113d57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602001610992565b5050505050565b600154600090600160a81b90046001600160401b031681036111665750600090565b60018054600091600391839161118b91600160a81b90046001600160401b0316612c65565b6001600160401b0390811682526020808301939093526040918201600020825160808101845290546001600160701b0381168252600160701b8104831694820194909452600160b01b840490911691810191909152600160f01b90910461ffff16606082015290506111fb61237e565b61120757600191505090565b61121081611c22565b61121c57600191505090565b600091505090565b336112376000546001600160a01b031690565b6001600160a01b03161461125d5760405162461bcd60e51b815260040161093990612bf6565b6001805460ff60a01b1916600160a01b1781556040519081527f9422424b175dda897495a07b091ef74a3ef715cf6d866fc972954c1c7f45930490602001610adb565b336112b36000546001600160a01b031690565b6001600160a01b0316146112d95760405162461bcd60e51b815260040161093990612bf6565b600080546040516001600160a01b03909116907fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908390a3600080546001600160a01b0319169055565b336113366000546001600160a01b031690565b6001600160a01b03161461135c5760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b0381166113c55760405162461bcd60e51b815260206004820152602a60248201527f427269646765526f6c653a206e65772062726964676520697320746865207a65604482015269726f206164647265737360b01b6064820152608401610939565b6001546001600160a01b03908116908216036114235760405162461bcd60e51b815260206004820152601860248201527f427269646765526f6c653a2073616d65206164647265737300000000000000006044820152606401610939565b6001600160a01b0381163b61148c5760405162461bcd60e51b815260206004820152602960248201527f427269646765526f6c653a206e657720627269646765206d75737420626520616044820152680818dbdb9d1c9858dd60ba1b6064820152608401610939565b6001546040516001600160a01b038084169216907fcca5fddab921a878ddbd4edb737a2cf3ac6df70864f108606647d1b37a5e07a090600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b336114fb6000546001600160a01b031690565b6001600160a01b0316146115215760405162461bcd60e51b815260040161093990612bf6565b6001600160a01b03909116600090815260076020526040902055565b336115506000546001600160a01b031690565b6001600160a01b0316146115765760405162461bcd60e51b815260040161093990612bf6565b816115d257806115d25760405162461bcd60e51b815260206004820152602160248201527f4f6e6c79206e617469766520746f6b656e732063616e2062652073746f7265646044820152602160f81b6064820152608401610939565b6001600160a01b039490941660009081526004602090815260408083208054600160ff19918216179091556005835281842080548216951515959095179094556006825280832080549094169615159690961790925560078252848120939093556008905291902055565b600154600160a01b900460ff161561168a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610939565b600080611698878787611c53565b60405191935091506001600160701b038316907fce848da21487607afba5c5a500c2ad1002d9b8db97ca5512671309df071113b2906116dc90849088908890612c8c565b60405180910390a250505050505050565b336117006000546001600160a01b031690565b6001600160a01b0316146117265760405162461bcd60e51b815260040161093990612bf6565b606461ffff821611156117715760405162461bcd60e51b8152602060048201526013602482015272084c2e8c6d040e6d2f4ca40e8dede40d0d2ced606b1b6044820152606401610939565b6002805461ffff909216600160401b0269ffff000000000000000019909216919091179055565b6000336117ad6001546001600160a01b031690565b6001600160a01b03161461180f5760405162461bcd60e51b8152602060048201526024808201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f742042726044820152636964676560e01b6064820152608401610939565b6001600160a01b03841660009081526005602052604090205460ff16611891578360006118466001600160a01b038316858761245d565b9050806118585760009250505061198e565b6001600160a01b03861660009081526009602052604081208054879290611880908490612be3565b909155506001935061198e92505050565b6001600160a01b03841660009081526006602052604090205460ff161561193d576001600160a01b0384166000908152600a60205260409020546118d6908490612c39565b6001600160a01b0385166000908152600b6020526040902054101561193d5760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768206275726e656420746f6b656e7300000000000000006044820152606401610939565b600061194a858486612544565b90508061195b57600091505061198e565b6001600160a01b0385166000908152600a602052604081208054869290611983908490612c39565b909155506001925050505b9392505050565b336119a86000546001600160a01b031690565b6001600160a01b0316146119ce5760405162461bcd60e51b815260040161093990612bf6565b60025460ff600160581b90910481169082161115611a545760405162461bcd60e51b815260206004820152603760248201527f43616e6e6f7420696e63726561736520626174636820626c6f636b206c696d6960448201527f74206f76657220736574746c656d656e74206c696d69740000000000000000006064820152608401610939565b6002805460ff909216600160501b0260ff60501b19909216919091179055565b33611a876000546001600160a01b031690565b6001600160a01b031614611aad5760405162461bcd60e51b815260040161093990612bf6565b600154600160a01b900460ff16611afd5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610939565b611b05611144565b15611b6e5760405162461bcd60e51b815260206004820152603360248201527f43616e6e6f74206368616e6765206261746368536574746c654c696d697420776044820152726974682070656e64696e67206261746368657360681b6064820152608401610939565b60025460ff600160501b90910481169082161015611c025760405162461bcd60e51b815260206004820152604560248201527f43616e6e6f74206465637265617365206261746368536574746c654c696d697460448201527f20756e646572207468652076616c7565206f6620626174636820626c6f636b206064820152641b1a5b5a5d60da1b608482015260a401610939565b6002805460ff909216600160581b0260ff60581b19909216919091179055565b60025460408201516000914391611c4391600160581b900460ff1690612ccb565b6001600160401b03161092915050565b6001600160a01b038316600090815260046020526040812054819060ff16611cb15760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b6044820152606401610939565b6001600160a01b038516600090815260076020526040902054841015611d3f5760405162461bcd60e51b815260206004820152603c60248201527f547269656420746f206465706f73697420616e20616d6f756e742062656c6f7760448201527f20746865206d696e696d756d20737065636966696564206c696d6974000000006064820152608401610939565b6001600160a01b038516600090815260086020526040902054841115611dcd5760405162461bcd60e51b815260206004820152603c60248201527f547269656420746f206465706f73697420616e20616d6f756e742061626f766560448201527f20746865206d6178696d756d20737065636966696564206c696d6974000000006064820152608401610939565b436000611dd861237e565b15611e75575060018054600160a81b90046001600160401b0316600081815260036020526040902091611e0b9190612ccb565b81546001600160401b039182166001600160b01b031990911617600160701b8483160217825560018054600160a81b9004909116906015611e4b83612ceb565b91906101000a8154816001600160401b0302191690836001600160401b0316021790555050611eb3565b60018054600391600091611e999190600160a81b90046001600160401b0316612c65565b6001600160401b0316815260200190815260200160002090505b600254600090611ecd906001600160401b03166001612ccb565b6001600160401b03169050600c600060018060159054906101000a90046001600160401b0316611efd9190612c65565b6001600160401b031681526020019081526020016000206040518060c00160405280836001600160701b031681526020018a6001600160a01b03168152602001898152602001336001600160a01b0316815260200188815260200160016004811115611f6b57611f6b612867565b90528154600181810184556000938452602093849020835160069093020180546001600160701b039093166dffffffffffffffffffffffffffff199093169290921782559282015181840180546001600160a01b039283166001600160a01b031991821617909155604084015160028401556060840151600384018054919093169116179055608082015160048083019190915560a0830151600583018054949593949193909260ff1990921691849081111561202a5761202a612867565b021790555050825467ffffffffffffffff60b01b1916600160b01b6001600160401b0386160217808455600160f01b900461ffff16905082601e61206d83612d11565b825461ffff9182166101009390930a928302919092021990911617905550600280546001600160401b03169060006120a483612ceb565b91906101000a8154816001600160401b0302191690836001600160401b03160217905550506120eb886001600160a01b031660009081526005602052604090205460ff1690565b612139576001600160a01b03881660009081526009602052604081208054899290612117908490612c39565b909155508890506121336001600160a01b03821633308b612287565b50612270565b6001600160a01b03881660009081526006602052604090205460ff166121df576001600160a01b0388166000908152600b602052604090205461217d908890612c39565b6001600160a01b0389166000908152600a602052604090205410156121df5760405162461bcd60e51b81526020600482015260186024820152774e6f7420656e6f756768206d696e74656420746f6b656e7360401b6044820152606401610939565b6001600160a01b0388166000908152600b602052604081208054899290612207908490612c39565b909155505060405163079cc67960e41b81523360048201526024810188905288906001600160a01b038216906379cc679090604401600060405180830381600087803b15801561225657600080fd5b505af115801561226a573d6000803e3d6000fd5b50505050505b90546001600160701b031697909650945050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610fd19186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506125bc565b6040516001600160a01b03838116602483015260448201839052610bde91859182169063a9059cbb906064016122bc565b61232761261f565b61232f612668565b612337612678565b565b61234161261f565b612349612668565b612337612680565b61235961261f565b600280546bffffffff000000000000000019166b2828000a0000000000000000179055565b600154600090600160a81b90046001600160401b031681036123a05750600190565b6001805460009160039183916123c591600160a81b90046001600160401b0316612c65565b6001600160401b0390811682526020808301939093526040918201600020825160808101845290546001600160701b0381168252600160701b81048316948201859052600160b01b810490921692810192909252600160f01b900461ffff16606082018190529092506124379161269d565b806124575750600254606082015161ffff600160401b9092048216911610155b91505090565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b179052915160009283928392918816916124bb9190612d28565b6000604051808303816000865af19150503d80600081146124f8576040519150601f19603f3d011682016040523d82523d6000602084013e6124fd565b606091505b5091509150816125125760009250505061198e565b80516000036125265760019250505061198e565b8080602001905181019061253a9190612d57565b9695505050505050565b6040516340c10f1960e01b81526001600160a01b0383811660048301526024820183905260009185918216906340c10f1990604401600060405180830381600087803b15801561259357600080fd5b505af19250505080156125a4575060015b6125b257600091505061198e565b600191505061198e565b60006125d16001600160a01b038416836126df565b905080516000141580156125f65750808060200190518101906125f49190612d57565b155b15610bde57604051635274afe760e01b81526001600160a01b0384166004820152602401610939565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661233757604051631afcd79f60e31b815260040160405180910390fd5b61267061261f565b6123376126ed565b61233761261f565b61268861261f565b6001805460ff60a01b1916600160a01b179055565b60008261ffff166000036126b3575060006126d9565b60025443906126cc90600160501b900460ff1684612ccb565b6001600160401b03161090505b92915050565b606061198e83836000612738565b6126f561261f565b600080546001600160a01b031916339081178255604051909182917fe379ac64de02d8184ca1a871ac486cb8137de77e485ede140e97057b9c765ffd908290a350565b60608147101561275d5760405163cd78605960e01b8152306004820152602401610939565b600080856001600160a01b031684866040516127799190612d28565b60006040518083038185875af1925050503d80600081146127b6576040519150601f19603f3d011682016040523d82523d6000602084013e6127bb565b606091505b509150915061253a8683836060826127db576127d682612822565b61198e565b81511580156127f257506001600160a01b0384163b155b1561281b57604051639996b31560e01b81526001600160a01b0385166004820152602401610939565b508061198e565b8051156128325780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b60006020828403121561286057600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b6005811061289b57634e487b7160e01b600052602160045260246000fd5b9052565b6040808252835182820181905260009190606090818501906020808901865b8381101561292b57815180516001600160701b03168652838101516001600160a01b039081168588015288820151898801528782015116878701526080808201519087015260a090810151906129168188018361287d565b505060c09490940193908201906001016128be565b505082955061293d8188018915159052565b50505050509392505050565b80356001600160a01b038116811461296057600080fd5b919050565b60008060006060848603121561297a57600080fd5b61298384612949565b95602085013595506040909401359392505050565b600080604083850312156129ab57600080fd5b50508035926020909101359150565b6001600160701b03871681526001600160a01b03868116602083015260408201869052841660608201526080810183905260c081016129fc60a083018461287d565b979650505050505050565b600060208284031215612a1957600080fd5b61198e82612949565b60008060408385031215612a3557600080fd5b612a3e83612949565b946020939093013593505050565b801515811461284b57600080fd5b600080600080600060a08688031215612a7257600080fd5b612a7b86612949565b945060208601359350604086013592506060860135612a9981612a4c565b91506080860135612aa981612a4c565b809150509295509295909350565b600080600080600060808688031215612acf57600080fd5b612ad886612949565b9450602086013593506040860135925060608601356001600160401b0380821115612b0257600080fd5b818801915088601f830112612b1657600080fd5b813581811115612b2557600080fd5b896020828501011115612b3757600080fd5b9699959850939650602001949392505050565b600060208284031215612b5c57600080fd5b813561ffff8116811461198e57600080fd5b600080600060608486031215612b8357600080fd5b612b8c84612949565b925060208401359150612ba160408501612949565b90509250925092565b600060208284031215612bbc57600080fd5b813560ff8116811461198e57600080fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156126d9576126d9612bcd565b60208082526023908201527f41636365737320436f6e74726f6c3a2073656e646572206973206e6f7420416460408201526236b4b760e91b606082015260800190565b808201808211156126d9576126d9612bcd565b600060208284031215612c5e57600080fd5b5051919050565b6001600160401b03828116828216039080821115612c8557612c85612bcd565b5092915050565b6001600160701b038416815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b6001600160401b03818116838216019080821115612c8557612c85612bcd565b60006001600160401b03808316818103612d0757612d07612bcd565b6001019392505050565b600061ffff808316818103612d0757612d07612bcd565b6000825160005b81811015612d495760208186018101518583015201612d2f565b506000920191825250919050565b600060208284031215612d6957600080fd5b815161198e81612a4c56fea164736f6c6343000814000a", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/abi/contracts/GenericERC20/GenericERC20.abi.json b/abi/contracts/GenericERC20/GenericERC20.abi.json deleted file mode 100644 index 5bbc1c0..0000000 --- a/abi/contracts/GenericERC20/GenericERC20.abi.json +++ /dev/null @@ -1,349 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "providedNumDecimals", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allowance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientAllowance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ERC20InvalidApprover", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC20InvalidReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC20InvalidSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "ERC20InvalidSpender", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipientAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/abi/contracts/GenericERC20/GenericERC20.go b/abi/contracts/GenericERC20/GenericERC20.go deleted file mode 100644 index c03630a..0000000 --- a/abi/contracts/GenericERC20/GenericERC20.go +++ /dev/null @@ -1,759 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contract - -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 -) - -// GenericERC20MetaData contains all meta data concerning the GenericERC20 contract. -var GenericERC20MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"tokenName\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"tokenSymbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"providedNumDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipientAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", -} - -// GenericERC20ABI is the input ABI used to generate the binding from. -// Deprecated: Use GenericERC20MetaData.ABI instead. -var GenericERC20ABI = GenericERC20MetaData.ABI - -// GenericERC20 is an auto generated Go binding around an Ethereum contract. -type GenericERC20 struct { - GenericERC20Caller // Read-only binding to the contract - GenericERC20Transactor // Write-only binding to the contract - GenericERC20Filterer // Log filterer for contract events -} - -// GenericERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type GenericERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// GenericERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type GenericERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// GenericERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type GenericERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// GenericERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type GenericERC20Session struct { - Contract *GenericERC20 // 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 -} - -// GenericERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type GenericERC20CallerSession struct { - Contract *GenericERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// GenericERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type GenericERC20TransactorSession struct { - Contract *GenericERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// GenericERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type GenericERC20Raw struct { - Contract *GenericERC20 // Generic contract binding to access the raw methods on -} - -// GenericERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type GenericERC20CallerRaw struct { - Contract *GenericERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// GenericERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type GenericERC20TransactorRaw struct { - Contract *GenericERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewGenericERC20 creates a new instance of GenericERC20, bound to a specific deployed contract. -func NewGenericERC20(address common.Address, backend bind.ContractBackend) (*GenericERC20, error) { - contract, err := bindGenericERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &GenericERC20{GenericERC20Caller: GenericERC20Caller{contract: contract}, GenericERC20Transactor: GenericERC20Transactor{contract: contract}, GenericERC20Filterer: GenericERC20Filterer{contract: contract}}, nil -} - -// NewGenericERC20Caller creates a new read-only instance of GenericERC20, bound to a specific deployed contract. -func NewGenericERC20Caller(address common.Address, caller bind.ContractCaller) (*GenericERC20Caller, error) { - contract, err := bindGenericERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &GenericERC20Caller{contract: contract}, nil -} - -// NewGenericERC20Transactor creates a new write-only instance of GenericERC20, bound to a specific deployed contract. -func NewGenericERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*GenericERC20Transactor, error) { - contract, err := bindGenericERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &GenericERC20Transactor{contract: contract}, nil -} - -// NewGenericERC20Filterer creates a new log filterer instance of GenericERC20, bound to a specific deployed contract. -func NewGenericERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*GenericERC20Filterer, error) { - contract, err := bindGenericERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &GenericERC20Filterer{contract: contract}, nil -} - -// bindGenericERC20 binds a generic wrapper to an already deployed contract. -func bindGenericERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := GenericERC20MetaData.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 (_GenericERC20 *GenericERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _GenericERC20.Contract.GenericERC20Caller.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 (_GenericERC20 *GenericERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _GenericERC20.Contract.GenericERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_GenericERC20 *GenericERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _GenericERC20.Contract.GenericERC20Transactor.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 (_GenericERC20 *GenericERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _GenericERC20.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 (_GenericERC20 *GenericERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _GenericERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_GenericERC20 *GenericERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _GenericERC20.Contract.contract.Transact(opts, method, params...) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_GenericERC20 *GenericERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var out []interface{} - err := _GenericERC20.contract.Call(opts, &out, "allowance", owner, spender) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_GenericERC20 *GenericERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _GenericERC20.Contract.Allowance(&_GenericERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_GenericERC20 *GenericERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _GenericERC20.Contract.Allowance(&_GenericERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_GenericERC20 *GenericERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _GenericERC20.contract.Call(opts, &out, "balanceOf", account) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_GenericERC20 *GenericERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _GenericERC20.Contract.BalanceOf(&_GenericERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_GenericERC20 *GenericERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _GenericERC20.Contract.BalanceOf(&_GenericERC20.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_GenericERC20 *GenericERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _GenericERC20.contract.Call(opts, &out, "decimals") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_GenericERC20 *GenericERC20Session) Decimals() (uint8, error) { - return _GenericERC20.Contract.Decimals(&_GenericERC20.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_GenericERC20 *GenericERC20CallerSession) Decimals() (uint8, error) { - return _GenericERC20.Contract.Decimals(&_GenericERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_GenericERC20 *GenericERC20Caller) Name(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _GenericERC20.contract.Call(opts, &out, "name") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_GenericERC20 *GenericERC20Session) Name() (string, error) { - return _GenericERC20.Contract.Name(&_GenericERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_GenericERC20 *GenericERC20CallerSession) Name() (string, error) { - return _GenericERC20.Contract.Name(&_GenericERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_GenericERC20 *GenericERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _GenericERC20.contract.Call(opts, &out, "symbol") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_GenericERC20 *GenericERC20Session) Symbol() (string, error) { - return _GenericERC20.Contract.Symbol(&_GenericERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_GenericERC20 *GenericERC20CallerSession) Symbol() (string, error) { - return _GenericERC20.Contract.Symbol(&_GenericERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_GenericERC20 *GenericERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _GenericERC20.contract.Call(opts, &out, "totalSupply") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_GenericERC20 *GenericERC20Session) TotalSupply() (*big.Int, error) { - return _GenericERC20.Contract.TotalSupply(&_GenericERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_GenericERC20 *GenericERC20CallerSession) TotalSupply() (*big.Int, error) { - return _GenericERC20.Contract.TotalSupply(&_GenericERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.contract.Transact(opts, "approve", spender, value) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.Approve(&_GenericERC20.TransactOpts, spender, value) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.Approve(&_GenericERC20.TransactOpts, spender, value) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address recipientAddress, uint256 amount) returns() -func (_GenericERC20 *GenericERC20Transactor) Mint(opts *bind.TransactOpts, recipientAddress common.Address, amount *big.Int) (*types.Transaction, error) { - return _GenericERC20.contract.Transact(opts, "mint", recipientAddress, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address recipientAddress, uint256 amount) returns() -func (_GenericERC20 *GenericERC20Session) Mint(recipientAddress common.Address, amount *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.Mint(&_GenericERC20.TransactOpts, recipientAddress, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address recipientAddress, uint256 amount) returns() -func (_GenericERC20 *GenericERC20TransactorSession) Mint(recipientAddress common.Address, amount *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.Mint(&_GenericERC20.TransactOpts, recipientAddress, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.contract.Transact(opts, "transfer", to, value) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.Transfer(&_GenericERC20.TransactOpts, to, value) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.Transfer(&_GenericERC20.TransactOpts, to, value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.contract.Transact(opts, "transferFrom", from, to, value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.TransferFrom(&_GenericERC20.TransactOpts, from, to, value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) -func (_GenericERC20 *GenericERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { - return _GenericERC20.Contract.TransferFrom(&_GenericERC20.TransactOpts, from, to, value) -} - -// GenericERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the GenericERC20 contract. -type GenericERC20ApprovalIterator struct { - Event *GenericERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *GenericERC20ApprovalIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(GenericERC20Approval) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(GenericERC20Approval) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *GenericERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *GenericERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// GenericERC20Approval represents a Approval event raised by the GenericERC20 contract. -type GenericERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_GenericERC20 *GenericERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*GenericERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _GenericERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &GenericERC20ApprovalIterator{contract: _GenericERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_GenericERC20 *GenericERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *GenericERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _GenericERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(GenericERC20Approval) - if err := _GenericERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_GenericERC20 *GenericERC20Filterer) ParseApproval(log types.Log) (*GenericERC20Approval, error) { - event := new(GenericERC20Approval) - if err := _GenericERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// GenericERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the GenericERC20 contract. -type GenericERC20TransferIterator struct { - Event *GenericERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *GenericERC20TransferIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(GenericERC20Transfer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(GenericERC20Transfer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *GenericERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *GenericERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// GenericERC20Transfer represents a Transfer event raised by the GenericERC20 contract. -type GenericERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_GenericERC20 *GenericERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*GenericERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _GenericERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &GenericERC20TransferIterator{contract: _GenericERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_GenericERC20 *GenericERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *GenericERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _GenericERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(GenericERC20Transfer) - if err := _GenericERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_GenericERC20 *GenericERC20Filterer) ParseTransfer(log types.Log) (*GenericERC20Transfer, error) { - event := new(GenericERC20Transfer) - if err := _GenericERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/abi/contracts/GenericERC20/GenericERC20.hex b/abi/contracts/GenericERC20/GenericERC20.hex deleted file mode 100644 index 48c2d28..0000000 --- a/abi/contracts/GenericERC20/GenericERC20.hex +++ /dev/null @@ -1 +0,0 @@ -0x60806040523480156200001157600080fd5b5060405162000a8a38038062000a8a833981016040819052620000349162000139565b828260036200004483826200024d565b5060046200005382826200024d565b50506005805460ff191660ff93909316929092179091555062000319915050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200009c57600080fd5b81516001600160401b0380821115620000b957620000b962000074565b604051601f8301601f19908116603f01168101908282118183101715620000e457620000e462000074565b816040528381526020925086838588010111156200010157600080fd5b600091505b8382101562000125578582018301518183018401529082019062000106565b600093810190920192909252949350505050565b6000806000606084860312156200014f57600080fd5b83516001600160401b03808211156200016757600080fd5b62000175878388016200008a565b945060208601519150808211156200018c57600080fd5b506200019b868287016200008a565b925050604084015160ff81168114620001b357600080fd5b809150509250925092565b600181811c90821680620001d357607f821691505b602082108103620001f457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200024857600081815260208120601f850160051c81016020861015620002235750805b601f850160051c820191505b8181101562000244578281556001016200022f565b5050505b505050565b81516001600160401b0381111562000269576200026962000074565b62000281816200027a8454620001be565b84620001fa565b602080601f831160018114620002b95760008415620002a05750858301515b600019600386901b1c1916600185901b17855562000244565b600085815260208120601f198616915b82811015620002ea57888601518255948401946001909101908401620002c9565b5085821015620003095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61076180620003296000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806340c10f191161006657806340c10f191461011e57806370a082311461013357806395d89b411461015c578063a9059cbb14610164578063dd62ed3e1461017757600080fd5b806306fdde03146100a3578063095ea7b3146100c157806318160ddd146100e457806323b872dd146100f6578063313ce56714610109575b600080fd5b6100ab6101b0565b6040516100b891906105d4565b60405180910390f35b6100d46100cf36600461063e565b610242565b60405190151581526020016100b8565b6002545b6040519081526020016100b8565b6100d4610104366004610668565b61025c565b60055460405160ff90911681526020016100b8565b61013161012c36600461063e565b610280565b005b6100e86101413660046106a4565b6001600160a01b031660009081526020819052604090205490565b6100ab61028e565b6100d461017236600461063e565b61029d565b6100e86101853660046106c6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101bf906106f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb906106f9565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b6000336102508185856102ab565b60019150505b92915050565b60003361026a8582856102bd565b610275858585610340565b506001949350505050565b61028a828261039f565b5050565b6060600480546101bf906106f9565b600033610250818585610340565b6102b883838360016103d5565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461033a578181101561032b57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61033a848484840360006103d5565b50505050565b6001600160a01b03831661036a57604051634b637e8f60e11b815260006004820152602401610322565b6001600160a01b0382166103945760405163ec442f0560e01b815260006004820152602401610322565b6102b88383836104aa565b6001600160a01b0382166103c95760405163ec442f0560e01b815260006004820152602401610322565b61028a600083836104aa565b6001600160a01b0384166103ff5760405163e602df0560e01b815260006004820152602401610322565b6001600160a01b03831661042957604051634a1406b160e11b815260006004820152602401610322565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561033a57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161049c91815260200190565b60405180910390a350505050565b6001600160a01b0383166104d55780600260008282546104ca9190610733565b909155506105479050565b6001600160a01b038316600090815260208190526040902054818110156105285760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610322565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661056357600280548290039055610582565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516105c791815260200190565b60405180910390a3505050565b600060208083528351808285015260005b81811015610601578581018301518582016040015282016105e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461063957600080fd5b919050565b6000806040838503121561065157600080fd5b61065a83610622565b946020939093013593505050565b60008060006060848603121561067d57600080fd5b61068684610622565b925061069460208501610622565b9150604084013590509250925092565b6000602082840312156106b657600080fd5b6106bf82610622565b9392505050565b600080604083850312156106d957600080fd5b6106e283610622565b91506106f060208401610622565b90509250929050565b600181811c9082168061070d57607f821691505b60208210810361072d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561025657634e487b7160e01b600052601160045260246000fdfea164736f6c6343000814000a diff --git a/abi/contracts/GenericERC20/GenericERC20.json b/abi/contracts/GenericERC20/GenericERC20.json deleted file mode 100644 index 0784a85..0000000 --- a/abi/contracts/GenericERC20/GenericERC20.json +++ /dev/null @@ -1,358 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "GenericERC20", - "sourceName": "contracts/GenericERC20.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "tokenName", - "type": "string" - }, - { - "internalType": "string", - "name": "tokenSymbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "providedNumDecimals", - "type": "uint8" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allowance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientAllowance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ERC20InvalidApprover", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC20InvalidReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC20InvalidSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "ERC20InvalidSpender", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipientAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60806040523480156200001157600080fd5b5060405162000a8a38038062000a8a833981016040819052620000349162000139565b828260036200004483826200024d565b5060046200005382826200024d565b50506005805460ff191660ff93909316929092179091555062000319915050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200009c57600080fd5b81516001600160401b0380821115620000b957620000b962000074565b604051601f8301601f19908116603f01168101908282118183101715620000e457620000e462000074565b816040528381526020925086838588010111156200010157600080fd5b600091505b8382101562000125578582018301518183018401529082019062000106565b600093810190920192909252949350505050565b6000806000606084860312156200014f57600080fd5b83516001600160401b03808211156200016757600080fd5b62000175878388016200008a565b945060208601519150808211156200018c57600080fd5b506200019b868287016200008a565b925050604084015160ff81168114620001b357600080fd5b809150509250925092565b600181811c90821680620001d357607f821691505b602082108103620001f457634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200024857600081815260208120601f850160051c81016020861015620002235750805b601f850160051c820191505b8181101562000244578281556001016200022f565b5050505b505050565b81516001600160401b0381111562000269576200026962000074565b62000281816200027a8454620001be565b84620001fa565b602080601f831160018114620002b95760008415620002a05750858301515b600019600386901b1c1916600185901b17855562000244565b600085815260208120601f198616915b82811015620002ea57888601518255948401946001909101908401620002c9565b5085821015620003095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61076180620003296000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c806340c10f191161006657806340c10f191461011e57806370a082311461013357806395d89b411461015c578063a9059cbb14610164578063dd62ed3e1461017757600080fd5b806306fdde03146100a3578063095ea7b3146100c157806318160ddd146100e457806323b872dd146100f6578063313ce56714610109575b600080fd5b6100ab6101b0565b6040516100b891906105d4565b60405180910390f35b6100d46100cf36600461063e565b610242565b60405190151581526020016100b8565b6002545b6040519081526020016100b8565b6100d4610104366004610668565b61025c565b60055460405160ff90911681526020016100b8565b61013161012c36600461063e565b610280565b005b6100e86101413660046106a4565b6001600160a01b031660009081526020819052604090205490565b6100ab61028e565b6100d461017236600461063e565b61029d565b6100e86101853660046106c6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101bf906106f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb906106f9565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b6000336102508185856102ab565b60019150505b92915050565b60003361026a8582856102bd565b610275858585610340565b506001949350505050565b61028a828261039f565b5050565b6060600480546101bf906106f9565b600033610250818585610340565b6102b883838360016103d5565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461033a578181101561032b57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61033a848484840360006103d5565b50505050565b6001600160a01b03831661036a57604051634b637e8f60e11b815260006004820152602401610322565b6001600160a01b0382166103945760405163ec442f0560e01b815260006004820152602401610322565b6102b88383836104aa565b6001600160a01b0382166103c95760405163ec442f0560e01b815260006004820152602401610322565b61028a600083836104aa565b6001600160a01b0384166103ff5760405163e602df0560e01b815260006004820152602401610322565b6001600160a01b03831661042957604051634a1406b160e11b815260006004820152602401610322565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561033a57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161049c91815260200190565b60405180910390a350505050565b6001600160a01b0383166104d55780600260008282546104ca9190610733565b909155506105479050565b6001600160a01b038316600090815260208190526040902054818110156105285760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610322565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661056357600280548290039055610582565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516105c791815260200190565b60405180910390a3505050565b600060208083528351808285015260005b81811015610601578581018301518582016040015282016105e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461063957600080fd5b919050565b6000806040838503121561065157600080fd5b61065a83610622565b946020939093013593505050565b60008060006060848603121561067d57600080fd5b61068684610622565b925061069460208501610622565b9150604084013590509250925092565b6000602082840312156106b657600080fd5b6106bf82610622565b9392505050565b600080604083850312156106d957600080fd5b6106e283610622565b91506106f060208401610622565b90509250929050565b600181811c9082168061070d57607f821691505b60208210810361072d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561025657634e487b7160e01b600052601160045260246000fdfea164736f6c6343000814000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c806340c10f191161006657806340c10f191461011e57806370a082311461013357806395d89b411461015c578063a9059cbb14610164578063dd62ed3e1461017757600080fd5b806306fdde03146100a3578063095ea7b3146100c157806318160ddd146100e457806323b872dd146100f6578063313ce56714610109575b600080fd5b6100ab6101b0565b6040516100b891906105d4565b60405180910390f35b6100d46100cf36600461063e565b610242565b60405190151581526020016100b8565b6002545b6040519081526020016100b8565b6100d4610104366004610668565b61025c565b60055460405160ff90911681526020016100b8565b61013161012c36600461063e565b610280565b005b6100e86101413660046106a4565b6001600160a01b031660009081526020819052604090205490565b6100ab61028e565b6100d461017236600461063e565b61029d565b6100e86101853660046106c6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101bf906106f9565b80601f01602080910402602001604051908101604052809291908181526020018280546101eb906106f9565b80156102385780601f1061020d57610100808354040283529160200191610238565b820191906000526020600020905b81548152906001019060200180831161021b57829003601f168201915b5050505050905090565b6000336102508185856102ab565b60019150505b92915050565b60003361026a8582856102bd565b610275858585610340565b506001949350505050565b61028a828261039f565b5050565b6060600480546101bf906106f9565b600033610250818585610340565b6102b883838360016103d5565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461033a578181101561032b57604051637dc7a0d960e11b81526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61033a848484840360006103d5565b50505050565b6001600160a01b03831661036a57604051634b637e8f60e11b815260006004820152602401610322565b6001600160a01b0382166103945760405163ec442f0560e01b815260006004820152602401610322565b6102b88383836104aa565b6001600160a01b0382166103c95760405163ec442f0560e01b815260006004820152602401610322565b61028a600083836104aa565b6001600160a01b0384166103ff5760405163e602df0560e01b815260006004820152602401610322565b6001600160a01b03831661042957604051634a1406b160e11b815260006004820152602401610322565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561033a57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161049c91815260200190565b60405180910390a350505050565b6001600160a01b0383166104d55780600260008282546104ca9190610733565b909155506105479050565b6001600160a01b038316600090815260208190526040902054818110156105285760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610322565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661056357600280548290039055610582565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516105c791815260200190565b60405180910390a3505050565b600060208083528351808285015260005b81811015610601578581018301518582016040015282016105e5565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461063957600080fd5b919050565b6000806040838503121561065157600080fd5b61065a83610622565b946020939093013593505050565b60008060006060848603121561067d57600080fd5b61068684610622565b925061069460208501610622565b9150604084013590509250925092565b6000602082840312156106b657600080fd5b6106bf82610622565b9392505050565b600080604083850312156106d957600080fd5b6106e283610622565b91506106f060208401610622565b90509250929050565b600181811c9082168061070d57607f821691505b60208210810361072d57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561025657634e487b7160e01b600052601160045260246000fdfea164736f6c6343000814000a", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/abi/contracts/MintBurnERC20/MintBurnERC20.abi.json b/abi/contracts/MintBurnERC20/MintBurnERC20.abi.json deleted file mode 100644 index fa6b369..0000000 --- a/abi/contracts/MintBurnERC20/MintBurnERC20.abi.json +++ /dev/null @@ -1,654 +0,0 @@ -[ - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerNotMinter", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allowance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientAllowance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ERC20InvalidApprover", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC20InvalidReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC20InvalidSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "ERC20InvalidSpender", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "providedNumDecimals", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/abi/contracts/MintBurnERC20/MintBurnERC20.go b/abi/contracts/MintBurnERC20/MintBurnERC20.go deleted file mode 100644 index 53718ae..0000000 --- a/abi/contracts/MintBurnERC20/MintBurnERC20.go +++ /dev/null @@ -1,1660 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contract - -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 -) - -// MintBurnERC20MetaData contains all meta data concerning the MintBurnERC20 contract. -var MintBurnERC20MetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"CallerNotMinter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"providedNumDecimals\",\"type\":\"uint8\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", -} - -// MintBurnERC20ABI is the input ABI used to generate the binding from. -// Deprecated: Use MintBurnERC20MetaData.ABI instead. -var MintBurnERC20ABI = MintBurnERC20MetaData.ABI - -// MintBurnERC20 is an auto generated Go binding around an Ethereum contract. -type MintBurnERC20 struct { - MintBurnERC20Caller // Read-only binding to the contract - MintBurnERC20Transactor // Write-only binding to the contract - MintBurnERC20Filterer // Log filterer for contract events -} - -// MintBurnERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type MintBurnERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// MintBurnERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type MintBurnERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// MintBurnERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type MintBurnERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// MintBurnERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type MintBurnERC20Session struct { - Contract *MintBurnERC20 // 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 -} - -// MintBurnERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type MintBurnERC20CallerSession struct { - Contract *MintBurnERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// MintBurnERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type MintBurnERC20TransactorSession struct { - Contract *MintBurnERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// MintBurnERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type MintBurnERC20Raw struct { - Contract *MintBurnERC20 // Generic contract binding to access the raw methods on -} - -// MintBurnERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type MintBurnERC20CallerRaw struct { - Contract *MintBurnERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// MintBurnERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type MintBurnERC20TransactorRaw struct { - Contract *MintBurnERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewMintBurnERC20 creates a new instance of MintBurnERC20, bound to a specific deployed contract. -func NewMintBurnERC20(address common.Address, backend bind.ContractBackend) (*MintBurnERC20, error) { - contract, err := bindMintBurnERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &MintBurnERC20{MintBurnERC20Caller: MintBurnERC20Caller{contract: contract}, MintBurnERC20Transactor: MintBurnERC20Transactor{contract: contract}, MintBurnERC20Filterer: MintBurnERC20Filterer{contract: contract}}, nil -} - -// NewMintBurnERC20Caller creates a new read-only instance of MintBurnERC20, bound to a specific deployed contract. -func NewMintBurnERC20Caller(address common.Address, caller bind.ContractCaller) (*MintBurnERC20Caller, error) { - contract, err := bindMintBurnERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &MintBurnERC20Caller{contract: contract}, nil -} - -// NewMintBurnERC20Transactor creates a new write-only instance of MintBurnERC20, bound to a specific deployed contract. -func NewMintBurnERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*MintBurnERC20Transactor, error) { - contract, err := bindMintBurnERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &MintBurnERC20Transactor{contract: contract}, nil -} - -// NewMintBurnERC20Filterer creates a new log filterer instance of MintBurnERC20, bound to a specific deployed contract. -func NewMintBurnERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*MintBurnERC20Filterer, error) { - contract, err := bindMintBurnERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &MintBurnERC20Filterer{contract: contract}, nil -} - -// bindMintBurnERC20 binds a generic wrapper to an already deployed contract. -func bindMintBurnERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := MintBurnERC20MetaData.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 (_MintBurnERC20 *MintBurnERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _MintBurnERC20.Contract.MintBurnERC20Caller.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 (_MintBurnERC20 *MintBurnERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _MintBurnERC20.Contract.MintBurnERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_MintBurnERC20 *MintBurnERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _MintBurnERC20.Contract.MintBurnERC20Transactor.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 (_MintBurnERC20 *MintBurnERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _MintBurnERC20.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 (_MintBurnERC20 *MintBurnERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _MintBurnERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_MintBurnERC20 *MintBurnERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _MintBurnERC20.Contract.contract.Transact(opts, method, params...) -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20Caller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20Session) DEFAULTADMINROLE() ([32]byte, error) { - return _MintBurnERC20.Contract.DEFAULTADMINROLE(&_MintBurnERC20.CallOpts) -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20CallerSession) DEFAULTADMINROLE() ([32]byte, error) { - return _MintBurnERC20.Contract.DEFAULTADMINROLE(&_MintBurnERC20.CallOpts) -} - -// MINTERROLE is a free data retrieval call binding the contract method 0xd5391393. -// -// Solidity: function MINTER_ROLE() view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20Caller) MINTERROLE(opts *bind.CallOpts) ([32]byte, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "MINTER_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// MINTERROLE is a free data retrieval call binding the contract method 0xd5391393. -// -// Solidity: function MINTER_ROLE() view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20Session) MINTERROLE() ([32]byte, error) { - return _MintBurnERC20.Contract.MINTERROLE(&_MintBurnERC20.CallOpts) -} - -// MINTERROLE is a free data retrieval call binding the contract method 0xd5391393. -// -// Solidity: function MINTER_ROLE() view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20CallerSession) MINTERROLE() ([32]byte, error) { - return _MintBurnERC20.Contract.MINTERROLE(&_MintBurnERC20.CallOpts) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "allowance", owner, spender) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _MintBurnERC20.Contract.Allowance(&_MintBurnERC20.CallOpts, owner, spender) -} - -// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. -// -// Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _MintBurnERC20.Contract.Allowance(&_MintBurnERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "balanceOf", account) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _MintBurnERC20.Contract.BalanceOf(&_MintBurnERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _MintBurnERC20.Contract.BalanceOf(&_MintBurnERC20.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_MintBurnERC20 *MintBurnERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "decimals") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_MintBurnERC20 *MintBurnERC20Session) Decimals() (uint8, error) { - return _MintBurnERC20.Contract.Decimals(&_MintBurnERC20.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_MintBurnERC20 *MintBurnERC20CallerSession) Decimals() (uint8, error) { - return _MintBurnERC20.Contract.Decimals(&_MintBurnERC20.CallOpts) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20Caller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "getRoleAdmin", role) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20Session) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _MintBurnERC20.Contract.GetRoleAdmin(&_MintBurnERC20.CallOpts, role) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_MintBurnERC20 *MintBurnERC20CallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _MintBurnERC20.Contract.GetRoleAdmin(&_MintBurnERC20.CallOpts, role) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_MintBurnERC20 *MintBurnERC20Caller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "hasRole", role, account) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_MintBurnERC20 *MintBurnERC20Session) HasRole(role [32]byte, account common.Address) (bool, error) { - return _MintBurnERC20.Contract.HasRole(&_MintBurnERC20.CallOpts, role, account) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_MintBurnERC20 *MintBurnERC20CallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _MintBurnERC20.Contract.HasRole(&_MintBurnERC20.CallOpts, role, account) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_MintBurnERC20 *MintBurnERC20Caller) Name(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "name") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_MintBurnERC20 *MintBurnERC20Session) Name() (string, error) { - return _MintBurnERC20.Contract.Name(&_MintBurnERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_MintBurnERC20 *MintBurnERC20CallerSession) Name() (string, error) { - return _MintBurnERC20.Contract.Name(&_MintBurnERC20.CallOpts) -} - -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. -// -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_MintBurnERC20 *MintBurnERC20Caller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "supportsInterface", interfaceId) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. -// -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_MintBurnERC20 *MintBurnERC20Session) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _MintBurnERC20.Contract.SupportsInterface(&_MintBurnERC20.CallOpts, interfaceId) -} - -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. -// -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_MintBurnERC20 *MintBurnERC20CallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _MintBurnERC20.Contract.SupportsInterface(&_MintBurnERC20.CallOpts, interfaceId) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_MintBurnERC20 *MintBurnERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "symbol") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_MintBurnERC20 *MintBurnERC20Session) Symbol() (string, error) { - return _MintBurnERC20.Contract.Symbol(&_MintBurnERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_MintBurnERC20 *MintBurnERC20CallerSession) Symbol() (string, error) { - return _MintBurnERC20.Contract.Symbol(&_MintBurnERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _MintBurnERC20.contract.Call(opts, &out, "totalSupply") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20Session) TotalSupply() (*big.Int, error) { - return _MintBurnERC20.Contract.TotalSupply(&_MintBurnERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_MintBurnERC20 *MintBurnERC20CallerSession) TotalSupply() (*big.Int, error) { - return _MintBurnERC20.Contract.TotalSupply(&_MintBurnERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "approve", spender, value) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Approve(&_MintBurnERC20.TransactOpts, spender, value) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Approve(&_MintBurnERC20.TransactOpts, spender, value) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 value) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) Burn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "burn", value) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 value) returns() -func (_MintBurnERC20 *MintBurnERC20Session) Burn(value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Burn(&_MintBurnERC20.TransactOpts, value) -} - -// Burn is a paid mutator transaction binding the contract method 0x42966c68. -// -// Solidity: function burn(uint256 value) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) Burn(value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Burn(&_MintBurnERC20.TransactOpts, value) -} - -// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. -// -// Solidity: function burnFrom(address account, uint256 value) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) BurnFrom(opts *bind.TransactOpts, account common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "burnFrom", account, value) -} - -// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. -// -// Solidity: function burnFrom(address account, uint256 value) returns() -func (_MintBurnERC20 *MintBurnERC20Session) BurnFrom(account common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.BurnFrom(&_MintBurnERC20.TransactOpts, account, value) -} - -// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. -// -// Solidity: function burnFrom(address account, uint256 value) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) BurnFrom(account common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.BurnFrom(&_MintBurnERC20.TransactOpts, account, value) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "grantRole", role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_MintBurnERC20 *MintBurnERC20Session) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _MintBurnERC20.Contract.GrantRole(&_MintBurnERC20.TransactOpts, role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _MintBurnERC20.Contract.GrantRole(&_MintBurnERC20.TransactOpts, role, account) -} - -// Initialize is a paid mutator transaction binding the contract method 0x1624f6c6. -// -// Solidity: function initialize(string name, string symbol, uint8 providedNumDecimals) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) Initialize(opts *bind.TransactOpts, name string, symbol string, providedNumDecimals uint8) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "initialize", name, symbol, providedNumDecimals) -} - -// Initialize is a paid mutator transaction binding the contract method 0x1624f6c6. -// -// Solidity: function initialize(string name, string symbol, uint8 providedNumDecimals) returns() -func (_MintBurnERC20 *MintBurnERC20Session) Initialize(name string, symbol string, providedNumDecimals uint8) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Initialize(&_MintBurnERC20.TransactOpts, name, symbol, providedNumDecimals) -} - -// Initialize is a paid mutator transaction binding the contract method 0x1624f6c6. -// -// Solidity: function initialize(string name, string symbol, uint8 providedNumDecimals) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) Initialize(name string, symbol string, providedNumDecimals uint8) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Initialize(&_MintBurnERC20.TransactOpts, name, symbol, providedNumDecimals) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address to, uint256 amount) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "mint", to, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address to, uint256 amount) returns() -func (_MintBurnERC20 *MintBurnERC20Session) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Mint(&_MintBurnERC20.TransactOpts, to, amount) -} - -// Mint is a paid mutator transaction binding the contract method 0x40c10f19. -// -// Solidity: function mint(address to, uint256 amount) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Mint(&_MintBurnERC20.TransactOpts, to, amount) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. -// -// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "renounceRole", role, callerConfirmation) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. -// -// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() -func (_MintBurnERC20 *MintBurnERC20Session) RenounceRole(role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { - return _MintBurnERC20.Contract.RenounceRole(&_MintBurnERC20.TransactOpts, role, callerConfirmation) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. -// -// Solidity: function renounceRole(bytes32 role, address callerConfirmation) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) RenounceRole(role [32]byte, callerConfirmation common.Address) (*types.Transaction, error) { - return _MintBurnERC20.Contract.RenounceRole(&_MintBurnERC20.TransactOpts, role, callerConfirmation) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_MintBurnERC20 *MintBurnERC20Transactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "revokeRole", role, account) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_MintBurnERC20 *MintBurnERC20Session) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _MintBurnERC20.Contract.RevokeRole(&_MintBurnERC20.TransactOpts, role, account) -} - -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. -// -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_MintBurnERC20 *MintBurnERC20TransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _MintBurnERC20.Contract.RevokeRole(&_MintBurnERC20.TransactOpts, role, account) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "transfer", to, value) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Transfer(&_MintBurnERC20.TransactOpts, to, value) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address to, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.Transfer(&_MintBurnERC20.TransactOpts, to, value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.contract.Transact(opts, "transferFrom", from, to, value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.TransferFrom(&_MintBurnERC20.TransactOpts, from, to, value) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) -func (_MintBurnERC20 *MintBurnERC20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { - return _MintBurnERC20.Contract.TransferFrom(&_MintBurnERC20.TransactOpts, from, to, value) -} - -// MintBurnERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the MintBurnERC20 contract. -type MintBurnERC20ApprovalIterator struct { - Event *MintBurnERC20Approval // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *MintBurnERC20ApprovalIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20Approval) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20Approval) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *MintBurnERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *MintBurnERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// MintBurnERC20Approval represents a Approval event raised by the MintBurnERC20 contract. -type MintBurnERC20Approval struct { - Owner common.Address - Spender common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_MintBurnERC20 *MintBurnERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*MintBurnERC20ApprovalIterator, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _MintBurnERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &MintBurnERC20ApprovalIterator{contract: _MintBurnERC20.contract, event: "Approval", logs: logs, sub: sub}, nil -} - -// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_MintBurnERC20 *MintBurnERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *MintBurnERC20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { - - var ownerRule []interface{} - for _, ownerItem := range owner { - ownerRule = append(ownerRule, ownerItem) - } - var spenderRule []interface{} - for _, spenderItem := range spender { - spenderRule = append(spenderRule, spenderItem) - } - - logs, sub, err := _MintBurnERC20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(MintBurnERC20Approval) - if err := _MintBurnERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. -// -// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_MintBurnERC20 *MintBurnERC20Filterer) ParseApproval(log types.Log) (*MintBurnERC20Approval, error) { - event := new(MintBurnERC20Approval) - if err := _MintBurnERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// MintBurnERC20InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the MintBurnERC20 contract. -type MintBurnERC20InitializedIterator struct { - Event *MintBurnERC20Initialized // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *MintBurnERC20InitializedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20Initialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20Initialized) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *MintBurnERC20InitializedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *MintBurnERC20InitializedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// MintBurnERC20Initialized represents a Initialized event raised by the MintBurnERC20 contract. -type MintBurnERC20Initialized struct { - Version uint64 - Raw types.Log // Blockchain specific contextual infos -} - -// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_MintBurnERC20 *MintBurnERC20Filterer) FilterInitialized(opts *bind.FilterOpts) (*MintBurnERC20InitializedIterator, error) { - - logs, sub, err := _MintBurnERC20.contract.FilterLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return &MintBurnERC20InitializedIterator{contract: _MintBurnERC20.contract, event: "Initialized", logs: logs, sub: sub}, nil -} - -// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_MintBurnERC20 *MintBurnERC20Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *MintBurnERC20Initialized) (event.Subscription, error) { - - logs, sub, err := _MintBurnERC20.contract.WatchLogs(opts, "Initialized") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(MintBurnERC20Initialized) - if err := _MintBurnERC20.contract.UnpackLog(event, "Initialized", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. -// -// Solidity: event Initialized(uint64 version) -func (_MintBurnERC20 *MintBurnERC20Filterer) ParseInitialized(log types.Log) (*MintBurnERC20Initialized, error) { - event := new(MintBurnERC20Initialized) - if err := _MintBurnERC20.contract.UnpackLog(event, "Initialized", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// MintBurnERC20RoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the MintBurnERC20 contract. -type MintBurnERC20RoleAdminChangedIterator struct { - Event *MintBurnERC20RoleAdminChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *MintBurnERC20RoleAdminChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20RoleAdminChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20RoleAdminChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *MintBurnERC20RoleAdminChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *MintBurnERC20RoleAdminChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// MintBurnERC20RoleAdminChanged represents a RoleAdminChanged event raised by the MintBurnERC20 contract. -type MintBurnERC20RoleAdminChanged struct { - Role [32]byte - PreviousAdminRole [32]byte - NewAdminRole [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_MintBurnERC20 *MintBurnERC20Filterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*MintBurnERC20RoleAdminChangedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) - } - - logs, sub, err := _MintBurnERC20.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) - if err != nil { - return nil, err - } - return &MintBurnERC20RoleAdminChangedIterator{contract: _MintBurnERC20.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil -} - -// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_MintBurnERC20 *MintBurnERC20Filterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *MintBurnERC20RoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) - } - - logs, sub, err := _MintBurnERC20.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(MintBurnERC20RoleAdminChanged) - if err := _MintBurnERC20.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_MintBurnERC20 *MintBurnERC20Filterer) ParseRoleAdminChanged(log types.Log) (*MintBurnERC20RoleAdminChanged, error) { - event := new(MintBurnERC20RoleAdminChanged) - if err := _MintBurnERC20.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// MintBurnERC20RoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the MintBurnERC20 contract. -type MintBurnERC20RoleGrantedIterator struct { - Event *MintBurnERC20RoleGranted // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *MintBurnERC20RoleGrantedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20RoleGranted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20RoleGranted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *MintBurnERC20RoleGrantedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *MintBurnERC20RoleGrantedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// MintBurnERC20RoleGranted represents a RoleGranted event raised by the MintBurnERC20 contract. -type MintBurnERC20RoleGranted struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_MintBurnERC20 *MintBurnERC20Filterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*MintBurnERC20RoleGrantedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _MintBurnERC20.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &MintBurnERC20RoleGrantedIterator{contract: _MintBurnERC20.contract, event: "RoleGranted", logs: logs, sub: sub}, nil -} - -// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_MintBurnERC20 *MintBurnERC20Filterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *MintBurnERC20RoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _MintBurnERC20.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(MintBurnERC20RoleGranted) - if err := _MintBurnERC20.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_MintBurnERC20 *MintBurnERC20Filterer) ParseRoleGranted(log types.Log) (*MintBurnERC20RoleGranted, error) { - event := new(MintBurnERC20RoleGranted) - if err := _MintBurnERC20.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// MintBurnERC20RoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the MintBurnERC20 contract. -type MintBurnERC20RoleRevokedIterator struct { - Event *MintBurnERC20RoleRevoked // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *MintBurnERC20RoleRevokedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20RoleRevoked) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20RoleRevoked) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *MintBurnERC20RoleRevokedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *MintBurnERC20RoleRevokedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// MintBurnERC20RoleRevoked represents a RoleRevoked event raised by the MintBurnERC20 contract. -type MintBurnERC20RoleRevoked struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_MintBurnERC20 *MintBurnERC20Filterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*MintBurnERC20RoleRevokedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _MintBurnERC20.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &MintBurnERC20RoleRevokedIterator{contract: _MintBurnERC20.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil -} - -// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_MintBurnERC20 *MintBurnERC20Filterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *MintBurnERC20RoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _MintBurnERC20.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(MintBurnERC20RoleRevoked) - if err := _MintBurnERC20.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_MintBurnERC20 *MintBurnERC20Filterer) ParseRoleRevoked(log types.Log) (*MintBurnERC20RoleRevoked, error) { - event := new(MintBurnERC20RoleRevoked) - if err := _MintBurnERC20.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// MintBurnERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the MintBurnERC20 contract. -type MintBurnERC20TransferIterator struct { - Event *MintBurnERC20Transfer // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *MintBurnERC20TransferIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20Transfer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(MintBurnERC20Transfer) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *MintBurnERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *MintBurnERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// MintBurnERC20Transfer represents a Transfer event raised by the MintBurnERC20 contract. -type MintBurnERC20Transfer struct { - From common.Address - To common.Address - Value *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_MintBurnERC20 *MintBurnERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*MintBurnERC20TransferIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _MintBurnERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &MintBurnERC20TransferIterator{contract: _MintBurnERC20.contract, event: "Transfer", logs: logs, sub: sub}, nil -} - -// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_MintBurnERC20 *MintBurnERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *MintBurnERC20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _MintBurnERC20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(MintBurnERC20Transfer) - if err := _MintBurnERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. -// -// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_MintBurnERC20 *MintBurnERC20Filterer) ParseTransfer(log types.Log) (*MintBurnERC20Transfer, error) { - event := new(MintBurnERC20Transfer) - if err := _MintBurnERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/abi/contracts/MintBurnERC20/MintBurnERC20.hex b/abi/contracts/MintBurnERC20/MintBurnERC20.hex deleted file mode 100644 index ed784ab..0000000 --- a/abi/contracts/MintBurnERC20/MintBurnERC20.hex +++ /dev/null @@ -1 +0,0 @@ -0x608060405234801561001057600080fd5b50611167806100206000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806340c10f19116100b857806395d89b411161007c57806395d89b41146102b5578063a217fddf146102bd578063a9059cbb146102c5578063d5391393146102d8578063d547741f146102ff578063dd62ed3e1461031257600080fd5b806340c10f191461023357806342966c681461024657806370a082311461025957806379cc67901461028f57806391d14854146102a257600080fd5b806323b872dd116100ff57806323b872dd146101d2578063248a9ca3146101e55780632f2ff15d146101f8578063313ce5671461020b57806336568abe1461022057600080fd5b806301ffc9a71461013c57806306fdde0314610164578063095ea7b3146101795780631624f6c61461018c57806318160ddd146101a1575b600080fd5b61014f61014a366004610d05565b610325565b60405190151581526020015b60405180910390f35b61016c61035c565b60405161015b9190610d36565b61014f610187366004610da0565b61041f565b61019f61019a366004610e6d565b610437565b005b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b60405190815260200161015b565b61014f6101e0366004610eeb565b610563565b6101c46101f3366004610f27565b610587565b61019f610206366004610f40565b6105a9565b60005460405160ff909116815260200161015b565b61019f61022e366004610f40565b6105cb565b61019f610241366004610da0565b610603565b61019f610254366004610f27565b61065f565b6101c4610267366004610f6c565b6001600160a01b0316600090815260008051602061111b833981519152602052604090205490565b61019f61029d366004610da0565b61066c565b61014f6102b0366004610f40565b610681565b61016c6106b9565b6101c4600081565b61014f6102d3366004610da0565b6106f8565b6101c47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61019f61030d366004610f40565b610706565b6101c4610320366004610f87565b610722565b60006001600160e01b03198216637965db0b60e01b148061035657506301ffc9a760e01b6001600160e01b03198316145b92915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03805460609160008051602061111b8339815191529161039b90610fb1565b80601f01602080910402602001604051908101604052809291908181526020018280546103c790610fb1565b80156104145780601f106103e957610100808354040283529160200191610414565b820191906000526020600020905b8154815290600101906020018083116103f757829003601f168201915b505050505091505090565b60003361042d81858561076c565b5060019392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff1660008115801561047d5750825b905060008267ffffffffffffffff16600114801561049a5750303b155b9050811580156104a8575080155b156104c65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104f057845460ff60401b1916600160401b1785555b6104fa8888610779565b61050261078b565b61050a61078b565b61051386610795565b831561055957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b6000336105718582856107b6565b61057c858585610816565b506001949350505050565b600090815260008051602061113b833981519152602052604090206001015490565b6105b282610587565b6105bb81610875565b6105c5838361087f565b50505050565b6001600160a01b03811633146105f45760405163334bd91960e11b815260040160405180910390fd5b6105fe8282610924565b505050565b61062d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610681565b61065157604051632fdab94f60e11b81523360048201526024015b60405180910390fd5b61065b82826109a0565b5050565b61066933826109d6565b50565b6106778233836107b6565b61065b82826109d6565b600091825260008051602061113b833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace04805460609160008051602061111b8339815191529161039b90610fb1565b60003361042d818585610816565b61070f82610587565b61071881610875565b6105c58383610924565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b6105fe8383836001610a0c565b610781610af4565b61065b8282610b3d565b610793610af4565b565b61079d610af4565b6000805460ff191660ff831617815561065b903361087f565b60006107c28484610722565b905060001981146105c5578181101561080757604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610648565b6105c584848484036000610a0c565b6001600160a01b03831661084057604051634b637e8f60e11b815260006004820152602401610648565b6001600160a01b03821661086a5760405163ec442f0560e01b815260006004820152602401610648565b6105fe838383610b8e565b6106698133610ccc565b600060008051602061113b83398151915261089a8484610681565b61091a576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556108d03390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610356565b6000915050610356565b600060008051602061113b83398151915261093f8484610681565b1561091a576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610356565b6001600160a01b0382166109ca5760405163ec442f0560e01b815260006004820152602401610648565b61065b60008383610b8e565b6001600160a01b038216610a0057604051634b637e8f60e11b815260006004820152602401610648565b61065b82600083610b8e565b60008051602061111b8339815191526001600160a01b038516610a455760405163e602df0560e01b815260006004820152602401610648565b6001600160a01b038416610a6f57604051634a1406b160e11b815260006004820152602401610648565b6001600160a01b03808616600090815260018301602090815260408083209388168352929052208390558115610aed57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610ae491815260200190565b60405180910390a35b5050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661079357604051631afcd79f60e31b815260040160405180910390fd5b610b45610af4565b60008051602061111b8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03610b7f8482611039565b50600481016105c58382611039565b60008051602061111b8339815191526001600160a01b038416610bca5781816002016000828254610bbf91906110f9565b90915550610c3c9050565b6001600160a01b03841660009081526020829052604090205482811015610c1d5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610648565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b038316610c5a576002810180548390039055610c79565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cbe91815260200190565b60405180910390a350505050565b610cd68282610681565b61065b5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610648565b600060208284031215610d1757600080fd5b81356001600160e01b031981168114610d2f57600080fd5b9392505050565b600060208083528351808285015260005b81811015610d6357858101830151858201604001528201610d47565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610d9b57600080fd5b919050565b60008060408385031215610db357600080fd5b610dbc83610d84565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610df157600080fd5b813567ffffffffffffffff80821115610e0c57610e0c610dca565b604051601f8301601f19908116603f01168101908282118183101715610e3457610e34610dca565b81604052838152866020858801011115610e4d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e8257600080fd5b833567ffffffffffffffff80821115610e9a57600080fd5b610ea687838801610de0565b94506020860135915080821115610ebc57600080fd5b50610ec986828701610de0565b925050604084013560ff81168114610ee057600080fd5b809150509250925092565b600080600060608486031215610f0057600080fd5b610f0984610d84565b9250610f1760208501610d84565b9150604084013590509250925092565b600060208284031215610f3957600080fd5b5035919050565b60008060408385031215610f5357600080fd5b82359150610f6360208401610d84565b90509250929050565b600060208284031215610f7e57600080fd5b610d2f82610d84565b60008060408385031215610f9a57600080fd5b610fa383610d84565b9150610f6360208401610d84565b600181811c90821680610fc557607f821691505b602082108103610fe557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105fe57600081815260208120601f850160051c810160208610156110125750805b601f850160051c820191505b818110156110315782815560010161101e565b505050505050565b815167ffffffffffffffff81111561105357611053610dca565b611067816110618454610fb1565b84610feb565b602080601f83116001811461109c57600084156110845750858301515b600019600386901b1c1916600185901b178555611031565b600085815260208120601f198616915b828110156110cb578886015182559484019460019091019084016110ac565b50858210156110e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561035657634e487b7160e01b600052601160045260246000fdfe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a164736f6c6343000814000a diff --git a/abi/contracts/MintBurnERC20/MintBurnERC20.json b/abi/contracts/MintBurnERC20/MintBurnERC20.json deleted file mode 100644 index 2b2b230..0000000 --- a/abi/contracts/MintBurnERC20/MintBurnERC20.json +++ /dev/null @@ -1,663 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "MintBurnERC20", - "sourceName": "contracts/MintBurnERC20.sol", - "abi": [ - { - "inputs": [], - "name": "AccessControlBadConfirmation", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "neededRole", - "type": "bytes32" - } - ], - "name": "AccessControlUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "caller", - "type": "address" - } - ], - "name": "CallerNotMinter", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "allowance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientAllowance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "balance", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "needed", - "type": "uint256" - } - ], - "name": "ERC20InsufficientBalance", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "approver", - "type": "address" - } - ], - "name": "ERC20InvalidApprover", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - } - ], - "name": "ERC20InvalidReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "ERC20InvalidSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "ERC20InvalidSpender", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidInitialization", - "type": "error" - }, - { - "inputs": [], - "name": "NotInitializing", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", - "name": "version", - "type": "uint64" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MINTER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "burnFrom", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint8", - "name": "providedNumDecimals", - "type": "uint8" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "callerConfirmation", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x608060405234801561001057600080fd5b50611167806100206000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806340c10f19116100b857806395d89b411161007c57806395d89b41146102b5578063a217fddf146102bd578063a9059cbb146102c5578063d5391393146102d8578063d547741f146102ff578063dd62ed3e1461031257600080fd5b806340c10f191461023357806342966c681461024657806370a082311461025957806379cc67901461028f57806391d14854146102a257600080fd5b806323b872dd116100ff57806323b872dd146101d2578063248a9ca3146101e55780632f2ff15d146101f8578063313ce5671461020b57806336568abe1461022057600080fd5b806301ffc9a71461013c57806306fdde0314610164578063095ea7b3146101795780631624f6c61461018c57806318160ddd146101a1575b600080fd5b61014f61014a366004610d05565b610325565b60405190151581526020015b60405180910390f35b61016c61035c565b60405161015b9190610d36565b61014f610187366004610da0565b61041f565b61019f61019a366004610e6d565b610437565b005b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b60405190815260200161015b565b61014f6101e0366004610eeb565b610563565b6101c46101f3366004610f27565b610587565b61019f610206366004610f40565b6105a9565b60005460405160ff909116815260200161015b565b61019f61022e366004610f40565b6105cb565b61019f610241366004610da0565b610603565b61019f610254366004610f27565b61065f565b6101c4610267366004610f6c565b6001600160a01b0316600090815260008051602061111b833981519152602052604090205490565b61019f61029d366004610da0565b61066c565b61014f6102b0366004610f40565b610681565b61016c6106b9565b6101c4600081565b61014f6102d3366004610da0565b6106f8565b6101c47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61019f61030d366004610f40565b610706565b6101c4610320366004610f87565b610722565b60006001600160e01b03198216637965db0b60e01b148061035657506301ffc9a760e01b6001600160e01b03198316145b92915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03805460609160008051602061111b8339815191529161039b90610fb1565b80601f01602080910402602001604051908101604052809291908181526020018280546103c790610fb1565b80156104145780601f106103e957610100808354040283529160200191610414565b820191906000526020600020905b8154815290600101906020018083116103f757829003601f168201915b505050505091505090565b60003361042d81858561076c565b5060019392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff1660008115801561047d5750825b905060008267ffffffffffffffff16600114801561049a5750303b155b9050811580156104a8575080155b156104c65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104f057845460ff60401b1916600160401b1785555b6104fa8888610779565b61050261078b565b61050a61078b565b61051386610795565b831561055957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b6000336105718582856107b6565b61057c858585610816565b506001949350505050565b600090815260008051602061113b833981519152602052604090206001015490565b6105b282610587565b6105bb81610875565b6105c5838361087f565b50505050565b6001600160a01b03811633146105f45760405163334bd91960e11b815260040160405180910390fd5b6105fe8282610924565b505050565b61062d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610681565b61065157604051632fdab94f60e11b81523360048201526024015b60405180910390fd5b61065b82826109a0565b5050565b61066933826109d6565b50565b6106778233836107b6565b61065b82826109d6565b600091825260008051602061113b833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace04805460609160008051602061111b8339815191529161039b90610fb1565b60003361042d818585610816565b61070f82610587565b61071881610875565b6105c58383610924565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b6105fe8383836001610a0c565b610781610af4565b61065b8282610b3d565b610793610af4565b565b61079d610af4565b6000805460ff191660ff831617815561065b903361087f565b60006107c28484610722565b905060001981146105c5578181101561080757604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610648565b6105c584848484036000610a0c565b6001600160a01b03831661084057604051634b637e8f60e11b815260006004820152602401610648565b6001600160a01b03821661086a5760405163ec442f0560e01b815260006004820152602401610648565b6105fe838383610b8e565b6106698133610ccc565b600060008051602061113b83398151915261089a8484610681565b61091a576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556108d03390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610356565b6000915050610356565b600060008051602061113b83398151915261093f8484610681565b1561091a576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610356565b6001600160a01b0382166109ca5760405163ec442f0560e01b815260006004820152602401610648565b61065b60008383610b8e565b6001600160a01b038216610a0057604051634b637e8f60e11b815260006004820152602401610648565b61065b82600083610b8e565b60008051602061111b8339815191526001600160a01b038516610a455760405163e602df0560e01b815260006004820152602401610648565b6001600160a01b038416610a6f57604051634a1406b160e11b815260006004820152602401610648565b6001600160a01b03808616600090815260018301602090815260408083209388168352929052208390558115610aed57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610ae491815260200190565b60405180910390a35b5050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661079357604051631afcd79f60e31b815260040160405180910390fd5b610b45610af4565b60008051602061111b8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03610b7f8482611039565b50600481016105c58382611039565b60008051602061111b8339815191526001600160a01b038416610bca5781816002016000828254610bbf91906110f9565b90915550610c3c9050565b6001600160a01b03841660009081526020829052604090205482811015610c1d5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610648565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b038316610c5a576002810180548390039055610c79565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cbe91815260200190565b60405180910390a350505050565b610cd68282610681565b61065b5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610648565b600060208284031215610d1757600080fd5b81356001600160e01b031981168114610d2f57600080fd5b9392505050565b600060208083528351808285015260005b81811015610d6357858101830151858201604001528201610d47565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610d9b57600080fd5b919050565b60008060408385031215610db357600080fd5b610dbc83610d84565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610df157600080fd5b813567ffffffffffffffff80821115610e0c57610e0c610dca565b604051601f8301601f19908116603f01168101908282118183101715610e3457610e34610dca565b81604052838152866020858801011115610e4d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e8257600080fd5b833567ffffffffffffffff80821115610e9a57600080fd5b610ea687838801610de0565b94506020860135915080821115610ebc57600080fd5b50610ec986828701610de0565b925050604084013560ff81168114610ee057600080fd5b809150509250925092565b600080600060608486031215610f0057600080fd5b610f0984610d84565b9250610f1760208501610d84565b9150604084013590509250925092565b600060208284031215610f3957600080fd5b5035919050565b60008060408385031215610f5357600080fd5b82359150610f6360208401610d84565b90509250929050565b600060208284031215610f7e57600080fd5b610d2f82610d84565b60008060408385031215610f9a57600080fd5b610fa383610d84565b9150610f6360208401610d84565b600181811c90821680610fc557607f821691505b602082108103610fe557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105fe57600081815260208120601f850160051c810160208610156110125750805b601f850160051c820191505b818110156110315782815560010161101e565b505050505050565b815167ffffffffffffffff81111561105357611053610dca565b611067816110618454610fb1565b84610feb565b602080601f83116001811461109c57600084156110845750858301515b600019600386901b1c1916600185901b178555611031565b600085815260208120601f198616915b828110156110cb578886015182559484019460019091019084016110ac565b50858210156110e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561035657634e487b7160e01b600052601160045260246000fdfe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a164736f6c6343000814000a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101375760003560e01c806340c10f19116100b857806395d89b411161007c57806395d89b41146102b5578063a217fddf146102bd578063a9059cbb146102c5578063d5391393146102d8578063d547741f146102ff578063dd62ed3e1461031257600080fd5b806340c10f191461023357806342966c681461024657806370a082311461025957806379cc67901461028f57806391d14854146102a257600080fd5b806323b872dd116100ff57806323b872dd146101d2578063248a9ca3146101e55780632f2ff15d146101f8578063313ce5671461020b57806336568abe1461022057600080fd5b806301ffc9a71461013c57806306fdde0314610164578063095ea7b3146101795780631624f6c61461018c57806318160ddd146101a1575b600080fd5b61014f61014a366004610d05565b610325565b60405190151581526020015b60405180910390f35b61016c61035c565b60405161015b9190610d36565b61014f610187366004610da0565b61041f565b61019f61019a366004610e6d565b610437565b005b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace02545b60405190815260200161015b565b61014f6101e0366004610eeb565b610563565b6101c46101f3366004610f27565b610587565b61019f610206366004610f40565b6105a9565b60005460405160ff909116815260200161015b565b61019f61022e366004610f40565b6105cb565b61019f610241366004610da0565b610603565b61019f610254366004610f27565b61065f565b6101c4610267366004610f6c565b6001600160a01b0316600090815260008051602061111b833981519152602052604090205490565b61019f61029d366004610da0565b61066c565b61014f6102b0366004610f40565b610681565b61016c6106b9565b6101c4600081565b61014f6102d3366004610da0565b6106f8565b6101c47f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61019f61030d366004610f40565b610706565b6101c4610320366004610f87565b610722565b60006001600160e01b03198216637965db0b60e01b148061035657506301ffc9a760e01b6001600160e01b03198316145b92915050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03805460609160008051602061111b8339815191529161039b90610fb1565b80601f01602080910402602001604051908101604052809291908181526020018280546103c790610fb1565b80156104145780601f106103e957610100808354040283529160200191610414565b820191906000526020600020905b8154815290600101906020018083116103f757829003601f168201915b505050505091505090565b60003361042d81858561076c565b5060019392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff1660008115801561047d5750825b905060008267ffffffffffffffff16600114801561049a5750303b155b9050811580156104a8575080155b156104c65760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104f057845460ff60401b1916600160401b1785555b6104fa8888610779565b61050261078b565b61050a61078b565b61051386610795565b831561055957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b6000336105718582856107b6565b61057c858585610816565b506001949350505050565b600090815260008051602061113b833981519152602052604090206001015490565b6105b282610587565b6105bb81610875565b6105c5838361087f565b50505050565b6001600160a01b03811633146105f45760405163334bd91960e11b815260040160405180910390fd5b6105fe8282610924565b505050565b61062d7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633610681565b61065157604051632fdab94f60e11b81523360048201526024015b60405180910390fd5b61065b82826109a0565b5050565b61066933826109d6565b50565b6106778233836107b6565b61065b82826109d6565b600091825260008051602061113b833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace04805460609160008051602061111b8339815191529161039b90610fb1565b60003361042d818585610816565b61070f82610587565b61071881610875565b6105c58383610924565b6001600160a01b0391821660009081527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace016020908152604080832093909416825291909152205490565b6105fe8383836001610a0c565b610781610af4565b61065b8282610b3d565b610793610af4565b565b61079d610af4565b6000805460ff191660ff831617815561065b903361087f565b60006107c28484610722565b905060001981146105c5578181101561080757604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610648565b6105c584848484036000610a0c565b6001600160a01b03831661084057604051634b637e8f60e11b815260006004820152602401610648565b6001600160a01b03821661086a5760405163ec442f0560e01b815260006004820152602401610648565b6105fe838383610b8e565b6106698133610ccc565b600060008051602061113b83398151915261089a8484610681565b61091a576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556108d03390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610356565b6000915050610356565b600060008051602061113b83398151915261093f8484610681565b1561091a576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610356565b6001600160a01b0382166109ca5760405163ec442f0560e01b815260006004820152602401610648565b61065b60008383610b8e565b6001600160a01b038216610a0057604051634b637e8f60e11b815260006004820152602401610648565b61065b82600083610b8e565b60008051602061111b8339815191526001600160a01b038516610a455760405163e602df0560e01b815260006004820152602401610648565b6001600160a01b038416610a6f57604051634a1406b160e11b815260006004820152602401610648565b6001600160a01b03808616600090815260018301602090815260408083209388168352929052208390558115610aed57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92585604051610ae491815260200190565b60405180910390a35b5050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661079357604051631afcd79f60e31b815260040160405180910390fd5b610b45610af4565b60008051602061111b8339815191527f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace03610b7f8482611039565b50600481016105c58382611039565b60008051602061111b8339815191526001600160a01b038416610bca5781816002016000828254610bbf91906110f9565b90915550610c3c9050565b6001600160a01b03841660009081526020829052604090205482811015610c1d5760405163391434e360e21b81526001600160a01b03861660048201526024810182905260448101849052606401610648565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b038316610c5a576002810180548390039055610c79565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610cbe91815260200190565b60405180910390a350505050565b610cd68282610681565b61065b5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610648565b600060208284031215610d1757600080fd5b81356001600160e01b031981168114610d2f57600080fd5b9392505050565b600060208083528351808285015260005b81811015610d6357858101830151858201604001528201610d47565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610d9b57600080fd5b919050565b60008060408385031215610db357600080fd5b610dbc83610d84565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610df157600080fd5b813567ffffffffffffffff80821115610e0c57610e0c610dca565b604051601f8301601f19908116603f01168101908282118183101715610e3457610e34610dca565b81604052838152866020858801011115610e4d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600060608486031215610e8257600080fd5b833567ffffffffffffffff80821115610e9a57600080fd5b610ea687838801610de0565b94506020860135915080821115610ebc57600080fd5b50610ec986828701610de0565b925050604084013560ff81168114610ee057600080fd5b809150509250925092565b600080600060608486031215610f0057600080fd5b610f0984610d84565b9250610f1760208501610d84565b9150604084013590509250925092565b600060208284031215610f3957600080fd5b5035919050565b60008060408385031215610f5357600080fd5b82359150610f6360208401610d84565b90509250929050565b600060208284031215610f7e57600080fd5b610d2f82610d84565b60008060408385031215610f9a57600080fd5b610fa383610d84565b9150610f6360208401610d84565b600181811c90821680610fc557607f821691505b602082108103610fe557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105fe57600081815260208120601f850160051c810160208610156110125750805b601f850160051c820191505b818110156110315782815560010161101e565b505050505050565b815167ffffffffffffffff81111561105357611053610dca565b611067816110618454610fb1565b84610feb565b602080601f83116001811461109c57600084156110845750858301515b600019600386901b1c1916600185901b178555611031565b600085815260208120601f198616915b828110156110cb578886015182559484019460019091019084016110ac565b50858210156110e95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561035657634e487b7160e01b600052601160045260246000fdfe52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0002dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a164736f6c6343000814000a", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/abi/contracts/Proxy/Proxy.abi.json b/abi/contracts/Proxy/Proxy.abi.json deleted file mode 100644 index 5ec0648..0000000 --- a/abi/contracts/Proxy/Proxy.abi.json +++ /dev/null @@ -1,107 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "initialOwner", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "ERC1967InvalidAdmin", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "ERC1967InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "ERC1967NonPayable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [], - "name": "ProxyDeniedAdminAccess", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - } -] diff --git a/abi/contracts/Proxy/Proxy.go b/abi/contracts/Proxy/Proxy.go deleted file mode 100644 index 52106c5..0000000 --- a/abi/contracts/Proxy/Proxy.go +++ /dev/null @@ -1,481 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package contract - -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 -) - -// ProxyMetaData contains all meta data concerning the Proxy contract. -var ProxyMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidAdmin\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERC1967NonPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ProxyDeniedAdminAccess\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"}]", -} - -// ProxyABI is the input ABI used to generate the binding from. -// Deprecated: Use ProxyMetaData.ABI instead. -var ProxyABI = ProxyMetaData.ABI - -// Proxy is an auto generated Go binding around an Ethereum contract. -type Proxy struct { - ProxyCaller // Read-only binding to the contract - ProxyTransactor // Write-only binding to the contract - ProxyFilterer // Log filterer for contract events -} - -// ProxyCaller is an auto generated read-only Go binding around an Ethereum contract. -type ProxyCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ProxyTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ProxyTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ProxyFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ProxySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ProxySession struct { - Contract *Proxy // 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 -} - -// ProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ProxyCallerSession struct { - Contract *ProxyCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ProxyTransactorSession struct { - Contract *ProxyTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ProxyRaw is an auto generated low-level Go binding around an Ethereum contract. -type ProxyRaw struct { - Contract *Proxy // Generic contract binding to access the raw methods on -} - -// ProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ProxyCallerRaw struct { - Contract *ProxyCaller // Generic read-only contract binding to access the raw methods on -} - -// ProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ProxyTransactorRaw struct { - Contract *ProxyTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewProxy creates a new instance of Proxy, bound to a specific deployed contract. -func NewProxy(address common.Address, backend bind.ContractBackend) (*Proxy, error) { - contract, err := bindProxy(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Proxy{ProxyCaller: ProxyCaller{contract: contract}, ProxyTransactor: ProxyTransactor{contract: contract}, ProxyFilterer: ProxyFilterer{contract: contract}}, nil -} - -// NewProxyCaller creates a new read-only instance of Proxy, bound to a specific deployed contract. -func NewProxyCaller(address common.Address, caller bind.ContractCaller) (*ProxyCaller, error) { - contract, err := bindProxy(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ProxyCaller{contract: contract}, nil -} - -// NewProxyTransactor creates a new write-only instance of Proxy, bound to a specific deployed contract. -func NewProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*ProxyTransactor, error) { - contract, err := bindProxy(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ProxyTransactor{contract: contract}, nil -} - -// NewProxyFilterer creates a new log filterer instance of Proxy, bound to a specific deployed contract. -func NewProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*ProxyFilterer, error) { - contract, err := bindProxy(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ProxyFilterer{contract: contract}, nil -} - -// bindProxy binds a generic wrapper to an already deployed contract. -func bindProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := ProxyMetaData.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 (_Proxy *ProxyRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Proxy.Contract.ProxyCaller.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 (_Proxy *ProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Proxy.Contract.ProxyTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Proxy *ProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Proxy.Contract.ProxyTransactor.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 (_Proxy *ProxyCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Proxy.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 (_Proxy *ProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Proxy.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Proxy *ProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Proxy.Contract.contract.Transact(opts, method, params...) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() payable returns() -func (_Proxy *ProxyTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { - return _Proxy.contract.RawTransact(opts, calldata) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() payable returns() -func (_Proxy *ProxySession) Fallback(calldata []byte) (*types.Transaction, error) { - return _Proxy.Contract.Fallback(&_Proxy.TransactOpts, calldata) -} - -// Fallback is a paid mutator transaction binding the contract fallback function. -// -// Solidity: fallback() payable returns() -func (_Proxy *ProxyTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { - return _Proxy.Contract.Fallback(&_Proxy.TransactOpts, calldata) -} - -// ProxyAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the Proxy contract. -type ProxyAdminChangedIterator struct { - Event *ProxyAdminChanged // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ProxyAdminChangedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ProxyAdminChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ProxyAdminChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ProxyAdminChangedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ProxyAdminChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ProxyAdminChanged represents a AdminChanged event raised by the Proxy contract. -type ProxyAdminChanged struct { - PreviousAdmin common.Address - NewAdmin common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. -// -// Solidity: event AdminChanged(address previousAdmin, address newAdmin) -func (_Proxy *ProxyFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*ProxyAdminChangedIterator, error) { - - logs, sub, err := _Proxy.contract.FilterLogs(opts, "AdminChanged") - if err != nil { - return nil, err - } - return &ProxyAdminChangedIterator{contract: _Proxy.contract, event: "AdminChanged", logs: logs, sub: sub}, nil -} - -// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. -// -// Solidity: event AdminChanged(address previousAdmin, address newAdmin) -func (_Proxy *ProxyFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *ProxyAdminChanged) (event.Subscription, error) { - - logs, sub, err := _Proxy.contract.WatchLogs(opts, "AdminChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ProxyAdminChanged) - if err := _Proxy.contract.UnpackLog(event, "AdminChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. -// -// Solidity: event AdminChanged(address previousAdmin, address newAdmin) -func (_Proxy *ProxyFilterer) ParseAdminChanged(log types.Log) (*ProxyAdminChanged, error) { - event := new(ProxyAdminChanged) - if err := _Proxy.contract.UnpackLog(event, "AdminChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ProxyUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Proxy contract. -type ProxyUpgradedIterator struct { - Event *ProxyUpgraded // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *ProxyUpgradedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(ProxyUpgraded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(ProxyUpgraded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *ProxyUpgradedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ProxyUpgradedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ProxyUpgraded represents a Upgraded event raised by the Proxy contract. -type ProxyUpgraded struct { - Implementation common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. -// -// Solidity: event Upgraded(address indexed implementation) -func (_Proxy *ProxyFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*ProxyUpgradedIterator, error) { - - var implementationRule []interface{} - for _, implementationItem := range implementation { - implementationRule = append(implementationRule, implementationItem) - } - - logs, sub, err := _Proxy.contract.FilterLogs(opts, "Upgraded", implementationRule) - if err != nil { - return nil, err - } - return &ProxyUpgradedIterator{contract: _Proxy.contract, event: "Upgraded", logs: logs, sub: sub}, nil -} - -// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. -// -// Solidity: event Upgraded(address indexed implementation) -func (_Proxy *ProxyFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *ProxyUpgraded, implementation []common.Address) (event.Subscription, error) { - - var implementationRule []interface{} - for _, implementationItem := range implementation { - implementationRule = append(implementationRule, implementationItem) - } - - logs, sub, err := _Proxy.contract.WatchLogs(opts, "Upgraded", implementationRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(ProxyUpgraded) - if err := _Proxy.contract.UnpackLog(event, "Upgraded", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. -// -// Solidity: event Upgraded(address indexed implementation) -func (_Proxy *ProxyFilterer) ParseUpgraded(log types.Log) (*ProxyUpgraded, error) { - event := new(ProxyUpgraded) - if err := _Proxy.contract.UnpackLog(event, "Upgraded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} diff --git a/abi/contracts/Proxy/Proxy.hex b/abi/contracts/Proxy/Proxy.hex deleted file mode 100644 index 04533ef..0000000 --- a/abi/contracts/Proxy/Proxy.hex +++ /dev/null @@ -1 +0,0 @@ -0x60a060405260405162000e6538038062000e658339810160408190526200002691620003d3565b8282828281620000378282620000a2565b50508160405162000048906200036c565b6001600160a01b039091168152602001604051809103906000f08015801562000075573d6000803e3d6000fd5b506001600160a01b0316608052620000966200009060805190565b62000108565b505050505050620004d1565b620000ad826200017a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115620000fa57620000f58282620001fa565b505050565b6200010462000277565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014a60008051602062000e45833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620001778162000299565b50565b806001600160a01b03163b600003620001b657604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080846001600160a01b031684604051620002199190620004b3565b600060405180830381855af49150503d806000811462000256576040519150601f19603f3d011682016040523d82523d6000602084013e6200025b565b606091505b5090925090506200026e858383620002dc565b95945050505050565b3415620002975760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b038116620002c557604051633173bdd160e11b815260006004820152602401620001ad565b8060008051602062000e45833981519152620001d9565b606082620002f557620002ef8262000342565b6200033b565b81511580156200030d57506001600160a01b0384163b155b156200033857604051639996b31560e01b81526001600160a01b0385166004820152602401620001ad565b50805b9392505050565b805115620003535780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6104fb806200094a83390190565b80516001600160a01b03811681146200039257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003ca578181015183820152602001620003b0565b50506000910152565b600080600060608486031215620003e957600080fd5b620003f4846200037a565b925062000404602085016200037a565b60408501519092506001600160401b03808211156200042257600080fd5b818601915086601f8301126200043757600080fd5b8151818111156200044c576200044c62000397565b604051601f8201601f19908116603f0116810190838211818310171562000477576200047762000397565b816040528281528960208487010111156200049157600080fd5b620004a4836020830160208801620003ad565b80955050505050509250925092565b60008251620004c7818460208701620003ad565b9190910192915050565b60805161045e620004ec60003960006010015261045e6000f3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007b576000356001600160e01b03191663278f794360e11b14610071576040516334ad5dbb60e21b815260040160405180910390fd5b610079610083565b565b6100796100b2565b6000806100933660048184610312565b8101906100a09190610352565b915091506100ae82826100c2565b5050565b6100796100bd61011d565b610155565b6100cb82610179565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156101155761011082826101f5565b505050565b6100ae61026b565b60006101507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610174573d6000f35b3d6000fd5b806001600160a01b03163b6000036101b457604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102129190610422565b600060405180830381855af49150503d806000811461024d576040519150601f19603f3d011682016040523d82523d6000602084013e610252565b606091505b509150915061026285838361028a565b95945050505050565b34156100795760405163b398979f60e01b815260040160405180910390fd5b60608261029f5761029a826102e9565b6102e2565b81511580156102b657506001600160a01b0384163b155b156102df57604051639996b31560e01b81526001600160a01b03851660048201526024016101ab565b50805b9392505050565b8051156102f95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000808585111561032257600080fd5b8386111561032f57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561036557600080fd5b82356001600160a01b038116811461037c57600080fd5b9150602083013567ffffffffffffffff8082111561039957600080fd5b818501915085601f8301126103ad57600080fd5b8135818111156103bf576103bf61033c565b604051601f8201601f19908116603f011681019083821181831017156103e7576103e761033c565b8160405282815288602084870101111561040057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b818110156104435760208186018101518583015201610429565b50600092019182525091905056fea164736f6c6343000814000a608060405234801561001057600080fd5b506040516104fb3803806104fb83398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b6103fe806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea164736f6c6343000814000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103 diff --git a/abi/contracts/Proxy/Proxy.json b/abi/contracts/Proxy/Proxy.json deleted file mode 100644 index aa6bcf8..0000000 --- a/abi/contracts/Proxy/Proxy.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "_format": "hh-sol-artifact-1", - "contractName": "Proxy", - "sourceName": "contracts/Proxy.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_logic", - "type": "address" - }, - { - "internalType": "address", - "name": "initialOwner", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "AddressEmptyCode", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "admin", - "type": "address" - } - ], - "name": "ERC1967InvalidAdmin", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "ERC1967InvalidImplementation", - "type": "error" - }, - { - "inputs": [], - "name": "ERC1967NonPayable", - "type": "error" - }, - { - "inputs": [], - "name": "FailedInnerCall", - "type": "error" - }, - { - "inputs": [], - "name": "ProxyDeniedAdminAccess", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "previousAdmin", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "AdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "Upgraded", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - } - ], - "bytecode": "0x60a060405260405162000e6538038062000e658339810160408190526200002691620003d3565b8282828281620000378282620000a2565b50508160405162000048906200036c565b6001600160a01b039091168152602001604051809103906000f08015801562000075573d6000803e3d6000fd5b506001600160a01b0316608052620000966200009060805190565b62000108565b505050505050620004d1565b620000ad826200017a565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115620000fa57620000f58282620001fa565b505050565b6200010462000277565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014a60008051602062000e45833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a1620001778162000299565b50565b806001600160a01b03163b600003620001b657604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080846001600160a01b031684604051620002199190620004b3565b600060405180830381855af49150503d806000811462000256576040519150601f19603f3d011682016040523d82523d6000602084013e6200025b565b606091505b5090925090506200026e858383620002dc565b95945050505050565b3415620002975760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b038116620002c557604051633173bdd160e11b815260006004820152602401620001ad565b8060008051602062000e45833981519152620001d9565b606082620002f557620002ef8262000342565b6200033b565b81511580156200030d57506001600160a01b0384163b155b156200033857604051639996b31560e01b81526001600160a01b0385166004820152602401620001ad565b50805b9392505050565b805115620003535780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6104fb806200094a83390190565b80516001600160a01b03811681146200039257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003ca578181015183820152602001620003b0565b50506000910152565b600080600060608486031215620003e957600080fd5b620003f4846200037a565b925062000404602085016200037a565b60408501519092506001600160401b03808211156200042257600080fd5b818601915086601f8301126200043757600080fd5b8151818111156200044c576200044c62000397565b604051601f8201601f19908116603f0116810190838211818310171562000477576200047762000397565b816040528281528960208487010111156200049157600080fd5b620004a4836020830160208801620003ad565b80955050505050509250925092565b60008251620004c7818460208701620003ad565b9190910192915050565b60805161045e620004ec60003960006010015261045e6000f3fe608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007b576000356001600160e01b03191663278f794360e11b14610071576040516334ad5dbb60e21b815260040160405180910390fd5b610079610083565b565b6100796100b2565b6000806100933660048184610312565b8101906100a09190610352565b915091506100ae82826100c2565b5050565b6100796100bd61011d565b610155565b6100cb82610179565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156101155761011082826101f5565b505050565b6100ae61026b565b60006101507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610174573d6000f35b3d6000fd5b806001600160a01b03163b6000036101b457604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102129190610422565b600060405180830381855af49150503d806000811461024d576040519150601f19603f3d011682016040523d82523d6000602084013e610252565b606091505b509150915061026285838361028a565b95945050505050565b34156100795760405163b398979f60e01b815260040160405180910390fd5b60608261029f5761029a826102e9565b6102e2565b81511580156102b657506001600160a01b0384163b155b156102df57604051639996b31560e01b81526001600160a01b03851660048201526024016101ab565b50805b9392505050565b8051156102f95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000808585111561032257600080fd5b8386111561032f57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561036557600080fd5b82356001600160a01b038116811461037c57600080fd5b9150602083013567ffffffffffffffff8082111561039957600080fd5b818501915085601f8301126103ad57600080fd5b8135818111156103bf576103bf61033c565b604051601f8201601f19908116603f011681019083821181831017156103e7576103e761033c565b8160405282815288602084870101111561040057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b818110156104435760208186018101518583015201610429565b50600092019182525091905056fea164736f6c6343000814000a608060405234801561001057600080fd5b506040516104fb3803806104fb83398101604081905261002f916100be565b806001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100678161006e565b50506100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d057600080fd5b81516001600160a01b03811681146100e757600080fd5b9392505050565b6103fe806100fd6000396000f3fe60806040526004361061004a5760003560e01c8063715018a61461004f5780638da5cb5b146100665780639623609d14610093578063ad3cb1cc146100a6578063f2fde38b146100e4575b600080fd5b34801561005b57600080fd5b50610064610104565b005b34801561007257600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b6100646100a1366004610272565b610118565b3480156100b257600080fd5b506100d7604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161008a919061038e565b3480156100f057600080fd5b506100646100ff3660046103a8565b610187565b61010c6101ca565b61011660006101f7565b565b6101206101ca565b60405163278f794360e11b81526001600160a01b03841690634f1ef28690349061015090869086906004016103c5565b6000604051808303818588803b15801561016957600080fd5b505af115801561017d573d6000803e3d6000fd5b5050505050505050565b61018f6101ca565b6001600160a01b0381166101be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b6101c7816101f7565b50565b6000546001600160a01b031633146101165760405163118cdaa760e01b81523360048201526024016101b5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101c757600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561028757600080fd5b833561029281610247565b925060208401356102a281610247565b9150604084013567ffffffffffffffff808211156102bf57600080fd5b818601915086601f8301126102d357600080fd5b8135818111156102e5576102e561025c565b604051601f8201601f19908116603f0116810190838211818310171561030d5761030d61025c565b8160405282815289602084870101111561032657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000815180845260005b8181101561036e57602081850181015186830182015201610352565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006103a16020830184610348565b9392505050565b6000602082840312156103ba57600080fd5b81356103a181610247565b6001600160a01b03831681526040602082018190526000906103e990830184610348565b94935050505056fea164736f6c6343000814000ab53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103", - "deployedBytecode": "0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361007b576000356001600160e01b03191663278f794360e11b14610071576040516334ad5dbb60e21b815260040160405180910390fd5b610079610083565b565b6100796100b2565b6000806100933660048184610312565b8101906100a09190610352565b915091506100ae82826100c2565b5050565b6100796100bd61011d565b610155565b6100cb82610179565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156101155761011082826101f5565b505050565b6100ae61026b565b60006101507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e808015610174573d6000f35b3d6000fd5b806001600160a01b03163b6000036101b457604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516102129190610422565b600060405180830381855af49150503d806000811461024d576040519150601f19603f3d011682016040523d82523d6000602084013e610252565b606091505b509150915061026285838361028a565b95945050505050565b34156100795760405163b398979f60e01b815260040160405180910390fd5b60608261029f5761029a826102e9565b6102e2565b81511580156102b657506001600160a01b0384163b155b156102df57604051639996b31560e01b81526001600160a01b03851660048201526024016101ab565b50805b9392505050565b8051156102f95780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000808585111561032257600080fd5b8386111561032f57600080fd5b5050820193919092039150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561036557600080fd5b82356001600160a01b038116811461037c57600080fd5b9150602083013567ffffffffffffffff8082111561039957600080fd5b818501915085601f8301126103ad57600080fd5b8135818111156103bf576103bf61033c565b604051601f8201601f19908116603f011681019083821181831017156103e7576103e761033c565b8160405282815288602084870101111561040057600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b818110156104435760208186018101518583015201610429565b50600092019182525091905056fea164736f6c6343000814000a", - "linkReferences": {}, - "deployedLinkReferences": {} -} diff --git a/contracts/Bridge.sol b/contracts/Bridge.sol index 6e098a1..e0d28bc 100644 --- a/contracts/Bridge.sol +++ b/contracts/Bridge.sol @@ -37,6 +37,9 @@ contract Bridge is Initializable, RelayerRole, Pausable { uint256 public batchSettleBlockCount; uint256 public quorum; + // Reserved storage slots for future upgrades + uint256[10] private __gap; + ERC20Safe internal safe; BridgeExecutor internal bridgeExecutor; @@ -46,7 +49,7 @@ contract Bridge is Initializable, RelayerRole, Pausable { /*========================= PUBLIC API =========================*/ /** - * @dev whoever deploys the contract is the admin + * @dev whoever initializes the contract is the admin * Admin Role means that it can: * - adjust access control * - add/remove relayers @@ -105,7 +108,7 @@ contract Bridge is Initializable, RelayerRole, Pausable { - batch nonce - blockNumber - depositsCount - @dev Even if there are deposits in the Safe, the current batch might still return the count as 0. This is because it might not be final (not full, and not enough blocks elapsed) + and a boolean that indicates if the batch is final (not full, and not enough blocks elapsed) */ function getBatch(uint256 batchNonce) external view returns (Batch memory, bool isBatchFinal) { return safe.getBatch(batchNonce); @@ -155,9 +158,9 @@ contract Bridge is Initializable, RelayerRole, Pausable { } /** - @notice Only returns values if the cross transfers were executed some predefined time ago to ensure finality + @notice Gets information about the status of the transfers in a batch after it was executed @param batchNonceMvx Nonce for the batch - @return a list of statuses for each transfer in the batch provided + @return a list of statuses for each transfer in the batch provided and a boolean that indicates if the information is final */ function getStatusesAfterExecution( uint256 batchNonceMvx diff --git a/contracts/ERC20Safe.sol b/contracts/ERC20Safe.sol index b9879b8..4f03359 100644 --- a/contracts/ERC20Safe.sol +++ b/contracts/ERC20Safe.sol @@ -39,6 +39,9 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { uint8 public batchBlockLimit; uint8 public batchSettleLimit; + // Reserved storage slots for future upgrades + uint256[10] private __gap; + mapping(uint256 => Batch) public batches; mapping(address => bool) public whitelistedTokens; mapping(address => bool) public mintBurnTokens; @@ -77,7 +80,10 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { uint256 minimumAmount, uint256 maximumAmount, bool mintBurn, - bool native + bool native, + uint256 totalBalance, + uint256 mintBalance, + uint256 burnBalance ) external onlyAdmin { if (!mintBurn) { require(native, "Only native tokens can be stored!"); @@ -87,6 +93,14 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { nativeTokens[token] = native; tokenMinLimits[token] = minimumAmount; tokenMaxLimits[token] = maximumAmount; + if (mintBurn) { + require(totalBalance == 0, "Mint-burn tokens must have 0 total balance!"); + initSupplyMintBurn(token, mintBalance, burnBalance); + } else { + require(mintBalance == 0, "Stored tokens must have 0 mint balance!"); + require(burnBalance == 0, "Stored tokens must have 0 burn balance!"); + initSupply(token, totalBalance); + } } /** @@ -199,7 +213,7 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { } - function _deposit_common(address tokenAddress, uint256 amount, bytes32 recipientAddress) internal returns (uint112 batchNonce, uint112) { + function _deposit_common(address tokenAddress, uint256 amount, bytes32 recipientAddress) internal returns (uint112 batchNonce, uint112 depositNonce) { require(whitelistedTokens[tokenAddress], "Unsupported token"); require(amount >= tokenMinLimits[tokenAddress], "Tried to deposit an amount below the minimum specified limit"); require(amount <= tokenMaxLimits[tokenAddress], "Tried to deposit an amount above the maximum specified limit"); @@ -225,17 +239,19 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { batch.depositsCount++; depositsCount++; - if (!_isTokenMintBurn(tokenAddress)) { - totalBalances[tokenAddress] += amount; - IERC20 erc20 = IERC20(tokenAddress); - erc20.safeTransferFrom(msg.sender, address(this), amount); - } else { + IERC20 erc20 = IERC20(tokenAddress); + IBurnableERC20 burnableErc20 = IBurnableERC20(tokenAddress); + + if (_isTokenMintBurn(tokenAddress)) { if (!nativeTokens[tokenAddress]) { - require(mintBalances[tokenAddress] >= burnBalances[tokenAddress] + amount, "Not enough minted tokens"); + uint256 availableTokens = mintBalances[tokenAddress] - burnBalances[tokenAddress]; + require(availableTokens >= amount, "Not enough minted tokens"); } burnBalances[tokenAddress] += amount; - IBurnableERC20 erc20 = IBurnableERC20(tokenAddress); - erc20.burnFrom(msg.sender, amount); + burnableErc20.burnFrom(msg.sender, amount); + } else { + totalBalances[tokenAddress] += amount; + erc20.safeTransferFrom(msg.sender, address(this), amount); } return (batch.nonce, depositNonce); } @@ -244,23 +260,29 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { @notice Deposit initial supply for an ESDT token already deployed on MultiversX @param tokenAddress Address of the contract for the ERC20 token that will be deposited @param amount number of tokens that need to be deposited -\ */ - function initSupply(address tokenAddress, uint256 amount) external onlyAdmin { + */ + function initSupply(address tokenAddress, uint256 amount) public onlyAdmin { require(whitelistedTokens[tokenAddress], "Unsupported token"); + require(!_isTokenMintBurn(tokenAddress), "Cannot init for mintable/burnable tokens"); + require(nativeTokens[tokenAddress], "Only native tokens can be stored!"); - if (!_isTokenMintBurn(tokenAddress)) { - totalBalances[tokenAddress] += amount; - IERC20 erc20 = IERC20(tokenAddress); - erc20.safeTransferFrom(msg.sender, address(this), amount); - return; - } + totalBalances[tokenAddress] += amount; + IERC20 erc20 = IERC20(tokenAddress); + erc20.safeTransferFrom(msg.sender, address(this), amount); + } - if (!nativeTokens[tokenAddress]) { - require(mintBalances[tokenAddress] >= burnBalances[tokenAddress] + amount, "Not enough minted tokens"); - } - burnBalances[tokenAddress] += amount; - IBurnableERC20 burnableErc20 = IBurnableERC20(tokenAddress); - burnableErc20.burnFrom(msg.sender, amount); + /** + @notice Set burn and mint balances for a mintable/burnable token + @param tokenAddress Address of the contract for the ERC20 token that will be deposited + @param burnAmount number of tokens that are already burned + @param mintAmount number of tokens that are already minted + */ + function initSupplyMintBurn(address tokenAddress, uint256 mintAmount, uint256 burnAmount) public onlyAdmin { + require(whitelistedTokens[tokenAddress], "Unsupported token"); + require(_isTokenMintBurn(tokenAddress), "Cannot init for non mintable/burnable tokens"); + + burnBalances[tokenAddress] = burnAmount; + mintBalances[tokenAddress] = mintAmount; } /** @@ -292,6 +314,20 @@ contract ERC20Safe is Initializable, BridgeRole, Pausable { return true; } + /** + @notice Endpoint used by the admin to reset the token balance to the current balance + @notice This endpoint is used only for migration from v2 to v3 and will be removed in the next version + @param tokenAddress Address of the ERC20 contract + */ + function resetTotalBalance(address tokenAddress) external onlyAdmin { + require(whitelistedTokens[tokenAddress], "Unsupported token"); + require(!_isTokenMintBurn(tokenAddress), "Token is mintable/burnable"); + + IERC20 erc20 = IERC20(tokenAddress); + uint256 mainBalance = erc20.balanceOf(address(this)); + totalBalances[tokenAddress] = mainBalance; + } + /** @notice Endpoint used by the admin to recover tokens sent directly to the contract @param tokenAddress Address of the ERC20 contract diff --git a/contracts/MintBurnERC20.sol b/contracts/MintBurnERC20.sol index 195f968..f4c403c 100644 --- a/contracts/MintBurnERC20.sol +++ b/contracts/MintBurnERC20.sol @@ -10,6 +10,8 @@ contract MintBurnERC20 is ERC20Upgradeable, AccessControlUpgradeable, ERC20Burna // Create a new role identifier for the minter role bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint8 private numDecimals; + // Reserved storage slots for future upgrades + uint256[10] private __gap; error CallerNotMinter(address caller); diff --git a/docker/build-docker-compose.yml b/docker/build-docker-compose.yml new file mode 100644 index 0000000..066ed11 --- /dev/null +++ b/docker/build-docker-compose.yml @@ -0,0 +1,8 @@ +services: + artifacts-builder: + build: + context: .. + dockerfile: ./docker/build.Dockerfile + volumes: + - ./../artifacts:/multiversx/artifacts_volume + entrypoint: /bin/sh -c "cp -r /multiversx/artifacts/* /multiversx/artifacts_volume" diff --git a/docker/build.Dockerfile b/docker/build.Dockerfile new file mode 100644 index 0000000..3de87f1 --- /dev/null +++ b/docker/build.Dockerfile @@ -0,0 +1,39 @@ +FROM node:22-alpine AS sol-compiler +LABEL description="This Docker image compiles the Solidity contracts and prepares the .json and .hex files." + +WORKDIR /multiversx +COPY . . + +RUN apk update && apk add jq + +RUN cp -u .env.example .env + +RUN yarn install +RUN yarn compile + +RUN jq -r '.abi' artifacts/contracts/Bridge.sol/Bridge.json > artifacts/contracts/Bridge.sol/Bridge.abi.json +RUN jq -r '.abi' artifacts/contracts/Proxy.sol/Proxy.json > artifacts/contracts/Proxy.sol/Proxy.abi.json +RUN jq -r '.abi' artifacts/contracts/ERC20Safe.sol/ERC20Safe.json > artifacts/contracts/ERC20Safe.sol/ERC20Safe.abi.json +RUN jq -r '.abi' artifacts/contracts/GenericERC20.sol/GenericERC20.json > artifacts/contracts/GenericERC20.sol/GenericERC20.abi.json +RUN jq -r '.abi' artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.json > artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.abi.json + +RUN jq -r '.bytecode' artifacts/contracts/Bridge.sol/Bridge.json > artifacts/contracts/Bridge.sol/Bridge.hex +RUN jq -r '.bytecode' artifacts/contracts/Proxy.sol/Proxy.json > artifacts/contracts/Proxy.sol/Proxy.hex +RUN jq -r '.bytecode' artifacts/contracts/ERC20Safe.sol/ERC20Safe.json > artifacts/contracts/ERC20Safe.sol/ERC20Safe.hex +RUN jq -r '.bytecode' artifacts/contracts/GenericERC20.sol/GenericERC20.json > artifacts/contracts/GenericERC20.sol/GenericERC20.hex +RUN jq -r '.bytecode' artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.json > artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.hex + +FROM golang:1.20.7-bookworm AS go-builder +LABEL description="This Docker image creates the go-wrappers for the Solidity contracts" + +RUN apt update && apt install -y zip unzip +RUN go install github.com/ethereum/go-ethereum/cmd/abigen@v1.13.15 + +COPY --from=sol-compiler /multiversx /multiversx +WORKDIR /multiversx + +RUN abigen --abi=artifacts/contracts/Bridge.sol/Bridge.abi.json --pkg=contract --out=artifacts/contracts/Bridge.sol/Bridge.go --type=Bridge +RUN abigen --abi=artifacts/contracts/Proxy.sol/Proxy.abi.json --pkg=contract --out=artifacts/contracts/Proxy.sol/Proxy.go --type=Proxy +RUN abigen --abi=artifacts/contracts/ERC20Safe.sol/ERC20Safe.abi.json --pkg=contract --out=artifacts/contracts/ERC20Safe.sol/ERC20Safe.go --type=ERC20Safe +RUN abigen --abi=artifacts/contracts/GenericERC20.sol/GenericERC20.abi.json --pkg=contract --out=artifacts/contracts/GenericERC20.sol/GenericERC20.go --type=GenericERC20 +RUN abigen --abi=artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.abi.json --pkg=contract --out=artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.go --type=MintBurnERC20 diff --git a/docker/tests-docker-compose.yml b/docker/tests-docker-compose.yml new file mode 100644 index 0000000..fed15e5 --- /dev/null +++ b/docker/tests-docker-compose.yml @@ -0,0 +1,6 @@ +services: + run-tests: + build: + context: .. + dockerfile: ./docker/tests.Dockerfile + entrypoint: /bin/sh -c "sleep 1" diff --git a/docker/tests.Dockerfile b/docker/tests.Dockerfile new file mode 100644 index 0000000..0e16e51 --- /dev/null +++ b/docker/tests.Dockerfile @@ -0,0 +1,13 @@ +FROM node:22-alpine AS sol-tests-runner +LABEL description="This Docker image compiles the Solidity contracts and runs the tests" + +WORKDIR /multiversx +COPY . . + +RUN apk update && apk add jq + +RUN cp -u .env.example .env + +RUN yarn install +RUN yarn compile +RUN yarn test diff --git a/scripts/generate-all.sh b/scripts/generate-all.sh deleted file mode 100755 index f566515..0000000 --- a/scripts/generate-all.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -export PATH=$PATH:$GOBIN:$GOPATH/bin -export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - -nvm use 20 -cd .. - -yarn set version 1.22.22 -yarn install -yarn compile - -cp artifacts/contracts/Bridge.sol/Bridge.json abi/contracts/Bridge/Bridge.json -cp artifacts/contracts/Proxy.sol/Proxy.json abi/contracts/Proxy/Proxy.json -cp artifacts/contracts/ERC20Safe.sol/ERC20Safe.json abi/contracts/ERC20Safe/ERC20Safe.json -cp artifacts/contracts/GenericERC20.sol/GenericERC20.json abi/contracts/GenericERC20/GenericERC20.json -cp artifacts/contracts/MintBurnERC20.sol/MintBurnERC20.json abi/contracts/MintBurnERC20/MintBurnERC20.json - -jq -r '.abi' abi/contracts/Bridge/Bridge.json > abi/contracts/Bridge/Bridge.abi.json -jq -r '.abi' abi/contracts/Proxy/Proxy.json > abi/contracts/Proxy/Proxy.abi.json -jq -r '.abi' abi/contracts/ERC20Safe/ERC20Safe.json > abi/contracts/ERC20Safe/ERC20Safe.abi.json -jq -r '.abi' abi/contracts/GenericERC20/GenericERC20.json > abi/contracts/GenericERC20/GenericERC20.abi.json -jq -r '.abi' abi/contracts/MintBurnERC20/MintBurnERC20.json > abi/contracts/MintBurnERC20/MintBurnERC20.abi.json - -abigen --abi=abi/contracts/Bridge/Bridge.abi.json --pkg=contract --out=abi/contracts/Bridge/Bridge.go --type=Bridge -abigen --abi=abi/contracts/Proxy/Proxy.abi.json --pkg=contract --out=abi/contracts/Proxy/Proxy.go --type=Proxy -abigen --abi=abi/contracts/ERC20Safe/ERC20Safe.abi.json --pkg=contract --out=abi/contracts/ERC20Safe/ERC20Safe.go --type=ERC20Safe -abigen --abi=abi/contracts/GenericERC20/GenericERC20.abi.json --pkg=contract --out=abi/contracts/GenericERC20/GenericERC20.go --type=GenericERC20 -abigen --abi=abi/contracts/MintBurnERC20/MintBurnERC20.abi.json --pkg=contract --out=abi/contracts/MintBurnERC20/MintBurnERC20.go --type=MintBurnERC20 - -jq -r '.bytecode' abi/contracts/Bridge/Bridge.json > abi/contracts/Bridge/Bridge.hex -jq -r '.bytecode' abi/contracts/Proxy/Proxy.json > abi/contracts/Proxy/Proxy.hex -jq -r '.bytecode' abi/contracts/ERC20Safe/ERC20Safe.json > abi/contracts/ERC20Safe/ERC20Safe.hex -jq -r '.bytecode' abi/contracts/GenericERC20/GenericERC20.json > abi/contracts/GenericERC20/GenericERC20.hex -jq -r '.bytecode' abi/contracts/MintBurnERC20/MintBurnERC20.json > abi/contracts/MintBurnERC20/MintBurnERC20.hex diff --git a/tasks/add-to-whitelist.ts b/tasks/add-to-whitelist.ts index a5b6e96..a5e75ad 100644 --- a/tasks/add-to-whitelist.ts +++ b/tasks/add-to-whitelist.ts @@ -8,12 +8,18 @@ task("add-to-whitelist", "Whitelists a new address in the bridge.") .addOptionalParam("price", "Gas price in gwei for this transaction", undefined) .addOptionalParam("mintburn", "flag if the token is mintable/burnable", false, types.boolean) .addOptionalParam("native", "flag if the token is native", true, types.boolean) + .addOptionalParam("totalBalance", "total balance") + .addOptionalParam("mintBalance", "minted balance") + .addOptionalParam("burnBalance", "burn balance") .setAction(async (taskArgs, hre) => { const minAmount = taskArgs.min ?? 25; const maxAmount = taskArgs.max ?? 100; const address = taskArgs.address; const mintBurn = taskArgs.mintburn ?? false; const native = taskArgs.native ?? false; + const totalBalance = taskArgs.totalBalance ?? 0 + const mintBalance = taskArgs.mintBalance ?? 0 + const burnBalance = taskArgs.burnBalance ?? 0 const [adminWallet] = await hre.ethers.getSigners(); const fs = require("fs"); const filename = "setup.config.json"; @@ -22,7 +28,7 @@ task("add-to-whitelist", "Whitelists a new address in the bridge.") const safeContractFactory = await hre.ethers.getContractFactory("ERC20Safe"); const safe = safeContractFactory.attach(safeAddress).connect(adminWallet); - await safe.whitelistToken(address, minAmount, maxAmount, mintBurn, native, getDeployOptions(taskArgs)); + await safe.whitelistToken(address, minAmount, maxAmount, mintBurn, native, totalBalance, mintBalance, burnBalance, getDeployOptions(taskArgs)); if (config.tokens === undefined) { config.tokens = {}; diff --git a/tasks/deploy/evil-erc.ts b/tasks/deploy/evil-erc.ts index ff6cae7..d723190 100644 --- a/tasks/deploy/evil-erc.ts +++ b/tasks/deploy/evil-erc.ts @@ -16,5 +16,5 @@ task("deploy-evil-erc", "Deploys EvilERC20 contract to use to test the bridge"). //whitelist tokens in safe console.log("Whitelisting token ", usdcContract.target); - await safe.whitelistToken(usdcContract.target, "25000000", "100000000000", false, true); + await safe.whitelistToken(usdcContract.target, "25000000", "100000000000", false, true, 0, 0, 0); }); diff --git a/tasks/deploy/test-tokens.ts b/tasks/deploy/test-tokens.ts index e31f005..7bcdbc7 100644 --- a/tasks/deploy/test-tokens.ts +++ b/tasks/deploy/test-tokens.ts @@ -12,7 +12,7 @@ task("deploy-test-tokens", "Deploys ERC20 contracts to use to test the bridge") const safeAddress = config["erc20Safe"]; const safeContractFactory = await hre.ethers.getContractFactory("ERC20Safe"); const safe = safeContractFactory.attach(safeAddress); - console.log("Safe at: ", safe.address); + console.log("Safe at: ", safe.target); //deploy contracts const genericERC20Factory = await hre.ethers.getContractFactory("GenericERC20"); @@ -21,5 +21,5 @@ task("deploy-test-tokens", "Deploys ERC20 contracts to use to test the bridge") const decimals = taskArgs.decimals; const usdcContract = await genericERC20Factory.deploy(tokenName, tokenSymbol, decimals); - console.log("Token deployed to:", usdcContract.getAddress()); + console.log("Token deployed to:", usdcContract.target); }); diff --git a/test/Bridge.test.js b/test/Bridge.test.js index b010149..4d6571e 100644 --- a/test/Bridge.test.js +++ b/test/Bridge.test.js @@ -28,7 +28,7 @@ describe("Bridge", async function () { genericErc20 = await deployContract(adminWallet, "GenericERC20", ["TSC", "TSC", 6]); await genericErc20.mint(adminWallet.address, 1000); await genericErc20.approve(erc20Safe.address, 1000); - await erc20Safe.whitelistToken(genericErc20.address, 0, 100, false, true); + await erc20Safe.whitelistToken(genericErc20.address, 0, 100, false, true, 0, 0, 0); await erc20Safe.unpause(); } diff --git a/test/BridgeExecutor.test.js b/test/BridgeExecutor.test.js index 1c9f585..cd2e77f 100644 --- a/test/BridgeExecutor.test.js +++ b/test/BridgeExecutor.test.js @@ -31,7 +31,7 @@ describe("BridgeExecutor", function () { genericErc20 = await deployContract(adminWallet, "GenericERC20", ["TSC", "TSC", 6]); await genericErc20.mint(adminWallet.address, 1000); await genericErc20.approve(erc20Safe.address, 1000); - await erc20Safe.whitelistToken(genericErc20.address, 0, 1000, false, true); + await erc20Safe.whitelistToken(genericErc20.address, 0, 1000, false, true, 0, 0, 0); await erc20Safe.unpause(); } diff --git a/test/MintBurnERC20.test.js b/test/MintBurnERC20.test.js index 55c4ab0..3ee9bf5 100644 --- a/test/MintBurnERC20.test.js +++ b/test/MintBurnERC20.test.js @@ -28,7 +28,7 @@ describe("ERC20Safe, MintBurnERC20, and Bridge Interaction", function () { async function setupErc20Token() { mintBurnErc20 = await deployUpgradableContract(adminWallet, "MintBurnERC20", ["Test Token", "TST", 6]); - await erc20Safe.whitelistToken(mintBurnErc20.address, 0, 100, true, false); + await erc20Safe.whitelistToken(mintBurnErc20.address, 0, 100, true, false, 0, 0, 0); await erc20Safe.unpause(); } diff --git a/test/Safe.test.js b/test/Safe.test.js index 10ec2d7..39b45ed 100644 --- a/test/Safe.test.js +++ b/test/Safe.test.js @@ -40,7 +40,7 @@ describe("ERC20Safe", function () { describe("ERC20Safe - setting whitelisted tokens works as expected", async function () { it("correctly whitelists token and updates limits", async function () { - await safe.whitelistToken(genericERC20.address, "25", "100", false, true); + await safe.whitelistToken(genericERC20.address, "25", "100", false, true, 0, 0, 0); expect(await safe.isTokenWhitelisted(genericERC20.address)).to.be.true; expect(await safe.getTokenMinLimit(genericERC20.address)).to.eq("25"); expect(await safe.getTokenMaxLimit(genericERC20.address)).to.eq("100"); @@ -56,7 +56,7 @@ describe("ERC20Safe", function () { }); it("reverts", async function () { await expect( - safe.connect(otherWallet).whitelistToken(genericERC20.address, "0", "100", false, true), + safe.connect(otherWallet).whitelistToken(genericERC20.address, "0", "100", false, true, 0, 0, 0), ).to.be.revertedWith("Access Control: sender is not Admin"); await expect(safe.connect(otherWallet).removeTokenFromWhitelist(genericERC20.address)).to.be.revertedWith( "Access Control: sender is not Admin", @@ -104,7 +104,7 @@ describe("ERC20Safe", function () { ); // Creating a batch - await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true); + await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true, 0, 0, 0); await genericERC20.approve(safe.address, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); await genericERC20.mint(adminWallet.address, "1000000"); await safe.unpause(); @@ -208,7 +208,7 @@ describe("ERC20Safe", function () { describe("when token is whitelisted", async function () { beforeEach(async function () { - await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true); + await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true, 0, 0, 0); await genericERC20.approve(safe.address, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); await genericERC20.mint(adminWallet.address, "1000000"); }); @@ -392,7 +392,7 @@ describe("ERC20Safe", function () { }); it("sends just the balance above what is actually deposited for whitelited tokens", async function () { - await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true); + await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true, 0, 0, 0); await genericERC20.approve(safe.address, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); await safe.deposit( @@ -416,7 +416,7 @@ describe("ERC20Safe", function () { }); it("sends just the balance above what is actually deposited for whitelited tokens - considers bridge transfers", async function () { - await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true); + await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true, 0, 0, 0); await genericERC20.approve(safe.address, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); const mockBridge = await deployUpgradableContract(adminWallet, "BridgeMock", [ @@ -452,7 +452,7 @@ describe("ERC20Safe", function () { describe("ERC20Safe - getBatch and getDeposits work as expected", async function () { beforeEach(async function () { - await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true); + await safe.whitelistToken(genericERC20.address, defaultMinAmount, defaultMaxAmount, false, true, 0, 0, 0); await genericERC20.approve(safe.address, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); await genericERC20.mint(adminWallet.address, "1000000"); });