diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 184ae93..e774320 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,33 @@ jobs: with: version: v1.43 + bindings: + name: Generate bindings + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Set up Golang + uses: actions/setup-go@v2 + with: + go-version: ${{ env.go-version }} + + - name: Generate bindings + working-directory: ${{ env.repo_dir }} + run: | + cd bindings + WD=/root + export SOLC="docker run --rm -v $(pwd):$WD -w $WD ethereum/solc:0.7.6-alpine" + export ABIGEN="docker run --rm -v $(pwd):$WD -w $WD --entrypoint abigen ethereum/client-go:alltools-v1.10.18" + ./generate.sh + sudo find -type f -name "*.go" -exec chmod a+r {} \; + + - name: Test + run: go test -timeout 60s ./... + test: name: Test runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4867375 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/bindings/*/*.abi +/bindings/*/*.bin +/bindings/*/*.bin-runtime diff --git a/.gitmodules b/.gitmodules index c3c9dcd..97802f5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "contracts"] - path = contracts +[submodule "bindings/contracts"] + path = bindings/contracts url = https://github.com/hyperledger-labs/perun-eth-contracts diff --git a/README.md b/README.md index 7a008b9..902eead 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@
This repository provides an [Ethereum] blockchain module for the [go-perun] state channel library. @@ -12,7 +13,6 @@ It thereby enables Perun channels for EVM-compatible networks. * `bindings/`: Contract bindings. * `channel/`: Channel interface implementations. * `client/`: Client tests. -* `contracts/`: Smart contracts, imported from [perun-eth-contracts]. * `wallet/`: Wallet interface implementations. ## Development diff --git a/bindings/abi.go b/bindings/abi.go index 407cbbb..0b8ab6e 100644 --- a/bindings/abi.go +++ b/bindings/abi.go @@ -31,8 +31,8 @@ import ( // ABI contains all the parsed ABI definitions of our contracts. // Use it together with `bind.NewBoundContract` to create a bound contract. var ABI = struct { - // ERC20Token is the parsed ABI definition of contract ERC20Token. - ERC20Token abi.ABI + // PerunToken is the parsed ABI definition of contract PerunToken. + PerunToken abi.ABI // Adjudicator is the parsed ABI definition of contract Adjudicator. Adjudicator abi.ABI // AssetHolder is the parsed ABI definition of contract AssetHolder. @@ -53,8 +53,8 @@ var Events = struct { AhDeposited string // AhWithdrawn is the Withdrawn event of the Assetholder contract. AhWithdrawn string - // ERC20Approval is the Approval event of the ERC20Token contract. - ERC20Approval string + // PerunTokenApproval is the Approval event of the PerunToken contract. + PerunTokenApproval string }{} func init() { @@ -71,12 +71,12 @@ func parseABIs() { return abi } - ABI.ERC20Token = parse(peruntoken.ERC20ABI) - ABI.Adjudicator = parse(adjudicator.AdjudicatorABI) - ABI.AssetHolder = parse(assetholder.AssetHolderABI) - ABI.ETHAssetHolder = parse(assetholdereth.AssetHolderETHABI) - ABI.ERC20AssetHolder = parse(assetholdererc20.AssetHolderERC20ABI) - ABI.TrivialApp = parse(trivialapp.TrivialAppABI) + ABI.PerunToken = parse(peruntoken.PeruntokenMetaData.ABI) + ABI.Adjudicator = parse(adjudicator.AdjudicatorMetaData.ABI) + ABI.AssetHolder = parse(assetholder.AssetholderMetaData.ABI) + ABI.ETHAssetHolder = parse(assetholdereth.AssetholderethMetaData.ABI) + ABI.ERC20AssetHolder = parse(assetholdererc20.Assetholdererc20MetaData.ABI) + ABI.TrivialApp = parse(trivialapp.TrivialappMetaData.ABI) } // extractEvents sets the event names and panics if any event does not exist. @@ -92,5 +92,5 @@ func extractEvents() { Events.AdjChannelUpdate = extract(ABI.Adjudicator, "ChannelUpdate") Events.AhDeposited = extract(ABI.AssetHolder, "Deposited") Events.AhWithdrawn = extract(ABI.AssetHolder, "Withdrawn") - Events.ERC20Approval = extract(ABI.ERC20Token, "Approval") + Events.PerunTokenApproval = extract(ABI.PerunToken, "Approval") } diff --git a/bindings/adjudicator/Adjudicator.go b/bindings/adjudicator/Adjudicator.go index 16dc040..ee437ba 100644 --- a/bindings/adjudicator/Adjudicator.go +++ b/bindings/adjudicator/Adjudicator.go @@ -4,6 +4,7 @@ package adjudicator import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -33,14 +35,6 @@ type AdjudicatorSignedState struct { Sigs [][]byte } -// AssetHolderWithdrawalAuth is an auto generated low-level Go binding around an user-defined struct. -type AssetHolderWithdrawalAuth struct { - ChannelID [32]byte - Participant common.Address - Receiver common.Address - Amount *big.Int -} - // ChannelAllocation is an auto generated low-level Go binding around an user-defined struct. type ChannelAllocation struct { Assets []common.Address @@ -74,31 +68,31 @@ type ChannelSubAlloc struct { IndexMap []uint16 } -// AdjudicatorABI is the input ABI used to generate the binding from. -const AdjudicatorABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"phase\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"}],\"name\":\"ChannelUpdate\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"channelID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State[]\",\"name\":\"subStates\",\"type\":\"tuple[]\"}],\"name\":\"conclude\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"sigs\",\"type\":\"bytes[]\"}],\"name\":\"concludeFinal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"challengeDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"hasApp\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"phase\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"}],\"name\":\"hashState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"stateOld\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"sig\",\"type\":\"bytes\"}],\"name\":\"progress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"sigs\",\"type\":\"bytes[]\"}],\"internalType\":\"structAdjudicator.SignedState\",\"name\":\"channel\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"sigs\",\"type\":\"bytes[]\"}],\"internalType\":\"structAdjudicator.SignedState[]\",\"name\":\"subChannels\",\"type\":\"tuple[]\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// AdjudicatorFuncSigs maps the 4-byte function signature to its string representation. -var AdjudicatorFuncSigs = map[string]string{ - "6f68e70e": "channelID((uint256,uint256,address[],address,bool,bool))", - "97f5a097": "conclude((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool)[])", - "66e7b564": "concludeFinal((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),bytes[])", - "11be1997": "disputes(bytes32)", - "1fb910dd": "hashState((bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool))", - "02357657": "progress((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),uint256,bytes)", - "e30194b7": "register(((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),bytes[]),((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),bytes[])[])", +// AdjudicatorMetaData contains all meta data concerning the Adjudicator contract. +var AdjudicatorMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"phase\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"}],\"name\":\"ChannelUpdate\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"channelID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State[]\",\"name\":\"subStates\",\"type\":\"tuple[]\"}],\"name\":\"conclude\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"sigs\",\"type\":\"bytes[]\"}],\"name\":\"concludeFinal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"challengeDuration\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"hasApp\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"phase\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"}],\"name\":\"hashState\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"stateOld\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"sig\",\"type\":\"bytes\"}],\"name\":\"progress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"sigs\",\"type\":\"bytes[]\"}],\"internalType\":\"structAdjudicator.SignedState\",\"name\":\"channel\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"state\",\"type\":\"tuple\"},{\"internalType\":\"bytes[]\",\"name\":\"sigs\",\"type\":\"bytes[]\"}],\"internalType\":\"structAdjudicator.SignedState[]\",\"name\":\"subChannels\",\"type\":\"tuple[]\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50612df8806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806366e7b5641161005b57806366e7b564146100e55780636f68e70e146100f857806397f5a0971461010b578063e30194b71461011e5761007d565b8063023576571461008257806311be1997146100975780631fb910dd146100c5575b600080fd5b61009561009036600461218c565b610131565b005b6100aa6100a5366004611fe5565b6102c1565b6040516100bc96959493929190612cdb565b60405180910390f35b6100d86100d33660046122ec565b610310565b6040516100bc91906125da565b6100956100f3366004612037565b61032a565b6100d8610106366004611ffd565b610425565b6100956101193660046120ba565b610430565b61009561012c36600461223d565b610493565b600061014084600001516104c1565b608081015190915060ff166101875780516001600160401b03164210156101825760405162461bcd60e51b815260040161017990612955565b60405180910390fd5b6101d8565b608081015160ff16600114156101c05780516001600160401b031642106101825760405162461bcd60e51b815260040161017990612618565b60405162461bcd60e51b81526004016101799061271d565b60608601516001600160a01b03166102025760405162461bcd60e51b815260040161017990612c43565b85604001515183106102265760405162461bcd60e51b81526004016101799061288a565b61023086856104fd565b61023985610310565b8160a001511461025b5760405162461bcd60e51b815260040161017990612774565b61028561026785610529565b838860400151868151811061027857fe5b6020026020010151610552565b6102a15760405162461bcd60e51b8152600401610179906126a0565b6102ad8686868661058d565b6102b986856001610671565b505050505050565b600060208190529081526040902080546001909101546001600160401b0380831692600160401b8104821692600160801b82049092169160ff600160c01b8304811692600160c81b9004169086565b600061031b82610529565b8051906020012090505b919050565b826080015161034b5760405162461bcd60e51b815260040161017990612b7a565b608082015115156001146103715760405162461bcd60e51b8152600401610179906126f4565b604080830151015151156103975760405162461bcd60e51b81526004016101799061279d565b6103a183836104fd565b6103ac83838361073c565b6000806103bc84600001516107c6565b9150915080156103ee57608082015160ff16600214156103ee5760405162461bcd60e51b8152600401610179906128f0565b6103fa85856002610671565b61041e8460000151856040015160000151876040015187604001516020015161084b565b5050505050565b600061031b826108eb565b82608001516104515760405162461bcd60e51b815260040161017990612b7a565b61045b83836104fd565b610464826108fe565b6000610472838360006109e2565b508351604080860151519087015192935061048d928461084b565b50505050565b8151608001516104b55760405162461bcd60e51b815260040161017990612b7a565b61048d82826000610cc1565b6104c96119ca565b6000806104d5846107c6565b91509150806104f65760405162461bcd60e51b8152600401610179906127fd565b5092915050565b61050682610425565b8151146105255760405162461bcd60e51b815260040161017990612af3565b5050565b60608160405160200161053c9190612cc8565b6040516020818303038152906040529050919050565b6000806105658580519060200120610ddd565b905060006105738286610e2e565b6001600160a01b0390811690851614925050509392505050565b82602001516001016001600160401b031682602001516001600160401b0316146105c95760405162461bcd60e51b815260040161017990612abc565b6080830151156105eb5760405162461bcd60e51b815260040161017990612825565b6106038360400151836040015186604001515161101b565b6060840151604051630d1feb4f60e01b81526001600160a01b03821690630d1feb4f9061063a908890889088908890600401612c7d565b60006040518083038186803b15801561065257600080fd5b505afa158015610666573d6000803e3d6000fd5b505050505050505050565b60008061068184600001516107c6565b86516001600160401b0390811660208085019190915287015116604083015290925090506106ae8561120f565b151560608301528260028111156106c157fe5b60ff1660808301526106d284610310565b60a08301526080840151156106f2576001600160401b0342168252610730565b8015806107065750608082015160ff166001145b15610730576020820151610724906001600160401b03421690611221565b6001600160401b031682525b835161041e9083611270565b600061074783610529565b905081518460400151511461076e5760405162461bcd60e51b8152600401610179906129e7565b60005b825181101561041e576107a28284838151811061078a57fe5b60200260200101518760400151848151811061027857fe5b6107be5760405162461bcd60e51b8152600401610179906126a0565b600101610771565b6107ce6119ca565b5060008181526020818152604091829020825160c08101845281546001600160401b038082168352600160401b8204811694830194909452600160801b81049093169381019390935260ff600160c01b8304811615156060850152600160c81b90920490911660808301526001015460a082018190521515915091565b60005b835181101561041e5783818151811061086357fe5b60200260200101516001600160a01b031663fc79a66d868585858151811061088757fe5b60200260200101516040518463ffffffff1660e01b81526004016108ad939291906125e3565b600060405180830381600087803b1580156108c757600080fd5b505af11580156108db573d6000803e3d6000fd5b50506001909201915061084e9050565b60608160405160200161053c9190612c6a565b600061090d82600001516104c1565b905061091882610310565b8160a001511461093a5760405162461bcd60e51b8152600401610179906129b8565b608081015160ff16600214156109625760405162461bcd60e51b8152600401610179906128f0565b608081015160ff16158015610978575080606001515b156109a55760208101518151610999916001600160401b0390911690611221565b6001600160401b031681525b80516001600160401b03164210156109cf5760405162461bcd60e51b815260040161017990612a1e565b6002608082015281516105259082611270565b606060006109ef8561136b565b60408501515180516001600160401b0381118015610a0c57600080fd5b50604051908082528060200260200182016040528015610a4057816020015b6060815260200190600190039081610a2b5790505b50925060005b8151811015610b3f5760008760400151602001518281518110610a6557fe5b6020026020010151905080516001600160401b0381118015610a8657600080fd5b50604051908082528060200260200182016040528015610ab0578160200160208202803683370190505b50858381518110610abd57fe5b602002602001018190525060005b8151811015610b35578860400151602001518381518110610ae857fe5b60200260200101518181518110610afb57fe5b6020026020010151868481518110610b0f57fe5b60200260200101518281518110610b2257fe5b6020908102919091010152600101610acb565b5050600101610a46565b50604080870151015184925060005b8151811015610cb6576000828281518110610b6557fe5b602002602001015190506000888680600101975081518110610b8357fe5b602002602001015190508060000151826000015114610bb45760405162461bcd60e51b815260040161017990612b4b565b6060610bc1828b896109e2565b604085015190985090915060005b8751811015610ca55760005b8251811015610c9c576000848381518110610bf257fe5b60200260200101518281518110610c0557fe5b602002602001015190506000848381518110610c1d57fe5b60200260200101519050610c64828e8681518110610c3757fe5b60200260200101518361ffff1681518110610c4e57fe5b60200260200101516113a790919063ffffffff16565b8d8581518110610c7057fe5b60200260200101518261ffff1681518110610c8757fe5b60209081029190910101525050600101610bdb565b50600101610bcf565b505060019093019250610b4e915050565b505050935093915050565b60208301516040015180516060918391610cda87611408565b610ce7826020015161154b565b9350600082604001519050865181511115610d145760405162461bcd60e51b815260040161017990612b1b565b60005b8151811015610dd1576000888680600101975081518110610d3457fe5b60200260200101519050600080848481518110610d4d57fe5b60200260200101518360200151915091508060000151826000015114610d855760405162461bcd60e51b815260040161017990612744565b6060610d92848d8b610cc1565b604084015151909a50909150610da9908890611613565b610db783602001518261170e565b610dc18a826117f2565b505060019092019150610d179050565b50505050935093915050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610e86576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610ef75760405162461bcd60e51b8152600401808060200182810382526022815260200180612d7f6022913960400191505060405180910390fd5b8060ff16601b14158015610f0f57508060ff16601c14155b15610f4b5760405162461bcd60e51b8152600401808060200182810382526022815260200180612da16022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610fa7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661100f576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b93505050505b92915050565b816020015151836020015151146110445760405162461bcd60e51b815260040161017990612bd5565b815151835151146110675760405162461bcd60e51b81526004016101799061285a565b61107983604001518360400151611840565b60005b82515181101561048d57825180518290811061109457fe5b60200260200101516001600160a01b0316846000015182815181106110b557fe5b60200260200101516001600160a01b0316146110e35760405162461bcd60e51b815260040161017990612669565b60008083866020015184815181106110f757fe5b6020026020010151511461111d5760405162461bcd60e51b815260040161017990612c0c565b838560200151848151811061112e57fe5b602002602001015151146111545760405162461bcd60e51b815260040161017990612a85565b60005b848110156111e55761119c8760200151858151811061117257fe5b6020026020010151828151811061118557fe5b6020026020010151846113a790919063ffffffff16565b92506111db866020015185815181106111b157fe5b602002602001015182815181106111c457fe5b6020026020010151836113a790919063ffffffff16565b9150600101611157565b508082146112055760405162461bcd60e51b815260040161017990612a4e565b505060010161107c565b606001516001600160a01b0316151590565b8082016001600160401b038084169082161015611015576040805162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b604482015290519081900360640190fd5b600082815260208181526040918290208351815492850151858501516060870151608088015167ffffffffffffffff199096166001600160401b03808616919091176fffffffffffffffff00000000000000001916600160401b948216949094029390931767ffffffffffffffff60801b1916600160801b938316939093029290921760ff60c01b1916600160c01b921515929092029190911760ff60c81b1916600160c81b60ff86160217835560a0860151600190930192909255925185937f895ef5a5fc3efd313a300b006d6ce97ff0670dfe04f6eea90417edf924fa786b9361135f9392909190612d18565b60405180910390a25050565b600061137a82600001516104c1565b905061138582610310565b8160a00151146109cf5760405162461bcd60e51b8152600401610179906129b8565b600082820183811015611401576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b8051602082015161141982826104fd565b6114288282856040015161073c565b8160a001511561147e5761143b8261120f565b156114585760405162461bcd60e51b815260040161017990612640565b6040808201510151511561147e5760405162461bcd60e51b8152600401610179906128b9565b60008061148e83600001516107c6565b91509150801561153c576114a183610310565b8260a0015114156114b55750505050611548565b82602001516001600160401b031682604001516001600160401b0316106114ee5760405162461bcd60e51b8152600401610179906126cb565b608082015160ff16156115135760405162461bcd60e51b8152600401610179906127d4565b81516001600160401b0316421061153c5760405162461bcd60e51b815260040161017990612981565b61041e84846000610671565b50565b606081516001600160401b038111801561156457600080fd5b5060405190808252806020026020018201604052801561158e578160200160208202803683370190505b50905060005b825181101561160d5760008382815181106115ab57fe5b6020026020010151905060005b8151811015611603576115e48282815181106115d057fe5b6020026020010151858581518110610c4e57fe5b8484815181106115f057fe5b60209081029190910101526001016115b8565b5050600101611594565b50919050565b8051825114611669576040805162461bcd60e51b815260206004820152601960248201527f616464726573735b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b82518110156117095781818151811061168157fe5b60200260200101516001600160a01b031683828151811061169e57fe5b60200260200101516001600160a01b031614611701576040805162461bcd60e51b815260206004820152601760248201527f616464726573735b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b60010161166c565b505050565b8051825114611764576040805162461bcd60e51b815260206004820152601960248201527f75696e743235365b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b82518110156117095781818151811061177c57fe5b602002602001015183828151811061179057fe5b6020026020010151146117ea576040805162461bcd60e51b815260206004820152601760248201527f75696e743235365b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b600101611767565b60005b82518110156117095761182182828151811061180d57fe5b6020026020010151848381518110610c4e57fe5b83828151811061182d57fe5b60209081029190910101526001016117f5565b80518251146118615760405162461bcd60e51b815260040161017990612b9e565b60005b82518110156117095761189d83828151811061187c57fe5b602002602001015183838151811061189057fe5b60200260200101516118a5565b600101611864565b80518251146118c65760405162461bcd60e51b815260040161017990612927565b6118d88260200151826020015161170e565b61052582604001518260400151805182511461193b576040805162461bcd60e51b815260206004820152601860248201527f75696e7431365b5d3a20756e657175616c206c656e6774680000000000000000604482015290519081900360640190fd5b60005b82518110156117095781818151811061195357fe5b602002602001015161ffff1683828151811061196b57fe5b602002602001015161ffff16146119c2576040805162461bcd60e51b815260206004820152601660248201527575696e7431365b5d3a20756e657175616c206974656d60501b604482015290519081900360640190fd5b60010161193e565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b80356001600160a01b038116811461032557600080fd5b600082601f830112611a26578081fd5b81356020611a3b611a3683612d61565b612d3e565b8281528181019085830183850287018401881015611a57578586fd5b855b85811015611a7c57611a6a826119ff565b84529284019290840190600101611a59565b5090979650505050505050565b600082601f830112611a99578081fd5b81356020611aa9611a3683612d61565b82815281810190858301855b85811015611a7c57611acc898684358b0101611c6d565b84529284019290840190600101611ab5565b600082601f830112611aee578081fd5b81356020611afe611a3683612d61565b82815281810190858301855b85811015611a7c57611b21898684358b0101611cd7565b84529284019290840190600101611b0a565b600082601f830112611b43578081fd5b81356020611b53611a3683612d61565b82815281810190858301855b85811015611a7c5781358801606080601f19838d03011215611b7f578889fd5b604080518281016001600160401b038282108183111715611b9c57fe5b908352848a01358252848301359080821115611bb6578c8dfd5b611bc48f8c84890101611c6d565b838c0152938501359380851115611bd9578c8dfd5b5050611be98d8a85870101611c04565b91810191909152865250509284019290840190600101611b5f565b600082601f830112611c14578081fd5b81356020611c24611a3683612d61565b8281528181019085830183850287018401881015611c40578586fd5b855b85811015611a7c57813561ffff81168114611c5b578788fd5b84529284019290840190600101611c42565b600082601f830112611c7d578081fd5b81356020611c8d611a3683612d61565b8281528181019085830183850287018401881015611ca9578586fd5b855b85811015611a7c57813584529284019290840190600101611cab565b8035801515811461032557600080fd5b600082601f830112611ce7578081fd5b81356001600160401b03811115611cfa57fe5b611d0d601f8201601f1916602001612d3e565b818152846020838601011115611d21578283fd5b816020850160208301379081016020019190915292915050565b600060608284031215611d4c578081fd5b604051606081016001600160401b038282108183111715611d6957fe5b816040528293508435915080821115611d8157600080fd5b611d8d86838701611a16565b83526020850135915080821115611da357600080fd5b611daf86838701611a89565b60208401526040850135915080821115611dc857600080fd5b50611dd585828601611b33565b6040830152505092915050565b600060c08284031215611df3578081fd5b60405160c081016001600160401b038282108183111715611e1057fe5b8160405282935084358352602085013560208401526040850135915080821115611e3957600080fd5b50611e4685828601611a16565b604083015250611e58606084016119ff565b6060820152611e6960808401611cc7565b6080820152611e7a60a08401611cc7565b60a08201525092915050565b600060608284031215611e97578081fd5b604051606081016001600160401b038282108183111715611eb457fe5b816040528293508435915080821115611ecc57600080fd5b611ed886838701611de2565b83526020850135915080821115611eee57600080fd5b611efa86838701611f20565b60208401526040850135915080821115611f1357600080fd5b50611dd585828601611ade565b600060a08284031215611f31578081fd5b60405160a081016001600160401b038282108183111715611f4e57fe5b8160405282935084358352611f6560208601611fce565b60208401526040850135915080821115611f7e57600080fd5b611f8a86838701611d3b565b60408401526060850135915080821115611fa357600080fd5b50611fb085828601611cd7565b606083015250611fc260808401611cc7565b60808201525092915050565b80356001600160401b038116811461032557600080fd5b600060208284031215611ff6578081fd5b5035919050565b60006020828403121561200e578081fd5b81356001600160401b03811115612023578182fd5b61202f84828501611de2565b949350505050565b60008060006060848603121561204b578182fd5b83356001600160401b0380821115612061578384fd5b61206d87838801611de2565b94506020860135915080821115612082578384fd5b61208e87838801611f20565b935060408601359150808211156120a3578283fd5b506120b086828701611ade565b9150509250925092565b6000806000606084860312156120ce578081fd5b83356001600160401b03808211156120e4578283fd5b6120f087838801611de2565b9450602091508186013581811115612106578384fd5b61211288828901611f20565b945050604086013581811115612126578384fd5b86019050601f81018713612138578283fd5b8035612146611a3682612d61565b81815283810190838501865b8481101561217b576121698c888435890101611f20565b84529286019290860190600101612152565b505080955050505050509250925092565b600080600080600060a086880312156121a3578283fd5b85356001600160401b03808211156121b9578485fd5b6121c589838a01611de2565b965060208801359150808211156121da578485fd5b6121e689838a01611f20565b955060408801359150808211156121fb578485fd5b61220789838a01611f20565b9450606088013593506080880135915080821115612223578283fd5b5061223088828901611cd7565b9150509295509295909350565b6000806040838503121561224f578182fd5b82356001600160401b0380821115612265578384fd5b61227186838701611e86565b9350602091508185013581811115612287578384fd5b85019050601f81018613612299578283fd5b80356122a7611a3682612d61565b81815283810190838501865b848110156122dc576122ca8b888435890101611e86565b845292860192908601906001016122b3565b5096999098509650505050505050565b6000602082840312156122fd578081fd5b81356001600160401b03811115612312578182fd5b61202f84828501611f20565b6000815180845260208085019450808401835b838110156123565781516001600160a01b031687529582019590820190600101612331565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b8581101561240257828403895281516060815186528682015181888801526123a78288018261240f565b604093840151888203948901949094528351808252938901938b935090890191505b808310156123ed57835161ffff1682529288019260019290920191908801906123c9565b509a87019a955050509084019060010161237d565b5091979650505050505050565b6000815180845260208085019450808401835b8381101561235657815187529582019590820190600101612422565b15159052565b60008151808452815b818110156124695760208185018101518683018201520161244d565b8181111561247a5782602083870101525b50601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160c060408501526124b860c085018261231e565b6060848101516001600160a01b03169086015260808085015115159086015260a0938401511515949093019390935250919050565b60008151835260206001600160401b03818401511681850152604083015160a060408601528051606060a087015261252961010087018261231e565b83830151609f19888303810160c08a01528151808452929350908501918386019080870285018701885b8281101561258157601f1987830301845261256f82875161240f565b95890195938901939150600101612553565b5060408701519750838b82030160e08c015261259d8189612361565b975050505050505050606083015184820360608601526125bd8282612444565b91505060808301516125d2608086018261243e565b509392505050565b90815260200190565b6000848252606060208301526125fc606083018561231e565b828103604084015261260e818561240f565b9695505050505050565b6020808252600e908201526d1d1a5b595bdd5d081c185cdcd95960921b604082015260600190565b6020808252600f908201526e063616e6e6f7420686176652061707608c1b604082015260600190565b6020808252601a908201527f6173736574735b695d2061646472657373206d69736d61746368000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b6020808252600f908201526e34b73b30b634b2103b32b939b4b7b760891b604082015260600190565b6020808252600f908201526e1cdd185d19481b9bdd08199a5b985b608a1b604082015260600190565b6020808252600d908201526c696e76616c696420706861736560981b604082015260600190565b6020808252601690820152751a5b9d985b1a59081cdd588b58da185b9b995b081a5960521b604082015260600190565b6020808252600f908201526e77726f6e67206f6c6420737461746560881b604082015260600190565b60208082526018908201527f63616e6e6f742068617665207375622d6368616e6e656c730000000000000000604082015260600190565b6020808252600f908201526e696e636f727265637420706861736560881b604082015260600190565b6020808252600e908201526d1b9bdd081c9959da5cdd195c995960921b604082015260600190565b6020808252818101527f63616e6e6f742070726f67726573732066726f6d2066696e616c207374617465604082015260600190565b6020808252601690820152750c2e6e6cae8e640d8cadccee8d040dad2e6dac2e8c6d60531b604082015260600190565b6020808252601590820152746163746f72496478206f7574206f662072616e676560581b604082015260600190565b60208082526018908201527f63616e6e6f742068617665206c6f636b65642066756e64730000000000000000604082015260600190565b60208082526019908201527f6368616e6e656c20616c726561647920636f6e636c7564656400000000000000604082015260600190565b60208082526014908201527314dd58905b1b1bd8ce881d5b995c5d585b08125160621b604082015260600190565b6020808252601290820152711d1a5b595bdd5d081b9bdd081c185cdcd95960721b604082015260600190565b60208082526019908201527f72656675746174696f6e2074696d656f75742070617373656400000000000000604082015260600190565b602080825260159082015274696e76616c6964206368616e6e656c20737461746560581b604082015260600190565b6020808252601a908201527f7369676e617475726573206c656e677468206d69736d61746368000000000000604082015260600190565b6020808252601690820152751d1a5b595bdd5d081b9bdd081c185cdcd959081e595d60521b604082015260600190565b60208082526018908201527f73756d206f662062616c616e636573206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6e65772062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252601d908201527f76657273696f6e206d75737420696e6372656d656e74206279206f6e65000000604082015260600190565b6020808252600e908201526d696e76616c696420706172616d7360901b604082015260600190565b6020808252601690820152751cdd5890da185b9b995b1cce881d1bdbc81cda1bdc9d60521b604082015260600190565b6020808252601590820152741a5b9d985b1a59081cdd5898da185b9b995b081a59605a1b604082015260600190565b6020808252600a90820152693737ba103632b233b2b960b11b604082015260600190565b6020808252601a908201527f537562416c6c6f635b5d3a20756e657175616c206c656e677468000000000000604082015260600190565b60208082526018908201527f62616c616e636573206c656e677468206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6f6c642062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252600d908201526c06d75737420686176652061707609c1b604082015260600190565b600060208252611401602083018461248f565b600060808252612c90608083018761248f565b8281036020840152612ca281876124ed565b90508281036040840152612cb681866124ed565b91505082606083015295945050505050565b60006020825261140160208301846124ed565b6001600160401b03968716815294861660208601529290941660408401521515606083015260ff909216608082015260a081019190915260c00190565b6001600160401b03938416815260ff929092166020830152909116604082015260600190565b6040518181016001600160401b0381118282101715612d5957fe5b604052919050565b60006001600160401b03821115612d7457fe5b506020908102019056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220519fed9a039fb9fc79626da8b4615c9cdc1f2f3adf207a1b8cc7dec9b5fe3a9664736f6c63430007060033", } +// AdjudicatorABI is the input ABI used to generate the binding from. +// Deprecated: Use AdjudicatorMetaData.ABI instead. +var AdjudicatorABI = AdjudicatorMetaData.ABI + // AdjudicatorBin is the compiled bytecode used for deploying new contracts. -var AdjudicatorBin = "0x608060405234801561001057600080fd5b50612f6f806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806366e7b5641161005b57806366e7b564146100e55780636f68e70e146100f857806397f5a0971461010b578063e30194b71461011e5761007d565b8063023576571461008257806311be1997146100975780631fb910dd146100c5575b600080fd5b610095610090366004612303565b610131565b005b6100aa6100a536600461215c565b6102c5565b6040516100bc96959493929190612e52565b60405180910390f35b6100d86100d3366004612463565b610314565b6040516100bc9190612751565b6100956100f33660046121ae565b61032e565b6100d8610106366004612174565b610430565b610095610119366004612231565b61043b565b61009561012c3660046123b4565b61049e565b610139611a34565b8351610144906104cc565b608081015190915060ff1661018b5780516001600160401b03164210156101865760405162461bcd60e51b815260040161017d90612acc565b60405180910390fd5b6101dc565b608081015160ff16600114156101c45780516001600160401b031642106101865760405162461bcd60e51b815260040161017d9061278f565b60405162461bcd60e51b815260040161017d90612894565b60608601516001600160a01b03166102065760405162461bcd60e51b815260040161017d90612dba565b856040015151831061022a5760405162461bcd60e51b815260040161017d90612a01565b610234868561050f565b61023d85610314565b8160a001511461025f5760405162461bcd60e51b815260040161017d906128eb565b61028961026b8561053b565b838860400151868151811061027c57fe5b6020026020010151610564565b6102a55760405162461bcd60e51b815260040161017d90612817565b6102b18686868661059f565b6102bd86856001610683565b505050505050565b600060208190529081526040902080546001909101546001600160401b0380831692600160401b8104821692600160801b82049092169160ff600160c01b8304811692600160c81b9004169086565b600061031f8261053b565b8051906020012090505b919050565b826080015161034f5760405162461bcd60e51b815260040161017d90612cf1565b608082015115156001146103755760405162461bcd60e51b815260040161017d9061286b565b6040808301510151511561039b5760405162461bcd60e51b815260040161017d90612914565b6103a5838361050f565b6103b0838383610755565b6103b8611a34565b60006103c784600001516107df565b9150915080156103f957608082015160ff16600214156103f95760405162461bcd60e51b815260040161017d90612a67565b61040585856002610683565b61042984600001518560400151600001518760400151876040015160200151610870565b5050505050565b600061031f82610910565b826080015161045c5760405162461bcd60e51b815260040161017d90612cf1565b610466838361050f565b61046f82610923565b606061047d83836000610a0b565b50835160408086015151908701519293506104989284610870565b50505050565b8151608001516104c05760405162461bcd60e51b815260040161017d90612cf1565b61049882826000610cf5565b6104d4611a34565b6104dc611a34565b60006104e7846107df565b91509150806105085760405162461bcd60e51b815260040161017d90612974565b5092915050565b61051882610430565b8151146105375760405162461bcd60e51b815260040161017d90612c6a565b5050565b60608160405160200161054e9190612e3f565b6040516020818303038152906040529050919050565b6000806105778580519060200120610e2a565b905060006105858286610e7b565b6001600160a01b0390811690851614925050509392505050565b82602001516001016001600160401b031682602001516001600160401b0316146105db5760405162461bcd60e51b815260040161017d90612c33565b6080830151156105fd5760405162461bcd60e51b815260040161017d9061299c565b61061583604001518360400151866040015151611068565b6060840151604051630d1feb4f60e01b81526001600160a01b03821690630d1feb4f9061064c908890889088908890600401612df4565b60006040518083038186803b15801561066457600080fd5b505afa158015610678573d6000803e3d6000fd5b505050505050505050565b61068b611a34565b600061069a84600001516107df565b86516001600160401b0390811660208085019190915287015116604083015290925090506106c78561125c565b151560608301528260028111156106da57fe5b60ff1660808301526106eb84610314565b60a083015260808401511561070b576001600160401b0342168252610749565b80158061071f5750608082015160ff166001145b1561074957602082015161073d906001600160401b0342169061126e565b6001600160401b031682525b835161042990836112bd565b60606107608361053b565b90508151846040015151146107875760405162461bcd60e51b815260040161017d90612b5e565b60005b8251811015610429576107bb828483815181106107a357fe5b60200260200101518760400151848151811061027c57fe5b6107d75760405162461bcd60e51b815260040161017d90612817565b60010161078a565b6107e7611a34565b60006107f1611a34565b50505060008181526020818152604091829020825160c08101845281546001600160401b038082168352600160401b8204811694830194909452600160801b81049093169381019390935260ff600160c01b8304811615156060850152600160c81b90920490911660808301526001015460a082018190521515915091565b60005b83518110156104295783818151811061088857fe5b60200260200101516001600160a01b031663fc79a66d86858585815181106108ac57fe5b60200260200101516040518463ffffffff1660e01b81526004016108d29392919061275a565b600060405180830381600087803b1580156108ec57600080fd5b505af1158015610900573d6000803e3d6000fd5b5050600190920191506108739050565b60608160405160200161054e9190612de1565b61092b611a34565b8151610936906104cc565b905061094182610314565b8160a00151146109635760405162461bcd60e51b815260040161017d90612b2f565b608081015160ff166002141561098b5760405162461bcd60e51b815260040161017d90612a67565b608081015160ff161580156109a1575080606001515b156109ce57602081015181516109c2916001600160401b039091169061126e565b6001600160401b031681525b80516001600160401b03164210156109f85760405162461bcd60e51b815260040161017d90612b95565b60026080820152815161053790826112bd565b60606000610a18856113b8565b60408501515180516001600160401b0381118015610a3557600080fd5b50604051908082528060200260200182016040528015610a6957816020015b6060815260200190600190039081610a545790505b50925060005b8151811015610b685760608760400151602001518281518110610a8e57fe5b6020026020010151905080516001600160401b0381118015610aaf57600080fd5b50604051908082528060200260200182016040528015610ad9578160200160208202803683370190505b50858381518110610ae657fe5b602002602001018190525060005b8151811015610b5e578860400151602001518381518110610b1157fe5b60200260200101518181518110610b2457fe5b6020026020010151868481518110610b3857fe5b60200260200101518281518110610b4b57fe5b6020908102919091010152600101610af4565b5050600101610a6f565b50604080870151015184925060005b8151811015610cea57610b88611a69565b828281518110610b9457fe5b60200260200101519050610ba6611a8d565b885160018701968a918110610bb757fe5b602002602001015190508060000151826000015114610be85760405162461bcd60e51b815260040161017d90612cc2565b6060610bf5828b89610a0b565b604085015190985090915060005b8751811015610cd95760005b8251811015610cd0576000848381518110610c2657fe5b60200260200101518281518110610c3957fe5b602002602001015190506000848381518110610c5157fe5b60200260200101519050610c98828e8681518110610c6b57fe5b60200260200101518361ffff1681518110610c8257fe5b60200260200101516113f890919063ffffffff16565b8d8581518110610ca457fe5b60200260200101518261ffff1681518110610cbb57fe5b60209081029190910101525050600101610c0f565b50600101610c03565b505060019093019250610b77915050565b505050935093915050565b606081610d00611ac0565b506020850151604001518051610d1587611459565b610d2282602001516115b5565b9350606082604001519050865181511115610d4f5760405162461bcd60e51b815260040161017d90612c92565b60005b8151811015610e1e57610d63611ae1565b885160018701968a918110610d7457fe5b60200260200101519050610d86611a69565b610d8e611a8d565b848481518110610d9a57fe5b60200260200101518360200151915091508060000151826000015114610dd25760405162461bcd60e51b815260040161017d906128bb565b6060610ddf848d8b610cf5565b604084015151909a50909150610df690889061167d565b610e04836020015182611778565b610e0e8a8261185c565b505060019092019150610d529050565b50505050935093915050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610ed3576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610f445760405162461bcd60e51b8152600401808060200182810382526022815260200180612ef66022913960400191505060405180910390fd5b8060ff16601b14158015610f5c57508060ff16601c14155b15610f985760405162461bcd60e51b8152600401808060200182810382526022815260200180612f186022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610ff4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661105c576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b93505050505b92915050565b816020015151836020015151146110915760405162461bcd60e51b815260040161017d90612d4c565b815151835151146110b45760405162461bcd60e51b815260040161017d906129d1565b6110c6836040015183604001516118aa565b60005b8251518110156104985782518051829081106110e157fe5b60200260200101516001600160a01b03168460000151828151811061110257fe5b60200260200101516001600160a01b0316146111305760405162461bcd60e51b815260040161017d906127e0565b600080838660200151848151811061114457fe5b6020026020010151511461116a5760405162461bcd60e51b815260040161017d90612d83565b838560200151848151811061117b57fe5b602002602001015151146111a15760405162461bcd60e51b815260040161017d90612bfc565b60005b84811015611232576111e9876020015185815181106111bf57fe5b602002602001015182815181106111d257fe5b6020026020010151846113f890919063ffffffff16565b9250611228866020015185815181106111fe57fe5b6020026020010151828151811061121157fe5b6020026020010151836113f890919063ffffffff16565b91506001016111a4565b508082146112525760405162461bcd60e51b815260040161017d90612bc5565b50506001016110c9565b606001516001600160a01b0316151590565b8082016001600160401b038084169082161015611062576040805162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b604482015290519081900360640190fd5b600082815260208181526040918290208351815492850151858501516060870151608088015167ffffffffffffffff199096166001600160401b03808616919091176fffffffffffffffff00000000000000001916600160401b948216949094029390931767ffffffffffffffff60801b1916600160801b938316939093029290921760ff60c01b1916600160c01b921515929092029190911760ff60c81b1916600160c81b60ff86160217835560a0860151600190930192909255925185937f895ef5a5fc3efd313a300b006d6ce97ff0670dfe04f6eea90417edf924fa786b936113ac9392909190612e8f565b60405180910390a25050565b6113c0611a34565b81516113cb906104cc565b90506113d682610314565b8160a00151146109f85760405162461bcd60e51b815260040161017d90612b2f565b600082820183811015611452576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b611461611b0e565b611469611a8d565b50508051602082015161147c828261050f565b61148b82828560400151610755565b8160a00151156114e15761149e8261125c565b156114bb5760405162461bcd60e51b815260040161017d906127b7565b604080820151015151156114e15760405162461bcd60e51b815260040161017d90612a30565b6114e9611a34565b60006114f883600001516107df565b9150915080156115a65761150b83610314565b8260a00151141561151f57505050506115b2565b82602001516001600160401b031682604001516001600160401b0316106115585760405162461bcd60e51b815260040161017d90612842565b608082015160ff161561157d5760405162461bcd60e51b815260040161017d9061294b565b81516001600160401b031642106115a65760405162461bcd60e51b815260040161017d90612af8565b61042984846000610683565b50565b606081516001600160401b03811180156115ce57600080fd5b506040519080825280602002602001820160405280156115f8578160200160208202803683370190505b50905060005b825181101561167757606083828151811061161557fe5b6020026020010151905060005b815181101561166d5761164e82828151811061163a57fe5b6020026020010151858581518110610c8257fe5b84848151811061165a57fe5b6020908102919091010152600101611622565b50506001016115fe565b50919050565b80518251146116d3576040805162461bcd60e51b815260206004820152601960248201527f616464726573735b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b8251811015611773578181815181106116eb57fe5b60200260200101516001600160a01b031683828151811061170857fe5b60200260200101516001600160a01b03161461176b576040805162461bcd60e51b815260206004820152601760248201527f616464726573735b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b6001016116d6565b505050565b80518251146117ce576040805162461bcd60e51b815260206004820152601960248201527f75696e743235365b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b8251811015611773578181815181106117e657fe5b60200260200101518382815181106117fa57fe5b602002602001015114611854576040805162461bcd60e51b815260206004820152601760248201527f75696e743235365b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b6001016117d1565b60005b82518110156117735761188b82828151811061187757fe5b6020026020010151848381518110610c8257fe5b83828151811061189757fe5b602090810291909101015260010161185f565b80518251146118cb5760405162461bcd60e51b815260040161017d90612d15565b60005b8251811015611773576119078382815181106118e657fe5b60200260200101518383815181106118fa57fe5b602002602001015161190f565b6001016118ce565b80518251146119305760405162461bcd60e51b815260040161017d90612a9e565b61194282602001518260200151611778565b6105378260400151826040015180518251146119a5576040805162461bcd60e51b815260206004820152601860248201527f75696e7431365b5d3a20756e657175616c206c656e6774680000000000000000604482015290519081900360640190fd5b60005b8251811015611773578181815181106119bd57fe5b602002602001015161ffff168382815181106119d557fe5b602002602001015161ffff1614611a2c576040805162461bcd60e51b815260206004820152601660248201527575696e7431365b5d3a20756e657175616c206974656d60501b604482015290519081900360640190fd5b6001016119a8565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180606001604052806000801916815260200160608152602001606081525090565b6040805160a08101825260008082526020820152908101611aac611ac0565b815260606020820152600060409091015290565b60405180606001604052806060815260200160608152602001606081525090565b6040518060600160405280611af4611b0e565b8152602001611b01611a8d565b8152602001606081525090565b6040518060c0016040528060008152602001600081526020016060815260200160006001600160a01b031681526020016000151581526020016000151581525090565b80356001600160a01b038116811461032957600080fd5b600082601f830112611b78578081fd5b8135611b8b611b8682612ed8565b612eb5565b818152915060208083019084810181840286018201871015611bac57600080fd5b60005b84811015611bd257611bc082611b51565b84529282019290820190600101611baf565b505050505092915050565b600082601f830112611bed578081fd5b8135611bfb611b8682612ed8565b818152915060208083019084810160005b84811015611bd257611c23888484358a0101611dde565b84529282019290820190600101611c0c565b600082601f830112611c45578081fd5b8135611c53611b8682612ed8565b818152915060208083019084810160005b84811015611bd257611c7b888484358a0101611e4c565b84529282019290820190600101611c64565b600082601f830112611c9d578081fd5b8135611cab611b8682612ed8565b818152915060208083019084810160005b84811015611bd25781358701606080601f19838c03011215611cdd57600080fd5b604080518281016001600160401b038282108183111715611cfa57fe5b908352848801358252848301359080821115611d1557600080fd5b611d238e8a84890101611dde565b838a0152938501359380851115611d3957600080fd5b5050611d498c8885870101611d64565b91810191909152865250509282019290820190600101611cbc565b600082601f830112611d74578081fd5b8135611d82611b8682612ed8565b818152915060208083019084810181840286018201871015611da357600080fd5b6000805b85811015611dd257823561ffff81168114611dc0578283fd5b85529383019391830191600101611da7565b50505050505092915050565b600082601f830112611dee578081fd5b8135611dfc611b8682612ed8565b818152915060208083019084810181840286018201871015611e1d57600080fd5b60005b84811015611bd257813584529282019290820190600101611e20565b8035801515811461032957600080fd5b600082601f830112611e5c578081fd5b81356001600160401b03811115611e6f57fe5b611e82601f8201601f1916602001612eb5565b9150808252836020828501011115611e9957600080fd5b8060208401602084013760009082016020015292915050565b600060608284031215611ec3578081fd5b604051606081016001600160401b038282108183111715611ee057fe5b816040528293508435915080821115611ef857600080fd5b611f0486838701611b68565b83526020850135915080821115611f1a57600080fd5b611f2686838701611bdd565b60208401526040850135915080821115611f3f57600080fd5b50611f4c85828601611c8d565b6040830152505092915050565b600060c08284031215611f6a578081fd5b60405160c081016001600160401b038282108183111715611f8757fe5b8160405282935084358352602085013560208401526040850135915080821115611fb057600080fd5b50611fbd85828601611b68565b604083015250611fcf60608401611b51565b6060820152611fe060808401611e3c565b6080820152611ff160a08401611e3c565b60a08201525092915050565b60006060828403121561200e578081fd5b604051606081016001600160401b03828210818311171561202b57fe5b81604052829350843591508082111561204357600080fd5b61204f86838701611f59565b8352602085013591508082111561206557600080fd5b61207186838701612097565b6020840152604085013591508082111561208a57600080fd5b50611f4c85828601611c35565b600060a082840312156120a8578081fd5b60405160a081016001600160401b0382821081831117156120c557fe5b81604052829350843583526120dc60208601612145565b602084015260408501359150808211156120f557600080fd5b61210186838701611eb2565b6040840152606085013591508082111561211a57600080fd5b5061212785828601611e4c565b60608301525061213960808401611e3c565b60808201525092915050565b80356001600160401b038116811461032957600080fd5b60006020828403121561216d578081fd5b5035919050565b600060208284031215612185578081fd5b81356001600160401b0381111561219a578182fd5b6121a684828501611f59565b949350505050565b6000806000606084860312156121c2578182fd5b83356001600160401b03808211156121d8578384fd5b6121e487838801611f59565b945060208601359150808211156121f9578384fd5b61220587838801612097565b9350604086013591508082111561221a578283fd5b5061222786828701611c35565b9150509250925092565b600080600060608486031215612245578081fd5b83356001600160401b038082111561225b578283fd5b61226787838801611f59565b945060209150818601358181111561227d578384fd5b61228988828901612097565b94505060408601358181111561229d578384fd5b86019050601f810187136122af578283fd5b80356122bd611b8682612ed8565b81815283810190838501865b848110156122f2576122e08c888435890101612097565b845292860192908601906001016122c9565b505080955050505050509250925092565b600080600080600060a0868803121561231a578283fd5b85356001600160401b0380821115612330578485fd5b61233c89838a01611f59565b96506020880135915080821115612351578485fd5b61235d89838a01612097565b95506040880135915080821115612372578485fd5b61237e89838a01612097565b945060608801359350608088013591508082111561239a578283fd5b506123a788828901611e4c565b9150509295509295909350565b600080604083850312156123c6578182fd5b82356001600160401b03808211156123dc578384fd5b6123e886838701611ffd565b93506020915081850135818111156123fe578384fd5b85019050601f81018613612410578283fd5b803561241e611b8682612ed8565b81815283810190838501865b84811015612453576124418b888435890101611ffd565b8452928601929086019060010161242a565b5096999098509650505050505050565b600060208284031215612474578081fd5b81356001600160401b03811115612489578182fd5b6121a684828501612097565b6000815180845260208085019450808401835b838110156124cd5781516001600160a01b0316875295820195908201906001016124a8565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612579578284038952815160608151865286820151818888015261251e82880182612586565b604093840151888203948901949094528351808252938901938b935090890191505b8083101561256457835161ffff168252928801926001929092019190880190612540565b509a87019a95505050908401906001016124f4565b5091979650505050505050565b6000815180845260208085019450808401835b838110156124cd57815187529582019590820190600101612599565b15159052565b60008151808452815b818110156125e0576020818501810151868301820152016125c4565b818111156125f15782602083870101525b50601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160c0604085015261262f60c0850182612495565b6060848101516001600160a01b03169086015260808085015115159086015260a0938401511515949093019390935250919050565b60008151835260206001600160401b03818401511681850152604083015160a060408601528051606060a08701526126a0610100870182612495565b83830151609f19888303810160c08a01528151808452929350908501918386019080870285018701885b828110156126f857601f198783030184526126e6828751612586565b958901959389019391506001016126ca565b5060408701519750838b82030160e08c015261271481896124d8565b9750505050505050506060830151848203606086015261273482826125bb565b915050608083015161274960808601826125b5565b509392505050565b90815260200190565b6000848252606060208301526127736060830185612495565b82810360408401526127858185612586565b9695505050505050565b6020808252600e908201526d1d1a5b595bdd5d081c185cdcd95960921b604082015260600190565b6020808252600f908201526e063616e6e6f7420686176652061707608c1b604082015260600190565b6020808252601a908201527f6173736574735b695d2061646472657373206d69736d61746368000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b6020808252600f908201526e34b73b30b634b2103b32b939b4b7b760891b604082015260600190565b6020808252600f908201526e1cdd185d19481b9bdd08199a5b985b608a1b604082015260600190565b6020808252600d908201526c696e76616c696420706861736560981b604082015260600190565b6020808252601690820152751a5b9d985b1a59081cdd588b58da185b9b995b081a5960521b604082015260600190565b6020808252600f908201526e77726f6e67206f6c6420737461746560881b604082015260600190565b60208082526018908201527f63616e6e6f742068617665207375622d6368616e6e656c730000000000000000604082015260600190565b6020808252600f908201526e696e636f727265637420706861736560881b604082015260600190565b6020808252600e908201526d1b9bdd081c9959da5cdd195c995960921b604082015260600190565b6020808252818101527f63616e6e6f742070726f67726573732066726f6d2066696e616c207374617465604082015260600190565b6020808252601690820152750c2e6e6cae8e640d8cadccee8d040dad2e6dac2e8c6d60531b604082015260600190565b6020808252601590820152746163746f72496478206f7574206f662072616e676560581b604082015260600190565b60208082526018908201527f63616e6e6f742068617665206c6f636b65642066756e64730000000000000000604082015260600190565b60208082526019908201527f6368616e6e656c20616c726561647920636f6e636c7564656400000000000000604082015260600190565b60208082526014908201527314dd58905b1b1bd8ce881d5b995c5d585b08125160621b604082015260600190565b6020808252601290820152711d1a5b595bdd5d081b9bdd081c185cdcd95960721b604082015260600190565b60208082526019908201527f72656675746174696f6e2074696d656f75742070617373656400000000000000604082015260600190565b602080825260159082015274696e76616c6964206368616e6e656c20737461746560581b604082015260600190565b6020808252601a908201527f7369676e617475726573206c656e677468206d69736d61746368000000000000604082015260600190565b6020808252601690820152751d1a5b595bdd5d081b9bdd081c185cdcd959081e595d60521b604082015260600190565b60208082526018908201527f73756d206f662062616c616e636573206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6e65772062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252601d908201527f76657273696f6e206d75737420696e6372656d656e74206279206f6e65000000604082015260600190565b6020808252600e908201526d696e76616c696420706172616d7360901b604082015260600190565b6020808252601690820152751cdd5890da185b9b995b1cce881d1bdbc81cda1bdc9d60521b604082015260600190565b6020808252601590820152741a5b9d985b1a59081cdd5898da185b9b995b081a59605a1b604082015260600190565b6020808252600a90820152693737ba103632b233b2b960b11b604082015260600190565b6020808252601a908201527f537562416c6c6f635b5d3a20756e657175616c206c656e677468000000000000604082015260600190565b60208082526018908201527f62616c616e636573206c656e677468206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6f6c642062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252600d908201526c06d75737420686176652061707609c1b604082015260600190565b6000602082526114526020830184612606565b600060808252612e076080830187612606565b8281036020840152612e198187612664565b90508281036040840152612e2d8186612664565b91505082606083015295945050505050565b6000602082526114526020830184612664565b6001600160401b03968716815294861660208601529290941660408401521515606083015260ff909216608082015260a081019190915260c00190565b6001600160401b03938416815260ff929092166020830152909116604082015260600190565b6040518181016001600160401b0381118282101715612ed057fe5b604052919050565b60006001600160401b03821115612eeb57fe5b506020908102019056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220c3d4f7b4b23cab2f6b0a9d01f232c08dab5309387a689da9c2a306ba54fbc93964736f6c63430007040033" +// Deprecated: Use AdjudicatorMetaData.Bin instead. +var AdjudicatorBin = AdjudicatorMetaData.Bin // DeployAdjudicator deploys a new Ethereum contract, binding an instance of Adjudicator to it. func DeployAdjudicator(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Adjudicator, error) { - parsed, err := abi.JSON(strings.NewReader(AdjudicatorABI)) + parsed, err := AdjudicatorMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AdjudicatorBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AdjudicatorBin), backend) if err != nil { return common.Address{}, nil, nil, err } @@ -300,13 +294,16 @@ func (_Adjudicator *AdjudicatorCaller) Disputes(opts *bind.CallOpts, arg0 [32]by Phase uint8 StateHash [32]byte }) + if err != nil { + return *outstruct, err + } - outstruct.Timeout = out[0].(uint64) - outstruct.ChallengeDuration = out[1].(uint64) - outstruct.Version = out[2].(uint64) - outstruct.HasApp = out[3].(bool) - outstruct.Phase = out[4].(uint8) - outstruct.StateHash = out[5].([32]byte) + outstruct.Timeout = *abi.ConvertType(out[0], new(uint64)).(*uint64) + outstruct.ChallengeDuration = *abi.ConvertType(out[1], new(uint64)).(*uint64) + outstruct.Version = *abi.ConvertType(out[2], new(uint64)).(*uint64) + outstruct.HasApp = *abi.ConvertType(out[3], new(bool)).(*bool) + outstruct.Phase = *abi.ConvertType(out[4], new(uint8)).(*uint8) + outstruct.StateHash = *abi.ConvertType(out[5], new([32]byte)).(*[32]byte) return *outstruct, err @@ -601,1900 +598,3 @@ func (_Adjudicator *AdjudicatorFilterer) ParseChannelUpdate(log types.Log) (*Adj event.Raw = log return event, nil } - -// AppABI is the input ABI used to generate the binding from. -const AppABI = "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"from\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"to\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"}],\"name\":\"validTransition\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]" - -// AppFuncSigs maps the 4-byte function signature to its string representation. -var AppFuncSigs = map[string]string{ - "0d1feb4f": "validTransition((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),uint256)", -} - -// App is an auto generated Go binding around an Ethereum contract. -type App struct { - AppCaller // Read-only binding to the contract - AppTransactor // Write-only binding to the contract - AppFilterer // Log filterer for contract events -} - -// AppCaller is an auto generated read-only Go binding around an Ethereum contract. -type AppCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AppTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AppTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AppFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AppFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AppSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AppSession struct { - Contract *App // 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 -} - -// AppCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AppCallerSession struct { - Contract *AppCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AppTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AppTransactorSession struct { - Contract *AppTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AppRaw is an auto generated low-level Go binding around an Ethereum contract. -type AppRaw struct { - Contract *App // Generic contract binding to access the raw methods on -} - -// AppCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AppCallerRaw struct { - Contract *AppCaller // Generic read-only contract binding to access the raw methods on -} - -// AppTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AppTransactorRaw struct { - Contract *AppTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewApp creates a new instance of App, bound to a specific deployed contract. -func NewApp(address common.Address, backend bind.ContractBackend) (*App, error) { - contract, err := bindApp(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &App{AppCaller: AppCaller{contract: contract}, AppTransactor: AppTransactor{contract: contract}, AppFilterer: AppFilterer{contract: contract}}, nil -} - -// NewAppCaller creates a new read-only instance of App, bound to a specific deployed contract. -func NewAppCaller(address common.Address, caller bind.ContractCaller) (*AppCaller, error) { - contract, err := bindApp(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AppCaller{contract: contract}, nil -} - -// NewAppTransactor creates a new write-only instance of App, bound to a specific deployed contract. -func NewAppTransactor(address common.Address, transactor bind.ContractTransactor) (*AppTransactor, error) { - contract, err := bindApp(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AppTransactor{contract: contract}, nil -} - -// NewAppFilterer creates a new log filterer instance of App, bound to a specific deployed contract. -func NewAppFilterer(address common.Address, filterer bind.ContractFilterer) (*AppFilterer, error) { - contract, err := bindApp(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AppFilterer{contract: contract}, nil -} - -// bindApp binds a generic wrapper to an already deployed contract. -func bindApp(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AppABI)) - 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 (_App *AppRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _App.Contract.AppCaller.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 (_App *AppRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _App.Contract.AppTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_App *AppRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _App.Contract.AppTransactor.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 (_App *AppCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _App.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 (_App *AppTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _App.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_App *AppTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _App.Contract.contract.Transact(opts, method, params...) -} - -// ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. -// -// Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_App *AppCaller) ValidTransition(opts *bind.CallOpts, params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - var out []interface{} - err := _App.contract.Call(opts, &out, "validTransition", params, from, to, actorIdx) - - if err != nil { - return err - } - - return err - -} - -// ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. -// -// Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_App *AppSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - return _App.Contract.ValidTransition(&_App.CallOpts, params, from, to, actorIdx) -} - -// ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. -// -// Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_App *AppCallerSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - return _App.Contract.ValidTransition(&_App.CallOpts, params, from, to, actorIdx) -} - -// ArrayABI is the input ABI used to generate the binding from. -const ArrayABI = "[]" - -// ArrayBin is the compiled bytecode used for deploying new contracts. -var ArrayBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f03ababb0613234c3eb5710fd53ebb146b5257611ec7cb2eec2258d682ba631764736f6c63430007040033" - -// DeployArray deploys a new Ethereum contract, binding an instance of Array to it. -func DeployArray(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Array, error) { - parsed, err := abi.JSON(strings.NewReader(ArrayABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ArrayBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Array{ArrayCaller: ArrayCaller{contract: contract}, ArrayTransactor: ArrayTransactor{contract: contract}, ArrayFilterer: ArrayFilterer{contract: contract}}, nil -} - -// Array is an auto generated Go binding around an Ethereum contract. -type Array struct { - ArrayCaller // Read-only binding to the contract - ArrayTransactor // Write-only binding to the contract - ArrayFilterer // Log filterer for contract events -} - -// ArrayCaller is an auto generated read-only Go binding around an Ethereum contract. -type ArrayCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ArrayTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ArrayTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ArrayFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ArrayFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ArraySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ArraySession struct { - Contract *Array // 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 -} - -// ArrayCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ArrayCallerSession struct { - Contract *ArrayCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ArrayTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ArrayTransactorSession struct { - Contract *ArrayTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ArrayRaw is an auto generated low-level Go binding around an Ethereum contract. -type ArrayRaw struct { - Contract *Array // Generic contract binding to access the raw methods on -} - -// ArrayCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ArrayCallerRaw struct { - Contract *ArrayCaller // Generic read-only contract binding to access the raw methods on -} - -// ArrayTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ArrayTransactorRaw struct { - Contract *ArrayTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewArray creates a new instance of Array, bound to a specific deployed contract. -func NewArray(address common.Address, backend bind.ContractBackend) (*Array, error) { - contract, err := bindArray(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Array{ArrayCaller: ArrayCaller{contract: contract}, ArrayTransactor: ArrayTransactor{contract: contract}, ArrayFilterer: ArrayFilterer{contract: contract}}, nil -} - -// NewArrayCaller creates a new read-only instance of Array, bound to a specific deployed contract. -func NewArrayCaller(address common.Address, caller bind.ContractCaller) (*ArrayCaller, error) { - contract, err := bindArray(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ArrayCaller{contract: contract}, nil -} - -// NewArrayTransactor creates a new write-only instance of Array, bound to a specific deployed contract. -func NewArrayTransactor(address common.Address, transactor bind.ContractTransactor) (*ArrayTransactor, error) { - contract, err := bindArray(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ArrayTransactor{contract: contract}, nil -} - -// NewArrayFilterer creates a new log filterer instance of Array, bound to a specific deployed contract. -func NewArrayFilterer(address common.Address, filterer bind.ContractFilterer) (*ArrayFilterer, error) { - contract, err := bindArray(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ArrayFilterer{contract: contract}, nil -} - -// bindArray binds a generic wrapper to an already deployed contract. -func bindArray(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ArrayABI)) - 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 (_Array *ArrayRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Array.Contract.ArrayCaller.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 (_Array *ArrayRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Array.Contract.ArrayTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Array *ArrayRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Array.Contract.ArrayTransactor.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 (_Array *ArrayCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Array.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 (_Array *ArrayTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Array.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Array *ArrayTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Array.Contract.contract.Transact(opts, method, params...) -} - -// AssetHolderABI is the input ABI used to generate the binding from. -const AssetHolderABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// AssetHolderFuncSigs maps the 4-byte function signature to its string representation. -var AssetHolderFuncSigs = map[string]string{ - "53c2ed8e": "adjudicator()", - "1de26e16": "deposit(bytes32,uint256)", - "ae9ee18c": "holdings(bytes32)", - "fc79a66d": "setOutcome(bytes32,address[],uint256[])", - "d945af1d": "settled(bytes32)", - "4ed4283c": "withdraw((bytes32,address,address,uint256),bytes)", -} - -// AssetHolder is an auto generated Go binding around an Ethereum contract. -type AssetHolder struct { - AssetHolderCaller // Read-only binding to the contract - AssetHolderTransactor // Write-only binding to the contract - AssetHolderFilterer // Log filterer for contract events -} - -// AssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. -type AssetHolderCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AssetHolderTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AssetHolderFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AssetHolderSession struct { - Contract *AssetHolder // 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 -} - -// AssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AssetHolderCallerSession struct { - Contract *AssetHolderCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AssetHolderTransactorSession struct { - Contract *AssetHolderTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. -type AssetHolderRaw struct { - Contract *AssetHolder // Generic contract binding to access the raw methods on -} - -// AssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AssetHolderCallerRaw struct { - Contract *AssetHolderCaller // Generic read-only contract binding to access the raw methods on -} - -// AssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AssetHolderTransactorRaw struct { - Contract *AssetHolderTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewAssetHolder creates a new instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolder(address common.Address, backend bind.ContractBackend) (*AssetHolder, error) { - contract, err := bindAssetHolder(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &AssetHolder{AssetHolderCaller: AssetHolderCaller{contract: contract}, AssetHolderTransactor: AssetHolderTransactor{contract: contract}, AssetHolderFilterer: AssetHolderFilterer{contract: contract}}, nil -} - -// NewAssetHolderCaller creates a new read-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*AssetHolderCaller, error) { - contract, err := bindAssetHolder(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AssetHolderCaller{contract: contract}, nil -} - -// NewAssetHolderTransactor creates a new write-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetHolderTransactor, error) { - contract, err := bindAssetHolder(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AssetHolderTransactor{contract: contract}, nil -} - -// NewAssetHolderFilterer creates a new log filterer instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetHolderFilterer, error) { - contract, err := bindAssetHolder(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AssetHolderFilterer{contract: contract}, nil -} - -// bindAssetHolder binds a generic wrapper to an already deployed contract. -func bindAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderABI)) - 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 (_AssetHolder *AssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.AssetHolderCaller.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 (_AssetHolder *AssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.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 (_AssetHolder *AssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.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 (_AssetHolder *AssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transact(opts, method, params...) -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "adjudicator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCallerSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { - var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "holdings", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { - var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "settled", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCallerSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "deposit", fundingID, amount) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "setOutcome", channelID, parts, newBals) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "withdraw", authorization, signature) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) -} - -// AssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the AssetHolder contract. -type AssetHolderDepositedIterator struct { - Event *AssetHolderDeposited // 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 *AssetHolderDepositedIterator) 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(AssetHolderDeposited) - 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(AssetHolderDeposited) - 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 *AssetHolderDepositedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderDepositedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderDeposited represents a Deposited event raised by the AssetHolder contract. -type AssetHolderDeposited struct { - FundingID [32]byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeposited is a free log retrieval operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderDepositedIterator, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Deposited", fundingIDRule) - if err != nil { - return nil, err - } - return &AssetHolderDepositedIterator{contract: _AssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil -} - -// WatchDeposited is a free log subscription operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetHolderDeposited, fundingID [][32]byte) (event.Subscription, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Deposited", fundingIDRule) - 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(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", 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 -} - -// ParseDeposited is a log parse operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) ParseDeposited(log types.Log) (*AssetHolderDeposited, error) { - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// AssetHolderOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the AssetHolder contract. -type AssetHolderOutcomeSetIterator struct { - Event *AssetHolderOutcomeSet // 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 *AssetHolderOutcomeSetIterator) 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(AssetHolderOutcomeSet) - 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(AssetHolderOutcomeSet) - 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 *AssetHolderOutcomeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderOutcomeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderOutcomeSet represents a OutcomeSet event raised by the AssetHolder contract. -type AssetHolderOutcomeSet struct { - ChannelID [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOutcomeSet is a free log retrieval operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetHolderOutcomeSetIterator, error) { - - var channelIDRule []interface{} - for _, channelIDItem := range channelID { - channelIDRule = append(channelIDRule, channelIDItem) - } - - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) - if err != nil { - return nil, err - } - return &AssetHolderOutcomeSetIterator{contract: _AssetHolder.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil -} - -// WatchOutcomeSet is a free log subscription operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetHolderOutcomeSet, channelID [][32]byte) (event.Subscription, error) { - - var channelIDRule []interface{} - for _, channelIDItem := range channelID { - channelIDRule = append(channelIDRule, channelIDItem) - } - - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) - 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(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", 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 -} - -// ParseOutcomeSet is a log parse operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) ParseOutcomeSet(log types.Log) (*AssetHolderOutcomeSet, error) { - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// AssetHolderWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the AssetHolder contract. -type AssetHolderWithdrawnIterator struct { - Event *AssetHolderWithdrawn // 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 *AssetHolderWithdrawnIterator) 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(AssetHolderWithdrawn) - 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(AssetHolderWithdrawn) - 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 *AssetHolderWithdrawnIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderWithdrawn represents a Withdrawn event raised by the AssetHolder contract. -type AssetHolderWithdrawn struct { - FundingID [32]byte - Amount *big.Int - Receiver common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterWithdrawn is a free log retrieval operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderWithdrawnIterator, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) - if err != nil { - return nil, err - } - return &AssetHolderWithdrawnIterator{contract: _AssetHolder.contract, event: "Withdrawn", logs: logs, sub: sub}, nil -} - -// WatchWithdrawn is a free log subscription operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderWithdrawn, fundingID [][32]byte) (event.Subscription, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) - 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(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", 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 -} - -// ParseWithdrawn is a log parse operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) ParseWithdrawn(log types.Log) (*AssetHolderWithdrawn, error) { - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ChannelABI is the input ABI used to generate the binding from. -const ChannelABI = "[]" - -// ChannelBin is the compiled bytecode used for deploying new contracts. -var ChannelBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122092cdd1cee89646209ed671e47b521f86313d39ebb86e786ab2cef1340b48353764736f6c63430007040033" - -// DeployChannel deploys a new Ethereum contract, binding an instance of Channel to it. -func DeployChannel(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Channel, error) { - parsed, err := abi.JSON(strings.NewReader(ChannelABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ChannelBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Channel{ChannelCaller: ChannelCaller{contract: contract}, ChannelTransactor: ChannelTransactor{contract: contract}, ChannelFilterer: ChannelFilterer{contract: contract}}, nil -} - -// Channel is an auto generated Go binding around an Ethereum contract. -type Channel struct { - ChannelCaller // Read-only binding to the contract - ChannelTransactor // Write-only binding to the contract - ChannelFilterer // Log filterer for contract events -} - -// ChannelCaller is an auto generated read-only Go binding around an Ethereum contract. -type ChannelCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ChannelTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ChannelTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ChannelFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ChannelFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ChannelSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ChannelSession struct { - Contract *Channel // 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 -} - -// ChannelCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ChannelCallerSession struct { - Contract *ChannelCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ChannelTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ChannelTransactorSession struct { - Contract *ChannelTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ChannelRaw is an auto generated low-level Go binding around an Ethereum contract. -type ChannelRaw struct { - Contract *Channel // Generic contract binding to access the raw methods on -} - -// ChannelCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ChannelCallerRaw struct { - Contract *ChannelCaller // Generic read-only contract binding to access the raw methods on -} - -// ChannelTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ChannelTransactorRaw struct { - Contract *ChannelTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewChannel creates a new instance of Channel, bound to a specific deployed contract. -func NewChannel(address common.Address, backend bind.ContractBackend) (*Channel, error) { - contract, err := bindChannel(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Channel{ChannelCaller: ChannelCaller{contract: contract}, ChannelTransactor: ChannelTransactor{contract: contract}, ChannelFilterer: ChannelFilterer{contract: contract}}, nil -} - -// NewChannelCaller creates a new read-only instance of Channel, bound to a specific deployed contract. -func NewChannelCaller(address common.Address, caller bind.ContractCaller) (*ChannelCaller, error) { - contract, err := bindChannel(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ChannelCaller{contract: contract}, nil -} - -// NewChannelTransactor creates a new write-only instance of Channel, bound to a specific deployed contract. -func NewChannelTransactor(address common.Address, transactor bind.ContractTransactor) (*ChannelTransactor, error) { - contract, err := bindChannel(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ChannelTransactor{contract: contract}, nil -} - -// NewChannelFilterer creates a new log filterer instance of Channel, bound to a specific deployed contract. -func NewChannelFilterer(address common.Address, filterer bind.ContractFilterer) (*ChannelFilterer, error) { - contract, err := bindChannel(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ChannelFilterer{contract: contract}, nil -} - -// bindChannel binds a generic wrapper to an already deployed contract. -func bindChannel(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ChannelABI)) - 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 (_Channel *ChannelRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Channel.Contract.ChannelCaller.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 (_Channel *ChannelRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Channel.Contract.ChannelTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Channel *ChannelRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Channel.Contract.ChannelTransactor.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 (_Channel *ChannelCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Channel.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 (_Channel *ChannelTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Channel.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Channel *ChannelTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Channel.Contract.contract.Transact(opts, method, params...) -} - -// ECDSAABI is the input ABI used to generate the binding from. -const ECDSAABI = "[]" - -// ECDSABin is the compiled bytecode used for deploying new contracts. -var ECDSABin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2e519b4a0a3509f02bba1abcf848979252df4c37ba062299b13fdabec46878464736f6c63430007040033" - -// DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it. -func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECDSABin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// ECDSA is an auto generated Go binding around an Ethereum contract. -type ECDSA struct { - ECDSACaller // Read-only binding to the contract - ECDSATransactor // Write-only binding to the contract - ECDSAFilterer // Log filterer for contract events -} - -// ECDSACaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSACaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSAFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSASession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSASession struct { - Contract *ECDSA // 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 -} - -// ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSACallerSession struct { - Contract *ECDSACaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATransactorSession struct { - Contract *ECDSATransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSARaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSARaw struct { - Contract *ECDSA // Generic contract binding to access the raw methods on -} - -// ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSACallerRaw struct { - Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATransactorRaw struct { - Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract. -func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) { - contract, err := bindECDSA(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) { - contract, err := bindECDSA(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSACaller{contract: contract}, nil -} - -// NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) { - contract, err := bindECDSA(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATransactor{contract: contract}, nil -} - -// NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract. -func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) { - contract, err := bindECDSA(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSAFilterer{contract: contract}, nil -} - -// bindECDSA binds a generic wrapper to an already deployed contract. -func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - 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 (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.Contract.ECDSACaller.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 (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.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 (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.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 (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transact(opts, method, params...) -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209d2110f8008a32668165aee96d39b9a3b210868f452685996027830739a87e3064736f6c63430007040033" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // 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 -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// SafeMath64ABI is the input ABI used to generate the binding from. -const SafeMath64ABI = "[]" - -// SafeMath64Bin is the compiled bytecode used for deploying new contracts. -var SafeMath64Bin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220310b4a8b4ea4cdbb2e7e1698831b72107a36001b65a7dc0856b34a952679b6e164736f6c63430007040033" - -// DeploySafeMath64 deploys a new Ethereum contract, binding an instance of SafeMath64 to it. -func DeploySafeMath64(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath64, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMath64ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMath64Bin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath64{SafeMath64Caller: SafeMath64Caller{contract: contract}, SafeMath64Transactor: SafeMath64Transactor{contract: contract}, SafeMath64Filterer: SafeMath64Filterer{contract: contract}}, nil -} - -// SafeMath64 is an auto generated Go binding around an Ethereum contract. -type SafeMath64 struct { - SafeMath64Caller // Read-only binding to the contract - SafeMath64Transactor // Write-only binding to the contract - SafeMath64Filterer // Log filterer for contract events -} - -// SafeMath64Caller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMath64Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMath64Transactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMath64Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMath64Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMath64Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMath64Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMath64Session struct { - Contract *SafeMath64 // 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 -} - -// SafeMath64CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMath64CallerSession struct { - Contract *SafeMath64Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMath64TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMath64TransactorSession struct { - Contract *SafeMath64Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMath64Raw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMath64Raw struct { - Contract *SafeMath64 // Generic contract binding to access the raw methods on -} - -// SafeMath64CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMath64CallerRaw struct { - Contract *SafeMath64Caller // Generic read-only contract binding to access the raw methods on -} - -// SafeMath64TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMath64TransactorRaw struct { - Contract *SafeMath64Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath64 creates a new instance of SafeMath64, bound to a specific deployed contract. -func NewSafeMath64(address common.Address, backend bind.ContractBackend) (*SafeMath64, error) { - contract, err := bindSafeMath64(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath64{SafeMath64Caller: SafeMath64Caller{contract: contract}, SafeMath64Transactor: SafeMath64Transactor{contract: contract}, SafeMath64Filterer: SafeMath64Filterer{contract: contract}}, nil -} - -// NewSafeMath64Caller creates a new read-only instance of SafeMath64, bound to a specific deployed contract. -func NewSafeMath64Caller(address common.Address, caller bind.ContractCaller) (*SafeMath64Caller, error) { - contract, err := bindSafeMath64(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMath64Caller{contract: contract}, nil -} - -// NewSafeMath64Transactor creates a new write-only instance of SafeMath64, bound to a specific deployed contract. -func NewSafeMath64Transactor(address common.Address, transactor bind.ContractTransactor) (*SafeMath64Transactor, error) { - contract, err := bindSafeMath64(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMath64Transactor{contract: contract}, nil -} - -// NewSafeMath64Filterer creates a new log filterer instance of SafeMath64, bound to a specific deployed contract. -func NewSafeMath64Filterer(address common.Address, filterer bind.ContractFilterer) (*SafeMath64Filterer, error) { - contract, err := bindSafeMath64(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMath64Filterer{contract: contract}, nil -} - -// bindSafeMath64 binds a generic wrapper to an already deployed contract. -func bindSafeMath64(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMath64ABI)) - 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 (_SafeMath64 *SafeMath64Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath64.Contract.SafeMath64Caller.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 (_SafeMath64 *SafeMath64Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath64.Contract.SafeMath64Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath64 *SafeMath64Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath64.Contract.SafeMath64Transactor.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 (_SafeMath64 *SafeMath64CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath64.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 (_SafeMath64 *SafeMath64TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath64.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath64 *SafeMath64TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath64.Contract.contract.Transact(opts, method, params...) -} - -// SigABI is the input ABI used to generate the binding from. -const SigABI = "[]" - -// SigBin is the compiled bytecode used for deploying new contracts. -var SigBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c3751b740d506c41c776ad3c92ca113b46a314ff1f98b52d4b23f32eaccf354664736f6c63430007040033" - -// DeploySig deploys a new Ethereum contract, binding an instance of Sig to it. -func DeploySig(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Sig, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SigBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// Sig is an auto generated Go binding around an Ethereum contract. -type Sig struct { - SigCaller // Read-only binding to the contract - SigTransactor // Write-only binding to the contract - SigFilterer // Log filterer for contract events -} - -// SigCaller is an auto generated read-only Go binding around an Ethereum contract. -type SigCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SigTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SigFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SigSession struct { - Contract *Sig // 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 -} - -// SigCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SigCallerSession struct { - Contract *SigCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SigTransactorSession struct { - Contract *SigTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SigRaw is an auto generated low-level Go binding around an Ethereum contract. -type SigRaw struct { - Contract *Sig // Generic contract binding to access the raw methods on -} - -// SigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SigCallerRaw struct { - Contract *SigCaller // Generic read-only contract binding to access the raw methods on -} - -// SigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SigTransactorRaw struct { - Contract *SigTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSig creates a new instance of Sig, bound to a specific deployed contract. -func NewSig(address common.Address, backend bind.ContractBackend) (*Sig, error) { - contract, err := bindSig(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// NewSigCaller creates a new read-only instance of Sig, bound to a specific deployed contract. -func NewSigCaller(address common.Address, caller bind.ContractCaller) (*SigCaller, error) { - contract, err := bindSig(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SigCaller{contract: contract}, nil -} - -// NewSigTransactor creates a new write-only instance of Sig, bound to a specific deployed contract. -func NewSigTransactor(address common.Address, transactor bind.ContractTransactor) (*SigTransactor, error) { - contract, err := bindSig(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SigTransactor{contract: contract}, nil -} - -// NewSigFilterer creates a new log filterer instance of Sig, bound to a specific deployed contract. -func NewSigFilterer(address common.Address, filterer bind.ContractFilterer) (*SigFilterer, error) { - contract, err := bindSig(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SigFilterer{contract: contract}, nil -} - -// bindSig binds a generic wrapper to an already deployed contract. -func bindSig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - 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 (_Sig *SigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.Contract.SigCaller.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 (_Sig *SigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.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 (_Sig *SigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.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 (_Sig *SigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.contract.Transact(opts, method, params...) -} diff --git a/bindings/adjudicator/AdjudicatorBinRuntime.go b/bindings/adjudicator/AdjudicatorBinRuntime.go index 4e9aa66..7cebcc6 100644 --- a/bindings/adjudicator/AdjudicatorBinRuntime.go +++ b/bindings/adjudicator/AdjudicatorBinRuntime.go @@ -1,4 +1,4 @@ package adjudicator // import "github.com/perun-network/perun-eth-backend/bindings/adjudicator" // AdjudicatorBinRuntime is the runtime part of the compiled bytecode used for deploying new contracts. -var AdjudicatorBinRuntime = "608060405234801561001057600080fd5b506004361061007d5760003560e01c806366e7b5641161005b57806366e7b564146100e55780636f68e70e146100f857806397f5a0971461010b578063e30194b71461011e5761007d565b8063023576571461008257806311be1997146100975780631fb910dd146100c5575b600080fd5b610095610090366004612303565b610131565b005b6100aa6100a536600461215c565b6102c5565b6040516100bc96959493929190612e52565b60405180910390f35b6100d86100d3366004612463565b610314565b6040516100bc9190612751565b6100956100f33660046121ae565b61032e565b6100d8610106366004612174565b610430565b610095610119366004612231565b61043b565b61009561012c3660046123b4565b61049e565b610139611a34565b8351610144906104cc565b608081015190915060ff1661018b5780516001600160401b03164210156101865760405162461bcd60e51b815260040161017d90612acc565b60405180910390fd5b6101dc565b608081015160ff16600114156101c45780516001600160401b031642106101865760405162461bcd60e51b815260040161017d9061278f565b60405162461bcd60e51b815260040161017d90612894565b60608601516001600160a01b03166102065760405162461bcd60e51b815260040161017d90612dba565b856040015151831061022a5760405162461bcd60e51b815260040161017d90612a01565b610234868561050f565b61023d85610314565b8160a001511461025f5760405162461bcd60e51b815260040161017d906128eb565b61028961026b8561053b565b838860400151868151811061027c57fe5b6020026020010151610564565b6102a55760405162461bcd60e51b815260040161017d90612817565b6102b18686868661059f565b6102bd86856001610683565b505050505050565b600060208190529081526040902080546001909101546001600160401b0380831692600160401b8104821692600160801b82049092169160ff600160c01b8304811692600160c81b9004169086565b600061031f8261053b565b8051906020012090505b919050565b826080015161034f5760405162461bcd60e51b815260040161017d90612cf1565b608082015115156001146103755760405162461bcd60e51b815260040161017d9061286b565b6040808301510151511561039b5760405162461bcd60e51b815260040161017d90612914565b6103a5838361050f565b6103b0838383610755565b6103b8611a34565b60006103c784600001516107df565b9150915080156103f957608082015160ff16600214156103f95760405162461bcd60e51b815260040161017d90612a67565b61040585856002610683565b61042984600001518560400151600001518760400151876040015160200151610870565b5050505050565b600061031f82610910565b826080015161045c5760405162461bcd60e51b815260040161017d90612cf1565b610466838361050f565b61046f82610923565b606061047d83836000610a0b565b50835160408086015151908701519293506104989284610870565b50505050565b8151608001516104c05760405162461bcd60e51b815260040161017d90612cf1565b61049882826000610cf5565b6104d4611a34565b6104dc611a34565b60006104e7846107df565b91509150806105085760405162461bcd60e51b815260040161017d90612974565b5092915050565b61051882610430565b8151146105375760405162461bcd60e51b815260040161017d90612c6a565b5050565b60608160405160200161054e9190612e3f565b6040516020818303038152906040529050919050565b6000806105778580519060200120610e2a565b905060006105858286610e7b565b6001600160a01b0390811690851614925050509392505050565b82602001516001016001600160401b031682602001516001600160401b0316146105db5760405162461bcd60e51b815260040161017d90612c33565b6080830151156105fd5760405162461bcd60e51b815260040161017d9061299c565b61061583604001518360400151866040015151611068565b6060840151604051630d1feb4f60e01b81526001600160a01b03821690630d1feb4f9061064c908890889088908890600401612df4565b60006040518083038186803b15801561066457600080fd5b505afa158015610678573d6000803e3d6000fd5b505050505050505050565b61068b611a34565b600061069a84600001516107df565b86516001600160401b0390811660208085019190915287015116604083015290925090506106c78561125c565b151560608301528260028111156106da57fe5b60ff1660808301526106eb84610314565b60a083015260808401511561070b576001600160401b0342168252610749565b80158061071f5750608082015160ff166001145b1561074957602082015161073d906001600160401b0342169061126e565b6001600160401b031682525b835161042990836112bd565b60606107608361053b565b90508151846040015151146107875760405162461bcd60e51b815260040161017d90612b5e565b60005b8251811015610429576107bb828483815181106107a357fe5b60200260200101518760400151848151811061027c57fe5b6107d75760405162461bcd60e51b815260040161017d90612817565b60010161078a565b6107e7611a34565b60006107f1611a34565b50505060008181526020818152604091829020825160c08101845281546001600160401b038082168352600160401b8204811694830194909452600160801b81049093169381019390935260ff600160c01b8304811615156060850152600160c81b90920490911660808301526001015460a082018190521515915091565b60005b83518110156104295783818151811061088857fe5b60200260200101516001600160a01b031663fc79a66d86858585815181106108ac57fe5b60200260200101516040518463ffffffff1660e01b81526004016108d29392919061275a565b600060405180830381600087803b1580156108ec57600080fd5b505af1158015610900573d6000803e3d6000fd5b5050600190920191506108739050565b60608160405160200161054e9190612de1565b61092b611a34565b8151610936906104cc565b905061094182610314565b8160a00151146109635760405162461bcd60e51b815260040161017d90612b2f565b608081015160ff166002141561098b5760405162461bcd60e51b815260040161017d90612a67565b608081015160ff161580156109a1575080606001515b156109ce57602081015181516109c2916001600160401b039091169061126e565b6001600160401b031681525b80516001600160401b03164210156109f85760405162461bcd60e51b815260040161017d90612b95565b60026080820152815161053790826112bd565b60606000610a18856113b8565b60408501515180516001600160401b0381118015610a3557600080fd5b50604051908082528060200260200182016040528015610a6957816020015b6060815260200190600190039081610a545790505b50925060005b8151811015610b685760608760400151602001518281518110610a8e57fe5b6020026020010151905080516001600160401b0381118015610aaf57600080fd5b50604051908082528060200260200182016040528015610ad9578160200160208202803683370190505b50858381518110610ae657fe5b602002602001018190525060005b8151811015610b5e578860400151602001518381518110610b1157fe5b60200260200101518181518110610b2457fe5b6020026020010151868481518110610b3857fe5b60200260200101518281518110610b4b57fe5b6020908102919091010152600101610af4565b5050600101610a6f565b50604080870151015184925060005b8151811015610cea57610b88611a69565b828281518110610b9457fe5b60200260200101519050610ba6611a8d565b885160018701968a918110610bb757fe5b602002602001015190508060000151826000015114610be85760405162461bcd60e51b815260040161017d90612cc2565b6060610bf5828b89610a0b565b604085015190985090915060005b8751811015610cd95760005b8251811015610cd0576000848381518110610c2657fe5b60200260200101518281518110610c3957fe5b602002602001015190506000848381518110610c5157fe5b60200260200101519050610c98828e8681518110610c6b57fe5b60200260200101518361ffff1681518110610c8257fe5b60200260200101516113f890919063ffffffff16565b8d8581518110610ca457fe5b60200260200101518261ffff1681518110610cbb57fe5b60209081029190910101525050600101610c0f565b50600101610c03565b505060019093019250610b77915050565b505050935093915050565b606081610d00611ac0565b506020850151604001518051610d1587611459565b610d2282602001516115b5565b9350606082604001519050865181511115610d4f5760405162461bcd60e51b815260040161017d90612c92565b60005b8151811015610e1e57610d63611ae1565b885160018701968a918110610d7457fe5b60200260200101519050610d86611a69565b610d8e611a8d565b848481518110610d9a57fe5b60200260200101518360200151915091508060000151826000015114610dd25760405162461bcd60e51b815260040161017d906128bb565b6060610ddf848d8b610cf5565b604084015151909a50909150610df690889061167d565b610e04836020015182611778565b610e0e8a8261185c565b505060019092019150610d529050565b50505050935093915050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610ed3576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610f445760405162461bcd60e51b8152600401808060200182810382526022815260200180612ef66022913960400191505060405180910390fd5b8060ff16601b14158015610f5c57508060ff16601c14155b15610f985760405162461bcd60e51b8152600401808060200182810382526022815260200180612f186022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610ff4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661105c576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b93505050505b92915050565b816020015151836020015151146110915760405162461bcd60e51b815260040161017d90612d4c565b815151835151146110b45760405162461bcd60e51b815260040161017d906129d1565b6110c6836040015183604001516118aa565b60005b8251518110156104985782518051829081106110e157fe5b60200260200101516001600160a01b03168460000151828151811061110257fe5b60200260200101516001600160a01b0316146111305760405162461bcd60e51b815260040161017d906127e0565b600080838660200151848151811061114457fe5b6020026020010151511461116a5760405162461bcd60e51b815260040161017d90612d83565b838560200151848151811061117b57fe5b602002602001015151146111a15760405162461bcd60e51b815260040161017d90612bfc565b60005b84811015611232576111e9876020015185815181106111bf57fe5b602002602001015182815181106111d257fe5b6020026020010151846113f890919063ffffffff16565b9250611228866020015185815181106111fe57fe5b6020026020010151828151811061121157fe5b6020026020010151836113f890919063ffffffff16565b91506001016111a4565b508082146112525760405162461bcd60e51b815260040161017d90612bc5565b50506001016110c9565b606001516001600160a01b0316151590565b8082016001600160401b038084169082161015611062576040805162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b604482015290519081900360640190fd5b600082815260208181526040918290208351815492850151858501516060870151608088015167ffffffffffffffff199096166001600160401b03808616919091176fffffffffffffffff00000000000000001916600160401b948216949094029390931767ffffffffffffffff60801b1916600160801b938316939093029290921760ff60c01b1916600160c01b921515929092029190911760ff60c81b1916600160c81b60ff86160217835560a0860151600190930192909255925185937f895ef5a5fc3efd313a300b006d6ce97ff0670dfe04f6eea90417edf924fa786b936113ac9392909190612e8f565b60405180910390a25050565b6113c0611a34565b81516113cb906104cc565b90506113d682610314565b8160a00151146109f85760405162461bcd60e51b815260040161017d90612b2f565b600082820183811015611452576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b611461611b0e565b611469611a8d565b50508051602082015161147c828261050f565b61148b82828560400151610755565b8160a00151156114e15761149e8261125c565b156114bb5760405162461bcd60e51b815260040161017d906127b7565b604080820151015151156114e15760405162461bcd60e51b815260040161017d90612a30565b6114e9611a34565b60006114f883600001516107df565b9150915080156115a65761150b83610314565b8260a00151141561151f57505050506115b2565b82602001516001600160401b031682604001516001600160401b0316106115585760405162461bcd60e51b815260040161017d90612842565b608082015160ff161561157d5760405162461bcd60e51b815260040161017d9061294b565b81516001600160401b031642106115a65760405162461bcd60e51b815260040161017d90612af8565b61042984846000610683565b50565b606081516001600160401b03811180156115ce57600080fd5b506040519080825280602002602001820160405280156115f8578160200160208202803683370190505b50905060005b825181101561167757606083828151811061161557fe5b6020026020010151905060005b815181101561166d5761164e82828151811061163a57fe5b6020026020010151858581518110610c8257fe5b84848151811061165a57fe5b6020908102919091010152600101611622565b50506001016115fe565b50919050565b80518251146116d3576040805162461bcd60e51b815260206004820152601960248201527f616464726573735b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b8251811015611773578181815181106116eb57fe5b60200260200101516001600160a01b031683828151811061170857fe5b60200260200101516001600160a01b03161461176b576040805162461bcd60e51b815260206004820152601760248201527f616464726573735b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b6001016116d6565b505050565b80518251146117ce576040805162461bcd60e51b815260206004820152601960248201527f75696e743235365b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b8251811015611773578181815181106117e657fe5b60200260200101518382815181106117fa57fe5b602002602001015114611854576040805162461bcd60e51b815260206004820152601760248201527f75696e743235365b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b6001016117d1565b60005b82518110156117735761188b82828151811061187757fe5b6020026020010151848381518110610c8257fe5b83828151811061189757fe5b602090810291909101015260010161185f565b80518251146118cb5760405162461bcd60e51b815260040161017d90612d15565b60005b8251811015611773576119078382815181106118e657fe5b60200260200101518383815181106118fa57fe5b602002602001015161190f565b6001016118ce565b80518251146119305760405162461bcd60e51b815260040161017d90612a9e565b61194282602001518260200151611778565b6105378260400151826040015180518251146119a5576040805162461bcd60e51b815260206004820152601860248201527f75696e7431365b5d3a20756e657175616c206c656e6774680000000000000000604482015290519081900360640190fd5b60005b8251811015611773578181815181106119bd57fe5b602002602001015161ffff168382815181106119d557fe5b602002602001015161ffff1614611a2c576040805162461bcd60e51b815260206004820152601660248201527575696e7431365b5d3a20756e657175616c206974656d60501b604482015290519081900360640190fd5b6001016119a8565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b60405180606001604052806000801916815260200160608152602001606081525090565b6040805160a08101825260008082526020820152908101611aac611ac0565b815260606020820152600060409091015290565b60405180606001604052806060815260200160608152602001606081525090565b6040518060600160405280611af4611b0e565b8152602001611b01611a8d565b8152602001606081525090565b6040518060c0016040528060008152602001600081526020016060815260200160006001600160a01b031681526020016000151581526020016000151581525090565b80356001600160a01b038116811461032957600080fd5b600082601f830112611b78578081fd5b8135611b8b611b8682612ed8565b612eb5565b818152915060208083019084810181840286018201871015611bac57600080fd5b60005b84811015611bd257611bc082611b51565b84529282019290820190600101611baf565b505050505092915050565b600082601f830112611bed578081fd5b8135611bfb611b8682612ed8565b818152915060208083019084810160005b84811015611bd257611c23888484358a0101611dde565b84529282019290820190600101611c0c565b600082601f830112611c45578081fd5b8135611c53611b8682612ed8565b818152915060208083019084810160005b84811015611bd257611c7b888484358a0101611e4c565b84529282019290820190600101611c64565b600082601f830112611c9d578081fd5b8135611cab611b8682612ed8565b818152915060208083019084810160005b84811015611bd25781358701606080601f19838c03011215611cdd57600080fd5b604080518281016001600160401b038282108183111715611cfa57fe5b908352848801358252848301359080821115611d1557600080fd5b611d238e8a84890101611dde565b838a0152938501359380851115611d3957600080fd5b5050611d498c8885870101611d64565b91810191909152865250509282019290820190600101611cbc565b600082601f830112611d74578081fd5b8135611d82611b8682612ed8565b818152915060208083019084810181840286018201871015611da357600080fd5b6000805b85811015611dd257823561ffff81168114611dc0578283fd5b85529383019391830191600101611da7565b50505050505092915050565b600082601f830112611dee578081fd5b8135611dfc611b8682612ed8565b818152915060208083019084810181840286018201871015611e1d57600080fd5b60005b84811015611bd257813584529282019290820190600101611e20565b8035801515811461032957600080fd5b600082601f830112611e5c578081fd5b81356001600160401b03811115611e6f57fe5b611e82601f8201601f1916602001612eb5565b9150808252836020828501011115611e9957600080fd5b8060208401602084013760009082016020015292915050565b600060608284031215611ec3578081fd5b604051606081016001600160401b038282108183111715611ee057fe5b816040528293508435915080821115611ef857600080fd5b611f0486838701611b68565b83526020850135915080821115611f1a57600080fd5b611f2686838701611bdd565b60208401526040850135915080821115611f3f57600080fd5b50611f4c85828601611c8d565b6040830152505092915050565b600060c08284031215611f6a578081fd5b60405160c081016001600160401b038282108183111715611f8757fe5b8160405282935084358352602085013560208401526040850135915080821115611fb057600080fd5b50611fbd85828601611b68565b604083015250611fcf60608401611b51565b6060820152611fe060808401611e3c565b6080820152611ff160a08401611e3c565b60a08201525092915050565b60006060828403121561200e578081fd5b604051606081016001600160401b03828210818311171561202b57fe5b81604052829350843591508082111561204357600080fd5b61204f86838701611f59565b8352602085013591508082111561206557600080fd5b61207186838701612097565b6020840152604085013591508082111561208a57600080fd5b50611f4c85828601611c35565b600060a082840312156120a8578081fd5b60405160a081016001600160401b0382821081831117156120c557fe5b81604052829350843583526120dc60208601612145565b602084015260408501359150808211156120f557600080fd5b61210186838701611eb2565b6040840152606085013591508082111561211a57600080fd5b5061212785828601611e4c565b60608301525061213960808401611e3c565b60808201525092915050565b80356001600160401b038116811461032957600080fd5b60006020828403121561216d578081fd5b5035919050565b600060208284031215612185578081fd5b81356001600160401b0381111561219a578182fd5b6121a684828501611f59565b949350505050565b6000806000606084860312156121c2578182fd5b83356001600160401b03808211156121d8578384fd5b6121e487838801611f59565b945060208601359150808211156121f9578384fd5b61220587838801612097565b9350604086013591508082111561221a578283fd5b5061222786828701611c35565b9150509250925092565b600080600060608486031215612245578081fd5b83356001600160401b038082111561225b578283fd5b61226787838801611f59565b945060209150818601358181111561227d578384fd5b61228988828901612097565b94505060408601358181111561229d578384fd5b86019050601f810187136122af578283fd5b80356122bd611b8682612ed8565b81815283810190838501865b848110156122f2576122e08c888435890101612097565b845292860192908601906001016122c9565b505080955050505050509250925092565b600080600080600060a0868803121561231a578283fd5b85356001600160401b0380821115612330578485fd5b61233c89838a01611f59565b96506020880135915080821115612351578485fd5b61235d89838a01612097565b95506040880135915080821115612372578485fd5b61237e89838a01612097565b945060608801359350608088013591508082111561239a578283fd5b506123a788828901611e4c565b9150509295509295909350565b600080604083850312156123c6578182fd5b82356001600160401b03808211156123dc578384fd5b6123e886838701611ffd565b93506020915081850135818111156123fe578384fd5b85019050601f81018613612410578283fd5b803561241e611b8682612ed8565b81815283810190838501865b84811015612453576124418b888435890101611ffd565b8452928601929086019060010161242a565b5096999098509650505050505050565b600060208284031215612474578081fd5b81356001600160401b03811115612489578182fd5b6121a684828501612097565b6000815180845260208085019450808401835b838110156124cd5781516001600160a01b0316875295820195908201906001016124a8565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612579578284038952815160608151865286820151818888015261251e82880182612586565b604093840151888203948901949094528351808252938901938b935090890191505b8083101561256457835161ffff168252928801926001929092019190880190612540565b509a87019a95505050908401906001016124f4565b5091979650505050505050565b6000815180845260208085019450808401835b838110156124cd57815187529582019590820190600101612599565b15159052565b60008151808452815b818110156125e0576020818501810151868301820152016125c4565b818111156125f15782602083870101525b50601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160c0604085015261262f60c0850182612495565b6060848101516001600160a01b03169086015260808085015115159086015260a0938401511515949093019390935250919050565b60008151835260206001600160401b03818401511681850152604083015160a060408601528051606060a08701526126a0610100870182612495565b83830151609f19888303810160c08a01528151808452929350908501918386019080870285018701885b828110156126f857601f198783030184526126e6828751612586565b958901959389019391506001016126ca565b5060408701519750838b82030160e08c015261271481896124d8565b9750505050505050506060830151848203606086015261273482826125bb565b915050608083015161274960808601826125b5565b509392505050565b90815260200190565b6000848252606060208301526127736060830185612495565b82810360408401526127858185612586565b9695505050505050565b6020808252600e908201526d1d1a5b595bdd5d081c185cdcd95960921b604082015260600190565b6020808252600f908201526e063616e6e6f7420686176652061707608c1b604082015260600190565b6020808252601a908201527f6173736574735b695d2061646472657373206d69736d61746368000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b6020808252600f908201526e34b73b30b634b2103b32b939b4b7b760891b604082015260600190565b6020808252600f908201526e1cdd185d19481b9bdd08199a5b985b608a1b604082015260600190565b6020808252600d908201526c696e76616c696420706861736560981b604082015260600190565b6020808252601690820152751a5b9d985b1a59081cdd588b58da185b9b995b081a5960521b604082015260600190565b6020808252600f908201526e77726f6e67206f6c6420737461746560881b604082015260600190565b60208082526018908201527f63616e6e6f742068617665207375622d6368616e6e656c730000000000000000604082015260600190565b6020808252600f908201526e696e636f727265637420706861736560881b604082015260600190565b6020808252600e908201526d1b9bdd081c9959da5cdd195c995960921b604082015260600190565b6020808252818101527f63616e6e6f742070726f67726573732066726f6d2066696e616c207374617465604082015260600190565b6020808252601690820152750c2e6e6cae8e640d8cadccee8d040dad2e6dac2e8c6d60531b604082015260600190565b6020808252601590820152746163746f72496478206f7574206f662072616e676560581b604082015260600190565b60208082526018908201527f63616e6e6f742068617665206c6f636b65642066756e64730000000000000000604082015260600190565b60208082526019908201527f6368616e6e656c20616c726561647920636f6e636c7564656400000000000000604082015260600190565b60208082526014908201527314dd58905b1b1bd8ce881d5b995c5d585b08125160621b604082015260600190565b6020808252601290820152711d1a5b595bdd5d081b9bdd081c185cdcd95960721b604082015260600190565b60208082526019908201527f72656675746174696f6e2074696d656f75742070617373656400000000000000604082015260600190565b602080825260159082015274696e76616c6964206368616e6e656c20737461746560581b604082015260600190565b6020808252601a908201527f7369676e617475726573206c656e677468206d69736d61746368000000000000604082015260600190565b6020808252601690820152751d1a5b595bdd5d081b9bdd081c185cdcd959081e595d60521b604082015260600190565b60208082526018908201527f73756d206f662062616c616e636573206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6e65772062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252601d908201527f76657273696f6e206d75737420696e6372656d656e74206279206f6e65000000604082015260600190565b6020808252600e908201526d696e76616c696420706172616d7360901b604082015260600190565b6020808252601690820152751cdd5890da185b9b995b1cce881d1bdbc81cda1bdc9d60521b604082015260600190565b6020808252601590820152741a5b9d985b1a59081cdd5898da185b9b995b081a59605a1b604082015260600190565b6020808252600a90820152693737ba103632b233b2b960b11b604082015260600190565b6020808252601a908201527f537562416c6c6f635b5d3a20756e657175616c206c656e677468000000000000604082015260600190565b60208082526018908201527f62616c616e636573206c656e677468206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6f6c642062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252600d908201526c06d75737420686176652061707609c1b604082015260600190565b6000602082526114526020830184612606565b600060808252612e076080830187612606565b8281036020840152612e198187612664565b90508281036040840152612e2d8186612664565b91505082606083015295945050505050565b6000602082526114526020830184612664565b6001600160401b03968716815294861660208601529290941660408401521515606083015260ff909216608082015260a081019190915260c00190565b6001600160401b03938416815260ff929092166020830152909116604082015260600190565b6040518181016001600160401b0381118282101715612ed057fe5b604052919050565b60006001600160401b03821115612eeb57fe5b506020908102019056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220c3d4f7b4b23cab2f6b0a9d01f232c08dab5309387a689da9c2a306ba54fbc93964736f6c63430007040033" +var AdjudicatorBinRuntime = "608060405234801561001057600080fd5b506004361061007d5760003560e01c806366e7b5641161005b57806366e7b564146100e55780636f68e70e146100f857806397f5a0971461010b578063e30194b71461011e5761007d565b8063023576571461008257806311be1997146100975780631fb910dd146100c5575b600080fd5b61009561009036600461218c565b610131565b005b6100aa6100a5366004611fe5565b6102c1565b6040516100bc96959493929190612cdb565b60405180910390f35b6100d86100d33660046122ec565b610310565b6040516100bc91906125da565b6100956100f3366004612037565b61032a565b6100d8610106366004611ffd565b610425565b6100956101193660046120ba565b610430565b61009561012c36600461223d565b610493565b600061014084600001516104c1565b608081015190915060ff166101875780516001600160401b03164210156101825760405162461bcd60e51b815260040161017990612955565b60405180910390fd5b6101d8565b608081015160ff16600114156101c05780516001600160401b031642106101825760405162461bcd60e51b815260040161017990612618565b60405162461bcd60e51b81526004016101799061271d565b60608601516001600160a01b03166102025760405162461bcd60e51b815260040161017990612c43565b85604001515183106102265760405162461bcd60e51b81526004016101799061288a565b61023086856104fd565b61023985610310565b8160a001511461025b5760405162461bcd60e51b815260040161017990612774565b61028561026785610529565b838860400151868151811061027857fe5b6020026020010151610552565b6102a15760405162461bcd60e51b8152600401610179906126a0565b6102ad8686868661058d565b6102b986856001610671565b505050505050565b600060208190529081526040902080546001909101546001600160401b0380831692600160401b8104821692600160801b82049092169160ff600160c01b8304811692600160c81b9004169086565b600061031b82610529565b8051906020012090505b919050565b826080015161034b5760405162461bcd60e51b815260040161017990612b7a565b608082015115156001146103715760405162461bcd60e51b8152600401610179906126f4565b604080830151015151156103975760405162461bcd60e51b81526004016101799061279d565b6103a183836104fd565b6103ac83838361073c565b6000806103bc84600001516107c6565b9150915080156103ee57608082015160ff16600214156103ee5760405162461bcd60e51b8152600401610179906128f0565b6103fa85856002610671565b61041e8460000151856040015160000151876040015187604001516020015161084b565b5050505050565b600061031b826108eb565b82608001516104515760405162461bcd60e51b815260040161017990612b7a565b61045b83836104fd565b610464826108fe565b6000610472838360006109e2565b508351604080860151519087015192935061048d928461084b565b50505050565b8151608001516104b55760405162461bcd60e51b815260040161017990612b7a565b61048d82826000610cc1565b6104c96119ca565b6000806104d5846107c6565b91509150806104f65760405162461bcd60e51b8152600401610179906127fd565b5092915050565b61050682610425565b8151146105255760405162461bcd60e51b815260040161017990612af3565b5050565b60608160405160200161053c9190612cc8565b6040516020818303038152906040529050919050565b6000806105658580519060200120610ddd565b905060006105738286610e2e565b6001600160a01b0390811690851614925050509392505050565b82602001516001016001600160401b031682602001516001600160401b0316146105c95760405162461bcd60e51b815260040161017990612abc565b6080830151156105eb5760405162461bcd60e51b815260040161017990612825565b6106038360400151836040015186604001515161101b565b6060840151604051630d1feb4f60e01b81526001600160a01b03821690630d1feb4f9061063a908890889088908890600401612c7d565b60006040518083038186803b15801561065257600080fd5b505afa158015610666573d6000803e3d6000fd5b505050505050505050565b60008061068184600001516107c6565b86516001600160401b0390811660208085019190915287015116604083015290925090506106ae8561120f565b151560608301528260028111156106c157fe5b60ff1660808301526106d284610310565b60a08301526080840151156106f2576001600160401b0342168252610730565b8015806107065750608082015160ff166001145b15610730576020820151610724906001600160401b03421690611221565b6001600160401b031682525b835161041e9083611270565b600061074783610529565b905081518460400151511461076e5760405162461bcd60e51b8152600401610179906129e7565b60005b825181101561041e576107a28284838151811061078a57fe5b60200260200101518760400151848151811061027857fe5b6107be5760405162461bcd60e51b8152600401610179906126a0565b600101610771565b6107ce6119ca565b5060008181526020818152604091829020825160c08101845281546001600160401b038082168352600160401b8204811694830194909452600160801b81049093169381019390935260ff600160c01b8304811615156060850152600160c81b90920490911660808301526001015460a082018190521515915091565b60005b835181101561041e5783818151811061086357fe5b60200260200101516001600160a01b031663fc79a66d868585858151811061088757fe5b60200260200101516040518463ffffffff1660e01b81526004016108ad939291906125e3565b600060405180830381600087803b1580156108c757600080fd5b505af11580156108db573d6000803e3d6000fd5b50506001909201915061084e9050565b60608160405160200161053c9190612c6a565b600061090d82600001516104c1565b905061091882610310565b8160a001511461093a5760405162461bcd60e51b8152600401610179906129b8565b608081015160ff16600214156109625760405162461bcd60e51b8152600401610179906128f0565b608081015160ff16158015610978575080606001515b156109a55760208101518151610999916001600160401b0390911690611221565b6001600160401b031681525b80516001600160401b03164210156109cf5760405162461bcd60e51b815260040161017990612a1e565b6002608082015281516105259082611270565b606060006109ef8561136b565b60408501515180516001600160401b0381118015610a0c57600080fd5b50604051908082528060200260200182016040528015610a4057816020015b6060815260200190600190039081610a2b5790505b50925060005b8151811015610b3f5760008760400151602001518281518110610a6557fe5b6020026020010151905080516001600160401b0381118015610a8657600080fd5b50604051908082528060200260200182016040528015610ab0578160200160208202803683370190505b50858381518110610abd57fe5b602002602001018190525060005b8151811015610b35578860400151602001518381518110610ae857fe5b60200260200101518181518110610afb57fe5b6020026020010151868481518110610b0f57fe5b60200260200101518281518110610b2257fe5b6020908102919091010152600101610acb565b5050600101610a46565b50604080870151015184925060005b8151811015610cb6576000828281518110610b6557fe5b602002602001015190506000888680600101975081518110610b8357fe5b602002602001015190508060000151826000015114610bb45760405162461bcd60e51b815260040161017990612b4b565b6060610bc1828b896109e2565b604085015190985090915060005b8751811015610ca55760005b8251811015610c9c576000848381518110610bf257fe5b60200260200101518281518110610c0557fe5b602002602001015190506000848381518110610c1d57fe5b60200260200101519050610c64828e8681518110610c3757fe5b60200260200101518361ffff1681518110610c4e57fe5b60200260200101516113a790919063ffffffff16565b8d8581518110610c7057fe5b60200260200101518261ffff1681518110610c8757fe5b60209081029190910101525050600101610bdb565b50600101610bcf565b505060019093019250610b4e915050565b505050935093915050565b60208301516040015180516060918391610cda87611408565b610ce7826020015161154b565b9350600082604001519050865181511115610d145760405162461bcd60e51b815260040161017990612b1b565b60005b8151811015610dd1576000888680600101975081518110610d3457fe5b60200260200101519050600080848481518110610d4d57fe5b60200260200101518360200151915091508060000151826000015114610d855760405162461bcd60e51b815260040161017990612744565b6060610d92848d8b610cc1565b604084015151909a50909150610da9908890611613565b610db783602001518261170e565b610dc18a826117f2565b505060019092019150610d179050565b50505050935093915050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610e86576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610ef75760405162461bcd60e51b8152600401808060200182810382526022815260200180612d7f6022913960400191505060405180910390fd5b8060ff16601b14158015610f0f57508060ff16601c14155b15610f4b5760405162461bcd60e51b8152600401808060200182810382526022815260200180612da16022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610fa7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661100f576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b93505050505b92915050565b816020015151836020015151146110445760405162461bcd60e51b815260040161017990612bd5565b815151835151146110675760405162461bcd60e51b81526004016101799061285a565b61107983604001518360400151611840565b60005b82515181101561048d57825180518290811061109457fe5b60200260200101516001600160a01b0316846000015182815181106110b557fe5b60200260200101516001600160a01b0316146110e35760405162461bcd60e51b815260040161017990612669565b60008083866020015184815181106110f757fe5b6020026020010151511461111d5760405162461bcd60e51b815260040161017990612c0c565b838560200151848151811061112e57fe5b602002602001015151146111545760405162461bcd60e51b815260040161017990612a85565b60005b848110156111e55761119c8760200151858151811061117257fe5b6020026020010151828151811061118557fe5b6020026020010151846113a790919063ffffffff16565b92506111db866020015185815181106111b157fe5b602002602001015182815181106111c457fe5b6020026020010151836113a790919063ffffffff16565b9150600101611157565b508082146112055760405162461bcd60e51b815260040161017990612a4e565b505060010161107c565b606001516001600160a01b0316151590565b8082016001600160401b038084169082161015611015576040805162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b604482015290519081900360640190fd5b600082815260208181526040918290208351815492850151858501516060870151608088015167ffffffffffffffff199096166001600160401b03808616919091176fffffffffffffffff00000000000000001916600160401b948216949094029390931767ffffffffffffffff60801b1916600160801b938316939093029290921760ff60c01b1916600160c01b921515929092029190911760ff60c81b1916600160c81b60ff86160217835560a0860151600190930192909255925185937f895ef5a5fc3efd313a300b006d6ce97ff0670dfe04f6eea90417edf924fa786b9361135f9392909190612d18565b60405180910390a25050565b600061137a82600001516104c1565b905061138582610310565b8160a00151146109cf5760405162461bcd60e51b8152600401610179906129b8565b600082820183811015611401576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b8051602082015161141982826104fd565b6114288282856040015161073c565b8160a001511561147e5761143b8261120f565b156114585760405162461bcd60e51b815260040161017990612640565b6040808201510151511561147e5760405162461bcd60e51b8152600401610179906128b9565b60008061148e83600001516107c6565b91509150801561153c576114a183610310565b8260a0015114156114b55750505050611548565b82602001516001600160401b031682604001516001600160401b0316106114ee5760405162461bcd60e51b8152600401610179906126cb565b608082015160ff16156115135760405162461bcd60e51b8152600401610179906127d4565b81516001600160401b0316421061153c5760405162461bcd60e51b815260040161017990612981565b61041e84846000610671565b50565b606081516001600160401b038111801561156457600080fd5b5060405190808252806020026020018201604052801561158e578160200160208202803683370190505b50905060005b825181101561160d5760008382815181106115ab57fe5b6020026020010151905060005b8151811015611603576115e48282815181106115d057fe5b6020026020010151858581518110610c4e57fe5b8484815181106115f057fe5b60209081029190910101526001016115b8565b5050600101611594565b50919050565b8051825114611669576040805162461bcd60e51b815260206004820152601960248201527f616464726573735b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b82518110156117095781818151811061168157fe5b60200260200101516001600160a01b031683828151811061169e57fe5b60200260200101516001600160a01b031614611701576040805162461bcd60e51b815260206004820152601760248201527f616464726573735b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b60010161166c565b505050565b8051825114611764576040805162461bcd60e51b815260206004820152601960248201527f75696e743235365b5d3a20756e657175616c206c656e67746800000000000000604482015290519081900360640190fd5b60005b82518110156117095781818151811061177c57fe5b602002602001015183828151811061179057fe5b6020026020010151146117ea576040805162461bcd60e51b815260206004820152601760248201527f75696e743235365b5d3a20756e657175616c206974656d000000000000000000604482015290519081900360640190fd5b600101611767565b60005b82518110156117095761182182828151811061180d57fe5b6020026020010151848381518110610c4e57fe5b83828151811061182d57fe5b60209081029190910101526001016117f5565b80518251146118615760405162461bcd60e51b815260040161017990612b9e565b60005b82518110156117095761189d83828151811061187c57fe5b602002602001015183838151811061189057fe5b60200260200101516118a5565b600101611864565b80518251146118c65760405162461bcd60e51b815260040161017990612927565b6118d88260200151826020015161170e565b61052582604001518260400151805182511461193b576040805162461bcd60e51b815260206004820152601860248201527f75696e7431365b5d3a20756e657175616c206c656e6774680000000000000000604482015290519081900360640190fd5b60005b82518110156117095781818151811061195357fe5b602002602001015161ffff1683828151811061196b57fe5b602002602001015161ffff16146119c2576040805162461bcd60e51b815260206004820152601660248201527575696e7431365b5d3a20756e657175616c206974656d60501b604482015290519081900360640190fd5b60010161193e565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915290565b80356001600160a01b038116811461032557600080fd5b600082601f830112611a26578081fd5b81356020611a3b611a3683612d61565b612d3e565b8281528181019085830183850287018401881015611a57578586fd5b855b85811015611a7c57611a6a826119ff565b84529284019290840190600101611a59565b5090979650505050505050565b600082601f830112611a99578081fd5b81356020611aa9611a3683612d61565b82815281810190858301855b85811015611a7c57611acc898684358b0101611c6d565b84529284019290840190600101611ab5565b600082601f830112611aee578081fd5b81356020611afe611a3683612d61565b82815281810190858301855b85811015611a7c57611b21898684358b0101611cd7565b84529284019290840190600101611b0a565b600082601f830112611b43578081fd5b81356020611b53611a3683612d61565b82815281810190858301855b85811015611a7c5781358801606080601f19838d03011215611b7f578889fd5b604080518281016001600160401b038282108183111715611b9c57fe5b908352848a01358252848301359080821115611bb6578c8dfd5b611bc48f8c84890101611c6d565b838c0152938501359380851115611bd9578c8dfd5b5050611be98d8a85870101611c04565b91810191909152865250509284019290840190600101611b5f565b600082601f830112611c14578081fd5b81356020611c24611a3683612d61565b8281528181019085830183850287018401881015611c40578586fd5b855b85811015611a7c57813561ffff81168114611c5b578788fd5b84529284019290840190600101611c42565b600082601f830112611c7d578081fd5b81356020611c8d611a3683612d61565b8281528181019085830183850287018401881015611ca9578586fd5b855b85811015611a7c57813584529284019290840190600101611cab565b8035801515811461032557600080fd5b600082601f830112611ce7578081fd5b81356001600160401b03811115611cfa57fe5b611d0d601f8201601f1916602001612d3e565b818152846020838601011115611d21578283fd5b816020850160208301379081016020019190915292915050565b600060608284031215611d4c578081fd5b604051606081016001600160401b038282108183111715611d6957fe5b816040528293508435915080821115611d8157600080fd5b611d8d86838701611a16565b83526020850135915080821115611da357600080fd5b611daf86838701611a89565b60208401526040850135915080821115611dc857600080fd5b50611dd585828601611b33565b6040830152505092915050565b600060c08284031215611df3578081fd5b60405160c081016001600160401b038282108183111715611e1057fe5b8160405282935084358352602085013560208401526040850135915080821115611e3957600080fd5b50611e4685828601611a16565b604083015250611e58606084016119ff565b6060820152611e6960808401611cc7565b6080820152611e7a60a08401611cc7565b60a08201525092915050565b600060608284031215611e97578081fd5b604051606081016001600160401b038282108183111715611eb457fe5b816040528293508435915080821115611ecc57600080fd5b611ed886838701611de2565b83526020850135915080821115611eee57600080fd5b611efa86838701611f20565b60208401526040850135915080821115611f1357600080fd5b50611dd585828601611ade565b600060a08284031215611f31578081fd5b60405160a081016001600160401b038282108183111715611f4e57fe5b8160405282935084358352611f6560208601611fce565b60208401526040850135915080821115611f7e57600080fd5b611f8a86838701611d3b565b60408401526060850135915080821115611fa357600080fd5b50611fb085828601611cd7565b606083015250611fc260808401611cc7565b60808201525092915050565b80356001600160401b038116811461032557600080fd5b600060208284031215611ff6578081fd5b5035919050565b60006020828403121561200e578081fd5b81356001600160401b03811115612023578182fd5b61202f84828501611de2565b949350505050565b60008060006060848603121561204b578182fd5b83356001600160401b0380821115612061578384fd5b61206d87838801611de2565b94506020860135915080821115612082578384fd5b61208e87838801611f20565b935060408601359150808211156120a3578283fd5b506120b086828701611ade565b9150509250925092565b6000806000606084860312156120ce578081fd5b83356001600160401b03808211156120e4578283fd5b6120f087838801611de2565b9450602091508186013581811115612106578384fd5b61211288828901611f20565b945050604086013581811115612126578384fd5b86019050601f81018713612138578283fd5b8035612146611a3682612d61565b81815283810190838501865b8481101561217b576121698c888435890101611f20565b84529286019290860190600101612152565b505080955050505050509250925092565b600080600080600060a086880312156121a3578283fd5b85356001600160401b03808211156121b9578485fd5b6121c589838a01611de2565b965060208801359150808211156121da578485fd5b6121e689838a01611f20565b955060408801359150808211156121fb578485fd5b61220789838a01611f20565b9450606088013593506080880135915080821115612223578283fd5b5061223088828901611cd7565b9150509295509295909350565b6000806040838503121561224f578182fd5b82356001600160401b0380821115612265578384fd5b61227186838701611e86565b9350602091508185013581811115612287578384fd5b85019050601f81018613612299578283fd5b80356122a7611a3682612d61565b81815283810190838501865b848110156122dc576122ca8b888435890101611e86565b845292860192908601906001016122b3565b5096999098509650505050505050565b6000602082840312156122fd578081fd5b81356001600160401b03811115612312578182fd5b61202f84828501611f20565b6000815180845260208085019450808401835b838110156123565781516001600160a01b031687529582019590820190600101612331565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b8581101561240257828403895281516060815186528682015181888801526123a78288018261240f565b604093840151888203948901949094528351808252938901938b935090890191505b808310156123ed57835161ffff1682529288019260019290920191908801906123c9565b509a87019a955050509084019060010161237d565b5091979650505050505050565b6000815180845260208085019450808401835b8381101561235657815187529582019590820190600101612422565b15159052565b60008151808452815b818110156124695760208185018101518683018201520161244d565b8181111561247a5782602083870101525b50601f01601f19169290920160200192915050565b60008151835260208201516020840152604082015160c060408501526124b860c085018261231e565b6060848101516001600160a01b03169086015260808085015115159086015260a0938401511515949093019390935250919050565b60008151835260206001600160401b03818401511681850152604083015160a060408601528051606060a087015261252961010087018261231e565b83830151609f19888303810160c08a01528151808452929350908501918386019080870285018701885b8281101561258157601f1987830301845261256f82875161240f565b95890195938901939150600101612553565b5060408701519750838b82030160e08c015261259d8189612361565b975050505050505050606083015184820360608601526125bd8282612444565b91505060808301516125d2608086018261243e565b509392505050565b90815260200190565b6000848252606060208301526125fc606083018561231e565b828103604084015261260e818561240f565b9695505050505050565b6020808252600e908201526d1d1a5b595bdd5d081c185cdcd95960921b604082015260600190565b6020808252600f908201526e063616e6e6f7420686176652061707608c1b604082015260600190565b6020808252601a908201527f6173736574735b695d2061646472657373206d69736d61746368000000000000604082015260600190565b602080825260119082015270696e76616c6964207369676e617475726560781b604082015260600190565b6020808252600f908201526e34b73b30b634b2103b32b939b4b7b760891b604082015260600190565b6020808252600f908201526e1cdd185d19481b9bdd08199a5b985b608a1b604082015260600190565b6020808252600d908201526c696e76616c696420706861736560981b604082015260600190565b6020808252601690820152751a5b9d985b1a59081cdd588b58da185b9b995b081a5960521b604082015260600190565b6020808252600f908201526e77726f6e67206f6c6420737461746560881b604082015260600190565b60208082526018908201527f63616e6e6f742068617665207375622d6368616e6e656c730000000000000000604082015260600190565b6020808252600f908201526e696e636f727265637420706861736560881b604082015260600190565b6020808252600e908201526d1b9bdd081c9959da5cdd195c995960921b604082015260600190565b6020808252818101527f63616e6e6f742070726f67726573732066726f6d2066696e616c207374617465604082015260600190565b6020808252601690820152750c2e6e6cae8e640d8cadccee8d040dad2e6dac2e8c6d60531b604082015260600190565b6020808252601590820152746163746f72496478206f7574206f662072616e676560581b604082015260600190565b60208082526018908201527f63616e6e6f742068617665206c6f636b65642066756e64730000000000000000604082015260600190565b60208082526019908201527f6368616e6e656c20616c726561647920636f6e636c7564656400000000000000604082015260600190565b60208082526014908201527314dd58905b1b1bd8ce881d5b995c5d585b08125160621b604082015260600190565b6020808252601290820152711d1a5b595bdd5d081b9bdd081c185cdcd95960721b604082015260600190565b60208082526019908201527f72656675746174696f6e2074696d656f75742070617373656400000000000000604082015260600190565b602080825260159082015274696e76616c6964206368616e6e656c20737461746560581b604082015260600190565b6020808252601a908201527f7369676e617475726573206c656e677468206d69736d61746368000000000000604082015260600190565b6020808252601690820152751d1a5b595bdd5d081b9bdd081c185cdcd959081e595d60521b604082015260600190565b60208082526018908201527f73756d206f662062616c616e636573206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6e65772062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252601d908201527f76657273696f6e206d75737420696e6372656d656e74206279206f6e65000000604082015260600190565b6020808252600e908201526d696e76616c696420706172616d7360901b604082015260600190565b6020808252601690820152751cdd5890da185b9b995b1cce881d1bdbc81cda1bdc9d60521b604082015260600190565b6020808252601590820152741a5b9d985b1a59081cdd5898da185b9b995b081a59605a1b604082015260600190565b6020808252600a90820152693737ba103632b233b2b960b11b604082015260600190565b6020808252601a908201527f537562416c6c6f635b5d3a20756e657175616c206c656e677468000000000000604082015260600190565b60208082526018908201527f62616c616e636573206c656e677468206d69736d617463680000000000000000604082015260600190565b6020808252601c908201527f6f6c642062616c616e636573206c656e677468206d69736d6174636800000000604082015260600190565b6020808252600d908201526c06d75737420686176652061707609c1b604082015260600190565b600060208252611401602083018461248f565b600060808252612c90608083018761248f565b8281036020840152612ca281876124ed565b90508281036040840152612cb681866124ed565b91505082606083015295945050505050565b60006020825261140160208301846124ed565b6001600160401b03968716815294861660208601529290941660408401521515606083015260ff909216608082015260a081019190915260c00190565b6001600160401b03938416815260ff929092166020830152909116604082015260600190565b6040518181016001600160401b0381118282101715612d5957fe5b604052919050565b60006001600160401b03821115612d7457fe5b506020908102019056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220519fed9a039fb9fc79626da8b4615c9cdc1f2f3adf207a1b8cc7dec9b5fe3a9664736f6c63430007060033" diff --git a/bindings/assetholder/AssetHolder.go b/bindings/assetholder/AssetHolder.go index a64f397..22d5e6b 100644 --- a/bindings/assetholder/AssetHolder.go +++ b/bindings/assetholder/AssetHolder.go @@ -4,6 +4,7 @@ package assetholder import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -34,117 +36,113 @@ type AssetHolderWithdrawalAuth struct { Amount *big.Int } -// AssetHolderABI is the input ABI used to generate the binding from. -const AssetHolderABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// AssetHolderFuncSigs maps the 4-byte function signature to its string representation. -var AssetHolderFuncSigs = map[string]string{ - "53c2ed8e": "adjudicator()", - "1de26e16": "deposit(bytes32,uint256)", - "ae9ee18c": "holdings(bytes32)", - "fc79a66d": "setOutcome(bytes32,address[],uint256[])", - "d945af1d": "settled(bytes32)", - "4ed4283c": "withdraw((bytes32,address,address,uint256),bytes)", +// AssetholderMetaData contains all meta data concerning the Assetholder contract. +var AssetholderMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } -// AssetHolder is an auto generated Go binding around an Ethereum contract. -type AssetHolder struct { - AssetHolderCaller // Read-only binding to the contract - AssetHolderTransactor // Write-only binding to the contract - AssetHolderFilterer // Log filterer for contract events +// AssetholderABI is the input ABI used to generate the binding from. +// Deprecated: Use AssetholderMetaData.ABI instead. +var AssetholderABI = AssetholderMetaData.ABI + +// Assetholder is an auto generated Go binding around an Ethereum contract. +type Assetholder struct { + AssetholderCaller // Read-only binding to the contract + AssetholderTransactor // Write-only binding to the contract + AssetholderFilterer // Log filterer for contract events } -// AssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. -type AssetHolderCaller struct { +// AssetholderCaller is an auto generated read-only Go binding around an Ethereum contract. +type AssetholderCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AssetHolderTransactor struct { +// AssetholderTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AssetholderTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AssetHolderFilterer struct { +// AssetholderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AssetholderFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderSession is an auto generated Go binding around an Ethereum contract, +// AssetholderSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type AssetHolderSession struct { - Contract *AssetHolder // Generic contract binding to set the session for +type AssetholderSession struct { + Contract *Assetholder // 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 } -// AssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// AssetholderCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type AssetHolderCallerSession struct { - Contract *AssetHolderCaller // Generic contract caller binding to set the session for +type AssetholderCallerSession struct { + Contract *AssetholderCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } -// AssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// AssetholderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type AssetHolderTransactorSession struct { - Contract *AssetHolderTransactor // Generic contract transactor binding to set the session for +type AssetholderTransactorSession struct { + Contract *AssetholderTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// AssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. -type AssetHolderRaw struct { - Contract *AssetHolder // Generic contract binding to access the raw methods on +// AssetholderRaw is an auto generated low-level Go binding around an Ethereum contract. +type AssetholderRaw struct { + Contract *Assetholder // Generic contract binding to access the raw methods on } -// AssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AssetHolderCallerRaw struct { - Contract *AssetHolderCaller // Generic read-only contract binding to access the raw methods on +// AssetholderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AssetholderCallerRaw struct { + Contract *AssetholderCaller // Generic read-only contract binding to access the raw methods on } -// AssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AssetHolderTransactorRaw struct { - Contract *AssetHolderTransactor // Generic write-only contract binding to access the raw methods on +// AssetholderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AssetholderTransactorRaw struct { + Contract *AssetholderTransactor // Generic write-only contract binding to access the raw methods on } -// NewAssetHolder creates a new instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolder(address common.Address, backend bind.ContractBackend) (*AssetHolder, error) { - contract, err := bindAssetHolder(address, backend, backend, backend) +// NewAssetholder creates a new instance of Assetholder, bound to a specific deployed contract. +func NewAssetholder(address common.Address, backend bind.ContractBackend) (*Assetholder, error) { + contract, err := bindAssetholder(address, backend, backend, backend) if err != nil { return nil, err } - return &AssetHolder{AssetHolderCaller: AssetHolderCaller{contract: contract}, AssetHolderTransactor: AssetHolderTransactor{contract: contract}, AssetHolderFilterer: AssetHolderFilterer{contract: contract}}, nil + return &Assetholder{AssetholderCaller: AssetholderCaller{contract: contract}, AssetholderTransactor: AssetholderTransactor{contract: contract}, AssetholderFilterer: AssetholderFilterer{contract: contract}}, nil } -// NewAssetHolderCaller creates a new read-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*AssetHolderCaller, error) { - contract, err := bindAssetHolder(address, caller, nil, nil) +// NewAssetholderCaller creates a new read-only instance of Assetholder, bound to a specific deployed contract. +func NewAssetholderCaller(address common.Address, caller bind.ContractCaller) (*AssetholderCaller, error) { + contract, err := bindAssetholder(address, caller, nil, nil) if err != nil { return nil, err } - return &AssetHolderCaller{contract: contract}, nil + return &AssetholderCaller{contract: contract}, nil } -// NewAssetHolderTransactor creates a new write-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetHolderTransactor, error) { - contract, err := bindAssetHolder(address, nil, transactor, nil) +// NewAssetholderTransactor creates a new write-only instance of Assetholder, bound to a specific deployed contract. +func NewAssetholderTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetholderTransactor, error) { + contract, err := bindAssetholder(address, nil, transactor, nil) if err != nil { return nil, err } - return &AssetHolderTransactor{contract: contract}, nil + return &AssetholderTransactor{contract: contract}, nil } -// NewAssetHolderFilterer creates a new log filterer instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetHolderFilterer, error) { - contract, err := bindAssetHolder(address, nil, nil, filterer) +// NewAssetholderFilterer creates a new log filterer instance of Assetholder, bound to a specific deployed contract. +func NewAssetholderFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetholderFilterer, error) { + contract, err := bindAssetholder(address, nil, nil, filterer) if err != nil { return nil, err } - return &AssetHolderFilterer{contract: contract}, nil + return &AssetholderFilterer{contract: contract}, nil } -// bindAssetHolder binds a generic wrapper to an already deployed contract. -func bindAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderABI)) +// bindAssetholder binds a generic wrapper to an already deployed contract. +func bindAssetholder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AssetholderABI)) if err != nil { return nil, err } @@ -155,46 +153,46 @@ func bindAssetHolder(address common.Address, caller bind.ContractCaller, transac // 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 (_AssetHolder *AssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.AssetHolderCaller.contract.Call(opts, result, method, params...) +func (_Assetholder *AssetholderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Assetholder.Contract.AssetholderCaller.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 (_AssetHolder *AssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transfer(opts) +func (_Assetholder *AssetholderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Assetholder.Contract.AssetholderTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transact(opts, method, params...) +func (_Assetholder *AssetholderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Assetholder.Contract.AssetholderTransactor.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 (_AssetHolder *AssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.contract.Call(opts, result, method, params...) +func (_Assetholder *AssetholderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Assetholder.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 (_AssetHolder *AssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transfer(opts) +func (_Assetholder *AssetholderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Assetholder.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transact(opts, method, params...) +func (_Assetholder *AssetholderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Assetholder.Contract.contract.Transact(opts, method, params...) } // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { +func (_Assetholder *AssetholderCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "adjudicator") + err := _Assetholder.contract.Call(opts, &out, "adjudicator") if err != nil { return *new(common.Address), err @@ -209,23 +207,23 @@ func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common. // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) +func (_Assetholder *AssetholderSession) Adjudicator() (common.Address, error) { + return _Assetholder.Contract.Adjudicator(&_Assetholder.CallOpts) } // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCallerSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) +func (_Assetholder *AssetholderCallerSession) Adjudicator() (common.Address, error) { + return _Assetholder.Contract.Adjudicator(&_Assetholder.CallOpts) } // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { +func (_Assetholder *AssetholderCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "holdings", arg0) + err := _Assetholder.contract.Call(opts, &out, "holdings", arg0) if err != nil { return *new(*big.Int), err @@ -240,23 +238,23 @@ func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]by // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) +func (_Assetholder *AssetholderSession) Holdings(arg0 [32]byte) (*big.Int, error) { + return _Assetholder.Contract.Holdings(&_Assetholder.CallOpts, arg0) } // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) +func (_Assetholder *AssetholderCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { + return _Assetholder.Contract.Holdings(&_Assetholder.CallOpts, arg0) } // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { +func (_Assetholder *AssetholderCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "settled", arg0) + err := _Assetholder.contract.Call(opts, &out, "settled", arg0) if err != nil { return *new(bool), err @@ -271,83 +269,83 @@ func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byt // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) +func (_Assetholder *AssetholderSession) Settled(arg0 [32]byte) (bool, error) { + return _Assetholder.Contract.Settled(&_Assetholder.CallOpts, arg0) } // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCallerSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) +func (_Assetholder *AssetholderCallerSession) Settled(arg0 [32]byte) (bool, error) { + return _Assetholder.Contract.Settled(&_Assetholder.CallOpts, arg0) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "deposit", fundingID, amount) +func (_Assetholder *AssetholderTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholder.contract.Transact(opts, "deposit", fundingID, amount) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) +func (_Assetholder *AssetholderSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholder.Contract.Deposit(&_Assetholder.TransactOpts, fundingID, amount) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) +func (_Assetholder *AssetholderTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholder.Contract.Deposit(&_Assetholder.TransactOpts, fundingID, amount) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "setOutcome", channelID, parts, newBals) +func (_Assetholder *AssetholderTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholder.contract.Transact(opts, "setOutcome", channelID, parts, newBals) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) +func (_Assetholder *AssetholderSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholder.Contract.SetOutcome(&_Assetholder.TransactOpts, channelID, parts, newBals) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) +func (_Assetholder *AssetholderTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholder.Contract.SetOutcome(&_Assetholder.TransactOpts, channelID, parts, newBals) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "withdraw", authorization, signature) +func (_Assetholder *AssetholderTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholder.contract.Transact(opts, "withdraw", authorization, signature) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) +func (_Assetholder *AssetholderSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholder.Contract.Withdraw(&_Assetholder.TransactOpts, authorization, signature) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) +func (_Assetholder *AssetholderTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholder.Contract.Withdraw(&_Assetholder.TransactOpts, authorization, signature) } -// AssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the AssetHolder contract. -type AssetHolderDepositedIterator struct { - Event *AssetHolderDeposited // Event containing the contract specifics and raw log +// AssetholderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the Assetholder contract. +type AssetholderDepositedIterator struct { + Event *AssetholderDeposited // 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 @@ -361,7 +359,7 @@ type AssetHolderDepositedIterator struct { // 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 *AssetHolderDepositedIterator) Next() bool { +func (it *AssetholderDepositedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -370,7 +368,7 @@ func (it *AssetHolderDepositedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderDeposited) + it.Event = new(AssetholderDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -385,7 +383,7 @@ func (it *AssetHolderDepositedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderDeposited) + it.Event = new(AssetholderDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -401,19 +399,19 @@ func (it *AssetHolderDepositedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderDepositedIterator) Error() error { +func (it *AssetholderDepositedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderDepositedIterator) Close() error { +func (it *AssetholderDepositedIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderDeposited represents a Deposited event raised by the AssetHolder contract. -type AssetHolderDeposited struct { +// AssetholderDeposited represents a Deposited event raised by the Assetholder contract. +type AssetholderDeposited struct { FundingID [32]byte Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -422,31 +420,31 @@ type AssetHolderDeposited struct { // FilterDeposited is a free log retrieval operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderDepositedIterator, error) { +func (_Assetholder *AssetholderFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetholderDepositedIterator, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Deposited", fundingIDRule) + logs, sub, err := _Assetholder.contract.FilterLogs(opts, "Deposited", fundingIDRule) if err != nil { return nil, err } - return &AssetHolderDepositedIterator{contract: _AssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil + return &AssetholderDepositedIterator{contract: _Assetholder.contract, event: "Deposited", logs: logs, sub: sub}, nil } // WatchDeposited is a free log subscription operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetHolderDeposited, fundingID [][32]byte) (event.Subscription, error) { +func (_Assetholder *AssetholderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetholderDeposited, fundingID [][32]byte) (event.Subscription, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Deposited", fundingIDRule) + logs, sub, err := _Assetholder.contract.WatchLogs(opts, "Deposited", fundingIDRule) if err != nil { return nil, err } @@ -456,8 +454,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { + event := new(AssetholderDeposited) + if err := _Assetholder.contract.UnpackLog(event, "Deposited", log); err != nil { return err } event.Raw = log @@ -481,18 +479,18 @@ func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, si // ParseDeposited is a log parse operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) ParseDeposited(log types.Log) (*AssetHolderDeposited, error) { - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { +func (_Assetholder *AssetholderFilterer) ParseDeposited(log types.Log) (*AssetholderDeposited, error) { + event := new(AssetholderDeposited) + if err := _Assetholder.contract.UnpackLog(event, "Deposited", log); err != nil { return nil, err } event.Raw = log return event, nil } -// AssetHolderOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the AssetHolder contract. -type AssetHolderOutcomeSetIterator struct { - Event *AssetHolderOutcomeSet // Event containing the contract specifics and raw log +// AssetholderOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the Assetholder contract. +type AssetholderOutcomeSetIterator struct { + Event *AssetholderOutcomeSet // 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 @@ -506,7 +504,7 @@ type AssetHolderOutcomeSetIterator struct { // 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 *AssetHolderOutcomeSetIterator) Next() bool { +func (it *AssetholderOutcomeSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -515,7 +513,7 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderOutcomeSet) + it.Event = new(AssetholderOutcomeSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -530,7 +528,7 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderOutcomeSet) + it.Event = new(AssetholderOutcomeSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -546,19 +544,19 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderOutcomeSetIterator) Error() error { +func (it *AssetholderOutcomeSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderOutcomeSetIterator) Close() error { +func (it *AssetholderOutcomeSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderOutcomeSet represents a OutcomeSet event raised by the AssetHolder contract. -type AssetHolderOutcomeSet struct { +// AssetholderOutcomeSet represents a OutcomeSet event raised by the Assetholder contract. +type AssetholderOutcomeSet struct { ChannelID [32]byte Raw types.Log // Blockchain specific contextual infos } @@ -566,31 +564,31 @@ type AssetHolderOutcomeSet struct { // FilterOutcomeSet is a free log retrieval operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetHolderOutcomeSetIterator, error) { +func (_Assetholder *AssetholderFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetholderOutcomeSetIterator, error) { var channelIDRule []interface{} for _, channelIDItem := range channelID { channelIDRule = append(channelIDRule, channelIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) + logs, sub, err := _Assetholder.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) if err != nil { return nil, err } - return &AssetHolderOutcomeSetIterator{contract: _AssetHolder.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil + return &AssetholderOutcomeSetIterator{contract: _Assetholder.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil } // WatchOutcomeSet is a free log subscription operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetHolderOutcomeSet, channelID [][32]byte) (event.Subscription, error) { +func (_Assetholder *AssetholderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetholderOutcomeSet, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} for _, channelIDItem := range channelID { channelIDRule = append(channelIDRule, channelIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) + logs, sub, err := _Assetholder.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) if err != nil { return nil, err } @@ -600,8 +598,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, s select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { + event := new(AssetholderOutcomeSet) + if err := _Assetholder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { return err } event.Raw = log @@ -625,18 +623,18 @@ func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, s // ParseOutcomeSet is a log parse operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) ParseOutcomeSet(log types.Log) (*AssetHolderOutcomeSet, error) { - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { +func (_Assetholder *AssetholderFilterer) ParseOutcomeSet(log types.Log) (*AssetholderOutcomeSet, error) { + event := new(AssetholderOutcomeSet) + if err := _Assetholder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// AssetHolderWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the AssetHolder contract. -type AssetHolderWithdrawnIterator struct { - Event *AssetHolderWithdrawn // Event containing the contract specifics and raw log +// AssetholderWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the Assetholder contract. +type AssetholderWithdrawnIterator struct { + Event *AssetholderWithdrawn // 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 @@ -650,7 +648,7 @@ type AssetHolderWithdrawnIterator struct { // 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 *AssetHolderWithdrawnIterator) Next() bool { +func (it *AssetholderWithdrawnIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -659,7 +657,7 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderWithdrawn) + it.Event = new(AssetholderWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -674,7 +672,7 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderWithdrawn) + it.Event = new(AssetholderWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -690,19 +688,19 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderWithdrawnIterator) Error() error { +func (it *AssetholderWithdrawnIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderWithdrawnIterator) Close() error { +func (it *AssetholderWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderWithdrawn represents a Withdrawn event raised by the AssetHolder contract. -type AssetHolderWithdrawn struct { +// AssetholderWithdrawn represents a Withdrawn event raised by the Assetholder contract. +type AssetholderWithdrawn struct { FundingID [32]byte Amount *big.Int Receiver common.Address @@ -712,31 +710,31 @@ type AssetHolderWithdrawn struct { // FilterWithdrawn is a free log retrieval operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderWithdrawnIterator, error) { +func (_Assetholder *AssetholderFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetholderWithdrawnIterator, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) + logs, sub, err := _Assetholder.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) if err != nil { return nil, err } - return &AssetHolderWithdrawnIterator{contract: _AssetHolder.contract, event: "Withdrawn", logs: logs, sub: sub}, nil + return &AssetholderWithdrawnIterator{contract: _Assetholder.contract, event: "Withdrawn", logs: logs, sub: sub}, nil } // WatchWithdrawn is a free log subscription operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderWithdrawn, fundingID [][32]byte) (event.Subscription, error) { +func (_Assetholder *AssetholderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetholderWithdrawn, fundingID [][32]byte) (event.Subscription, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) + logs, sub, err := _Assetholder.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) if err != nil { return nil, err } @@ -746,8 +744,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { + event := new(AssetholderWithdrawn) + if err := _Assetholder.contract.UnpackLog(event, "Withdrawn", log); err != nil { return err } event.Raw = log @@ -771,497 +769,11 @@ func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, si // ParseWithdrawn is a log parse operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) ParseWithdrawn(log types.Log) (*AssetHolderWithdrawn, error) { - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { +func (_Assetholder *AssetholderFilterer) ParseWithdrawn(log types.Log) (*AssetholderWithdrawn, error) { + event := new(AssetholderWithdrawn) + if err := _Assetholder.contract.UnpackLog(event, "Withdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } - -// ECDSAABI is the input ABI used to generate the binding from. -const ECDSAABI = "[]" - -// ECDSABin is the compiled bytecode used for deploying new contracts. -var ECDSABin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2e519b4a0a3509f02bba1abcf848979252df4c37ba062299b13fdabec46878464736f6c63430007040033" - -// DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it. -func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECDSABin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// ECDSA is an auto generated Go binding around an Ethereum contract. -type ECDSA struct { - ECDSACaller // Read-only binding to the contract - ECDSATransactor // Write-only binding to the contract - ECDSAFilterer // Log filterer for contract events -} - -// ECDSACaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSACaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSAFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSASession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSASession struct { - Contract *ECDSA // 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 -} - -// ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSACallerSession struct { - Contract *ECDSACaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATransactorSession struct { - Contract *ECDSATransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSARaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSARaw struct { - Contract *ECDSA // Generic contract binding to access the raw methods on -} - -// ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSACallerRaw struct { - Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATransactorRaw struct { - Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract. -func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) { - contract, err := bindECDSA(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) { - contract, err := bindECDSA(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSACaller{contract: contract}, nil -} - -// NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) { - contract, err := bindECDSA(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATransactor{contract: contract}, nil -} - -// NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract. -func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) { - contract, err := bindECDSA(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSAFilterer{contract: contract}, nil -} - -// bindECDSA binds a generic wrapper to an already deployed contract. -func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - 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 (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.Contract.ECDSACaller.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 (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.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 (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.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 (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transact(opts, method, params...) -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209d2110f8008a32668165aee96d39b9a3b210868f452685996027830739a87e3064736f6c63430007040033" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // 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 -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// SigABI is the input ABI used to generate the binding from. -const SigABI = "[]" - -// SigBin is the compiled bytecode used for deploying new contracts. -var SigBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c3751b740d506c41c776ad3c92ca113b46a314ff1f98b52d4b23f32eaccf354664736f6c63430007040033" - -// DeploySig deploys a new Ethereum contract, binding an instance of Sig to it. -func DeploySig(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Sig, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SigBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// Sig is an auto generated Go binding around an Ethereum contract. -type Sig struct { - SigCaller // Read-only binding to the contract - SigTransactor // Write-only binding to the contract - SigFilterer // Log filterer for contract events -} - -// SigCaller is an auto generated read-only Go binding around an Ethereum contract. -type SigCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SigTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SigFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SigSession struct { - Contract *Sig // 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 -} - -// SigCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SigCallerSession struct { - Contract *SigCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SigTransactorSession struct { - Contract *SigTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SigRaw is an auto generated low-level Go binding around an Ethereum contract. -type SigRaw struct { - Contract *Sig // Generic contract binding to access the raw methods on -} - -// SigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SigCallerRaw struct { - Contract *SigCaller // Generic read-only contract binding to access the raw methods on -} - -// SigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SigTransactorRaw struct { - Contract *SigTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSig creates a new instance of Sig, bound to a specific deployed contract. -func NewSig(address common.Address, backend bind.ContractBackend) (*Sig, error) { - contract, err := bindSig(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// NewSigCaller creates a new read-only instance of Sig, bound to a specific deployed contract. -func NewSigCaller(address common.Address, caller bind.ContractCaller) (*SigCaller, error) { - contract, err := bindSig(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SigCaller{contract: contract}, nil -} - -// NewSigTransactor creates a new write-only instance of Sig, bound to a specific deployed contract. -func NewSigTransactor(address common.Address, transactor bind.ContractTransactor) (*SigTransactor, error) { - contract, err := bindSig(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SigTransactor{contract: contract}, nil -} - -// NewSigFilterer creates a new log filterer instance of Sig, bound to a specific deployed contract. -func NewSigFilterer(address common.Address, filterer bind.ContractFilterer) (*SigFilterer, error) { - contract, err := bindSig(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SigFilterer{contract: contract}, nil -} - -// bindSig binds a generic wrapper to an already deployed contract. -func bindSig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - 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 (_Sig *SigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.Contract.SigCaller.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 (_Sig *SigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.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 (_Sig *SigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.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 (_Sig *SigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.contract.Transact(opts, method, params...) -} diff --git a/bindings/assetholdererc20/AssetHolderERC20.go b/bindings/assetholdererc20/AssetHolderERC20.go index 914a8c7..3284891 100644 --- a/bindings/assetholdererc20/AssetHolderERC20.go +++ b/bindings/assetholdererc20/AssetHolderERC20.go @@ -4,6 +4,7 @@ package assetholdererc20 import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -34,117 +36,135 @@ type AssetHolderWithdrawalAuth struct { Amount *big.Int } -// AssetHolderABI is the input ABI used to generate the binding from. -const AssetHolderABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// Assetholdererc20MetaData contains all meta data concerning the Assetholdererc20 contract. +var Assetholdererc20MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adjudicator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60a060405234801561001057600080fd5b5060405161117d38038061117d83398101604081905261002f91610081565b600280546001600160a01b0319166001600160a01b03939093169290921790915560601b6001600160601b0319166080526100b3565b80516001600160a01b038116811461007c57600080fd5b919050565b60008060408385031215610093578182fd5b61009c83610065565b91506100aa60208401610065565b90509250929050565b60805160601c6110a36100da600039806103b6528061068f52806107f552506110a36000f3fe6080604052600436106100705760003560e01c8063ae9ee18c1161004e578063ae9ee18c146100d5578063d945af1d14610102578063fc0c546a1461012f578063fc79a66d1461014457610070565b80631de26e16146100755780634ed4283c1461008a57806353c2ed8e146100aa575b600080fd5b610088610083366004610ca1565b610164565b005b34801561009657600080fd5b506100886100a5366004610cc2565b6101dc565b3480156100b657600080fd5b506100bf61037e565b6040516100cc9190610d47565b60405180910390f35b3480156100e157600080fd5b506100f56100f0366004610c12565b61038d565b6040516100cc9190611008565b34801561010e57600080fd5b5061012261011d366004610c12565b61039f565b6040516100cc9190610d98565b34801561013b57600080fd5b506100bf6103b4565b34801561015057600080fd5b5061008861015f366004610c2a565b6103d8565b61016e82826105f5565b6000828152602081905260409020546101879082610617565b6000838152602081905260409020556101a08282610678565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101d09190611008565b60405180910390a25050565b823560009081526001602052604090205460ff166102155760405162461bcd60e51b815260040161020c90610ec8565b60405180910390fd5b61027d836040516020016102299190610fbc565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610278925050506040870160208801610bd6565b610736565b6102995760405162461bcd60e51b815260040161020c90610e91565b60006102b584356102b06040870160208801610bd6565b610771565b600081815260208190526040902054909150606085013511156102ea5760405162461bcd60e51b815260040161020c90610f22565b6102f58484846107a4565b6000818152602081905260409020546103129060608601356107a9565b60008281526020819052604090205561032c8484846107eb565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103629060408901610bd6565b604051610370929190610da3565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002546001600160a01b031633146104025760405162461bcd60e51b815260040161020c90610f77565b8281146104215760405162461bcd60e51b815260040161020c90610e03565b60008581526001602052604090205460ff16156104505760405162461bcd60e51b815260040161020c90610e4c565b600085815260208190526040812080549082905590808567ffffffffffffffff8111801561047d57600080fd5b506040519080825280602002602001820160405280156104a7578160200160208202803683370190505b50905060005b8681101561054e5760006104dc8a8a8a858181106104c757fe5b90506020020160208101906102b09190610bd6565b9050808383815181106104eb57fe5b60200260200101818152505061051c600080838152602001908152602001600020548661061790919063ffffffff16565b945061054387878481811061052d57fe5b905060200201358561061790919063ffffffff16565b9350506001016104ad565b508183106105a85760005b868110156105a65785858281811061056d57fe5b9050602002013560008084848151811061058357fe5b602090810291909101810151825281019190915260400160002055600101610559565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b34156106135760405162461bcd60e51b815260040161020c90610dba565b5050565b600082820183811015610671576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906106c890339030908690600401610d5b565b602060405180830381600087803b1580156106e257600080fd5b505af11580156106f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a9190610bf2565b6106135760405162461bcd60e51b815260040161020c90610ef5565b60008061074985805190602001206108ba565b90506000610757828661090b565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610786929190610da3565b60405160208183030381529060405280519060200120905092915050565b505050565b600061067183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610af6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61082a6060860160408701610bd6565b85606001356040518363ffffffff1660e01b815260040161084c929190610d7f565b602060405180830381600087803b15801561086657600080fd5b505af115801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089e9190610bf2565b6107a45760405162461bcd60e51b815260040161020c90610f4e565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610963576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156109d45760405162461bcd60e51b815260040180806020018281038252602281526020018061102a6022913960400191505060405180910390fd5b8060ff16601b141580156109ec57508060ff16601c14155b15610a285760405162461bcd60e51b815260040180806020018281038252602281526020018061104c6022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610a84573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610aec576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b60008184841115610b855760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b4a578181015183820152602001610b32565b50505050905090810190601f168015610b775780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610b9e578182fd5b50813567ffffffffffffffff811115610bb5578182fd5b6020830191508360208083028501011115610bcf57600080fd5b9250929050565b600060208284031215610be7578081fd5b813561067181611011565b600060208284031215610c03578081fd5b81518015158114610671578182fd5b600060208284031215610c23578081fd5b5035919050565b600080600080600060608688031215610c41578081fd5b85359450602086013567ffffffffffffffff80821115610c5f578283fd5b610c6b89838a01610b8d565b90965094506040880135915080821115610c83578283fd5b50610c9088828901610b8d565b969995985093965092949392505050565b60008060408385031215610cb3578182fd5b50508035926020909101359150565b600080600083850360a0811215610cd7578384fd5b6080811215610ce4578384fd5b50839250608084013567ffffffffffffffff80821115610d02578384fd5b818601915086601f830112610d15578384fd5b813581811115610d23578485fd5b876020828501011115610d34578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b60208082526029908201527f6d6573736167652076616c7565206d757374206265203020666f7220746f6b656040820152681b8819195c1bdcda5d60ba1b606082015260800190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b6020808252601390820152721d1c985b9cd9995c919c9bdb4819985a5b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610fd281611011565b6001600160a01b039081166020840152604084013590610ff182611011565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b038116811461102657600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220441e00a9bed7c5521f586ebaecb9a8d06eae551b576d1c8f38b4cab39302dfce64736f6c63430007060033", +} + +// Assetholdererc20ABI is the input ABI used to generate the binding from. +// Deprecated: Use Assetholdererc20MetaData.ABI instead. +var Assetholdererc20ABI = Assetholdererc20MetaData.ABI + +// Assetholdererc20Bin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use Assetholdererc20MetaData.Bin instead. +var Assetholdererc20Bin = Assetholdererc20MetaData.Bin + +// DeployAssetholdererc20 deploys a new Ethereum contract, binding an instance of Assetholdererc20 to it. +func DeployAssetholdererc20(auth *bind.TransactOpts, backend bind.ContractBackend, _adjudicator common.Address, _token common.Address) (common.Address, *types.Transaction, *Assetholdererc20, error) { + parsed, err := Assetholdererc20MetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } -// AssetHolderFuncSigs maps the 4-byte function signature to its string representation. -var AssetHolderFuncSigs = map[string]string{ - "53c2ed8e": "adjudicator()", - "1de26e16": "deposit(bytes32,uint256)", - "ae9ee18c": "holdings(bytes32)", - "fc79a66d": "setOutcome(bytes32,address[],uint256[])", - "d945af1d": "settled(bytes32)", - "4ed4283c": "withdraw((bytes32,address,address,uint256),bytes)", + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(Assetholdererc20Bin), backend, _adjudicator, _token) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Assetholdererc20{Assetholdererc20Caller: Assetholdererc20Caller{contract: contract}, Assetholdererc20Transactor: Assetholdererc20Transactor{contract: contract}, Assetholdererc20Filterer: Assetholdererc20Filterer{contract: contract}}, nil } -// AssetHolder is an auto generated Go binding around an Ethereum contract. -type AssetHolder struct { - AssetHolderCaller // Read-only binding to the contract - AssetHolderTransactor // Write-only binding to the contract - AssetHolderFilterer // Log filterer for contract events +// Assetholdererc20 is an auto generated Go binding around an Ethereum contract. +type Assetholdererc20 struct { + Assetholdererc20Caller // Read-only binding to the contract + Assetholdererc20Transactor // Write-only binding to the contract + Assetholdererc20Filterer // Log filterer for contract events } -// AssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. -type AssetHolderCaller struct { +// Assetholdererc20Caller is an auto generated read-only Go binding around an Ethereum contract. +type Assetholdererc20Caller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AssetHolderTransactor struct { +// Assetholdererc20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type Assetholdererc20Transactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AssetHolderFilterer struct { +// Assetholdererc20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Assetholdererc20Filterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderSession is an auto generated Go binding around an Ethereum contract, +// Assetholdererc20Session is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type AssetHolderSession struct { - Contract *AssetHolder // Generic contract binding to set the session for +type Assetholdererc20Session struct { + Contract *Assetholdererc20 // 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 } -// AssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// Assetholdererc20CallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type AssetHolderCallerSession struct { - Contract *AssetHolderCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session +type Assetholdererc20CallerSession struct { + Contract *Assetholdererc20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session } -// AssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// Assetholdererc20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type AssetHolderTransactorSession struct { - Contract *AssetHolderTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +type Assetholdererc20TransactorSession struct { + Contract *Assetholdererc20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// AssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. -type AssetHolderRaw struct { - Contract *AssetHolder // Generic contract binding to access the raw methods on +// Assetholdererc20Raw is an auto generated low-level Go binding around an Ethereum contract. +type Assetholdererc20Raw struct { + Contract *Assetholdererc20 // Generic contract binding to access the raw methods on } -// AssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AssetHolderCallerRaw struct { - Contract *AssetHolderCaller // Generic read-only contract binding to access the raw methods on +// Assetholdererc20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Assetholdererc20CallerRaw struct { + Contract *Assetholdererc20Caller // Generic read-only contract binding to access the raw methods on } -// AssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AssetHolderTransactorRaw struct { - Contract *AssetHolderTransactor // Generic write-only contract binding to access the raw methods on +// Assetholdererc20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Assetholdererc20TransactorRaw struct { + Contract *Assetholdererc20Transactor // Generic write-only contract binding to access the raw methods on } -// NewAssetHolder creates a new instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolder(address common.Address, backend bind.ContractBackend) (*AssetHolder, error) { - contract, err := bindAssetHolder(address, backend, backend, backend) +// NewAssetholdererc20 creates a new instance of Assetholdererc20, bound to a specific deployed contract. +func NewAssetholdererc20(address common.Address, backend bind.ContractBackend) (*Assetholdererc20, error) { + contract, err := bindAssetholdererc20(address, backend, backend, backend) if err != nil { return nil, err } - return &AssetHolder{AssetHolderCaller: AssetHolderCaller{contract: contract}, AssetHolderTransactor: AssetHolderTransactor{contract: contract}, AssetHolderFilterer: AssetHolderFilterer{contract: contract}}, nil + return &Assetholdererc20{Assetholdererc20Caller: Assetholdererc20Caller{contract: contract}, Assetholdererc20Transactor: Assetholdererc20Transactor{contract: contract}, Assetholdererc20Filterer: Assetholdererc20Filterer{contract: contract}}, nil } -// NewAssetHolderCaller creates a new read-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*AssetHolderCaller, error) { - contract, err := bindAssetHolder(address, caller, nil, nil) +// NewAssetholdererc20Caller creates a new read-only instance of Assetholdererc20, bound to a specific deployed contract. +func NewAssetholdererc20Caller(address common.Address, caller bind.ContractCaller) (*Assetholdererc20Caller, error) { + contract, err := bindAssetholdererc20(address, caller, nil, nil) if err != nil { return nil, err } - return &AssetHolderCaller{contract: contract}, nil + return &Assetholdererc20Caller{contract: contract}, nil } -// NewAssetHolderTransactor creates a new write-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetHolderTransactor, error) { - contract, err := bindAssetHolder(address, nil, transactor, nil) +// NewAssetholdererc20Transactor creates a new write-only instance of Assetholdererc20, bound to a specific deployed contract. +func NewAssetholdererc20Transactor(address common.Address, transactor bind.ContractTransactor) (*Assetholdererc20Transactor, error) { + contract, err := bindAssetholdererc20(address, nil, transactor, nil) if err != nil { return nil, err } - return &AssetHolderTransactor{contract: contract}, nil + return &Assetholdererc20Transactor{contract: contract}, nil } -// NewAssetHolderFilterer creates a new log filterer instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetHolderFilterer, error) { - contract, err := bindAssetHolder(address, nil, nil, filterer) +// NewAssetholdererc20Filterer creates a new log filterer instance of Assetholdererc20, bound to a specific deployed contract. +func NewAssetholdererc20Filterer(address common.Address, filterer bind.ContractFilterer) (*Assetholdererc20Filterer, error) { + contract, err := bindAssetholdererc20(address, nil, nil, filterer) if err != nil { return nil, err } - return &AssetHolderFilterer{contract: contract}, nil + return &Assetholdererc20Filterer{contract: contract}, nil } -// bindAssetHolder binds a generic wrapper to an already deployed contract. -func bindAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderABI)) +// bindAssetholdererc20 binds a generic wrapper to an already deployed contract. +func bindAssetholdererc20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(Assetholdererc20ABI)) if err != nil { return nil, err } @@ -155,46 +175,46 @@ func bindAssetHolder(address common.Address, caller bind.ContractCaller, transac // 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 (_AssetHolder *AssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.AssetHolderCaller.contract.Call(opts, result, method, params...) +func (_Assetholdererc20 *Assetholdererc20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Assetholdererc20.Contract.Assetholdererc20Caller.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 (_AssetHolder *AssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transfer(opts) +func (_Assetholdererc20 *Assetholdererc20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Assetholdererc20.Contract.Assetholdererc20Transactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transact(opts, method, params...) +func (_Assetholdererc20 *Assetholdererc20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Assetholdererc20.Contract.Assetholdererc20Transactor.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 (_AssetHolder *AssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.contract.Call(opts, result, method, params...) +func (_Assetholdererc20 *Assetholdererc20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Assetholdererc20.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 (_AssetHolder *AssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transfer(opts) +func (_Assetholdererc20 *Assetholdererc20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Assetholdererc20.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transact(opts, method, params...) +func (_Assetholdererc20 *Assetholdererc20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Assetholdererc20.Contract.contract.Transact(opts, method, params...) } // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { +func (_Assetholdererc20 *Assetholdererc20Caller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "adjudicator") + err := _Assetholdererc20.contract.Call(opts, &out, "adjudicator") if err != nil { return *new(common.Address), err @@ -209,23 +229,23 @@ func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common. // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) +func (_Assetholdererc20 *Assetholdererc20Session) Adjudicator() (common.Address, error) { + return _Assetholdererc20.Contract.Adjudicator(&_Assetholdererc20.CallOpts) } // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCallerSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) +func (_Assetholdererc20 *Assetholdererc20CallerSession) Adjudicator() (common.Address, error) { + return _Assetholdererc20.Contract.Adjudicator(&_Assetholdererc20.CallOpts) } // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { +func (_Assetholdererc20 *Assetholdererc20Caller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "holdings", arg0) + err := _Assetholdererc20.contract.Call(opts, &out, "holdings", arg0) if err != nil { return *new(*big.Int), err @@ -240,23 +260,23 @@ func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]by // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) +func (_Assetholdererc20 *Assetholdererc20Session) Holdings(arg0 [32]byte) (*big.Int, error) { + return _Assetholdererc20.Contract.Holdings(&_Assetholdererc20.CallOpts, arg0) } // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) +func (_Assetholdererc20 *Assetholdererc20CallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { + return _Assetholdererc20.Contract.Holdings(&_Assetholdererc20.CallOpts, arg0) } // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { +func (_Assetholdererc20 *Assetholdererc20Caller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "settled", arg0) + err := _Assetholdererc20.contract.Call(opts, &out, "settled", arg0) if err != nil { return *new(bool), err @@ -271,83 +291,114 @@ func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byt // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) +func (_Assetholdererc20 *Assetholdererc20Session) Settled(arg0 [32]byte) (bool, error) { + return _Assetholdererc20.Contract.Settled(&_Assetholdererc20.CallOpts, arg0) } // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCallerSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) +func (_Assetholdererc20 *Assetholdererc20CallerSession) Settled(arg0 [32]byte) (bool, error) { + return _Assetholdererc20.Contract.Settled(&_Assetholdererc20.CallOpts, arg0) +} + +// Token is a free data retrieval call binding the contract method 0xfc0c546a. +// +// Solidity: function token() view returns(address) +func (_Assetholdererc20 *Assetholdererc20Caller) Token(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Assetholdererc20.contract.Call(opts, &out, "token") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Token is a free data retrieval call binding the contract method 0xfc0c546a. +// +// Solidity: function token() view returns(address) +func (_Assetholdererc20 *Assetholdererc20Session) Token() (common.Address, error) { + return _Assetholdererc20.Contract.Token(&_Assetholdererc20.CallOpts) +} + +// Token is a free data retrieval call binding the contract method 0xfc0c546a. +// +// Solidity: function token() view returns(address) +func (_Assetholdererc20 *Assetholdererc20CallerSession) Token() (common.Address, error) { + return _Assetholdererc20.Contract.Token(&_Assetholdererc20.CallOpts) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "deposit", fundingID, amount) +func (_Assetholdererc20 *Assetholdererc20Transactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholdererc20.contract.Transact(opts, "deposit", fundingID, amount) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) +func (_Assetholdererc20 *Assetholdererc20Session) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholdererc20.Contract.Deposit(&_Assetholdererc20.TransactOpts, fundingID, amount) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) +func (_Assetholdererc20 *Assetholdererc20TransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholdererc20.Contract.Deposit(&_Assetholdererc20.TransactOpts, fundingID, amount) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "setOutcome", channelID, parts, newBals) +func (_Assetholdererc20 *Assetholdererc20Transactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholdererc20.contract.Transact(opts, "setOutcome", channelID, parts, newBals) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) +func (_Assetholdererc20 *Assetholdererc20Session) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholdererc20.Contract.SetOutcome(&_Assetholdererc20.TransactOpts, channelID, parts, newBals) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) +func (_Assetholdererc20 *Assetholdererc20TransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholdererc20.Contract.SetOutcome(&_Assetholdererc20.TransactOpts, channelID, parts, newBals) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "withdraw", authorization, signature) +func (_Assetholdererc20 *Assetholdererc20Transactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholdererc20.contract.Transact(opts, "withdraw", authorization, signature) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) +func (_Assetholdererc20 *Assetholdererc20Session) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholdererc20.Contract.Withdraw(&_Assetholdererc20.TransactOpts, authorization, signature) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) +func (_Assetholdererc20 *Assetholdererc20TransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholdererc20.Contract.Withdraw(&_Assetholdererc20.TransactOpts, authorization, signature) } -// AssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the AssetHolder contract. -type AssetHolderDepositedIterator struct { - Event *AssetHolderDeposited // Event containing the contract specifics and raw log +// Assetholdererc20DepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the Assetholdererc20 contract. +type Assetholdererc20DepositedIterator struct { + Event *Assetholdererc20Deposited // 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 @@ -361,7 +412,7 @@ type AssetHolderDepositedIterator struct { // 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 *AssetHolderDepositedIterator) Next() bool { +func (it *Assetholdererc20DepositedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -370,7 +421,7 @@ func (it *AssetHolderDepositedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderDeposited) + it.Event = new(Assetholdererc20Deposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -385,7 +436,7 @@ func (it *AssetHolderDepositedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderDeposited) + it.Event = new(Assetholdererc20Deposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -401,19 +452,19 @@ func (it *AssetHolderDepositedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderDepositedIterator) Error() error { +func (it *Assetholdererc20DepositedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderDepositedIterator) Close() error { +func (it *Assetholdererc20DepositedIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderDeposited represents a Deposited event raised by the AssetHolder contract. -type AssetHolderDeposited struct { +// Assetholdererc20Deposited represents a Deposited event raised by the Assetholdererc20 contract. +type Assetholdererc20Deposited struct { FundingID [32]byte Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -422,31 +473,31 @@ type AssetHolderDeposited struct { // FilterDeposited is a free log retrieval operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderDepositedIterator, error) { +func (_Assetholdererc20 *Assetholdererc20Filterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*Assetholdererc20DepositedIterator, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Deposited", fundingIDRule) + logs, sub, err := _Assetholdererc20.contract.FilterLogs(opts, "Deposited", fundingIDRule) if err != nil { return nil, err } - return &AssetHolderDepositedIterator{contract: _AssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil + return &Assetholdererc20DepositedIterator{contract: _Assetholdererc20.contract, event: "Deposited", logs: logs, sub: sub}, nil } // WatchDeposited is a free log subscription operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetHolderDeposited, fundingID [][32]byte) (event.Subscription, error) { +func (_Assetholdererc20 *Assetholdererc20Filterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *Assetholdererc20Deposited, fundingID [][32]byte) (event.Subscription, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Deposited", fundingIDRule) + logs, sub, err := _Assetholdererc20.contract.WatchLogs(opts, "Deposited", fundingIDRule) if err != nil { return nil, err } @@ -456,8 +507,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { + event := new(Assetholdererc20Deposited) + if err := _Assetholdererc20.contract.UnpackLog(event, "Deposited", log); err != nil { return err } event.Raw = log @@ -481,18 +532,18 @@ func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, si // ParseDeposited is a log parse operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) ParseDeposited(log types.Log) (*AssetHolderDeposited, error) { - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { +func (_Assetholdererc20 *Assetholdererc20Filterer) ParseDeposited(log types.Log) (*Assetholdererc20Deposited, error) { + event := new(Assetholdererc20Deposited) + if err := _Assetholdererc20.contract.UnpackLog(event, "Deposited", log); err != nil { return nil, err } event.Raw = log return event, nil } -// AssetHolderOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the AssetHolder contract. -type AssetHolderOutcomeSetIterator struct { - Event *AssetHolderOutcomeSet // Event containing the contract specifics and raw log +// Assetholdererc20OutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the Assetholdererc20 contract. +type Assetholdererc20OutcomeSetIterator struct { + Event *Assetholdererc20OutcomeSet // 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 @@ -506,7 +557,7 @@ type AssetHolderOutcomeSetIterator struct { // 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 *AssetHolderOutcomeSetIterator) Next() bool { +func (it *Assetholdererc20OutcomeSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -515,7 +566,7 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderOutcomeSet) + it.Event = new(Assetholdererc20OutcomeSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -530,7 +581,7 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderOutcomeSet) + it.Event = new(Assetholdererc20OutcomeSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -546,19 +597,19 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderOutcomeSetIterator) Error() error { +func (it *Assetholdererc20OutcomeSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderOutcomeSetIterator) Close() error { +func (it *Assetholdererc20OutcomeSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderOutcomeSet represents a OutcomeSet event raised by the AssetHolder contract. -type AssetHolderOutcomeSet struct { +// Assetholdererc20OutcomeSet represents a OutcomeSet event raised by the Assetholdererc20 contract. +type Assetholdererc20OutcomeSet struct { ChannelID [32]byte Raw types.Log // Blockchain specific contextual infos } @@ -566,31 +617,31 @@ type AssetHolderOutcomeSet struct { // FilterOutcomeSet is a free log retrieval operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetHolderOutcomeSetIterator, error) { +func (_Assetholdererc20 *Assetholdererc20Filterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*Assetholdererc20OutcomeSetIterator, error) { var channelIDRule []interface{} for _, channelIDItem := range channelID { channelIDRule = append(channelIDRule, channelIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) + logs, sub, err := _Assetholdererc20.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) if err != nil { return nil, err } - return &AssetHolderOutcomeSetIterator{contract: _AssetHolder.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil + return &Assetholdererc20OutcomeSetIterator{contract: _Assetholdererc20.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil } // WatchOutcomeSet is a free log subscription operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetHolderOutcomeSet, channelID [][32]byte) (event.Subscription, error) { +func (_Assetholdererc20 *Assetholdererc20Filterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *Assetholdererc20OutcomeSet, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} for _, channelIDItem := range channelID { channelIDRule = append(channelIDRule, channelIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) + logs, sub, err := _Assetholdererc20.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) if err != nil { return nil, err } @@ -600,8 +651,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, s select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { + event := new(Assetholdererc20OutcomeSet) + if err := _Assetholdererc20.contract.UnpackLog(event, "OutcomeSet", log); err != nil { return err } event.Raw = log @@ -625,18 +676,18 @@ func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, s // ParseOutcomeSet is a log parse operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) ParseOutcomeSet(log types.Log) (*AssetHolderOutcomeSet, error) { - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { +func (_Assetholdererc20 *Assetholdererc20Filterer) ParseOutcomeSet(log types.Log) (*Assetholdererc20OutcomeSet, error) { + event := new(Assetholdererc20OutcomeSet) + if err := _Assetholdererc20.contract.UnpackLog(event, "OutcomeSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// AssetHolderWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the AssetHolder contract. -type AssetHolderWithdrawnIterator struct { - Event *AssetHolderWithdrawn // Event containing the contract specifics and raw log +// Assetholdererc20WithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the Assetholdererc20 contract. +type Assetholdererc20WithdrawnIterator struct { + Event *Assetholdererc20Withdrawn // 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 @@ -650,7 +701,7 @@ type AssetHolderWithdrawnIterator struct { // 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 *AssetHolderWithdrawnIterator) Next() bool { +func (it *Assetholdererc20WithdrawnIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -659,7 +710,7 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderWithdrawn) + it.Event = new(Assetholdererc20Withdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -674,7 +725,7 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderWithdrawn) + it.Event = new(Assetholdererc20Withdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -690,19 +741,19 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderWithdrawnIterator) Error() error { +func (it *Assetholdererc20WithdrawnIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderWithdrawnIterator) Close() error { +func (it *Assetholdererc20WithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderWithdrawn represents a Withdrawn event raised by the AssetHolder contract. -type AssetHolderWithdrawn struct { +// Assetholdererc20Withdrawn represents a Withdrawn event raised by the Assetholdererc20 contract. +type Assetholdererc20Withdrawn struct { FundingID [32]byte Amount *big.Int Receiver common.Address @@ -712,31 +763,31 @@ type AssetHolderWithdrawn struct { // FilterWithdrawn is a free log retrieval operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderWithdrawnIterator, error) { +func (_Assetholdererc20 *Assetholdererc20Filterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*Assetholdererc20WithdrawnIterator, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) + logs, sub, err := _Assetholdererc20.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) if err != nil { return nil, err } - return &AssetHolderWithdrawnIterator{contract: _AssetHolder.contract, event: "Withdrawn", logs: logs, sub: sub}, nil + return &Assetholdererc20WithdrawnIterator{contract: _Assetholdererc20.contract, event: "Withdrawn", logs: logs, sub: sub}, nil } // WatchWithdrawn is a free log subscription operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderWithdrawn, fundingID [][32]byte) (event.Subscription, error) { +func (_Assetholdererc20 *Assetholdererc20Filterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *Assetholdererc20Withdrawn, fundingID [][32]byte) (event.Subscription, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) + logs, sub, err := _Assetholdererc20.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) if err != nil { return nil, err } @@ -746,8 +797,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { + event := new(Assetholdererc20Withdrawn) + if err := _Assetholdererc20.contract.UnpackLog(event, "Withdrawn", log); err != nil { return err } event.Raw = log @@ -771,1911 +822,11 @@ func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, si // ParseWithdrawn is a log parse operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) ParseWithdrawn(log types.Log) (*AssetHolderWithdrawn, error) { - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { +func (_Assetholdererc20 *Assetholdererc20Filterer) ParseWithdrawn(log types.Log) (*Assetholdererc20Withdrawn, error) { + event := new(Assetholdererc20Withdrawn) + if err := _Assetholdererc20.contract.UnpackLog(event, "Withdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } - -// AssetHolderERC20ABI is the input ABI used to generate the binding from. -const AssetHolderERC20ABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adjudicator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// AssetHolderERC20FuncSigs maps the 4-byte function signature to its string representation. -var AssetHolderERC20FuncSigs = map[string]string{ - "53c2ed8e": "adjudicator()", - "1de26e16": "deposit(bytes32,uint256)", - "ae9ee18c": "holdings(bytes32)", - "fc79a66d": "setOutcome(bytes32,address[],uint256[])", - "d945af1d": "settled(bytes32)", - "fc0c546a": "token()", - "4ed4283c": "withdraw((bytes32,address,address,uint256),bytes)", -} - -// AssetHolderERC20Bin is the compiled bytecode used for deploying new contracts. -var AssetHolderERC20Bin = "0x60a060405234801561001057600080fd5b5060405161117e38038061117e83398101604081905261002f91610081565b600280546001600160a01b0319166001600160a01b03939093169290921790915560601b6001600160601b0319166080526100b3565b80516001600160a01b038116811461007c57600080fd5b919050565b60008060408385031215610093578182fd5b61009c83610065565b91506100aa60208401610065565b90509250929050565b60805160601c6110a46100da600039806103b6528061069052806107f652506110a46000f3fe6080604052600436106100705760003560e01c8063ae9ee18c1161004e578063ae9ee18c146100d5578063d945af1d14610102578063fc0c546a1461012f578063fc79a66d1461014457610070565b80631de26e16146100755780634ed4283c1461008a57806353c2ed8e146100aa575b600080fd5b610088610083366004610ca2565b610164565b005b34801561009657600080fd5b506100886100a5366004610cc3565b6101dc565b3480156100b657600080fd5b506100bf61037e565b6040516100cc9190610d48565b60405180910390f35b3480156100e157600080fd5b506100f56100f0366004610c13565b61038d565b6040516100cc9190611009565b34801561010e57600080fd5b5061012261011d366004610c13565b61039f565b6040516100cc9190610d99565b34801561013b57600080fd5b506100bf6103b4565b34801561015057600080fd5b5061008861015f366004610c2b565b6103d8565b61016e82826105f6565b6000828152602081905260409020546101879082610618565b6000838152602081905260409020556101a08282610679565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101d09190611009565b60405180910390a25050565b823560009081526001602052604090205460ff166102155760405162461bcd60e51b815260040161020c90610ec9565b60405180910390fd5b61027d836040516020016102299190610fbd565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610278925050506040870160208801610bd7565b610737565b6102995760405162461bcd60e51b815260040161020c90610e92565b60006102b584356102b06040870160208801610bd7565b610772565b600081815260208190526040902054909150606085013511156102ea5760405162461bcd60e51b815260040161020c90610f23565b6102f58484846107a5565b6000818152602081905260409020546103129060608601356107aa565b60008281526020819052604090205561032c8484846107ec565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103629060408901610bd7565b604051610370929190610da4565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002546001600160a01b031633146104025760405162461bcd60e51b815260040161020c90610f78565b8281146104215760405162461bcd60e51b815260040161020c90610e04565b60008581526001602052604090205460ff16156104505760405162461bcd60e51b815260040161020c90610e4d565b60008581526020819052604081208054908290559060608567ffffffffffffffff8111801561047e57600080fd5b506040519080825280602002602001820160405280156104a8578160200160208202803683370190505b50905060005b8681101561054f5760006104dd8a8a8a858181106104c857fe5b90506020020160208101906102b09190610bd7565b9050808383815181106104ec57fe5b60200260200101818152505061051d600080838152602001908152602001600020548661061890919063ffffffff16565b945061054487878481811061052e57fe5b905060200201358561061890919063ffffffff16565b9350506001016104ae565b508183106105a95760005b868110156105a75785858281811061056e57fe5b9050602002013560008084848151811061058457fe5b60209081029190910181015182528101919091526040016000205560010161055a565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b34156106145760405162461bcd60e51b815260040161020c90610dbb565b5050565b600082820183811015610672576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906106c990339030908690600401610d5c565b602060405180830381600087803b1580156106e357600080fd5b505af11580156106f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071b9190610bf3565b6106145760405162461bcd60e51b815260040161020c90610ef6565b60008061074a85805190602001206108bb565b90506000610758828661090c565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610787929190610da4565b60405160208183030381529060405280519060200120905092915050565b505050565b600061067283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610af7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61082b6060860160408701610bd7565b85606001356040518363ffffffff1660e01b815260040161084d929190610d80565b602060405180830381600087803b15801561086757600080fd5b505af115801561087b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089f9190610bf3565b6107a55760405162461bcd60e51b815260040161020c90610f4f565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610964576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156109d55760405162461bcd60e51b815260040180806020018281038252602281526020018061102b6022913960400191505060405180910390fd5b8060ff16601b141580156109ed57508060ff16601c14155b15610a295760405162461bcd60e51b815260040180806020018281038252602281526020018061104d6022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610a85573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610aed576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b60008184841115610b865760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b4b578181015183820152602001610b33565b50505050905090810190601f168015610b785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610b9f578182fd5b50813567ffffffffffffffff811115610bb6578182fd5b6020830191508360208083028501011115610bd057600080fd5b9250929050565b600060208284031215610be8578081fd5b813561067281611012565b600060208284031215610c04578081fd5b81518015158114610672578182fd5b600060208284031215610c24578081fd5b5035919050565b600080600080600060608688031215610c42578081fd5b85359450602086013567ffffffffffffffff80821115610c60578283fd5b610c6c89838a01610b8e565b90965094506040880135915080821115610c84578283fd5b50610c9188828901610b8e565b969995985093965092949392505050565b60008060408385031215610cb4578182fd5b50508035926020909101359150565b600080600083850360a0811215610cd8578384fd5b6080811215610ce5578384fd5b50839250608084013567ffffffffffffffff80821115610d03578384fd5b818601915086601f830112610d16578384fd5b813581811115610d24578485fd5b876020828501011115610d35578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b60208082526029908201527f6d6573736167652076616c7565206d757374206265203020666f7220746f6b656040820152681b8819195c1bdcda5d60ba1b606082015260800190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b6020808252601390820152721d1c985b9cd9995c919c9bdb4819985a5b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610fd381611012565b6001600160a01b039081166020840152604084013590610ff282611012565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b038116811461102757600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220bf42f863efe8ed8d071fb888e2c0ea424bfef9d5d084f9f44298ba7164531ab564736f6c63430007040033" - -// DeployAssetHolderERC20 deploys a new Ethereum contract, binding an instance of AssetHolderERC20 to it. -func DeployAssetHolderERC20(auth *bind.TransactOpts, backend bind.ContractBackend, _adjudicator common.Address, _token common.Address) (common.Address, *types.Transaction, *AssetHolderERC20, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AssetHolderERC20Bin), backend, _adjudicator, _token) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &AssetHolderERC20{AssetHolderERC20Caller: AssetHolderERC20Caller{contract: contract}, AssetHolderERC20Transactor: AssetHolderERC20Transactor{contract: contract}, AssetHolderERC20Filterer: AssetHolderERC20Filterer{contract: contract}}, nil -} - -// AssetHolderERC20 is an auto generated Go binding around an Ethereum contract. -type AssetHolderERC20 struct { - AssetHolderERC20Caller // Read-only binding to the contract - AssetHolderERC20Transactor // Write-only binding to the contract - AssetHolderERC20Filterer // Log filterer for contract events -} - -// AssetHolderERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type AssetHolderERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type AssetHolderERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AssetHolderERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AssetHolderERC20Session struct { - Contract *AssetHolderERC20 // 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 -} - -// AssetHolderERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AssetHolderERC20CallerSession struct { - Contract *AssetHolderERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AssetHolderERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AssetHolderERC20TransactorSession struct { - Contract *AssetHolderERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AssetHolderERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type AssetHolderERC20Raw struct { - Contract *AssetHolderERC20 // Generic contract binding to access the raw methods on -} - -// AssetHolderERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AssetHolderERC20CallerRaw struct { - Contract *AssetHolderERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// AssetHolderERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AssetHolderERC20TransactorRaw struct { - Contract *AssetHolderERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewAssetHolderERC20 creates a new instance of AssetHolderERC20, bound to a specific deployed contract. -func NewAssetHolderERC20(address common.Address, backend bind.ContractBackend) (*AssetHolderERC20, error) { - contract, err := bindAssetHolderERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &AssetHolderERC20{AssetHolderERC20Caller: AssetHolderERC20Caller{contract: contract}, AssetHolderERC20Transactor: AssetHolderERC20Transactor{contract: contract}, AssetHolderERC20Filterer: AssetHolderERC20Filterer{contract: contract}}, nil -} - -// NewAssetHolderERC20Caller creates a new read-only instance of AssetHolderERC20, bound to a specific deployed contract. -func NewAssetHolderERC20Caller(address common.Address, caller bind.ContractCaller) (*AssetHolderERC20Caller, error) { - contract, err := bindAssetHolderERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AssetHolderERC20Caller{contract: contract}, nil -} - -// NewAssetHolderERC20Transactor creates a new write-only instance of AssetHolderERC20, bound to a specific deployed contract. -func NewAssetHolderERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*AssetHolderERC20Transactor, error) { - contract, err := bindAssetHolderERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AssetHolderERC20Transactor{contract: contract}, nil -} - -// NewAssetHolderERC20Filterer creates a new log filterer instance of AssetHolderERC20, bound to a specific deployed contract. -func NewAssetHolderERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*AssetHolderERC20Filterer, error) { - contract, err := bindAssetHolderERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AssetHolderERC20Filterer{contract: contract}, nil -} - -// bindAssetHolderERC20 binds a generic wrapper to an already deployed contract. -func bindAssetHolderERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderERC20ABI)) - 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 (_AssetHolderERC20 *AssetHolderERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolderERC20.Contract.AssetHolderERC20Caller.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 (_AssetHolderERC20 *AssetHolderERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.AssetHolderERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AssetHolderERC20 *AssetHolderERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.AssetHolderERC20Transactor.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 (_AssetHolderERC20 *AssetHolderERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolderERC20.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 (_AssetHolderERC20 *AssetHolderERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AssetHolderERC20 *AssetHolderERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.contract.Transact(opts, method, params...) -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolderERC20 *AssetHolderERC20Caller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AssetHolderERC20.contract.Call(opts, &out, "adjudicator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolderERC20 *AssetHolderERC20Session) Adjudicator() (common.Address, error) { - return _AssetHolderERC20.Contract.Adjudicator(&_AssetHolderERC20.CallOpts) -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolderERC20 *AssetHolderERC20CallerSession) Adjudicator() (common.Address, error) { - return _AssetHolderERC20.Contract.Adjudicator(&_AssetHolderERC20.CallOpts) -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolderERC20 *AssetHolderERC20Caller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { - var out []interface{} - err := _AssetHolderERC20.contract.Call(opts, &out, "holdings", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolderERC20 *AssetHolderERC20Session) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolderERC20.Contract.Holdings(&_AssetHolderERC20.CallOpts, arg0) -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolderERC20 *AssetHolderERC20CallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolderERC20.Contract.Holdings(&_AssetHolderERC20.CallOpts, arg0) -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolderERC20 *AssetHolderERC20Caller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { - var out []interface{} - err := _AssetHolderERC20.contract.Call(opts, &out, "settled", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolderERC20 *AssetHolderERC20Session) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolderERC20.Contract.Settled(&_AssetHolderERC20.CallOpts, arg0) -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolderERC20 *AssetHolderERC20CallerSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolderERC20.Contract.Settled(&_AssetHolderERC20.CallOpts, arg0) -} - -// Token is a free data retrieval call binding the contract method 0xfc0c546a. -// -// Solidity: function token() view returns(address) -func (_AssetHolderERC20 *AssetHolderERC20Caller) Token(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AssetHolderERC20.contract.Call(opts, &out, "token") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Token is a free data retrieval call binding the contract method 0xfc0c546a. -// -// Solidity: function token() view returns(address) -func (_AssetHolderERC20 *AssetHolderERC20Session) Token() (common.Address, error) { - return _AssetHolderERC20.Contract.Token(&_AssetHolderERC20.CallOpts) -} - -// Token is a free data retrieval call binding the contract method 0xfc0c546a. -// -// Solidity: function token() view returns(address) -func (_AssetHolderERC20 *AssetHolderERC20CallerSession) Token() (common.Address, error) { - return _AssetHolderERC20.Contract.Token(&_AssetHolderERC20.CallOpts) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolderERC20 *AssetHolderERC20Transactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolderERC20.contract.Transact(opts, "deposit", fundingID, amount) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolderERC20 *AssetHolderERC20Session) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.Deposit(&_AssetHolderERC20.TransactOpts, fundingID, amount) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolderERC20 *AssetHolderERC20TransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.Deposit(&_AssetHolderERC20.TransactOpts, fundingID, amount) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolderERC20 *AssetHolderERC20Transactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolderERC20.contract.Transact(opts, "setOutcome", channelID, parts, newBals) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolderERC20 *AssetHolderERC20Session) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.SetOutcome(&_AssetHolderERC20.TransactOpts, channelID, parts, newBals) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolderERC20 *AssetHolderERC20TransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.SetOutcome(&_AssetHolderERC20.TransactOpts, channelID, parts, newBals) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolderERC20 *AssetHolderERC20Transactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolderERC20.contract.Transact(opts, "withdraw", authorization, signature) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolderERC20 *AssetHolderERC20Session) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.Withdraw(&_AssetHolderERC20.TransactOpts, authorization, signature) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolderERC20 *AssetHolderERC20TransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolderERC20.Contract.Withdraw(&_AssetHolderERC20.TransactOpts, authorization, signature) -} - -// AssetHolderERC20DepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the AssetHolderERC20 contract. -type AssetHolderERC20DepositedIterator struct { - Event *AssetHolderERC20Deposited // 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 *AssetHolderERC20DepositedIterator) 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(AssetHolderERC20Deposited) - 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(AssetHolderERC20Deposited) - 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 *AssetHolderERC20DepositedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderERC20DepositedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderERC20Deposited represents a Deposited event raised by the AssetHolderERC20 contract. -type AssetHolderERC20Deposited struct { - FundingID [32]byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeposited is a free log retrieval operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderERC20DepositedIterator, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderERC20.contract.FilterLogs(opts, "Deposited", fundingIDRule) - if err != nil { - return nil, err - } - return &AssetHolderERC20DepositedIterator{contract: _AssetHolderERC20.contract, event: "Deposited", logs: logs, sub: sub}, nil -} - -// WatchDeposited is a free log subscription operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetHolderERC20Deposited, fundingID [][32]byte) (event.Subscription, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderERC20.contract.WatchLogs(opts, "Deposited", fundingIDRule) - 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(AssetHolderERC20Deposited) - if err := _AssetHolderERC20.contract.UnpackLog(event, "Deposited", 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 -} - -// ParseDeposited is a log parse operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) ParseDeposited(log types.Log) (*AssetHolderERC20Deposited, error) { - event := new(AssetHolderERC20Deposited) - if err := _AssetHolderERC20.contract.UnpackLog(event, "Deposited", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// AssetHolderERC20OutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the AssetHolderERC20 contract. -type AssetHolderERC20OutcomeSetIterator struct { - Event *AssetHolderERC20OutcomeSet // 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 *AssetHolderERC20OutcomeSetIterator) 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(AssetHolderERC20OutcomeSet) - 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(AssetHolderERC20OutcomeSet) - 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 *AssetHolderERC20OutcomeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderERC20OutcomeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderERC20OutcomeSet represents a OutcomeSet event raised by the AssetHolderERC20 contract. -type AssetHolderERC20OutcomeSet struct { - ChannelID [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOutcomeSet is a free log retrieval operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetHolderERC20OutcomeSetIterator, error) { - - var channelIDRule []interface{} - for _, channelIDItem := range channelID { - channelIDRule = append(channelIDRule, channelIDItem) - } - - logs, sub, err := _AssetHolderERC20.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) - if err != nil { - return nil, err - } - return &AssetHolderERC20OutcomeSetIterator{contract: _AssetHolderERC20.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil -} - -// WatchOutcomeSet is a free log subscription operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetHolderERC20OutcomeSet, channelID [][32]byte) (event.Subscription, error) { - - var channelIDRule []interface{} - for _, channelIDItem := range channelID { - channelIDRule = append(channelIDRule, channelIDItem) - } - - logs, sub, err := _AssetHolderERC20.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) - 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(AssetHolderERC20OutcomeSet) - if err := _AssetHolderERC20.contract.UnpackLog(event, "OutcomeSet", 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 -} - -// ParseOutcomeSet is a log parse operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) ParseOutcomeSet(log types.Log) (*AssetHolderERC20OutcomeSet, error) { - event := new(AssetHolderERC20OutcomeSet) - if err := _AssetHolderERC20.contract.UnpackLog(event, "OutcomeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// AssetHolderERC20WithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the AssetHolderERC20 contract. -type AssetHolderERC20WithdrawnIterator struct { - Event *AssetHolderERC20Withdrawn // 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 *AssetHolderERC20WithdrawnIterator) 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(AssetHolderERC20Withdrawn) - 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(AssetHolderERC20Withdrawn) - 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 *AssetHolderERC20WithdrawnIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderERC20WithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderERC20Withdrawn represents a Withdrawn event raised by the AssetHolderERC20 contract. -type AssetHolderERC20Withdrawn struct { - FundingID [32]byte - Amount *big.Int - Receiver common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterWithdrawn is a free log retrieval operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderERC20WithdrawnIterator, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderERC20.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) - if err != nil { - return nil, err - } - return &AssetHolderERC20WithdrawnIterator{contract: _AssetHolderERC20.contract, event: "Withdrawn", logs: logs, sub: sub}, nil -} - -// WatchWithdrawn is a free log subscription operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderERC20Withdrawn, fundingID [][32]byte) (event.Subscription, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderERC20.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) - 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(AssetHolderERC20Withdrawn) - if err := _AssetHolderERC20.contract.UnpackLog(event, "Withdrawn", 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 -} - -// ParseWithdrawn is a log parse operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolderERC20 *AssetHolderERC20Filterer) ParseWithdrawn(log types.Log) (*AssetHolderERC20Withdrawn, error) { - event := new(AssetHolderERC20Withdrawn) - if err := _AssetHolderERC20.contract.UnpackLog(event, "Withdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ECDSAABI is the input ABI used to generate the binding from. -const ECDSAABI = "[]" - -// ECDSABin is the compiled bytecode used for deploying new contracts. -var ECDSABin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2e519b4a0a3509f02bba1abcf848979252df4c37ba062299b13fdabec46878464736f6c63430007040033" - -// DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it. -func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECDSABin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// ECDSA is an auto generated Go binding around an Ethereum contract. -type ECDSA struct { - ECDSACaller // Read-only binding to the contract - ECDSATransactor // Write-only binding to the contract - ECDSAFilterer // Log filterer for contract events -} - -// ECDSACaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSACaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSAFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSASession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSASession struct { - Contract *ECDSA // 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 -} - -// ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSACallerSession struct { - Contract *ECDSACaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATransactorSession struct { - Contract *ECDSATransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSARaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSARaw struct { - Contract *ECDSA // Generic contract binding to access the raw methods on -} - -// ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSACallerRaw struct { - Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATransactorRaw struct { - Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract. -func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) { - contract, err := bindECDSA(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) { - contract, err := bindECDSA(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSACaller{contract: contract}, nil -} - -// NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) { - contract, err := bindECDSA(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATransactor{contract: contract}, nil -} - -// NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract. -func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) { - contract, err := bindECDSA(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSAFilterer{contract: contract}, nil -} - -// bindECDSA binds a generic wrapper to an already deployed contract. -func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - 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 (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.Contract.ECDSACaller.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 (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.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 (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.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 (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transact(opts, method, params...) -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"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\":\"amount\",\"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\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // 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 -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.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 (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var out []interface{} - err := _IERC20.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 (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.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 (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _IERC20.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 (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _IERC20.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 (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // 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 *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval 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 (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, 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 := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.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 (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, 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 := _IERC20.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(IERC20Approval) - if err := _IERC20.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 (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // 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 *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer 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 (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, 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 := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.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 (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, 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 := _IERC20.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(IERC20Transfer) - if err := _IERC20.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 (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209d2110f8008a32668165aee96d39b9a3b210868f452685996027830739a87e3064736f6c63430007040033" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // 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 -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// SigABI is the input ABI used to generate the binding from. -const SigABI = "[]" - -// SigBin is the compiled bytecode used for deploying new contracts. -var SigBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c3751b740d506c41c776ad3c92ca113b46a314ff1f98b52d4b23f32eaccf354664736f6c63430007040033" - -// DeploySig deploys a new Ethereum contract, binding an instance of Sig to it. -func DeploySig(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Sig, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SigBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// Sig is an auto generated Go binding around an Ethereum contract. -type Sig struct { - SigCaller // Read-only binding to the contract - SigTransactor // Write-only binding to the contract - SigFilterer // Log filterer for contract events -} - -// SigCaller is an auto generated read-only Go binding around an Ethereum contract. -type SigCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SigTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SigFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SigSession struct { - Contract *Sig // 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 -} - -// SigCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SigCallerSession struct { - Contract *SigCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SigTransactorSession struct { - Contract *SigTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SigRaw is an auto generated low-level Go binding around an Ethereum contract. -type SigRaw struct { - Contract *Sig // Generic contract binding to access the raw methods on -} - -// SigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SigCallerRaw struct { - Contract *SigCaller // Generic read-only contract binding to access the raw methods on -} - -// SigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SigTransactorRaw struct { - Contract *SigTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSig creates a new instance of Sig, bound to a specific deployed contract. -func NewSig(address common.Address, backend bind.ContractBackend) (*Sig, error) { - contract, err := bindSig(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// NewSigCaller creates a new read-only instance of Sig, bound to a specific deployed contract. -func NewSigCaller(address common.Address, caller bind.ContractCaller) (*SigCaller, error) { - contract, err := bindSig(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SigCaller{contract: contract}, nil -} - -// NewSigTransactor creates a new write-only instance of Sig, bound to a specific deployed contract. -func NewSigTransactor(address common.Address, transactor bind.ContractTransactor) (*SigTransactor, error) { - contract, err := bindSig(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SigTransactor{contract: contract}, nil -} - -// NewSigFilterer creates a new log filterer instance of Sig, bound to a specific deployed contract. -func NewSigFilterer(address common.Address, filterer bind.ContractFilterer) (*SigFilterer, error) { - contract, err := bindSig(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SigFilterer{contract: contract}, nil -} - -// bindSig binds a generic wrapper to an already deployed contract. -func bindSig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - 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 (_Sig *SigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.Contract.SigCaller.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 (_Sig *SigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.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 (_Sig *SigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.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 (_Sig *SigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.contract.Transact(opts, method, params...) -} diff --git a/bindings/assetholdererc20/AssetHolderERC20BinRuntime.go b/bindings/assetholdererc20/AssetHolderERC20BinRuntime.go index 657bfab..6ae34b7 100644 --- a/bindings/assetholdererc20/AssetHolderERC20BinRuntime.go +++ b/bindings/assetholdererc20/AssetHolderERC20BinRuntime.go @@ -1,4 +1,4 @@ package assetholdererc20 // import "github.com/perun-network/perun-eth-backend/bindings/assetholdererc20" // AssetHolderERC20BinRuntime is the runtime part of the compiled bytecode used for deploying new contracts. -var AssetHolderERC20BinRuntime = "6080604052600436106100705760003560e01c8063ae9ee18c1161004e578063ae9ee18c146100d5578063d945af1d14610102578063fc0c546a1461012f578063fc79a66d1461014457610070565b80631de26e16146100755780634ed4283c1461008a57806353c2ed8e146100aa575b600080fd5b610088610083366004610ca2565b610164565b005b34801561009657600080fd5b506100886100a5366004610cc3565b6101dc565b3480156100b657600080fd5b506100bf61037e565b6040516100cc9190610d48565b60405180910390f35b3480156100e157600080fd5b506100f56100f0366004610c13565b61038d565b6040516100cc9190611009565b34801561010e57600080fd5b5061012261011d366004610c13565b61039f565b6040516100cc9190610d99565b34801561013b57600080fd5b506100bf6103b4565b34801561015057600080fd5b5061008861015f366004610c2b565b6103d8565b61016e82826105f6565b6000828152602081905260409020546101879082610618565b6000838152602081905260409020556101a08282610679565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101d09190611009565b60405180910390a25050565b823560009081526001602052604090205460ff166102155760405162461bcd60e51b815260040161020c90610ec9565b60405180910390fd5b61027d836040516020016102299190610fbd565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610278925050506040870160208801610bd7565b610737565b6102995760405162461bcd60e51b815260040161020c90610e92565b60006102b584356102b06040870160208801610bd7565b610772565b600081815260208190526040902054909150606085013511156102ea5760405162461bcd60e51b815260040161020c90610f23565b6102f58484846107a5565b6000818152602081905260409020546103129060608601356107aa565b60008281526020819052604090205561032c8484846107ec565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103629060408901610bd7565b604051610370929190610da4565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002546001600160a01b031633146104025760405162461bcd60e51b815260040161020c90610f78565b8281146104215760405162461bcd60e51b815260040161020c90610e04565b60008581526001602052604090205460ff16156104505760405162461bcd60e51b815260040161020c90610e4d565b60008581526020819052604081208054908290559060608567ffffffffffffffff8111801561047e57600080fd5b506040519080825280602002602001820160405280156104a8578160200160208202803683370190505b50905060005b8681101561054f5760006104dd8a8a8a858181106104c857fe5b90506020020160208101906102b09190610bd7565b9050808383815181106104ec57fe5b60200260200101818152505061051d600080838152602001908152602001600020548661061890919063ffffffff16565b945061054487878481811061052e57fe5b905060200201358561061890919063ffffffff16565b9350506001016104ae565b508183106105a95760005b868110156105a75785858281811061056e57fe5b9050602002013560008084848151811061058457fe5b60209081029190910181015182528101919091526040016000205560010161055a565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b34156106145760405162461bcd60e51b815260040161020c90610dbb565b5050565b600082820183811015610672576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906106c990339030908690600401610d5c565b602060405180830381600087803b1580156106e357600080fd5b505af11580156106f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071b9190610bf3565b6106145760405162461bcd60e51b815260040161020c90610ef6565b60008061074a85805190602001206108bb565b90506000610758828661090c565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610787929190610da4565b60405160208183030381529060405280519060200120905092915050565b505050565b600061067283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610af7565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61082b6060860160408701610bd7565b85606001356040518363ffffffff1660e01b815260040161084d929190610d80565b602060405180830381600087803b15801561086757600080fd5b505af115801561087b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089f9190610bf3565b6107a55760405162461bcd60e51b815260040161020c90610f4f565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610964576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156109d55760405162461bcd60e51b815260040180806020018281038252602281526020018061102b6022913960400191505060405180910390fd5b8060ff16601b141580156109ed57508060ff16601c14155b15610a295760405162461bcd60e51b815260040180806020018281038252602281526020018061104d6022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610a85573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610aed576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b60008184841115610b865760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b4b578181015183820152602001610b33565b50505050905090810190601f168015610b785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610b9f578182fd5b50813567ffffffffffffffff811115610bb6578182fd5b6020830191508360208083028501011115610bd057600080fd5b9250929050565b600060208284031215610be8578081fd5b813561067281611012565b600060208284031215610c04578081fd5b81518015158114610672578182fd5b600060208284031215610c24578081fd5b5035919050565b600080600080600060608688031215610c42578081fd5b85359450602086013567ffffffffffffffff80821115610c60578283fd5b610c6c89838a01610b8e565b90965094506040880135915080821115610c84578283fd5b50610c9188828901610b8e565b969995985093965092949392505050565b60008060408385031215610cb4578182fd5b50508035926020909101359150565b600080600083850360a0811215610cd8578384fd5b6080811215610ce5578384fd5b50839250608084013567ffffffffffffffff80821115610d03578384fd5b818601915086601f830112610d16578384fd5b813581811115610d24578485fd5b876020828501011115610d35578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b60208082526029908201527f6d6573736167652076616c7565206d757374206265203020666f7220746f6b656040820152681b8819195c1bdcda5d60ba1b606082015260800190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b6020808252601390820152721d1c985b9cd9995c919c9bdb4819985a5b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610fd381611012565b6001600160a01b039081166020840152604084013590610ff282611012565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b038116811461102757600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220bf42f863efe8ed8d071fb888e2c0ea424bfef9d5d084f9f44298ba7164531ab564736f6c63430007040033" +var AssetHolderERC20BinRuntime = "6080604052600436106100705760003560e01c8063ae9ee18c1161004e578063ae9ee18c146100d5578063d945af1d14610102578063fc0c546a1461012f578063fc79a66d1461014457610070565b80631de26e16146100755780634ed4283c1461008a57806353c2ed8e146100aa575b600080fd5b610088610083366004610ca1565b610164565b005b34801561009657600080fd5b506100886100a5366004610cc2565b6101dc565b3480156100b657600080fd5b506100bf61037e565b6040516100cc9190610d47565b60405180910390f35b3480156100e157600080fd5b506100f56100f0366004610c12565b61038d565b6040516100cc9190611008565b34801561010e57600080fd5b5061012261011d366004610c12565b61039f565b6040516100cc9190610d98565b34801561013b57600080fd5b506100bf6103b4565b34801561015057600080fd5b5061008861015f366004610c2a565b6103d8565b61016e82826105f5565b6000828152602081905260409020546101879082610617565b6000838152602081905260409020556101a08282610678565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101d09190611008565b60405180910390a25050565b823560009081526001602052604090205460ff166102155760405162461bcd60e51b815260040161020c90610ec8565b60405180910390fd5b61027d836040516020016102299190610fbc565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610278925050506040870160208801610bd6565b610736565b6102995760405162461bcd60e51b815260040161020c90610e91565b60006102b584356102b06040870160208801610bd6565b610771565b600081815260208190526040902054909150606085013511156102ea5760405162461bcd60e51b815260040161020c90610f22565b6102f58484846107a4565b6000818152602081905260409020546103129060608601356107a9565b60008281526020819052604090205561032c8484846107eb565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103629060408901610bd6565b604051610370929190610da3565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002546001600160a01b031633146104025760405162461bcd60e51b815260040161020c90610f77565b8281146104215760405162461bcd60e51b815260040161020c90610e03565b60008581526001602052604090205460ff16156104505760405162461bcd60e51b815260040161020c90610e4c565b600085815260208190526040812080549082905590808567ffffffffffffffff8111801561047d57600080fd5b506040519080825280602002602001820160405280156104a7578160200160208202803683370190505b50905060005b8681101561054e5760006104dc8a8a8a858181106104c757fe5b90506020020160208101906102b09190610bd6565b9050808383815181106104eb57fe5b60200260200101818152505061051c600080838152602001908152602001600020548661061790919063ffffffff16565b945061054387878481811061052d57fe5b905060200201358561061790919063ffffffff16565b9350506001016104ad565b508183106105a85760005b868110156105a65785858281811061056d57fe5b9050602002013560008084848151811061058357fe5b602090810291909101810151825281019190915260400160002055600101610559565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b34156106135760405162461bcd60e51b815260040161020c90610dba565b5050565b600082820183811015610671576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906106c890339030908690600401610d5b565b602060405180830381600087803b1580156106e257600080fd5b505af11580156106f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071a9190610bf2565b6106135760405162461bcd60e51b815260040161020c90610ef5565b60008061074985805190602001206108ba565b90506000610757828661090b565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610786929190610da3565b60405160208183030381529060405280519060200120905092915050565b505050565b600061067183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610af6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb61082a6060860160408701610bd6565b85606001356040518363ffffffff1660e01b815260040161084c929190610d7f565b602060405180830381600087803b15801561086657600080fd5b505af115801561087a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089e9190610bf2565b6107a45760405162461bcd60e51b815260040161020c90610f4e565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60008151604114610963576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156109d45760405162461bcd60e51b815260040180806020018281038252602281526020018061102a6022913960400191505060405180910390fd5b8060ff16601b141580156109ec57508060ff16601c14155b15610a285760405162461bcd60e51b815260040180806020018281038252602281526020018061104c6022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610a84573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610aec576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b60008184841115610b855760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b4a578181015183820152602001610b32565b50505050905090810190601f168015610b775780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610b9e578182fd5b50813567ffffffffffffffff811115610bb5578182fd5b6020830191508360208083028501011115610bcf57600080fd5b9250929050565b600060208284031215610be7578081fd5b813561067181611011565b600060208284031215610c03578081fd5b81518015158114610671578182fd5b600060208284031215610c23578081fd5b5035919050565b600080600080600060608688031215610c41578081fd5b85359450602086013567ffffffffffffffff80821115610c5f578283fd5b610c6b89838a01610b8d565b90965094506040880135915080821115610c83578283fd5b50610c9088828901610b8d565b969995985093965092949392505050565b60008060408385031215610cb3578182fd5b50508035926020909101359150565b600080600083850360a0811215610cd7578384fd5b6080811215610ce4578384fd5b50839250608084013567ffffffffffffffff80821115610d02578384fd5b818601915086601f830112610d15578384fd5b813581811115610d23578485fd5b876020828501011115610d34578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b60208082526029908201527f6d6573736167652076616c7565206d757374206265203020666f7220746f6b656040820152681b8819195c1bdcda5d60ba1b606082015260800190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b6020808252601390820152721d1c985b9cd9995c919c9bdb4819985a5b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b6020808252600f908201526e1d1c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610fd281611011565b6001600160a01b039081166020840152604084013590610ff182611011565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b038116811461102657600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220441e00a9bed7c5521f586ebaecb9a8d06eae551b576d1c8f38b4cab39302dfce64736f6c63430007060033" diff --git a/bindings/assetholdereth/AssetHolderETH.go b/bindings/assetholdereth/AssetHolderETH.go index fb5e887..8d0a28a 100644 --- a/bindings/assetholdereth/AssetHolderETH.go +++ b/bindings/assetholdereth/AssetHolderETH.go @@ -4,6 +4,7 @@ package assetholdereth import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -34,117 +36,135 @@ type AssetHolderWithdrawalAuth struct { Amount *big.Int } -// AssetHolderABI is the input ABI used to generate the binding from. -const AssetHolderABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// AssetholderethMetaData contains all meta data concerning the Assetholdereth contract. +var AssetholderethMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adjudicator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50604051610ee1380380610ee183398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610e50806100916000396000f3fe6080604052600436106100555760003560e01c80631de26e161461005a5780634ed4283c1461006f57806353c2ed8e1461008f578063ae9ee18c146100ba578063d945af1d146100e7578063fc79a66d14610114575b600080fd5b61006d610068366004610af3565b610134565b005b34801561007b57600080fd5b5061006d61008a366004610b14565b6101ac565b34801561009b57600080fd5b506100a461034e565b6040516100b19190610b99565b60405180910390f35b3480156100c657600080fd5b506100da6100d5366004610a64565b61035d565b6040516100b19190610db5565b3480156100f357600080fd5b50610107610102366004610a64565b61036f565b6040516100b19190610bad565b34801561012057600080fd5b5061006d61012f366004610a7c565b610384565b61013e82826105a1565b60008281526020819052604090205461015790826105c4565b60008381526020819052604090205561017082826105c0565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101a09190610db5565b60405180910390a25050565b823560009081526001602052604090205460ff166101e55760405162461bcd60e51b81526004016101dc90610ccb565b60405180910390fd5b61024d836040516020016101f99190610d69565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610248925050506040870160208801610a48565b610625565b6102695760405162461bcd60e51b81526004016101dc90610c94565b600061028584356102806040870160208801610a48565b610660565b600081815260208190526040902054909150606085013511156102ba5760405162461bcd60e51b81526004016101dc90610cf8565b6102c5848484610693565b6000818152602081905260409020546102e2906060860135610698565b6000828152602081905260409020556102fc8484846106da565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103329060408901610a48565b604051610340929190610bb8565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b6002546001600160a01b031633146103ae5760405162461bcd60e51b81526004016101dc90610d24565b8281146103cd5760405162461bcd60e51b81526004016101dc90610c06565b60008581526001602052604090205460ff16156103fc5760405162461bcd60e51b81526004016101dc90610c4f565b600085815260208190526040812080549082905590808567ffffffffffffffff8111801561042957600080fd5b50604051908082528060200260200182016040528015610453578160200160208202803683370190505b50905060005b868110156104fa5760006104888a8a8a8581811061047357fe5b90506020020160208101906102809190610a48565b90508083838151811061049757fe5b6020026020010181815250506104c860008083815260200190815260200160002054866105c490919063ffffffff16565b94506104ef8787848181106104d957fe5b90506020020135856105c490919063ffffffff16565b935050600101610459565b508183106105545760005b868110156105525785858281811061051957fe5b9050602002013560008084848151811061052f57fe5b602090810291909101810151825281019190915260400160002055600101610505565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b8034146105c05760405162461bcd60e51b81526004016101dc90610bcf565b5050565b60008282018381101561061e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600080610638858051906020012061072c565b90506000610646828661077d565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610675929190610bb8565b60405160208183030381529060405280519060200120905092915050565b505050565b600061061e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610968565b6106ea6060840160408501610a48565b6001600160a01b03166108fc84606001359081150290604051600060405180830381858888f19350505050158015610726573d6000803e3d6000fd5b50505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600081516041146107d5576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156108465760405162461bcd60e51b8152600401808060200182810382526022815260200180610dd76022913960400191505060405180910390fd5b8060ff16601b1415801561085e57508060ff16601c14155b1561089a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610df96022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156108f6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661095e576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b600081848411156109f75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109bc5781810151838201526020016109a4565b50505050905090810190601f1680156109e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610a10578182fd5b50813567ffffffffffffffff811115610a27578182fd5b6020830191508360208083028501011115610a4157600080fd5b9250929050565b600060208284031215610a59578081fd5b813561061e81610dbe565b600060208284031215610a75578081fd5b5035919050565b600080600080600060608688031215610a93578081fd5b85359450602086013567ffffffffffffffff80821115610ab1578283fd5b610abd89838a016109ff565b90965094506040880135915080821115610ad5578283fd5b50610ae2888289016109ff565b969995985093965092949392505050565b60008060408385031215610b05578182fd5b50508035926020909101359150565b600080600083850360a0811215610b29578384fd5b6080811215610b36578384fd5b50839250608084013567ffffffffffffffff80821115610b54578384fd5b818601915086601f830112610b67578384fd5b813581811115610b75578485fd5b876020828501011115610b86578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b6020808252601f908201527f77726f6e6720616d6f756e74206f662045544820666f72206465706f73697400604082015260600190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610d7f81610dbe565b6001600160a01b039081166020840152604084013590610d9e82610dbe565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b0381168114610dd357600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220e505c52fddf1f01bcdc24aed9acbce73904dc75050e922c1189b968cfaa3f6f064736f6c63430007060033", +} + +// AssetholderethABI is the input ABI used to generate the binding from. +// Deprecated: Use AssetholderethMetaData.ABI instead. +var AssetholderethABI = AssetholderethMetaData.ABI + +// AssetholderethBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use AssetholderethMetaData.Bin instead. +var AssetholderethBin = AssetholderethMetaData.Bin + +// DeployAssetholdereth deploys a new Ethereum contract, binding an instance of Assetholdereth to it. +func DeployAssetholdereth(auth *bind.TransactOpts, backend bind.ContractBackend, _adjudicator common.Address) (common.Address, *types.Transaction, *Assetholdereth, error) { + parsed, err := AssetholderethMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } -// AssetHolderFuncSigs maps the 4-byte function signature to its string representation. -var AssetHolderFuncSigs = map[string]string{ - "53c2ed8e": "adjudicator()", - "1de26e16": "deposit(bytes32,uint256)", - "ae9ee18c": "holdings(bytes32)", - "fc79a66d": "setOutcome(bytes32,address[],uint256[])", - "d945af1d": "settled(bytes32)", - "4ed4283c": "withdraw((bytes32,address,address,uint256),bytes)", + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AssetholderethBin), backend, _adjudicator) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &Assetholdereth{AssetholderethCaller: AssetholderethCaller{contract: contract}, AssetholderethTransactor: AssetholderethTransactor{contract: contract}, AssetholderethFilterer: AssetholderethFilterer{contract: contract}}, nil } -// AssetHolder is an auto generated Go binding around an Ethereum contract. -type AssetHolder struct { - AssetHolderCaller // Read-only binding to the contract - AssetHolderTransactor // Write-only binding to the contract - AssetHolderFilterer // Log filterer for contract events +// Assetholdereth is an auto generated Go binding around an Ethereum contract. +type Assetholdereth struct { + AssetholderethCaller // Read-only binding to the contract + AssetholderethTransactor // Write-only binding to the contract + AssetholderethFilterer // Log filterer for contract events } -// AssetHolderCaller is an auto generated read-only Go binding around an Ethereum contract. -type AssetHolderCaller struct { +// AssetholderethCaller is an auto generated read-only Go binding around an Ethereum contract. +type AssetholderethCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AssetHolderTransactor struct { +// AssetholderethTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AssetholderethTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AssetHolderFilterer struct { +// AssetholderethFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AssetholderethFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// AssetHolderSession is an auto generated Go binding around an Ethereum contract, +// AssetholderethSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type AssetHolderSession struct { - Contract *AssetHolder // Generic contract binding to set the session for +type AssetholderethSession struct { + Contract *Assetholdereth // 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 } -// AssetHolderCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// AssetholderethCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type AssetHolderCallerSession struct { - Contract *AssetHolderCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session +type AssetholderethCallerSession struct { + Contract *AssetholderethCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session } -// AssetHolderTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// AssetholderethTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type AssetHolderTransactorSession struct { - Contract *AssetHolderTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +type AssetholderethTransactorSession struct { + Contract *AssetholderethTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// AssetHolderRaw is an auto generated low-level Go binding around an Ethereum contract. -type AssetHolderRaw struct { - Contract *AssetHolder // Generic contract binding to access the raw methods on +// AssetholderethRaw is an auto generated low-level Go binding around an Ethereum contract. +type AssetholderethRaw struct { + Contract *Assetholdereth // Generic contract binding to access the raw methods on } -// AssetHolderCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AssetHolderCallerRaw struct { - Contract *AssetHolderCaller // Generic read-only contract binding to access the raw methods on +// AssetholderethCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AssetholderethCallerRaw struct { + Contract *AssetholderethCaller // Generic read-only contract binding to access the raw methods on } -// AssetHolderTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AssetHolderTransactorRaw struct { - Contract *AssetHolderTransactor // Generic write-only contract binding to access the raw methods on +// AssetholderethTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AssetholderethTransactorRaw struct { + Contract *AssetholderethTransactor // Generic write-only contract binding to access the raw methods on } -// NewAssetHolder creates a new instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolder(address common.Address, backend bind.ContractBackend) (*AssetHolder, error) { - contract, err := bindAssetHolder(address, backend, backend, backend) +// NewAssetholdereth creates a new instance of Assetholdereth, bound to a specific deployed contract. +func NewAssetholdereth(address common.Address, backend bind.ContractBackend) (*Assetholdereth, error) { + contract, err := bindAssetholdereth(address, backend, backend, backend) if err != nil { return nil, err } - return &AssetHolder{AssetHolderCaller: AssetHolderCaller{contract: contract}, AssetHolderTransactor: AssetHolderTransactor{contract: contract}, AssetHolderFilterer: AssetHolderFilterer{contract: contract}}, nil + return &Assetholdereth{AssetholderethCaller: AssetholderethCaller{contract: contract}, AssetholderethTransactor: AssetholderethTransactor{contract: contract}, AssetholderethFilterer: AssetholderethFilterer{contract: contract}}, nil } -// NewAssetHolderCaller creates a new read-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderCaller(address common.Address, caller bind.ContractCaller) (*AssetHolderCaller, error) { - contract, err := bindAssetHolder(address, caller, nil, nil) +// NewAssetholderethCaller creates a new read-only instance of Assetholdereth, bound to a specific deployed contract. +func NewAssetholderethCaller(address common.Address, caller bind.ContractCaller) (*AssetholderethCaller, error) { + contract, err := bindAssetholdereth(address, caller, nil, nil) if err != nil { return nil, err } - return &AssetHolderCaller{contract: contract}, nil + return &AssetholderethCaller{contract: contract}, nil } -// NewAssetHolderTransactor creates a new write-only instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetHolderTransactor, error) { - contract, err := bindAssetHolder(address, nil, transactor, nil) +// NewAssetholderethTransactor creates a new write-only instance of Assetholdereth, bound to a specific deployed contract. +func NewAssetholderethTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetholderethTransactor, error) { + contract, err := bindAssetholdereth(address, nil, transactor, nil) if err != nil { return nil, err } - return &AssetHolderTransactor{contract: contract}, nil + return &AssetholderethTransactor{contract: contract}, nil } -// NewAssetHolderFilterer creates a new log filterer instance of AssetHolder, bound to a specific deployed contract. -func NewAssetHolderFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetHolderFilterer, error) { - contract, err := bindAssetHolder(address, nil, nil, filterer) +// NewAssetholderethFilterer creates a new log filterer instance of Assetholdereth, bound to a specific deployed contract. +func NewAssetholderethFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetholderethFilterer, error) { + contract, err := bindAssetholdereth(address, nil, nil, filterer) if err != nil { return nil, err } - return &AssetHolderFilterer{contract: contract}, nil + return &AssetholderethFilterer{contract: contract}, nil } -// bindAssetHolder binds a generic wrapper to an already deployed contract. -func bindAssetHolder(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderABI)) +// bindAssetholdereth binds a generic wrapper to an already deployed contract. +func bindAssetholdereth(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AssetholderethABI)) if err != nil { return nil, err } @@ -155,46 +175,46 @@ func bindAssetHolder(address common.Address, caller bind.ContractCaller, transac // 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 (_AssetHolder *AssetHolderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.AssetHolderCaller.contract.Call(opts, result, method, params...) +func (_Assetholdereth *AssetholderethRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Assetholdereth.Contract.AssetholderethCaller.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 (_AssetHolder *AssetHolderRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transfer(opts) +func (_Assetholdereth *AssetholderethRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Assetholdereth.Contract.AssetholderethTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.AssetHolderTransactor.contract.Transact(opts, method, params...) +func (_Assetholdereth *AssetholderethRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Assetholdereth.Contract.AssetholderethTransactor.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 (_AssetHolder *AssetHolderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolder.Contract.contract.Call(opts, result, method, params...) +func (_Assetholdereth *AssetholderethCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Assetholdereth.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 (_AssetHolder *AssetHolderTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transfer(opts) +func (_Assetholdereth *AssetholderethTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Assetholdereth.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_AssetHolder *AssetHolderTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolder.Contract.contract.Transact(opts, method, params...) +func (_Assetholdereth *AssetholderethTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Assetholdereth.Contract.contract.Transact(opts, method, params...) } // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { +func (_Assetholdereth *AssetholderethCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "adjudicator") + err := _Assetholdereth.contract.Call(opts, &out, "adjudicator") if err != nil { return *new(common.Address), err @@ -209,23 +229,23 @@ func (_AssetHolder *AssetHolderCaller) Adjudicator(opts *bind.CallOpts) (common. // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) +func (_Assetholdereth *AssetholderethSession) Adjudicator() (common.Address, error) { + return _Assetholdereth.Contract.Adjudicator(&_Assetholdereth.CallOpts) } // Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. // // Solidity: function adjudicator() view returns(address) -func (_AssetHolder *AssetHolderCallerSession) Adjudicator() (common.Address, error) { - return _AssetHolder.Contract.Adjudicator(&_AssetHolder.CallOpts) +func (_Assetholdereth *AssetholderethCallerSession) Adjudicator() (common.Address, error) { + return _Assetholdereth.Contract.Adjudicator(&_Assetholdereth.CallOpts) } // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { +func (_Assetholdereth *AssetholderethCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "holdings", arg0) + err := _Assetholdereth.contract.Call(opts, &out, "holdings", arg0) if err != nil { return *new(*big.Int), err @@ -240,23 +260,23 @@ func (_AssetHolder *AssetHolderCaller) Holdings(opts *bind.CallOpts, arg0 [32]by // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) +func (_Assetholdereth *AssetholderethSession) Holdings(arg0 [32]byte) (*big.Int, error) { + return _Assetholdereth.Contract.Holdings(&_Assetholdereth.CallOpts, arg0) } // Holdings is a free data retrieval call binding the contract method 0xae9ee18c. // // Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolder *AssetHolderCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolder.Contract.Holdings(&_AssetHolder.CallOpts, arg0) +func (_Assetholdereth *AssetholderethCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { + return _Assetholdereth.Contract.Holdings(&_Assetholdereth.CallOpts, arg0) } // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { +func (_Assetholdereth *AssetholderethCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { var out []interface{} - err := _AssetHolder.contract.Call(opts, &out, "settled", arg0) + err := _Assetholdereth.contract.Call(opts, &out, "settled", arg0) if err != nil { return *new(bool), err @@ -271,83 +291,83 @@ func (_AssetHolder *AssetHolderCaller) Settled(opts *bind.CallOpts, arg0 [32]byt // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) +func (_Assetholdereth *AssetholderethSession) Settled(arg0 [32]byte) (bool, error) { + return _Assetholdereth.Contract.Settled(&_Assetholdereth.CallOpts, arg0) } // Settled is a free data retrieval call binding the contract method 0xd945af1d. // // Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolder *AssetHolderCallerSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolder.Contract.Settled(&_AssetHolder.CallOpts, arg0) +func (_Assetholdereth *AssetholderethCallerSession) Settled(arg0 [32]byte) (bool, error) { + return _Assetholdereth.Contract.Settled(&_Assetholdereth.CallOpts, arg0) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "deposit", fundingID, amount) +func (_Assetholdereth *AssetholderethTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholdereth.contract.Transact(opts, "deposit", fundingID, amount) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) +func (_Assetholdereth *AssetholderethSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholdereth.Contract.Deposit(&_Assetholdereth.TransactOpts, fundingID, amount) } // Deposit is a paid mutator transaction binding the contract method 0x1de26e16. // // Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolder *AssetHolderTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.Deposit(&_AssetHolder.TransactOpts, fundingID, amount) +func (_Assetholdereth *AssetholderethTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { + return _Assetholdereth.Contract.Deposit(&_Assetholdereth.TransactOpts, fundingID, amount) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "setOutcome", channelID, parts, newBals) +func (_Assetholdereth *AssetholderethTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholdereth.contract.Transact(opts, "setOutcome", channelID, parts, newBals) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) +func (_Assetholdereth *AssetholderethSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholdereth.Contract.SetOutcome(&_Assetholdereth.TransactOpts, channelID, parts, newBals) } // SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. // // Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolder *AssetHolderTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolder.Contract.SetOutcome(&_AssetHolder.TransactOpts, channelID, parts, newBals) +func (_Assetholdereth *AssetholderethTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { + return _Assetholdereth.Contract.SetOutcome(&_Assetholdereth.TransactOpts, channelID, parts, newBals) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.contract.Transact(opts, "withdraw", authorization, signature) +func (_Assetholdereth *AssetholderethTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholdereth.contract.Transact(opts, "withdraw", authorization, signature) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) +func (_Assetholdereth *AssetholderethSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholdereth.Contract.Withdraw(&_Assetholdereth.TransactOpts, authorization, signature) } // Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. // // Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolder *AssetHolderTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolder.Contract.Withdraw(&_AssetHolder.TransactOpts, authorization, signature) +func (_Assetholdereth *AssetholderethTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { + return _Assetholdereth.Contract.Withdraw(&_Assetholdereth.TransactOpts, authorization, signature) } -// AssetHolderDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the AssetHolder contract. -type AssetHolderDepositedIterator struct { - Event *AssetHolderDeposited // Event containing the contract specifics and raw log +// AssetholderethDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the Assetholdereth contract. +type AssetholderethDepositedIterator struct { + Event *AssetholderethDeposited // 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 @@ -361,7 +381,7 @@ type AssetHolderDepositedIterator struct { // 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 *AssetHolderDepositedIterator) Next() bool { +func (it *AssetholderethDepositedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -370,7 +390,7 @@ func (it *AssetHolderDepositedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderDeposited) + it.Event = new(AssetholderethDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -385,7 +405,7 @@ func (it *AssetHolderDepositedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderDeposited) + it.Event = new(AssetholderethDeposited) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -401,19 +421,19 @@ func (it *AssetHolderDepositedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderDepositedIterator) Error() error { +func (it *AssetholderethDepositedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderDepositedIterator) Close() error { +func (it *AssetholderethDepositedIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderDeposited represents a Deposited event raised by the AssetHolder contract. -type AssetHolderDeposited struct { +// AssetholderethDeposited represents a Deposited event raised by the Assetholdereth contract. +type AssetholderethDeposited struct { FundingID [32]byte Amount *big.Int Raw types.Log // Blockchain specific contextual infos @@ -422,31 +442,31 @@ type AssetHolderDeposited struct { // FilterDeposited is a free log retrieval operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderDepositedIterator, error) { +func (_Assetholdereth *AssetholderethFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetholderethDepositedIterator, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Deposited", fundingIDRule) + logs, sub, err := _Assetholdereth.contract.FilterLogs(opts, "Deposited", fundingIDRule) if err != nil { return nil, err } - return &AssetHolderDepositedIterator{contract: _AssetHolder.contract, event: "Deposited", logs: logs, sub: sub}, nil + return &AssetholderethDepositedIterator{contract: _Assetholdereth.contract, event: "Deposited", logs: logs, sub: sub}, nil } // WatchDeposited is a free log subscription operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetHolderDeposited, fundingID [][32]byte) (event.Subscription, error) { +func (_Assetholdereth *AssetholderethFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetholderethDeposited, fundingID [][32]byte) (event.Subscription, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Deposited", fundingIDRule) + logs, sub, err := _Assetholdereth.contract.WatchLogs(opts, "Deposited", fundingIDRule) if err != nil { return nil, err } @@ -456,8 +476,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { + event := new(AssetholderethDeposited) + if err := _Assetholdereth.contract.UnpackLog(event, "Deposited", log); err != nil { return err } event.Raw = log @@ -481,18 +501,18 @@ func (_AssetHolder *AssetHolderFilterer) WatchDeposited(opts *bind.WatchOpts, si // ParseDeposited is a log parse operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. // // Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolder *AssetHolderFilterer) ParseDeposited(log types.Log) (*AssetHolderDeposited, error) { - event := new(AssetHolderDeposited) - if err := _AssetHolder.contract.UnpackLog(event, "Deposited", log); err != nil { +func (_Assetholdereth *AssetholderethFilterer) ParseDeposited(log types.Log) (*AssetholderethDeposited, error) { + event := new(AssetholderethDeposited) + if err := _Assetholdereth.contract.UnpackLog(event, "Deposited", log); err != nil { return nil, err } event.Raw = log return event, nil } -// AssetHolderOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the AssetHolder contract. -type AssetHolderOutcomeSetIterator struct { - Event *AssetHolderOutcomeSet // Event containing the contract specifics and raw log +// AssetholderethOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the Assetholdereth contract. +type AssetholderethOutcomeSetIterator struct { + Event *AssetholderethOutcomeSet // 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 @@ -506,7 +526,7 @@ type AssetHolderOutcomeSetIterator struct { // 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 *AssetHolderOutcomeSetIterator) Next() bool { +func (it *AssetholderethOutcomeSetIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -515,7 +535,7 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderOutcomeSet) + it.Event = new(AssetholderethOutcomeSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -530,7 +550,7 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderOutcomeSet) + it.Event = new(AssetholderethOutcomeSet) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -546,19 +566,19 @@ func (it *AssetHolderOutcomeSetIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderOutcomeSetIterator) Error() error { +func (it *AssetholderethOutcomeSetIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderOutcomeSetIterator) Close() error { +func (it *AssetholderethOutcomeSetIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderOutcomeSet represents a OutcomeSet event raised by the AssetHolder contract. -type AssetHolderOutcomeSet struct { +// AssetholderethOutcomeSet represents a OutcomeSet event raised by the Assetholdereth contract. +type AssetholderethOutcomeSet struct { ChannelID [32]byte Raw types.Log // Blockchain specific contextual infos } @@ -566,31 +586,31 @@ type AssetHolderOutcomeSet struct { // FilterOutcomeSet is a free log retrieval operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetHolderOutcomeSetIterator, error) { +func (_Assetholdereth *AssetholderethFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetholderethOutcomeSetIterator, error) { var channelIDRule []interface{} for _, channelIDItem := range channelID { channelIDRule = append(channelIDRule, channelIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) + logs, sub, err := _Assetholdereth.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) if err != nil { return nil, err } - return &AssetHolderOutcomeSetIterator{contract: _AssetHolder.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil + return &AssetholderethOutcomeSetIterator{contract: _Assetholdereth.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil } // WatchOutcomeSet is a free log subscription operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetHolderOutcomeSet, channelID [][32]byte) (event.Subscription, error) { +func (_Assetholdereth *AssetholderethFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetholderethOutcomeSet, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} for _, channelIDItem := range channelID { channelIDRule = append(channelIDRule, channelIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) + logs, sub, err := _Assetholdereth.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) if err != nil { return nil, err } @@ -600,8 +620,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, s select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { + event := new(AssetholderethOutcomeSet) + if err := _Assetholdereth.contract.UnpackLog(event, "OutcomeSet", log); err != nil { return err } event.Raw = log @@ -625,18 +645,18 @@ func (_AssetHolder *AssetHolderFilterer) WatchOutcomeSet(opts *bind.WatchOpts, s // ParseOutcomeSet is a log parse operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. // // Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolder *AssetHolderFilterer) ParseOutcomeSet(log types.Log) (*AssetHolderOutcomeSet, error) { - event := new(AssetHolderOutcomeSet) - if err := _AssetHolder.contract.UnpackLog(event, "OutcomeSet", log); err != nil { +func (_Assetholdereth *AssetholderethFilterer) ParseOutcomeSet(log types.Log) (*AssetholderethOutcomeSet, error) { + event := new(AssetholderethOutcomeSet) + if err := _Assetholdereth.contract.UnpackLog(event, "OutcomeSet", log); err != nil { return nil, err } event.Raw = log return event, nil } -// AssetHolderWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the AssetHolder contract. -type AssetHolderWithdrawnIterator struct { - Event *AssetHolderWithdrawn // Event containing the contract specifics and raw log +// AssetholderethWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the Assetholdereth contract. +type AssetholderethWithdrawnIterator struct { + Event *AssetholderethWithdrawn // 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 @@ -650,7 +670,7 @@ type AssetHolderWithdrawnIterator struct { // 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 *AssetHolderWithdrawnIterator) Next() bool { +func (it *AssetholderethWithdrawnIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -659,7 +679,7 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(AssetHolderWithdrawn) + it.Event = new(AssetholderethWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -674,7 +694,7 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(AssetHolderWithdrawn) + it.Event = new(AssetholderethWithdrawn) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -690,19 +710,19 @@ func (it *AssetHolderWithdrawnIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *AssetHolderWithdrawnIterator) Error() error { +func (it *AssetholderethWithdrawnIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *AssetHolderWithdrawnIterator) Close() error { +func (it *AssetholderethWithdrawnIterator) Close() error { it.sub.Unsubscribe() return nil } -// AssetHolderWithdrawn represents a Withdrawn event raised by the AssetHolder contract. -type AssetHolderWithdrawn struct { +// AssetholderethWithdrawn represents a Withdrawn event raised by the Assetholdereth contract. +type AssetholderethWithdrawn struct { FundingID [32]byte Amount *big.Int Receiver common.Address @@ -712,31 +732,31 @@ type AssetHolderWithdrawn struct { // FilterWithdrawn is a free log retrieval operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderWithdrawnIterator, error) { +func (_Assetholdereth *AssetholderethFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetholderethWithdrawnIterator, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) + logs, sub, err := _Assetholdereth.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) if err != nil { return nil, err } - return &AssetHolderWithdrawnIterator{contract: _AssetHolder.contract, event: "Withdrawn", logs: logs, sub: sub}, nil + return &AssetholderethWithdrawnIterator{contract: _Assetholdereth.contract, event: "Withdrawn", logs: logs, sub: sub}, nil } // WatchWithdrawn is a free log subscription operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderWithdrawn, fundingID [][32]byte) (event.Subscription, error) { +func (_Assetholdereth *AssetholderethFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetholderethWithdrawn, fundingID [][32]byte) (event.Subscription, error) { var fundingIDRule []interface{} for _, fundingIDItem := range fundingID { fundingIDRule = append(fundingIDRule, fundingIDItem) } - logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) + logs, sub, err := _Assetholdereth.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) if err != nil { return nil, err } @@ -746,8 +766,8 @@ func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, si select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { + event := new(AssetholderethWithdrawn) + if err := _Assetholdereth.contract.UnpackLog(event, "Withdrawn", log); err != nil { return err } event.Raw = log @@ -771,1260 +791,11 @@ func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, si // ParseWithdrawn is a log parse operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. // // Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolder *AssetHolderFilterer) ParseWithdrawn(log types.Log) (*AssetHolderWithdrawn, error) { - event := new(AssetHolderWithdrawn) - if err := _AssetHolder.contract.UnpackLog(event, "Withdrawn", log); err != nil { +func (_Assetholdereth *AssetholderethFilterer) ParseWithdrawn(log types.Log) (*AssetholderethWithdrawn, error) { + event := new(AssetholderethWithdrawn) + if err := _Assetholdereth.contract.UnpackLog(event, "Withdrawn", log); err != nil { return nil, err } event.Raw = log return event, nil } - -// AssetHolderETHABI is the input ABI used to generate the binding from. -const AssetHolderETHABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adjudicator\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"OutcomeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"structAssetHolder.WithdrawalAuth\",\"name\":\"authorization\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// AssetHolderETHFuncSigs maps the 4-byte function signature to its string representation. -var AssetHolderETHFuncSigs = map[string]string{ - "53c2ed8e": "adjudicator()", - "1de26e16": "deposit(bytes32,uint256)", - "ae9ee18c": "holdings(bytes32)", - "fc79a66d": "setOutcome(bytes32,address[],uint256[])", - "d945af1d": "settled(bytes32)", - "4ed4283c": "withdraw((bytes32,address,address,uint256),bytes)", -} - -// AssetHolderETHBin is the compiled bytecode used for deploying new contracts. -var AssetHolderETHBin = "0x608060405234801561001057600080fd5b50604051610ee2380380610ee283398101604081905261002f91610054565b600280546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610e51806100916000396000f3fe6080604052600436106100555760003560e01c80631de26e161461005a5780634ed4283c1461006f57806353c2ed8e1461008f578063ae9ee18c146100ba578063d945af1d146100e7578063fc79a66d14610114575b600080fd5b61006d610068366004610af4565b610134565b005b34801561007b57600080fd5b5061006d61008a366004610b15565b6101ac565b34801561009b57600080fd5b506100a461034e565b6040516100b19190610b9a565b60405180910390f35b3480156100c657600080fd5b506100da6100d5366004610a65565b61035d565b6040516100b19190610db6565b3480156100f357600080fd5b50610107610102366004610a65565b61036f565b6040516100b19190610bae565b34801561012057600080fd5b5061006d61012f366004610a7d565b610384565b61013e82826105a2565b60008281526020819052604090205461015790826105c5565b60008381526020819052604090205561017082826105c1565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101a09190610db6565b60405180910390a25050565b823560009081526001602052604090205460ff166101e55760405162461bcd60e51b81526004016101dc90610ccc565b60405180910390fd5b61024d836040516020016101f99190610d6a565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610248925050506040870160208801610a49565b610626565b6102695760405162461bcd60e51b81526004016101dc90610c95565b600061028584356102806040870160208801610a49565b610661565b600081815260208190526040902054909150606085013511156102ba5760405162461bcd60e51b81526004016101dc90610cf9565b6102c5848484610694565b6000818152602081905260409020546102e2906060860135610699565b6000828152602081905260409020556102fc8484846106db565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103329060408901610a49565b604051610340929190610bb9565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b6002546001600160a01b031633146103ae5760405162461bcd60e51b81526004016101dc90610d25565b8281146103cd5760405162461bcd60e51b81526004016101dc90610c07565b60008581526001602052604090205460ff16156103fc5760405162461bcd60e51b81526004016101dc90610c50565b60008581526020819052604081208054908290559060608567ffffffffffffffff8111801561042a57600080fd5b50604051908082528060200260200182016040528015610454578160200160208202803683370190505b50905060005b868110156104fb5760006104898a8a8a8581811061047457fe5b90506020020160208101906102809190610a49565b90508083838151811061049857fe5b6020026020010181815250506104c960008083815260200190815260200160002054866105c590919063ffffffff16565b94506104f08787848181106104da57fe5b90506020020135856105c590919063ffffffff16565b93505060010161045a565b508183106105555760005b868110156105535785858281811061051a57fe5b9050602002013560008084848151811061053057fe5b602090810291909101810151825281019190915260400160002055600101610506565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b8034146105c15760405162461bcd60e51b81526004016101dc90610bd0565b5050565b60008282018381101561061f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600080610639858051906020012061072d565b90506000610647828661077e565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610676929190610bb9565b60405160208183030381529060405280519060200120905092915050565b505050565b600061061f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610969565b6106eb6060840160408501610a49565b6001600160a01b03166108fc84606001359081150290604051600060405180830381858888f19350505050158015610727573d6000803e3d6000fd5b50505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600081516041146107d6576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156108475760405162461bcd60e51b8152600401808060200182810382526022815260200180610dd86022913960400191505060405180910390fd5b8060ff16601b1415801561085f57508060ff16601c14155b1561089b5760405162461bcd60e51b8152600401808060200182810382526022815260200180610dfa6022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156108f7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661095f576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b600081848411156109f85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109bd5781810151838201526020016109a5565b50505050905090810190601f1680156109ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610a11578182fd5b50813567ffffffffffffffff811115610a28578182fd5b6020830191508360208083028501011115610a4257600080fd5b9250929050565b600060208284031215610a5a578081fd5b813561061f81610dbf565b600060208284031215610a76578081fd5b5035919050565b600080600080600060608688031215610a94578081fd5b85359450602086013567ffffffffffffffff80821115610ab2578283fd5b610abe89838a01610a00565b90965094506040880135915080821115610ad6578283fd5b50610ae388828901610a00565b969995985093965092949392505050565b60008060408385031215610b06578182fd5b50508035926020909101359150565b600080600083850360a0811215610b2a578384fd5b6080811215610b37578384fd5b50839250608084013567ffffffffffffffff80821115610b55578384fd5b818601915086601f830112610b68578384fd5b813581811115610b76578485fd5b876020828501011115610b87578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b6020808252601f908201527f77726f6e6720616d6f756e74206f662045544820666f72206465706f73697400604082015260600190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610d8081610dbf565b6001600160a01b039081166020840152604084013590610d9f82610dbf565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b0381168114610dd457600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a264697066735822122068e71f85379309a62f21a5e98203f9db6dc995ed4b01a9b01f70ebc29508c3fc64736f6c63430007040033" - -// DeployAssetHolderETH deploys a new Ethereum contract, binding an instance of AssetHolderETH to it. -func DeployAssetHolderETH(auth *bind.TransactOpts, backend bind.ContractBackend, _adjudicator common.Address) (common.Address, *types.Transaction, *AssetHolderETH, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderETHABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AssetHolderETHBin), backend, _adjudicator) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &AssetHolderETH{AssetHolderETHCaller: AssetHolderETHCaller{contract: contract}, AssetHolderETHTransactor: AssetHolderETHTransactor{contract: contract}, AssetHolderETHFilterer: AssetHolderETHFilterer{contract: contract}}, nil -} - -// AssetHolderETH is an auto generated Go binding around an Ethereum contract. -type AssetHolderETH struct { - AssetHolderETHCaller // Read-only binding to the contract - AssetHolderETHTransactor // Write-only binding to the contract - AssetHolderETHFilterer // Log filterer for contract events -} - -// AssetHolderETHCaller is an auto generated read-only Go binding around an Ethereum contract. -type AssetHolderETHCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderETHTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AssetHolderETHTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderETHFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AssetHolderETHFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AssetHolderETHSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AssetHolderETHSession struct { - Contract *AssetHolderETH // 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 -} - -// AssetHolderETHCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AssetHolderETHCallerSession struct { - Contract *AssetHolderETHCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AssetHolderETHTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AssetHolderETHTransactorSession struct { - Contract *AssetHolderETHTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AssetHolderETHRaw is an auto generated low-level Go binding around an Ethereum contract. -type AssetHolderETHRaw struct { - Contract *AssetHolderETH // Generic contract binding to access the raw methods on -} - -// AssetHolderETHCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AssetHolderETHCallerRaw struct { - Contract *AssetHolderETHCaller // Generic read-only contract binding to access the raw methods on -} - -// AssetHolderETHTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AssetHolderETHTransactorRaw struct { - Contract *AssetHolderETHTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewAssetHolderETH creates a new instance of AssetHolderETH, bound to a specific deployed contract. -func NewAssetHolderETH(address common.Address, backend bind.ContractBackend) (*AssetHolderETH, error) { - contract, err := bindAssetHolderETH(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &AssetHolderETH{AssetHolderETHCaller: AssetHolderETHCaller{contract: contract}, AssetHolderETHTransactor: AssetHolderETHTransactor{contract: contract}, AssetHolderETHFilterer: AssetHolderETHFilterer{contract: contract}}, nil -} - -// NewAssetHolderETHCaller creates a new read-only instance of AssetHolderETH, bound to a specific deployed contract. -func NewAssetHolderETHCaller(address common.Address, caller bind.ContractCaller) (*AssetHolderETHCaller, error) { - contract, err := bindAssetHolderETH(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AssetHolderETHCaller{contract: contract}, nil -} - -// NewAssetHolderETHTransactor creates a new write-only instance of AssetHolderETH, bound to a specific deployed contract. -func NewAssetHolderETHTransactor(address common.Address, transactor bind.ContractTransactor) (*AssetHolderETHTransactor, error) { - contract, err := bindAssetHolderETH(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AssetHolderETHTransactor{contract: contract}, nil -} - -// NewAssetHolderETHFilterer creates a new log filterer instance of AssetHolderETH, bound to a specific deployed contract. -func NewAssetHolderETHFilterer(address common.Address, filterer bind.ContractFilterer) (*AssetHolderETHFilterer, error) { - contract, err := bindAssetHolderETH(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AssetHolderETHFilterer{contract: contract}, nil -} - -// bindAssetHolderETH binds a generic wrapper to an already deployed contract. -func bindAssetHolderETH(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AssetHolderETHABI)) - 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 (_AssetHolderETH *AssetHolderETHRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolderETH.Contract.AssetHolderETHCaller.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 (_AssetHolderETH *AssetHolderETHRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolderETH.Contract.AssetHolderETHTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AssetHolderETH *AssetHolderETHRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolderETH.Contract.AssetHolderETHTransactor.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 (_AssetHolderETH *AssetHolderETHCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _AssetHolderETH.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 (_AssetHolderETH *AssetHolderETHTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _AssetHolderETH.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_AssetHolderETH *AssetHolderETHTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _AssetHolderETH.Contract.contract.Transact(opts, method, params...) -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolderETH *AssetHolderETHCaller) Adjudicator(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _AssetHolderETH.contract.Call(opts, &out, "adjudicator") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolderETH *AssetHolderETHSession) Adjudicator() (common.Address, error) { - return _AssetHolderETH.Contract.Adjudicator(&_AssetHolderETH.CallOpts) -} - -// Adjudicator is a free data retrieval call binding the contract method 0x53c2ed8e. -// -// Solidity: function adjudicator() view returns(address) -func (_AssetHolderETH *AssetHolderETHCallerSession) Adjudicator() (common.Address, error) { - return _AssetHolderETH.Contract.Adjudicator(&_AssetHolderETH.CallOpts) -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolderETH *AssetHolderETHCaller) Holdings(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { - var out []interface{} - err := _AssetHolderETH.contract.Call(opts, &out, "holdings", arg0) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolderETH *AssetHolderETHSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolderETH.Contract.Holdings(&_AssetHolderETH.CallOpts, arg0) -} - -// Holdings is a free data retrieval call binding the contract method 0xae9ee18c. -// -// Solidity: function holdings(bytes32 ) view returns(uint256) -func (_AssetHolderETH *AssetHolderETHCallerSession) Holdings(arg0 [32]byte) (*big.Int, error) { - return _AssetHolderETH.Contract.Holdings(&_AssetHolderETH.CallOpts, arg0) -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolderETH *AssetHolderETHCaller) Settled(opts *bind.CallOpts, arg0 [32]byte) (bool, error) { - var out []interface{} - err := _AssetHolderETH.contract.Call(opts, &out, "settled", arg0) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolderETH *AssetHolderETHSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolderETH.Contract.Settled(&_AssetHolderETH.CallOpts, arg0) -} - -// Settled is a free data retrieval call binding the contract method 0xd945af1d. -// -// Solidity: function settled(bytes32 ) view returns(bool) -func (_AssetHolderETH *AssetHolderETHCallerSession) Settled(arg0 [32]byte) (bool, error) { - return _AssetHolderETH.Contract.Settled(&_AssetHolderETH.CallOpts, arg0) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolderETH *AssetHolderETHTransactor) Deposit(opts *bind.TransactOpts, fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolderETH.contract.Transact(opts, "deposit", fundingID, amount) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolderETH *AssetHolderETHSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolderETH.Contract.Deposit(&_AssetHolderETH.TransactOpts, fundingID, amount) -} - -// Deposit is a paid mutator transaction binding the contract method 0x1de26e16. -// -// Solidity: function deposit(bytes32 fundingID, uint256 amount) payable returns() -func (_AssetHolderETH *AssetHolderETHTransactorSession) Deposit(fundingID [32]byte, amount *big.Int) (*types.Transaction, error) { - return _AssetHolderETH.Contract.Deposit(&_AssetHolderETH.TransactOpts, fundingID, amount) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolderETH *AssetHolderETHTransactor) SetOutcome(opts *bind.TransactOpts, channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolderETH.contract.Transact(opts, "setOutcome", channelID, parts, newBals) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolderETH *AssetHolderETHSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolderETH.Contract.SetOutcome(&_AssetHolderETH.TransactOpts, channelID, parts, newBals) -} - -// SetOutcome is a paid mutator transaction binding the contract method 0xfc79a66d. -// -// Solidity: function setOutcome(bytes32 channelID, address[] parts, uint256[] newBals) returns() -func (_AssetHolderETH *AssetHolderETHTransactorSession) SetOutcome(channelID [32]byte, parts []common.Address, newBals []*big.Int) (*types.Transaction, error) { - return _AssetHolderETH.Contract.SetOutcome(&_AssetHolderETH.TransactOpts, channelID, parts, newBals) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolderETH *AssetHolderETHTransactor) Withdraw(opts *bind.TransactOpts, authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolderETH.contract.Transact(opts, "withdraw", authorization, signature) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolderETH *AssetHolderETHSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolderETH.Contract.Withdraw(&_AssetHolderETH.TransactOpts, authorization, signature) -} - -// Withdraw is a paid mutator transaction binding the contract method 0x4ed4283c. -// -// Solidity: function withdraw((bytes32,address,address,uint256) authorization, bytes signature) returns() -func (_AssetHolderETH *AssetHolderETHTransactorSession) Withdraw(authorization AssetHolderWithdrawalAuth, signature []byte) (*types.Transaction, error) { - return _AssetHolderETH.Contract.Withdraw(&_AssetHolderETH.TransactOpts, authorization, signature) -} - -// AssetHolderETHDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the AssetHolderETH contract. -type AssetHolderETHDepositedIterator struct { - Event *AssetHolderETHDeposited // 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 *AssetHolderETHDepositedIterator) 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(AssetHolderETHDeposited) - 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(AssetHolderETHDeposited) - 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 *AssetHolderETHDepositedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderETHDepositedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderETHDeposited represents a Deposited event raised by the AssetHolderETH contract. -type AssetHolderETHDeposited struct { - FundingID [32]byte - Amount *big.Int - Raw types.Log // Blockchain specific contextual infos -} - -// FilterDeposited is a free log retrieval operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolderETH *AssetHolderETHFilterer) FilterDeposited(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderETHDepositedIterator, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderETH.contract.FilterLogs(opts, "Deposited", fundingIDRule) - if err != nil { - return nil, err - } - return &AssetHolderETHDepositedIterator{contract: _AssetHolderETH.contract, event: "Deposited", logs: logs, sub: sub}, nil -} - -// WatchDeposited is a free log subscription operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolderETH *AssetHolderETHFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *AssetHolderETHDeposited, fundingID [][32]byte) (event.Subscription, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderETH.contract.WatchLogs(opts, "Deposited", fundingIDRule) - 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(AssetHolderETHDeposited) - if err := _AssetHolderETH.contract.UnpackLog(event, "Deposited", 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 -} - -// ParseDeposited is a log parse operation binding the contract event 0xcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9. -// -// Solidity: event Deposited(bytes32 indexed fundingID, uint256 amount) -func (_AssetHolderETH *AssetHolderETHFilterer) ParseDeposited(log types.Log) (*AssetHolderETHDeposited, error) { - event := new(AssetHolderETHDeposited) - if err := _AssetHolderETH.contract.UnpackLog(event, "Deposited", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// AssetHolderETHOutcomeSetIterator is returned from FilterOutcomeSet and is used to iterate over the raw logs and unpacked data for OutcomeSet events raised by the AssetHolderETH contract. -type AssetHolderETHOutcomeSetIterator struct { - Event *AssetHolderETHOutcomeSet // 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 *AssetHolderETHOutcomeSetIterator) 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(AssetHolderETHOutcomeSet) - 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(AssetHolderETHOutcomeSet) - 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 *AssetHolderETHOutcomeSetIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderETHOutcomeSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderETHOutcomeSet represents a OutcomeSet event raised by the AssetHolderETH contract. -type AssetHolderETHOutcomeSet struct { - ChannelID [32]byte - Raw types.Log // Blockchain specific contextual infos -} - -// FilterOutcomeSet is a free log retrieval operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolderETH *AssetHolderETHFilterer) FilterOutcomeSet(opts *bind.FilterOpts, channelID [][32]byte) (*AssetHolderETHOutcomeSetIterator, error) { - - var channelIDRule []interface{} - for _, channelIDItem := range channelID { - channelIDRule = append(channelIDRule, channelIDItem) - } - - logs, sub, err := _AssetHolderETH.contract.FilterLogs(opts, "OutcomeSet", channelIDRule) - if err != nil { - return nil, err - } - return &AssetHolderETHOutcomeSetIterator{contract: _AssetHolderETH.contract, event: "OutcomeSet", logs: logs, sub: sub}, nil -} - -// WatchOutcomeSet is a free log subscription operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolderETH *AssetHolderETHFilterer) WatchOutcomeSet(opts *bind.WatchOpts, sink chan<- *AssetHolderETHOutcomeSet, channelID [][32]byte) (event.Subscription, error) { - - var channelIDRule []interface{} - for _, channelIDItem := range channelID { - channelIDRule = append(channelIDRule, channelIDItem) - } - - logs, sub, err := _AssetHolderETH.contract.WatchLogs(opts, "OutcomeSet", channelIDRule) - 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(AssetHolderETHOutcomeSet) - if err := _AssetHolderETH.contract.UnpackLog(event, "OutcomeSet", 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 -} - -// ParseOutcomeSet is a log parse operation binding the contract event 0xef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b8. -// -// Solidity: event OutcomeSet(bytes32 indexed channelID) -func (_AssetHolderETH *AssetHolderETHFilterer) ParseOutcomeSet(log types.Log) (*AssetHolderETHOutcomeSet, error) { - event := new(AssetHolderETHOutcomeSet) - if err := _AssetHolderETH.contract.UnpackLog(event, "OutcomeSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// AssetHolderETHWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the AssetHolderETH contract. -type AssetHolderETHWithdrawnIterator struct { - Event *AssetHolderETHWithdrawn // 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 *AssetHolderETHWithdrawnIterator) 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(AssetHolderETHWithdrawn) - 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(AssetHolderETHWithdrawn) - 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 *AssetHolderETHWithdrawnIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *AssetHolderETHWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// AssetHolderETHWithdrawn represents a Withdrawn event raised by the AssetHolderETH contract. -type AssetHolderETHWithdrawn struct { - FundingID [32]byte - Amount *big.Int - Receiver common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterWithdrawn is a free log retrieval operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolderETH *AssetHolderETHFilterer) FilterWithdrawn(opts *bind.FilterOpts, fundingID [][32]byte) (*AssetHolderETHWithdrawnIterator, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderETH.contract.FilterLogs(opts, "Withdrawn", fundingIDRule) - if err != nil { - return nil, err - } - return &AssetHolderETHWithdrawnIterator{contract: _AssetHolderETH.contract, event: "Withdrawn", logs: logs, sub: sub}, nil -} - -// WatchWithdrawn is a free log subscription operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolderETH *AssetHolderETHFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderETHWithdrawn, fundingID [][32]byte) (event.Subscription, error) { - - var fundingIDRule []interface{} - for _, fundingIDItem := range fundingID { - fundingIDRule = append(fundingIDRule, fundingIDItem) - } - - logs, sub, err := _AssetHolderETH.contract.WatchLogs(opts, "Withdrawn", fundingIDRule) - 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(AssetHolderETHWithdrawn) - if err := _AssetHolderETH.contract.UnpackLog(event, "Withdrawn", 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 -} - -// ParseWithdrawn is a log parse operation binding the contract event 0xd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81. -// -// Solidity: event Withdrawn(bytes32 indexed fundingID, uint256 amount, address receiver) -func (_AssetHolderETH *AssetHolderETHFilterer) ParseWithdrawn(log types.Log) (*AssetHolderETHWithdrawn, error) { - event := new(AssetHolderETHWithdrawn) - if err := _AssetHolderETH.contract.UnpackLog(event, "Withdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ECDSAABI is the input ABI used to generate the binding from. -const ECDSAABI = "[]" - -// ECDSABin is the compiled bytecode used for deploying new contracts. -var ECDSABin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2e519b4a0a3509f02bba1abcf848979252df4c37ba062299b13fdabec46878464736f6c63430007040033" - -// DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it. -func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECDSABin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// ECDSA is an auto generated Go binding around an Ethereum contract. -type ECDSA struct { - ECDSACaller // Read-only binding to the contract - ECDSATransactor // Write-only binding to the contract - ECDSAFilterer // Log filterer for contract events -} - -// ECDSACaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSACaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSAFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSASession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSASession struct { - Contract *ECDSA // 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 -} - -// ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSACallerSession struct { - Contract *ECDSACaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATransactorSession struct { - Contract *ECDSATransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSARaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSARaw struct { - Contract *ECDSA // Generic contract binding to access the raw methods on -} - -// ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSACallerRaw struct { - Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATransactorRaw struct { - Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract. -func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) { - contract, err := bindECDSA(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) { - contract, err := bindECDSA(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSACaller{contract: contract}, nil -} - -// NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) { - contract, err := bindECDSA(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATransactor{contract: contract}, nil -} - -// NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract. -func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) { - contract, err := bindECDSA(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSAFilterer{contract: contract}, nil -} - -// bindECDSA binds a generic wrapper to an already deployed contract. -func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - 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 (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.Contract.ECDSACaller.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 (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.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 (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.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 (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transact(opts, method, params...) -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209d2110f8008a32668165aee96d39b9a3b210868f452685996027830739a87e3064736f6c63430007040033" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // 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 -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// SigABI is the input ABI used to generate the binding from. -const SigABI = "[]" - -// SigBin is the compiled bytecode used for deploying new contracts. -var SigBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c3751b740d506c41c776ad3c92ca113b46a314ff1f98b52d4b23f32eaccf354664736f6c63430007040033" - -// DeploySig deploys a new Ethereum contract, binding an instance of Sig to it. -func DeploySig(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Sig, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SigBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// Sig is an auto generated Go binding around an Ethereum contract. -type Sig struct { - SigCaller // Read-only binding to the contract - SigTransactor // Write-only binding to the contract - SigFilterer // Log filterer for contract events -} - -// SigCaller is an auto generated read-only Go binding around an Ethereum contract. -type SigCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SigTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SigFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SigSession struct { - Contract *Sig // 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 -} - -// SigCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SigCallerSession struct { - Contract *SigCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SigTransactorSession struct { - Contract *SigTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SigRaw is an auto generated low-level Go binding around an Ethereum contract. -type SigRaw struct { - Contract *Sig // Generic contract binding to access the raw methods on -} - -// SigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SigCallerRaw struct { - Contract *SigCaller // Generic read-only contract binding to access the raw methods on -} - -// SigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SigTransactorRaw struct { - Contract *SigTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSig creates a new instance of Sig, bound to a specific deployed contract. -func NewSig(address common.Address, backend bind.ContractBackend) (*Sig, error) { - contract, err := bindSig(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// NewSigCaller creates a new read-only instance of Sig, bound to a specific deployed contract. -func NewSigCaller(address common.Address, caller bind.ContractCaller) (*SigCaller, error) { - contract, err := bindSig(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SigCaller{contract: contract}, nil -} - -// NewSigTransactor creates a new write-only instance of Sig, bound to a specific deployed contract. -func NewSigTransactor(address common.Address, transactor bind.ContractTransactor) (*SigTransactor, error) { - contract, err := bindSig(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SigTransactor{contract: contract}, nil -} - -// NewSigFilterer creates a new log filterer instance of Sig, bound to a specific deployed contract. -func NewSigFilterer(address common.Address, filterer bind.ContractFilterer) (*SigFilterer, error) { - contract, err := bindSig(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SigFilterer{contract: contract}, nil -} - -// bindSig binds a generic wrapper to an already deployed contract. -func bindSig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - 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 (_Sig *SigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.Contract.SigCaller.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 (_Sig *SigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.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 (_Sig *SigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.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 (_Sig *SigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.contract.Transact(opts, method, params...) -} diff --git a/bindings/assetholdereth/AssetHolderETHBinRuntime.go b/bindings/assetholdereth/AssetHolderETHBinRuntime.go index 32f8966..1215439 100644 --- a/bindings/assetholdereth/AssetHolderETHBinRuntime.go +++ b/bindings/assetholdereth/AssetHolderETHBinRuntime.go @@ -1,4 +1,4 @@ package assetholdereth // import "github.com/perun-network/perun-eth-backend/bindings/assetholdereth" // AssetHolderETHBinRuntime is the runtime part of the compiled bytecode used for deploying new contracts. -var AssetHolderETHBinRuntime = "6080604052600436106100555760003560e01c80631de26e161461005a5780634ed4283c1461006f57806353c2ed8e1461008f578063ae9ee18c146100ba578063d945af1d146100e7578063fc79a66d14610114575b600080fd5b61006d610068366004610af4565b610134565b005b34801561007b57600080fd5b5061006d61008a366004610b15565b6101ac565b34801561009b57600080fd5b506100a461034e565b6040516100b19190610b9a565b60405180910390f35b3480156100c657600080fd5b506100da6100d5366004610a65565b61035d565b6040516100b19190610db6565b3480156100f357600080fd5b50610107610102366004610a65565b61036f565b6040516100b19190610bae565b34801561012057600080fd5b5061006d61012f366004610a7d565b610384565b61013e82826105a2565b60008281526020819052604090205461015790826105c5565b60008381526020819052604090205561017082826105c1565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101a09190610db6565b60405180910390a25050565b823560009081526001602052604090205460ff166101e55760405162461bcd60e51b81526004016101dc90610ccc565b60405180910390fd5b61024d836040516020016101f99190610d6a565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610248925050506040870160208801610a49565b610626565b6102695760405162461bcd60e51b81526004016101dc90610c95565b600061028584356102806040870160208801610a49565b610661565b600081815260208190526040902054909150606085013511156102ba5760405162461bcd60e51b81526004016101dc90610cf9565b6102c5848484610694565b6000818152602081905260409020546102e2906060860135610699565b6000828152602081905260409020556102fc8484846106db565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103329060408901610a49565b604051610340929190610bb9565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b6002546001600160a01b031633146103ae5760405162461bcd60e51b81526004016101dc90610d25565b8281146103cd5760405162461bcd60e51b81526004016101dc90610c07565b60008581526001602052604090205460ff16156103fc5760405162461bcd60e51b81526004016101dc90610c50565b60008581526020819052604081208054908290559060608567ffffffffffffffff8111801561042a57600080fd5b50604051908082528060200260200182016040528015610454578160200160208202803683370190505b50905060005b868110156104fb5760006104898a8a8a8581811061047457fe5b90506020020160208101906102809190610a49565b90508083838151811061049857fe5b6020026020010181815250506104c960008083815260200190815260200160002054866105c590919063ffffffff16565b94506104f08787848181106104da57fe5b90506020020135856105c590919063ffffffff16565b93505060010161045a565b508183106105555760005b868110156105535785858281811061051a57fe5b9050602002013560008084848151811061053057fe5b602090810291909101810151825281019190915260400160002055600101610506565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b8034146105c15760405162461bcd60e51b81526004016101dc90610bd0565b5050565b60008282018381101561061f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600080610639858051906020012061072d565b90506000610647828661077e565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610676929190610bb9565b60405160208183030381529060405280519060200120905092915050565b505050565b600061061f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610969565b6106eb6060840160408501610a49565b6001600160a01b03166108fc84606001359081150290604051600060405180830381858888f19350505050158015610727573d6000803e3d6000fd5b50505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600081516041146107d6576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156108475760405162461bcd60e51b8152600401808060200182810382526022815260200180610dd86022913960400191505060405180910390fd5b8060ff16601b1415801561085f57508060ff16601c14155b1561089b5760405162461bcd60e51b8152600401808060200182810382526022815260200180610dfa6022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156108f7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661095f576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b600081848411156109f85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109bd5781810151838201526020016109a5565b50505050905090810190601f1680156109ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610a11578182fd5b50813567ffffffffffffffff811115610a28578182fd5b6020830191508360208083028501011115610a4257600080fd5b9250929050565b600060208284031215610a5a578081fd5b813561061f81610dbf565b600060208284031215610a76578081fd5b5035919050565b600080600080600060608688031215610a94578081fd5b85359450602086013567ffffffffffffffff80821115610ab2578283fd5b610abe89838a01610a00565b90965094506040880135915080821115610ad6578283fd5b50610ae388828901610a00565b969995985093965092949392505050565b60008060408385031215610b06578182fd5b50508035926020909101359150565b600080600083850360a0811215610b2a578384fd5b6080811215610b37578384fd5b50839250608084013567ffffffffffffffff80821115610b55578384fd5b818601915086601f830112610b68578384fd5b813581811115610b76578485fd5b876020828501011115610b87578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b6020808252601f908201527f77726f6e6720616d6f756e74206f662045544820666f72206465706f73697400604082015260600190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610d8081610dbf565b6001600160a01b039081166020840152604084013590610d9f82610dbf565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b0381168114610dd457600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a264697066735822122068e71f85379309a62f21a5e98203f9db6dc995ed4b01a9b01f70ebc29508c3fc64736f6c63430007040033" +var AssetHolderETHBinRuntime = "6080604052600436106100555760003560e01c80631de26e161461005a5780634ed4283c1461006f57806353c2ed8e1461008f578063ae9ee18c146100ba578063d945af1d146100e7578063fc79a66d14610114575b600080fd5b61006d610068366004610af3565b610134565b005b34801561007b57600080fd5b5061006d61008a366004610b14565b6101ac565b34801561009b57600080fd5b506100a461034e565b6040516100b19190610b99565b60405180910390f35b3480156100c657600080fd5b506100da6100d5366004610a64565b61035d565b6040516100b19190610db5565b3480156100f357600080fd5b50610107610102366004610a64565b61036f565b6040516100b19190610bad565b34801561012057600080fd5b5061006d61012f366004610a7c565b610384565b61013e82826105a1565b60008281526020819052604090205461015790826105c4565b60008381526020819052604090205561017082826105c0565b817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101a09190610db5565b60405180910390a25050565b823560009081526001602052604090205460ff166101e55760405162461bcd60e51b81526004016101dc90610ccb565b60405180910390fd5b61024d836040516020016101f99190610d69565b60408051601f198184030181526020601f860181900481028401810190925284835291908590859081908401838280828437600092019190915250610248925050506040870160208801610a48565b610625565b6102695760405162461bcd60e51b81526004016101dc90610c94565b600061028584356102806040870160208801610a48565b610660565b600081815260208190526040902054909150606085013511156102ba5760405162461bcd60e51b81526004016101dc90610cf8565b6102c5848484610693565b6000818152602081905260409020546102e2906060860135610698565b6000828152602081905260409020556102fc8484846106da565b807fd0b6e7d0170f56c62f87de6a8a47a0ccf41c86ffb5084d399d8eb62e823f2a81606086018035906103329060408901610a48565b604051610340929190610bb8565b60405180910390a250505050565b6002546001600160a01b031681565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b6002546001600160a01b031633146103ae5760405162461bcd60e51b81526004016101dc90610d24565b8281146103cd5760405162461bcd60e51b81526004016101dc90610c06565b60008581526001602052604090205460ff16156103fc5760405162461bcd60e51b81526004016101dc90610c4f565b600085815260208190526040812080549082905590808567ffffffffffffffff8111801561042957600080fd5b50604051908082528060200260200182016040528015610453578160200160208202803683370190505b50905060005b868110156104fa5760006104888a8a8a8581811061047357fe5b90506020020160208101906102809190610a48565b90508083838151811061049757fe5b6020026020010181815250506104c860008083815260200190815260200160002054866105c490919063ffffffff16565b94506104ef8787848181106104d957fe5b90506020020135856105c490919063ffffffff16565b935050600101610459565b508183106105545760005b868110156105525785858281811061051957fe5b9050602002013560008084848151811061052f57fe5b602090810291909101810151825281019190915260400160002055600101610505565b505b6000888152600160208190526040808320805460ff19169092179091555189917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a25050505050505050565b8034146105c05760405162461bcd60e51b81526004016101dc90610bcf565b5050565b60008282018381101561061e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600080610638858051906020012061072c565b90506000610646828661077d565b6001600160a01b0390811690851614925050509392505050565b60008282604051602001610675929190610bb8565b60405160208183030381529060405280519060200120905092915050565b505050565b600061061e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610968565b6106ea6060840160408501610a48565b6001600160a01b03166108fc84606001359081150290604051600060405180830381858888f19350505050158015610726573d6000803e3d6000fd5b50505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600081516041146107d5576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156108465760405162461bcd60e51b8152600401808060200182810382526022815260200180610dd76022913960400191505060405180910390fd5b8060ff16601b1415801561085e57508060ff16601c14155b1561089a5760405162461bcd60e51b8152600401808060200182810382526022815260200180610df96022913960400191505060405180910390fd5b600060018783868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156108f6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661095e576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b9695505050505050565b600081848411156109f75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109bc5781810151838201526020016109a4565b50505050905090810190601f1680156109e95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008083601f840112610a10578182fd5b50813567ffffffffffffffff811115610a27578182fd5b6020830191508360208083028501011115610a4157600080fd5b9250929050565b600060208284031215610a59578081fd5b813561061e81610dbe565b600060208284031215610a75578081fd5b5035919050565b600080600080600060608688031215610a93578081fd5b85359450602086013567ffffffffffffffff80821115610ab1578283fd5b610abd89838a016109ff565b90965094506040880135915080821115610ad5578283fd5b50610ae2888289016109ff565b969995985093965092949392505050565b60008060408385031215610b05578182fd5b50508035926020909101359150565b600080600083850360a0811215610b29578384fd5b6080811215610b36578384fd5b50839250608084013567ffffffffffffffff80821115610b54578384fd5b818601915086601f830112610b67578384fd5b813581811115610b75578485fd5b876020828501011115610b86578485fd5b6020830194508093505050509250925092565b6001600160a01b0391909116815260200190565b901515815260200190565b9182526001600160a01b0316602082015260400190565b6020808252601f908201527f77726f6e6720616d6f756e74206f662045544820666f72206465706f73697400604082015260600190565b60208082526029908201527f7061727469636970616e7473206c656e6774682073686f756c6420657175616c6040820152682062616c616e63657360b81b606082015260800190565b60208082526025908201527f747279696e6720746f2073657420616c726561647920736574746c6564206368604082015264185b9b995b60da1b606082015260800190565b6020808252601d908201527f7369676e617475726520766572696669636174696f6e206661696c6564000000604082015260600190565b60208082526013908201527218da185b9b995b081b9bdd081cd95d1d1b1959606a1b604082015260600190565b602080825260129082015271696e73756666696369656e742066756e647360701b604082015260600190565b60208082526025908201527f63616e206f6e6c792062652063616c6c6564206279207468652061646a75646960408201526431b0ba37b960d91b606082015260800190565b81358152608081016020830135610d7f81610dbe565b6001600160a01b039081166020840152604084013590610d9e82610dbe565b166040830152606092830135929091019190915290565b90815260200190565b6001600160a01b0381168114610dd357600080fd5b5056fe45434453413a20696e76616c6964207369676e6174757265202773272076616c756545434453413a20696e76616c6964207369676e6174757265202776272076616c7565a2646970667358221220e505c52fddf1f01bcdc24aed9acbce73904dc75050e922c1189b968cfaa3f6f064736f6c63430007060033" diff --git a/bindings/contracts b/bindings/contracts new file mode 160000 index 0000000..abd762d --- /dev/null +++ b/bindings/contracts @@ -0,0 +1 @@ +Subproject commit abd762dc7d3271f797e304d8bb641f71f8c5c206 diff --git a/bindings/generate.sh b/bindings/generate.sh index a42bd17..4093b0b 100755 --- a/bindings/generate.sh +++ b/bindings/generate.sh @@ -20,15 +20,17 @@ set -e ABIGEN="${ABIGEN-abigen}" SOLC="${SOLC-solc}" +echo 'Please ensure that solc v0.7.6+ and abigen v1.10.18+ are installed.' + if ! $ABIGEN --version then - echo "Please install abigen v1.9.25+ or the environment varables AGIBEN." + echo "'abigen' not found. Please add to PATH or set ABIGEN='path_to_abigen'." exit 1 fi if ! $SOLC --version then - echo "Please install abigen v0.7.4 or the environment varables SOLC." + echo "'solc' not found. Please add to PATH or set SOLC='path_to_solc'." exit 1 fi @@ -44,17 +46,17 @@ generate() { rm -r $PKG mkdir $PKG - # Generate bindings - $ABIGEN --pkg $PKG --sol ../contracts/contracts/$FILE.sol --out $PKG/$FILE.go --solc $SOLC - - # Generate binary runtime - $SOLC --bin-runtime --optimize --allow-paths ../contracts/vendor, ../contracts/contracts/$FILE.sol -o $PKG/ - BIN_RUNTIME=`cat ${PKG}/${CONTRACT}.bin-runtime` + # Compile and generate binary runtime. + $SOLC --abi --bin --bin-runtime --optimize --allow-paths contracts/vendor, contracts/contracts/$FILE.sol -o $PKG/ + BIN_RUNTIME=$(cat ${PKG}/${CONTRACT}.bin-runtime) OUT_FILE="$PKG/${CONTRACT}BinRuntime.go" echo "package $PKG // import \"github.com/perun-network/perun-eth-backend/bindings/$PKG\"" > $OUT_FILE echo >> $OUT_FILE echo "// ${CONTRACT}BinRuntime is the runtime part of the compiled bytecode used for deploying new contracts." >> $OUT_FILE echo "var ${CONTRACT}BinRuntime = \"$BIN_RUNTIME\"" >> $OUT_FILE + + # Generate bindings. + $ABIGEN --pkg $PKG --abi $PKG/$FILE.abi --bin $PKG/$FILE.bin --out $PKG/$FILE.go } # Adjudicator diff --git a/bindings/peruntoken/PerunToken.go b/bindings/peruntoken/PerunToken.go index be692a4..4042c81 100644 --- a/bindings/peruntoken/PerunToken.go +++ b/bindings/peruntoken/PerunToken.go @@ -4,6 +4,7 @@ package peruntoken import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -26,1841 +28,135 @@ var ( _ = event.NewSubscription ) -// AddressABI is the input ABI used to generate the binding from. -const AddressABI = "[]" - -// AddressBin is the compiled bytecode used for deploying new contracts. -var AddressBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a66ed51987e807a004421fbf3f7c10a448049e1a0fc8b6dcb32f19f6c06fbe0964736f6c63430007040033" - -// DeployAddress deploys a new Ethereum contract, binding an instance of Address to it. -func DeployAddress(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Address, error) { - parsed, err := abi.JSON(strings.NewReader(AddressABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(AddressBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil -} - -// Address is an auto generated Go binding around an Ethereum contract. -type Address struct { - AddressCaller // Read-only binding to the contract - AddressTransactor // Write-only binding to the contract - AddressFilterer // Log filterer for contract events -} - -// AddressCaller is an auto generated read-only Go binding around an Ethereum contract. -type AddressCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AddressTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AddressTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AddressFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AddressFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AddressSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AddressSession struct { - Contract *Address // 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 -} - -// AddressCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AddressCallerSession struct { - Contract *AddressCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AddressTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AddressTransactorSession struct { - Contract *AddressTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AddressRaw is an auto generated low-level Go binding around an Ethereum contract. -type AddressRaw struct { - Contract *Address // Generic contract binding to access the raw methods on -} - -// AddressCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AddressCallerRaw struct { - Contract *AddressCaller // Generic read-only contract binding to access the raw methods on -} - -// AddressTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AddressTransactorRaw struct { - Contract *AddressTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewAddress creates a new instance of Address, bound to a specific deployed contract. -func NewAddress(address common.Address, backend bind.ContractBackend) (*Address, error) { - contract, err := bindAddress(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Address{AddressCaller: AddressCaller{contract: contract}, AddressTransactor: AddressTransactor{contract: contract}, AddressFilterer: AddressFilterer{contract: contract}}, nil -} - -// NewAddressCaller creates a new read-only instance of Address, bound to a specific deployed contract. -func NewAddressCaller(address common.Address, caller bind.ContractCaller) (*AddressCaller, error) { - contract, err := bindAddress(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AddressCaller{contract: contract}, nil -} - -// NewAddressTransactor creates a new write-only instance of Address, bound to a specific deployed contract. -func NewAddressTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressTransactor, error) { - contract, err := bindAddress(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AddressTransactor{contract: contract}, nil -} - -// NewAddressFilterer creates a new log filterer instance of Address, bound to a specific deployed contract. -func NewAddressFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressFilterer, error) { - contract, err := bindAddress(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AddressFilterer{contract: contract}, nil -} - -// bindAddress binds a generic wrapper to an already deployed contract. -func bindAddress(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AddressABI)) - 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 (_Address *AddressRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Address.Contract.AddressCaller.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 (_Address *AddressRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Address.Contract.AddressTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Address *AddressRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Address.Contract.AddressTransactor.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 (_Address *AddressCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Address.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 (_Address *AddressTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Address.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Address *AddressTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Address.Contract.contract.Transact(opts, method, params...) -} - -// ContextABI is the input ABI used to generate the binding from. -const ContextABI = "[]" - -// Context is an auto generated Go binding around an Ethereum contract. -type Context struct { - ContextCaller // Read-only binding to the contract - ContextTransactor // Write-only binding to the contract - ContextFilterer // Log filterer for contract events -} - -// ContextCaller is an auto generated read-only Go binding around an Ethereum contract. -type ContextCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ContextTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ContextFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ContextSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ContextSession struct { - Contract *Context // 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 -} - -// ContextCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ContextCallerSession struct { - Contract *ContextCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ContextTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ContextTransactorSession struct { - Contract *ContextTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ContextRaw is an auto generated low-level Go binding around an Ethereum contract. -type ContextRaw struct { - Contract *Context // Generic contract binding to access the raw methods on -} - -// ContextCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ContextCallerRaw struct { - Contract *ContextCaller // Generic read-only contract binding to access the raw methods on -} - -// ContextTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ContextTransactorRaw struct { - Contract *ContextTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewContext creates a new instance of Context, bound to a specific deployed contract. -func NewContext(address common.Address, backend bind.ContractBackend) (*Context, error) { - contract, err := bindContext(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Context{ContextCaller: ContextCaller{contract: contract}, ContextTransactor: ContextTransactor{contract: contract}, ContextFilterer: ContextFilterer{contract: contract}}, nil -} - -// NewContextCaller creates a new read-only instance of Context, bound to a specific deployed contract. -func NewContextCaller(address common.Address, caller bind.ContractCaller) (*ContextCaller, error) { - contract, err := bindContext(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ContextCaller{contract: contract}, nil -} - -// NewContextTransactor creates a new write-only instance of Context, bound to a specific deployed contract. -func NewContextTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextTransactor, error) { - contract, err := bindContext(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ContextTransactor{contract: contract}, nil -} - -// NewContextFilterer creates a new log filterer instance of Context, bound to a specific deployed contract. -func NewContextFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextFilterer, error) { - contract, err := bindContext(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ContextFilterer{contract: contract}, nil -} - -// bindContext binds a generic wrapper to an already deployed contract. -func bindContext(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ContextABI)) - 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 (_Context *ContextRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Context.Contract.ContextCaller.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 (_Context *ContextRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.ContextTransactor.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 (_Context *ContextCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Context.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 (_Context *ContextTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Context.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Context *ContextTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Context.Contract.contract.Transact(opts, method, params...) -} - -// ERC20ABI is the input ABI used to generate the binding from. -const ERC20ABI = "[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"amount\",\"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\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// ERC20FuncSigs maps the 4-byte function signature to its string representation. -var ERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// ERC20Bin is the compiled bytecode used for deploying new contracts. -var ERC20Bin = "0x60806040523480156200001157600080fd5b5060405162000c8e38038062000c8e833981810160405260408110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405250508251620001b491506003906020850190620001e0565b508051620001ca906004906020840190620001e0565b50506005805460ff19166012179055506200028c565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928262000218576000855562000263565b82601f106200023357805160ff191683800117855562000263565b8280016001018555821562000263579182015b828111156200026357825182559160200191906001019062000246565b506200027192915062000275565b5090565b5b8082111562000271576000815560010162000276565b6109f2806200029c6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063395093511161007157806339509351146101d957806370a082311461020557806395d89b411461022b578063a457c2d714610233578063a9059cbb1461025f578063dd62ed3e1461028b576100a9565b806306fdde03146100ae578063095ea7b31461012b57806318160ddd1461016b57806323b872dd14610185578063313ce567146101bb575b600080fd5b6100b66102b9565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b03813516906020013561034f565b604080519115158252519081900360200190f35b61017361036c565b60408051918252519081900360200190f35b6101576004803603606081101561019b57600080fd5b506001600160a01b03813581169160208101359091169060400135610372565b6101c36103f9565b6040805160ff9092168252519081900360200190f35b610157600480360360408110156101ef57600080fd5b506001600160a01b038135169060200135610402565b6101736004803603602081101561021b57600080fd5b50356001600160a01b0316610450565b6100b661046b565b6101576004803603604081101561024957600080fd5b506001600160a01b0381351690602001356104cc565b6101576004803603604081101561027557600080fd5b506001600160a01b038135169060200135610534565b610173600480360360408110156102a157600080fd5b506001600160a01b0381358116916020013516610548565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b820191906000526020600020905b81548152906001019060200180831161032857829003601f168201915b5050505050905090565b600061036361035c610573565b8484610577565b50600192915050565b60025490565b600061037f848484610663565b6103ef8461038b610573565b6103ea85604051806060016040528060288152602001610927602891396001600160a01b038a166000908152600160205260408120906103c9610573565b6001600160a01b0316815260208101919091526040016000205491906107be565b610577565b5060019392505050565b60055460ff1690565b600061036361040f610573565b846103ea8560016000610420610573565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610855565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103455780601f1061031a57610100808354040283529160200191610345565b60006103636104d9610573565b846103ea856040518060600160405280602581526020016109986025913960016000610503610573565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906107be565b6000610363610541610573565b8484610663565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166105bc5760405162461bcd60e51b81526004018080602001828103825260248152602001806109746024913960400191505060405180910390fd5b6001600160a01b0382166106015760405162461bcd60e51b81526004018080602001828103825260228152602001806108df6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106a85760405162461bcd60e51b815260040180806020018281038252602581526020018061094f6025913960400191505060405180910390fd5b6001600160a01b0382166106ed5760405162461bcd60e51b81526004018080602001828103825260238152602001806108bc6023913960400191505060405180910390fd5b6106f88383836108b6565b61073581604051806060016040528060268152602001610901602691396001600160a01b03861660009081526020819052604090205491906107be565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107649082610855565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561084d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108125781810151838201526020016107fa565b50505050905090810190601f16801561083f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156108af576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220abe5ad2522c739e8ddd37ca089eaaaba7968031dfb0e1438d4701ff963c8e16564736f6c63430007040033" - -// DeployERC20 deploys a new Ethereum contract, binding an instance of ERC20 to it. -func DeployERC20(auth *bind.TransactOpts, backend bind.ContractBackend, name string, symbol string) (common.Address, *types.Transaction, *ERC20, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ERC20Bin), backend, name, symbol) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// ERC20 is an auto generated Go binding around an Ethereum contract. -type ERC20 struct { - ERC20Caller // Read-only binding to the contract - ERC20Transactor // Write-only binding to the contract - ERC20Filterer // Log filterer for contract events -} - -// ERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type ERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type ERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ERC20Session struct { - Contract *ERC20 // 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 -} - -// ERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ERC20CallerSession struct { - Contract *ERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ERC20TransactorSession struct { - Contract *ERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type ERC20Raw struct { - Contract *ERC20 // Generic contract binding to access the raw methods on -} - -// ERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ERC20CallerRaw struct { - Contract *ERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// ERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ERC20TransactorRaw struct { - Contract *ERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewERC20 creates a new instance of ERC20, bound to a specific deployed contract. -func NewERC20(address common.Address, backend bind.ContractBackend) (*ERC20, error) { - contract, err := bindERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ERC20{ERC20Caller: ERC20Caller{contract: contract}, ERC20Transactor: ERC20Transactor{contract: contract}, ERC20Filterer: ERC20Filterer{contract: contract}}, nil -} - -// NewERC20Caller creates a new read-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Caller(address common.Address, caller bind.ContractCaller) (*ERC20Caller, error) { - contract, err := bindERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ERC20Caller{contract: contract}, nil -} - -// NewERC20Transactor creates a new write-only instance of ERC20, bound to a specific deployed contract. -func NewERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*ERC20Transactor, error) { - contract, err := bindERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ERC20Transactor{contract: contract}, nil -} - -// NewERC20Filterer creates a new log filterer instance of ERC20, bound to a specific deployed contract. -func NewERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*ERC20Filterer, error) { - contract, err := bindERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ERC20Filterer{contract: contract}, nil -} - -// bindERC20 binds a generic wrapper to an already deployed contract. -func bindERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ERC20ABI)) - 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 (_ERC20 *ERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ERC20.Contract.ERC20Caller.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 (_ERC20 *ERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.Contract.ERC20Transactor.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 (_ERC20 *ERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ERC20.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 (_ERC20 *ERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ERC20 *ERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ERC20.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 (_ERC20 *ERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20.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 (_ERC20 *ERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.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 (_ERC20 *ERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _ERC20.Contract.Allowance(&_ERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _ERC20.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 (_ERC20 *ERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_ERC20 *ERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _ERC20.Contract.BalanceOf(&_ERC20.CallOpts, account) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20 *ERC20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _ERC20.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 (_ERC20 *ERC20Session) Decimals() (uint8, error) { - return _ERC20.Contract.Decimals(&_ERC20.CallOpts) -} - -// Decimals is a free data retrieval call binding the contract method 0x313ce567. -// -// Solidity: function decimals() view returns(uint8) -func (_ERC20 *ERC20CallerSession) Decimals() (uint8, error) { - return _ERC20.Contract.Decimals(&_ERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20 *ERC20Caller) Name(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _ERC20.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 (_ERC20 *ERC20Session) Name() (string, error) { - return _ERC20.Contract.Name(&_ERC20.CallOpts) -} - -// Name is a free data retrieval call binding the contract method 0x06fdde03. -// -// Solidity: function name() view returns(string) -func (_ERC20 *ERC20CallerSession) Name() (string, error) { - return _ERC20.Contract.Name(&_ERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20 *ERC20Caller) Symbol(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _ERC20.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 (_ERC20 *ERC20Session) Symbol() (string, error) { - return _ERC20.Contract.Symbol(&_ERC20.CallOpts) -} - -// Symbol is a free data retrieval call binding the contract method 0x95d89b41. -// -// Solidity: function symbol() view returns(string) -func (_ERC20 *ERC20CallerSession) Symbol() (string, error) { - return _ERC20.Contract.Symbol(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _ERC20.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 (_ERC20 *ERC20Session) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_ERC20 *ERC20CallerSession) TotalSupply() (*big.Int, error) { - return _ERC20.Contract.TotalSupply(&_ERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Approve(&_ERC20.TransactOpts, spender, amount) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Transactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20Session) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. -// -// Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.DecreaseAllowance(&_ERC20.TransactOpts, spender, subtractedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Transactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "increaseAllowance", spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20Session) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. -// -// Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_ERC20 *ERC20TransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.IncreaseAllowance(&_ERC20.TransactOpts, spender, addedValue) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.Transfer(&_ERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_ERC20 *ERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _ERC20.Contract.TransferFrom(&_ERC20.TransactOpts, sender, recipient, amount) -} - -// ERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC20 contract. -type ERC20ApprovalIterator struct { - Event *ERC20Approval // 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 *ERC20ApprovalIterator) 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(ERC20Approval) - 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(ERC20Approval) - 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 *ERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Approval represents a Approval event raised by the ERC20 contract. -type ERC20Approval 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 (_ERC20 *ERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERC20ApprovalIterator, 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 := _ERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &ERC20ApprovalIterator{contract: _ERC20.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 (_ERC20 *ERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERC20Approval, 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 := _ERC20.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(ERC20Approval) - if err := _ERC20.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 (_ERC20 *ERC20Filterer) ParseApproval(log types.Log) (*ERC20Approval, error) { - event := new(ERC20Approval) - if err := _ERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// ERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC20 contract. -type ERC20TransferIterator struct { - Event *ERC20Transfer // 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 *ERC20TransferIterator) 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(ERC20Transfer) - 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(ERC20Transfer) - 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 *ERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *ERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// ERC20Transfer represents a Transfer event raised by the ERC20 contract. -type ERC20Transfer 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 (_ERC20 *ERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERC20TransferIterator, 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 := _ERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &ERC20TransferIterator{contract: _ERC20.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 (_ERC20 *ERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERC20Transfer, 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 := _ERC20.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(ERC20Transfer) - if err := _ERC20.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 (_ERC20 *ERC20Filterer) ParseTransfer(log types.Log) (*ERC20Transfer, error) { - event := new(ERC20Transfer) - if err := _ERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// IERC20ABI is the input ABI used to generate the binding from. -const IERC20ABI = "[{\"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\":\"amount\",\"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\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// IERC20FuncSigs maps the 4-byte function signature to its string representation. -var IERC20FuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} - -// IERC20 is an auto generated Go binding around an Ethereum contract. -type IERC20 struct { - IERC20Caller // Read-only binding to the contract - IERC20Transactor // Write-only binding to the contract - IERC20Filterer // Log filterer for contract events -} - -// IERC20Caller is an auto generated read-only Go binding around an Ethereum contract. -type IERC20Caller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Transactor is an auto generated write-only Go binding around an Ethereum contract. -type IERC20Transactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. -type IERC20Filterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// IERC20Session is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type IERC20Session struct { - Contract *IERC20 // 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 -} - -// IERC20CallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type IERC20CallerSession struct { - Contract *IERC20Caller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// IERC20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type IERC20TransactorSession struct { - Contract *IERC20Transactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// IERC20Raw is an auto generated low-level Go binding around an Ethereum contract. -type IERC20Raw struct { - Contract *IERC20 // Generic contract binding to access the raw methods on -} - -// IERC20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type IERC20CallerRaw struct { - Contract *IERC20Caller // Generic read-only contract binding to access the raw methods on -} - -// IERC20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type IERC20TransactorRaw struct { - Contract *IERC20Transactor // Generic write-only contract binding to access the raw methods on -} - -// NewIERC20 creates a new instance of IERC20, bound to a specific deployed contract. -func NewIERC20(address common.Address, backend bind.ContractBackend) (*IERC20, error) { - contract, err := bindIERC20(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &IERC20{IERC20Caller: IERC20Caller{contract: contract}, IERC20Transactor: IERC20Transactor{contract: contract}, IERC20Filterer: IERC20Filterer{contract: contract}}, nil -} - -// NewIERC20Caller creates a new read-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Caller(address common.Address, caller bind.ContractCaller) (*IERC20Caller, error) { - contract, err := bindIERC20(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &IERC20Caller{contract: contract}, nil -} - -// NewIERC20Transactor creates a new write-only instance of IERC20, bound to a specific deployed contract. -func NewIERC20Transactor(address common.Address, transactor bind.ContractTransactor) (*IERC20Transactor, error) { - contract, err := bindIERC20(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &IERC20Transactor{contract: contract}, nil -} - -// NewIERC20Filterer creates a new log filterer instance of IERC20, bound to a specific deployed contract. -func NewIERC20Filterer(address common.Address, filterer bind.ContractFilterer) (*IERC20Filterer, error) { - contract, err := bindIERC20(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &IERC20Filterer{contract: contract}, nil -} - -// bindIERC20 binds a generic wrapper to an already deployed contract. -func bindIERC20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(IERC20ABI)) - 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 (_IERC20 *IERC20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IERC20.Contract.IERC20Caller.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 (_IERC20 *IERC20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.Contract.IERC20Transactor.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 (_IERC20 *IERC20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _IERC20.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 (_IERC20 *IERC20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _IERC20.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_IERC20 *IERC20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _IERC20.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 (_IERC20 *IERC20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var out []interface{} - err := _IERC20.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 (_IERC20 *IERC20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.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 (_IERC20 *IERC20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _IERC20.Contract.Allowance(&_IERC20.CallOpts, owner, spender) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { - var out []interface{} - err := _IERC20.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 (_IERC20 *IERC20Session) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. -// -// Solidity: function balanceOf(address account) view returns(uint256) -func (_IERC20 *IERC20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _IERC20.Contract.BalanceOf(&_IERC20.CallOpts, account) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _IERC20.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 (_IERC20 *IERC20Session) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. -// -// Solidity: function totalSupply() view returns(uint256) -func (_IERC20 *IERC20CallerSession) TotalSupply() (*big.Int, error) { - return _IERC20.Contract.TotalSupply(&_IERC20.CallOpts) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "approve", spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. -// -// Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Approve(&_IERC20.TransactOpts, spender, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transfer", recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. -// -// Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.Transfer(&_IERC20.TransactOpts, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Transactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.contract.Transact(opts, "transferFrom", sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20Session) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. -// -// Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_IERC20 *IERC20TransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _IERC20.Contract.TransferFrom(&_IERC20.TransactOpts, sender, recipient, amount) -} - -// IERC20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the IERC20 contract. -type IERC20ApprovalIterator struct { - Event *IERC20Approval // 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 *IERC20ApprovalIterator) 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(IERC20Approval) - 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(IERC20Approval) - 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 *IERC20ApprovalIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20ApprovalIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Approval represents a Approval event raised by the IERC20 contract. -type IERC20Approval 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 (_IERC20 *IERC20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*IERC20ApprovalIterator, 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 := _IERC20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) - if err != nil { - return nil, err - } - return &IERC20ApprovalIterator{contract: _IERC20.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 (_IERC20 *IERC20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *IERC20Approval, 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 := _IERC20.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(IERC20Approval) - if err := _IERC20.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 (_IERC20 *IERC20Filterer) ParseApproval(log types.Log) (*IERC20Approval, error) { - event := new(IERC20Approval) - if err := _IERC20.contract.UnpackLog(event, "Approval", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// IERC20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the IERC20 contract. -type IERC20TransferIterator struct { - Event *IERC20Transfer // 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 *IERC20TransferIterator) 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(IERC20Transfer) - 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(IERC20Transfer) - 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 *IERC20TransferIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *IERC20TransferIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// IERC20Transfer represents a Transfer event raised by the IERC20 contract. -type IERC20Transfer 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 (_IERC20 *IERC20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*IERC20TransferIterator, 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 := _IERC20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) - if err != nil { - return nil, err - } - return &IERC20TransferIterator{contract: _IERC20.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 (_IERC20 *IERC20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *IERC20Transfer, 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 := _IERC20.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(IERC20Transfer) - if err := _IERC20.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 (_IERC20 *IERC20Filterer) ParseTransfer(log types.Log) (*IERC20Transfer, error) { - event := new(IERC20Transfer) - if err := _IERC20.contract.UnpackLog(event, "Transfer", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil +// PeruntokenMetaData contains all meta data concerning the Peruntoken contract. +var PeruntokenMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"initBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"amount\",\"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\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60806040523480156200001157600080fd5b5060405162000e1438038062000e14833981016040819052620000349162000335565b6040518060400160405280600a8152602001692832b93ab72a37b5b2b760b11b8152506040518060400160405280600381526020016228292760e91b81525081600390805190602001906200008b9291906200026c565b508051620000a19060049060208401906200026c565b50506005805460ff191660121790555060005b8251811015620000ed57620000e4838281518110620000cf57fe5b602002602001015183620000f660201b60201c565b600101620000b4565b505050620003fb565b6001600160a01b03821662000152576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620001606000838362000205565b6200017c816002546200020a60201b6200044e1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620001af9183906200044e6200020a821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b60008282018381101562000265576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620002a45760008555620002ef565b82601f10620002bf57805160ff1916838001178555620002ef565b82800160010185558215620002ef579182015b82811115620002ef578251825591602001919060010190620002d2565b50620002fd92915062000301565b5090565b5b80821115620002fd576000815560010162000302565b80516001600160a01b03811681146200033057600080fd5b919050565b6000806040838503121562000348578182fd5b82516001600160401b03808211156200035f578384fd5b818501915085601f83011262000373578384fd5b81516020828211156200038257fe5b808202604051828282010181811086821117156200039c57fe5b604052838152828101945085830182870184018b1015620003bb578889fd5b8896505b84871015620003e857620003d38162000318565b865260019690960195948301948301620003bf565b5097909101519698969750505050505050565b610a09806200040b6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012957806370a082311461013c57806395d89b411461014f578063a457c2d714610157578063a9059cbb1461016a578063dd62ed3e1461017d576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ec57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b6610190565b6040516100c39190610868565b60405180910390f35b6100df6100da366004610834565b610226565b6040516100c3919061085d565b6100f4610243565b6040516100c391906108bb565b6100df61010f3660046107f9565b610249565b61011c6102d0565b6040516100c391906108c4565b6100df610137366004610834565b6102d9565b6100f461014a3660046107ad565b610327565b6100b6610346565b6100df610165366004610834565b6103a7565b6100df610178366004610834565b61040f565b6100f461018b3660046107c7565b610423565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b820191906000526020600020905b8154815290600101906020018083116101ff57829003601f168201915b5050505050905090565b600061023a6102336104af565b84846104b3565b50600192915050565b60025490565b600061025684848461059f565b6102c6846102626104af565b6102c18560405180606001604052806028815260200161093e602891396001600160a01b038a166000908152600160205260408120906102a06104af565b6001600160a01b0316815260208101919091526040016000205491906106fa565b6104b3565b5060019392505050565b60055460ff1690565b600061023a6102e66104af565b846102c185600160006102f76104af565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061044e565b6001600160a01b0381166000908152602081905260409020545b919050565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b600061023a6103b46104af565b846102c1856040518060600160405280602581526020016109af60259139600160006103de6104af565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906106fa565b600061023a61041c6104af565b848461059f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000828201838110156104a8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166104f85760405162461bcd60e51b815260040180806020018281038252602481526020018061098b6024913960400191505060405180910390fd5b6001600160a01b03821661053d5760405162461bcd60e51b81526004018080602001828103825260228152602001806108f66022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166105e45760405162461bcd60e51b81526004018080602001828103825260258152602001806109666025913960400191505060405180910390fd5b6001600160a01b0382166106295760405162461bcd60e51b81526004018080602001828103825260238152602001806108d36023913960400191505060405180910390fd5b610634838383610791565b61067181604051806060016040528060268152602001610918602691396001600160a01b03861660009081526020819052604090205491906106fa565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106a0908261044e565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156107895760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561074e578181015183820152602001610736565b50505050905090810190601f16801561077b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b505050565b80356001600160a01b038116811461034157600080fd5b6000602082840312156107be578081fd5b6104a882610796565b600080604083850312156107d9578081fd5b6107e283610796565b91506107f060208401610796565b90509250929050565b60008060006060848603121561080d578081fd5b61081684610796565b925061082460208501610796565b9150604084013590509250925092565b60008060408385031215610846578182fd5b61084f83610796565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b8181101561089457858101830151858201604001528201610878565b818111156108a55783604083870101525b50601f01601f1916929092016040019392505050565b90815260200190565b60ff9190911681526020019056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a6a62dd23e9025a655d63c6934c8cbda5a7b3e35be7fdd7e5872d995e1b252fc64736f6c63430007060033", } -// PerunTokenABI is the input ABI used to generate the binding from. -const PerunTokenABI = "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"initBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"amount\",\"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\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" - -// PerunTokenFuncSigs maps the 4-byte function signature to its string representation. -var PerunTokenFuncSigs = map[string]string{ - "dd62ed3e": "allowance(address,address)", - "095ea7b3": "approve(address,uint256)", - "70a08231": "balanceOf(address)", - "313ce567": "decimals()", - "a457c2d7": "decreaseAllowance(address,uint256)", - "39509351": "increaseAllowance(address,uint256)", - "06fdde03": "name()", - "95d89b41": "symbol()", - "18160ddd": "totalSupply()", - "a9059cbb": "transfer(address,uint256)", - "23b872dd": "transferFrom(address,address,uint256)", -} +// PeruntokenABI is the input ABI used to generate the binding from. +// Deprecated: Use PeruntokenMetaData.ABI instead. +var PeruntokenABI = PeruntokenMetaData.ABI -// PerunTokenBin is the compiled bytecode used for deploying new contracts. -var PerunTokenBin = "0x60806040523480156200001157600080fd5b5060405162000e2c38038062000e2c833981016040819052620000349162000335565b6040518060400160405280600a8152602001692832b93ab72a37b5b2b760b11b8152506040518060400160405280600381526020016228292760e91b81525081600390805190602001906200008b9291906200026c565b508051620000a19060049060208401906200026c565b50506005805460ff191660121790555060005b8251811015620000ed57620000e4838281518110620000cf57fe5b602002602001015183620000f660201b60201c565b600101620000b4565b50505062000413565b6001600160a01b03821662000152576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b620001606000838362000205565b6200017c816002546200020a60201b6200044e1790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620001af9183906200044e6200020a821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b60008282018381101562000265576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620002a45760008555620002ef565b82601f10620002bf57805160ff1916838001178555620002ef565b82800160010185558215620002ef579182015b82811115620002ef578251825591602001919060010190620002d2565b50620002fd92915062000301565b5090565b5b80821115620002fd576000815560010162000302565b80516001600160a01b03811681146200033057600080fd5b919050565b6000806040838503121562000348578182fd5b82516001600160401b03808211156200035f578384fd5b818501915085601f83011262000373578384fd5b8151818111156200038057fe5b6020915081810262000394838201620003ef565b8281528381019085850183870186018b1015620003af578889fd5b8896505b84871015620003dc57620003c78162000318565b835260019690960195918501918501620003b3565b5097909301519698969750505050505050565b6040518181016001600160401b03811182821017156200040b57fe5b604052919050565b610a0980620004236000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012957806370a082311461013c57806395d89b411461014f578063a457c2d714610157578063a9059cbb1461016a578063dd62ed3e1461017d576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ec57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b6610190565b6040516100c39190610868565b60405180910390f35b6100df6100da366004610834565b610226565b6040516100c3919061085d565b6100f4610243565b6040516100c391906108bb565b6100df61010f3660046107f9565b610249565b61011c6102d0565b6040516100c391906108c4565b6100df610137366004610834565b6102d9565b6100f461014a3660046107ad565b610327565b6100b6610346565b6100df610165366004610834565b6103a7565b6100df610178366004610834565b61040f565b6100f461018b3660046107c7565b610423565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b820191906000526020600020905b8154815290600101906020018083116101ff57829003601f168201915b5050505050905090565b600061023a6102336104af565b84846104b3565b50600192915050565b60025490565b600061025684848461059f565b6102c6846102626104af565b6102c18560405180606001604052806028815260200161093e602891396001600160a01b038a166000908152600160205260408120906102a06104af565b6001600160a01b0316815260208101919091526040016000205491906106fa565b6104b3565b5060019392505050565b60055460ff1690565b600061023a6102e66104af565b846102c185600160006102f76104af565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061044e565b6001600160a01b0381166000908152602081905260409020545b919050565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b600061023a6103b46104af565b846102c1856040518060600160405280602581526020016109af60259139600160006103de6104af565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906106fa565b600061023a61041c6104af565b848461059f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000828201838110156104a8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166104f85760405162461bcd60e51b815260040180806020018281038252602481526020018061098b6024913960400191505060405180910390fd5b6001600160a01b03821661053d5760405162461bcd60e51b81526004018080602001828103825260228152602001806108f66022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166105e45760405162461bcd60e51b81526004018080602001828103825260258152602001806109666025913960400191505060405180910390fd5b6001600160a01b0382166106295760405162461bcd60e51b81526004018080602001828103825260238152602001806108d36023913960400191505060405180910390fd5b610634838383610791565b61067181604051806060016040528060268152602001610918602691396001600160a01b03861660009081526020819052604090205491906106fa565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106a0908261044e565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156107895760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561074e578181015183820152602001610736565b50505050905090810190601f16801561077b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b505050565b80356001600160a01b038116811461034157600080fd5b6000602082840312156107be578081fd5b6104a882610796565b600080604083850312156107d9578081fd5b6107e283610796565b91506107f060208401610796565b90509250929050565b60008060006060848603121561080d578081fd5b61081684610796565b925061082460208501610796565b9150604084013590509250925092565b60008060408385031215610846578182fd5b61084f83610796565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b8181101561089457858101830151858201604001528201610878565b818111156108a55783604083870101525b50601f01601f1916929092016040019392505050565b90815260200190565b60ff9190911681526020019056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122037474073085c66a29bfbd0f5f32114fd1ca80f646beac1ebc808dda1667e7bc064736f6c63430007040033" +// PeruntokenBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use PeruntokenMetaData.Bin instead. +var PeruntokenBin = PeruntokenMetaData.Bin -// DeployPerunToken deploys a new Ethereum contract, binding an instance of PerunToken to it. -func DeployPerunToken(auth *bind.TransactOpts, backend bind.ContractBackend, accounts []common.Address, initBalance *big.Int) (common.Address, *types.Transaction, *PerunToken, error) { - parsed, err := abi.JSON(strings.NewReader(PerunTokenABI)) +// DeployPeruntoken deploys a new Ethereum contract, binding an instance of Peruntoken to it. +func DeployPeruntoken(auth *bind.TransactOpts, backend bind.ContractBackend, accounts []common.Address, initBalance *big.Int) (common.Address, *types.Transaction, *Peruntoken, error) { + parsed, err := PeruntokenMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(PerunTokenBin), backend, accounts, initBalance) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(PeruntokenBin), backend, accounts, initBalance) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &PerunToken{PerunTokenCaller: PerunTokenCaller{contract: contract}, PerunTokenTransactor: PerunTokenTransactor{contract: contract}, PerunTokenFilterer: PerunTokenFilterer{contract: contract}}, nil + return address, tx, &Peruntoken{PeruntokenCaller: PeruntokenCaller{contract: contract}, PeruntokenTransactor: PeruntokenTransactor{contract: contract}, PeruntokenFilterer: PeruntokenFilterer{contract: contract}}, nil } -// PerunToken is an auto generated Go binding around an Ethereum contract. -type PerunToken struct { - PerunTokenCaller // Read-only binding to the contract - PerunTokenTransactor // Write-only binding to the contract - PerunTokenFilterer // Log filterer for contract events +// Peruntoken is an auto generated Go binding around an Ethereum contract. +type Peruntoken struct { + PeruntokenCaller // Read-only binding to the contract + PeruntokenTransactor // Write-only binding to the contract + PeruntokenFilterer // Log filterer for contract events } -// PerunTokenCaller is an auto generated read-only Go binding around an Ethereum contract. -type PerunTokenCaller struct { +// PeruntokenCaller is an auto generated read-only Go binding around an Ethereum contract. +type PeruntokenCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// PerunTokenTransactor is an auto generated write-only Go binding around an Ethereum contract. -type PerunTokenTransactor struct { +// PeruntokenTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PeruntokenTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// PerunTokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type PerunTokenFilterer struct { +// PeruntokenFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PeruntokenFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// PerunTokenSession is an auto generated Go binding around an Ethereum contract, +// PeruntokenSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type PerunTokenSession struct { - Contract *PerunToken // Generic contract binding to set the session for +type PeruntokenSession struct { + Contract *Peruntoken // 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 } -// PerunTokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// PeruntokenCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type PerunTokenCallerSession struct { - Contract *PerunTokenCaller // Generic contract caller binding to set the session for +type PeruntokenCallerSession struct { + Contract *PeruntokenCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } -// PerunTokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// PeruntokenTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type PerunTokenTransactorSession struct { - Contract *PerunTokenTransactor // Generic contract transactor binding to set the session for +type PeruntokenTransactorSession struct { + Contract *PeruntokenTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// PerunTokenRaw is an auto generated low-level Go binding around an Ethereum contract. -type PerunTokenRaw struct { - Contract *PerunToken // Generic contract binding to access the raw methods on +// PeruntokenRaw is an auto generated low-level Go binding around an Ethereum contract. +type PeruntokenRaw struct { + Contract *Peruntoken // Generic contract binding to access the raw methods on } -// PerunTokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type PerunTokenCallerRaw struct { - Contract *PerunTokenCaller // Generic read-only contract binding to access the raw methods on +// PeruntokenCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PeruntokenCallerRaw struct { + Contract *PeruntokenCaller // Generic read-only contract binding to access the raw methods on } -// PerunTokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type PerunTokenTransactorRaw struct { - Contract *PerunTokenTransactor // Generic write-only contract binding to access the raw methods on +// PeruntokenTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PeruntokenTransactorRaw struct { + Contract *PeruntokenTransactor // Generic write-only contract binding to access the raw methods on } -// NewPerunToken creates a new instance of PerunToken, bound to a specific deployed contract. -func NewPerunToken(address common.Address, backend bind.ContractBackend) (*PerunToken, error) { - contract, err := bindPerunToken(address, backend, backend, backend) +// NewPeruntoken creates a new instance of Peruntoken, bound to a specific deployed contract. +func NewPeruntoken(address common.Address, backend bind.ContractBackend) (*Peruntoken, error) { + contract, err := bindPeruntoken(address, backend, backend, backend) if err != nil { return nil, err } - return &PerunToken{PerunTokenCaller: PerunTokenCaller{contract: contract}, PerunTokenTransactor: PerunTokenTransactor{contract: contract}, PerunTokenFilterer: PerunTokenFilterer{contract: contract}}, nil + return &Peruntoken{PeruntokenCaller: PeruntokenCaller{contract: contract}, PeruntokenTransactor: PeruntokenTransactor{contract: contract}, PeruntokenFilterer: PeruntokenFilterer{contract: contract}}, nil } -// NewPerunTokenCaller creates a new read-only instance of PerunToken, bound to a specific deployed contract. -func NewPerunTokenCaller(address common.Address, caller bind.ContractCaller) (*PerunTokenCaller, error) { - contract, err := bindPerunToken(address, caller, nil, nil) +// NewPeruntokenCaller creates a new read-only instance of Peruntoken, bound to a specific deployed contract. +func NewPeruntokenCaller(address common.Address, caller bind.ContractCaller) (*PeruntokenCaller, error) { + contract, err := bindPeruntoken(address, caller, nil, nil) if err != nil { return nil, err } - return &PerunTokenCaller{contract: contract}, nil + return &PeruntokenCaller{contract: contract}, nil } -// NewPerunTokenTransactor creates a new write-only instance of PerunToken, bound to a specific deployed contract. -func NewPerunTokenTransactor(address common.Address, transactor bind.ContractTransactor) (*PerunTokenTransactor, error) { - contract, err := bindPerunToken(address, nil, transactor, nil) +// NewPeruntokenTransactor creates a new write-only instance of Peruntoken, bound to a specific deployed contract. +func NewPeruntokenTransactor(address common.Address, transactor bind.ContractTransactor) (*PeruntokenTransactor, error) { + contract, err := bindPeruntoken(address, nil, transactor, nil) if err != nil { return nil, err } - return &PerunTokenTransactor{contract: contract}, nil + return &PeruntokenTransactor{contract: contract}, nil } -// NewPerunTokenFilterer creates a new log filterer instance of PerunToken, bound to a specific deployed contract. -func NewPerunTokenFilterer(address common.Address, filterer bind.ContractFilterer) (*PerunTokenFilterer, error) { - contract, err := bindPerunToken(address, nil, nil, filterer) +// NewPeruntokenFilterer creates a new log filterer instance of Peruntoken, bound to a specific deployed contract. +func NewPeruntokenFilterer(address common.Address, filterer bind.ContractFilterer) (*PeruntokenFilterer, error) { + contract, err := bindPeruntoken(address, nil, nil, filterer) if err != nil { return nil, err } - return &PerunTokenFilterer{contract: contract}, nil + return &PeruntokenFilterer{contract: contract}, nil } -// bindPerunToken binds a generic wrapper to an already deployed contract. -func bindPerunToken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(PerunTokenABI)) +// bindPeruntoken binds a generic wrapper to an already deployed contract. +func bindPeruntoken(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PeruntokenABI)) if err != nil { return nil, err } @@ -1871,46 +167,46 @@ func bindPerunToken(address common.Address, caller bind.ContractCaller, transact // 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 (_PerunToken *PerunTokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _PerunToken.Contract.PerunTokenCaller.contract.Call(opts, result, method, params...) +func (_Peruntoken *PeruntokenRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Peruntoken.Contract.PeruntokenCaller.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 (_PerunToken *PerunTokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _PerunToken.Contract.PerunTokenTransactor.contract.Transfer(opts) +func (_Peruntoken *PeruntokenRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Peruntoken.Contract.PeruntokenTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_PerunToken *PerunTokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _PerunToken.Contract.PerunTokenTransactor.contract.Transact(opts, method, params...) +func (_Peruntoken *PeruntokenRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Peruntoken.Contract.PeruntokenTransactor.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 (_PerunToken *PerunTokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _PerunToken.Contract.contract.Call(opts, result, method, params...) +func (_Peruntoken *PeruntokenCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Peruntoken.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 (_PerunToken *PerunTokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _PerunToken.Contract.contract.Transfer(opts) +func (_Peruntoken *PeruntokenTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Peruntoken.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_PerunToken *PerunTokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _PerunToken.Contract.contract.Transact(opts, method, params...) +func (_Peruntoken *PeruntokenTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Peruntoken.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 (_PerunToken *PerunTokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { +func (_Peruntoken *PeruntokenCaller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { var out []interface{} - err := _PerunToken.contract.Call(opts, &out, "allowance", owner, spender) + err := _Peruntoken.contract.Call(opts, &out, "allowance", owner, spender) if err != nil { return *new(*big.Int), err @@ -1925,23 +221,23 @@ func (_PerunToken *PerunTokenCaller) Allowance(opts *bind.CallOpts, owner common // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // // Solidity: function allowance(address owner, address spender) view returns(uint256) -func (_PerunToken *PerunTokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _PerunToken.Contract.Allowance(&_PerunToken.CallOpts, owner, spender) +func (_Peruntoken *PeruntokenSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _Peruntoken.Contract.Allowance(&_Peruntoken.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 (_PerunToken *PerunTokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { - return _PerunToken.Contract.Allowance(&_PerunToken.CallOpts, owner, spender) +func (_Peruntoken *PeruntokenCallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _Peruntoken.Contract.Allowance(&_Peruntoken.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) -func (_PerunToken *PerunTokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { +func (_Peruntoken *PeruntokenCaller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { var out []interface{} - err := _PerunToken.contract.Call(opts, &out, "balanceOf", account) + err := _Peruntoken.contract.Call(opts, &out, "balanceOf", account) if err != nil { return *new(*big.Int), err @@ -1956,23 +252,23 @@ func (_PerunToken *PerunTokenCaller) BalanceOf(opts *bind.CallOpts, account comm // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) -func (_PerunToken *PerunTokenSession) BalanceOf(account common.Address) (*big.Int, error) { - return _PerunToken.Contract.BalanceOf(&_PerunToken.CallOpts, account) +func (_Peruntoken *PeruntokenSession) BalanceOf(account common.Address) (*big.Int, error) { + return _Peruntoken.Contract.BalanceOf(&_Peruntoken.CallOpts, account) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // // Solidity: function balanceOf(address account) view returns(uint256) -func (_PerunToken *PerunTokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { - return _PerunToken.Contract.BalanceOf(&_PerunToken.CallOpts, account) +func (_Peruntoken *PeruntokenCallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _Peruntoken.Contract.BalanceOf(&_Peruntoken.CallOpts, account) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) -func (_PerunToken *PerunTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { +func (_Peruntoken *PeruntokenCaller) Decimals(opts *bind.CallOpts) (uint8, error) { var out []interface{} - err := _PerunToken.contract.Call(opts, &out, "decimals") + err := _Peruntoken.contract.Call(opts, &out, "decimals") if err != nil { return *new(uint8), err @@ -1987,23 +283,23 @@ func (_PerunToken *PerunTokenCaller) Decimals(opts *bind.CallOpts) (uint8, error // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) -func (_PerunToken *PerunTokenSession) Decimals() (uint8, error) { - return _PerunToken.Contract.Decimals(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenSession) Decimals() (uint8, error) { + return _Peruntoken.Contract.Decimals(&_Peruntoken.CallOpts) } // Decimals is a free data retrieval call binding the contract method 0x313ce567. // // Solidity: function decimals() view returns(uint8) -func (_PerunToken *PerunTokenCallerSession) Decimals() (uint8, error) { - return _PerunToken.Contract.Decimals(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenCallerSession) Decimals() (uint8, error) { + return _Peruntoken.Contract.Decimals(&_Peruntoken.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) -func (_PerunToken *PerunTokenCaller) Name(opts *bind.CallOpts) (string, error) { +func (_Peruntoken *PeruntokenCaller) Name(opts *bind.CallOpts) (string, error) { var out []interface{} - err := _PerunToken.contract.Call(opts, &out, "name") + err := _Peruntoken.contract.Call(opts, &out, "name") if err != nil { return *new(string), err @@ -2018,23 +314,23 @@ func (_PerunToken *PerunTokenCaller) Name(opts *bind.CallOpts) (string, error) { // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) -func (_PerunToken *PerunTokenSession) Name() (string, error) { - return _PerunToken.Contract.Name(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenSession) Name() (string, error) { + return _Peruntoken.Contract.Name(&_Peruntoken.CallOpts) } // Name is a free data retrieval call binding the contract method 0x06fdde03. // // Solidity: function name() view returns(string) -func (_PerunToken *PerunTokenCallerSession) Name() (string, error) { - return _PerunToken.Contract.Name(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenCallerSession) Name() (string, error) { + return _Peruntoken.Contract.Name(&_Peruntoken.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) -func (_PerunToken *PerunTokenCaller) Symbol(opts *bind.CallOpts) (string, error) { +func (_Peruntoken *PeruntokenCaller) Symbol(opts *bind.CallOpts) (string, error) { var out []interface{} - err := _PerunToken.contract.Call(opts, &out, "symbol") + err := _Peruntoken.contract.Call(opts, &out, "symbol") if err != nil { return *new(string), err @@ -2049,23 +345,23 @@ func (_PerunToken *PerunTokenCaller) Symbol(opts *bind.CallOpts) (string, error) // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) -func (_PerunToken *PerunTokenSession) Symbol() (string, error) { - return _PerunToken.Contract.Symbol(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenSession) Symbol() (string, error) { + return _Peruntoken.Contract.Symbol(&_Peruntoken.CallOpts) } // Symbol is a free data retrieval call binding the contract method 0x95d89b41. // // Solidity: function symbol() view returns(string) -func (_PerunToken *PerunTokenCallerSession) Symbol() (string, error) { - return _PerunToken.Contract.Symbol(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenCallerSession) Symbol() (string, error) { + return _Peruntoken.Contract.Symbol(&_Peruntoken.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) -func (_PerunToken *PerunTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { +func (_Peruntoken *PeruntokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { var out []interface{} - err := _PerunToken.contract.Call(opts, &out, "totalSupply") + err := _Peruntoken.contract.Call(opts, &out, "totalSupply") if err != nil { return *new(*big.Int), err @@ -2080,125 +376,125 @@ func (_PerunToken *PerunTokenCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) -func (_PerunToken *PerunTokenSession) TotalSupply() (*big.Int, error) { - return _PerunToken.Contract.TotalSupply(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenSession) TotalSupply() (*big.Int, error) { + return _Peruntoken.Contract.TotalSupply(&_Peruntoken.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // // Solidity: function totalSupply() view returns(uint256) -func (_PerunToken *PerunTokenCallerSession) TotalSupply() (*big.Int, error) { - return _PerunToken.Contract.TotalSupply(&_PerunToken.CallOpts) +func (_Peruntoken *PeruntokenCallerSession) TotalSupply() (*big.Int, error) { + return _Peruntoken.Contract.TotalSupply(&_Peruntoken.CallOpts) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.contract.Transact(opts, "approve", spender, amount) +func (_Peruntoken *PeruntokenTransactor) Approve(opts *bind.TransactOpts, spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.contract.Transact(opts, "approve", spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.Approve(&_PerunToken.TransactOpts, spender, amount) +func (_Peruntoken *PeruntokenSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.Approve(&_Peruntoken.TransactOpts, spender, amount) } // Approve is a paid mutator transaction binding the contract method 0x095ea7b3. // // Solidity: function approve(address spender, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.Approve(&_PerunToken.TransactOpts, spender, amount) +func (_Peruntoken *PeruntokenTransactorSession) Approve(spender common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.Approve(&_Peruntoken.TransactOpts, spender, amount) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_PerunToken *PerunTokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _PerunToken.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) +func (_Peruntoken *PeruntokenTransactor) DecreaseAllowance(opts *bind.TransactOpts, spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _Peruntoken.contract.Transact(opts, "decreaseAllowance", spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_PerunToken *PerunTokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.DecreaseAllowance(&_PerunToken.TransactOpts, spender, subtractedValue) +func (_Peruntoken *PeruntokenSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.DecreaseAllowance(&_Peruntoken.TransactOpts, spender, subtractedValue) } // DecreaseAllowance is a paid mutator transaction binding the contract method 0xa457c2d7. // // Solidity: function decreaseAllowance(address spender, uint256 subtractedValue) returns(bool) -func (_PerunToken *PerunTokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.DecreaseAllowance(&_PerunToken.TransactOpts, spender, subtractedValue) +func (_Peruntoken *PeruntokenTransactorSession) DecreaseAllowance(spender common.Address, subtractedValue *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.DecreaseAllowance(&_Peruntoken.TransactOpts, spender, subtractedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_PerunToken *PerunTokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _PerunToken.contract.Transact(opts, "increaseAllowance", spender, addedValue) +func (_Peruntoken *PeruntokenTransactor) IncreaseAllowance(opts *bind.TransactOpts, spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _Peruntoken.contract.Transact(opts, "increaseAllowance", spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_PerunToken *PerunTokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.IncreaseAllowance(&_PerunToken.TransactOpts, spender, addedValue) +func (_Peruntoken *PeruntokenSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.IncreaseAllowance(&_Peruntoken.TransactOpts, spender, addedValue) } // IncreaseAllowance is a paid mutator transaction binding the contract method 0x39509351. // // Solidity: function increaseAllowance(address spender, uint256 addedValue) returns(bool) -func (_PerunToken *PerunTokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.IncreaseAllowance(&_PerunToken.TransactOpts, spender, addedValue) +func (_Peruntoken *PeruntokenTransactorSession) IncreaseAllowance(spender common.Address, addedValue *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.IncreaseAllowance(&_Peruntoken.TransactOpts, spender, addedValue) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.contract.Transact(opts, "transfer", recipient, amount) +func (_Peruntoken *PeruntokenTransactor) Transfer(opts *bind.TransactOpts, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.contract.Transact(opts, "transfer", recipient, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.Transfer(&_PerunToken.TransactOpts, recipient, amount) +func (_Peruntoken *PeruntokenSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.Transfer(&_Peruntoken.TransactOpts, recipient, amount) } // Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. // // Solidity: function transfer(address recipient, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.Transfer(&_PerunToken.TransactOpts, recipient, amount) +func (_Peruntoken *PeruntokenTransactorSession) Transfer(recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.Transfer(&_Peruntoken.TransactOpts, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.contract.Transact(opts, "transferFrom", sender, recipient, amount) +func (_Peruntoken *PeruntokenTransactor) TransferFrom(opts *bind.TransactOpts, sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.contract.Transact(opts, "transferFrom", sender, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.TransferFrom(&_PerunToken.TransactOpts, sender, recipient, amount) +func (_Peruntoken *PeruntokenSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.TransferFrom(&_Peruntoken.TransactOpts, sender, recipient, amount) } // TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. // // Solidity: function transferFrom(address sender, address recipient, uint256 amount) returns(bool) -func (_PerunToken *PerunTokenTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { - return _PerunToken.Contract.TransferFrom(&_PerunToken.TransactOpts, sender, recipient, amount) +func (_Peruntoken *PeruntokenTransactorSession) TransferFrom(sender common.Address, recipient common.Address, amount *big.Int) (*types.Transaction, error) { + return _Peruntoken.Contract.TransferFrom(&_Peruntoken.TransactOpts, sender, recipient, amount) } -// PerunTokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the PerunToken contract. -type PerunTokenApprovalIterator struct { - Event *PerunTokenApproval // Event containing the contract specifics and raw log +// PeruntokenApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Peruntoken contract. +type PeruntokenApprovalIterator struct { + Event *PeruntokenApproval // 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 @@ -2212,7 +508,7 @@ type PerunTokenApprovalIterator struct { // 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 *PerunTokenApprovalIterator) Next() bool { +func (it *PeruntokenApprovalIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2221,7 +517,7 @@ func (it *PerunTokenApprovalIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PerunTokenApproval) + it.Event = new(PeruntokenApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2236,7 +532,7 @@ func (it *PerunTokenApprovalIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(PerunTokenApproval) + it.Event = new(PeruntokenApproval) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2252,19 +548,19 @@ func (it *PerunTokenApprovalIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *PerunTokenApprovalIterator) Error() error { +func (it *PeruntokenApprovalIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *PerunTokenApprovalIterator) Close() error { +func (it *PeruntokenApprovalIterator) Close() error { it.sub.Unsubscribe() return nil } -// PerunTokenApproval represents a Approval event raised by the PerunToken contract. -type PerunTokenApproval struct { +// PeruntokenApproval represents a Approval event raised by the Peruntoken contract. +type PeruntokenApproval struct { Owner common.Address Spender common.Address Value *big.Int @@ -2274,7 +570,7 @@ type PerunTokenApproval struct { // FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_PerunToken *PerunTokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*PerunTokenApprovalIterator, error) { +func (_Peruntoken *PeruntokenFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*PeruntokenApprovalIterator, error) { var ownerRule []interface{} for _, ownerItem := range owner { @@ -2285,17 +581,17 @@ func (_PerunToken *PerunTokenFilterer) FilterApproval(opts *bind.FilterOpts, own spenderRule = append(spenderRule, spenderItem) } - logs, sub, err := _PerunToken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + logs, sub, err := _Peruntoken.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } - return &PerunTokenApprovalIterator{contract: _PerunToken.contract, event: "Approval", logs: logs, sub: sub}, nil + return &PeruntokenApprovalIterator{contract: _Peruntoken.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 (_PerunToken *PerunTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *PerunTokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { +func (_Peruntoken *PeruntokenFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *PeruntokenApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { var ownerRule []interface{} for _, ownerItem := range owner { @@ -2306,7 +602,7 @@ func (_PerunToken *PerunTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink spenderRule = append(spenderRule, spenderItem) } - logs, sub, err := _PerunToken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + logs, sub, err := _Peruntoken.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) if err != nil { return nil, err } @@ -2316,8 +612,8 @@ func (_PerunToken *PerunTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(PerunTokenApproval) - if err := _PerunToken.contract.UnpackLog(event, "Approval", log); err != nil { + event := new(PeruntokenApproval) + if err := _Peruntoken.contract.UnpackLog(event, "Approval", log); err != nil { return err } event.Raw = log @@ -2341,18 +637,18 @@ func (_PerunToken *PerunTokenFilterer) WatchApproval(opts *bind.WatchOpts, sink // ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. // // Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) -func (_PerunToken *PerunTokenFilterer) ParseApproval(log types.Log) (*PerunTokenApproval, error) { - event := new(PerunTokenApproval) - if err := _PerunToken.contract.UnpackLog(event, "Approval", log); err != nil { +func (_Peruntoken *PeruntokenFilterer) ParseApproval(log types.Log) (*PeruntokenApproval, error) { + event := new(PeruntokenApproval) + if err := _Peruntoken.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } event.Raw = log return event, nil } -// PerunTokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the PerunToken contract. -type PerunTokenTransferIterator struct { - Event *PerunTokenTransfer // Event containing the contract specifics and raw log +// PeruntokenTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Peruntoken contract. +type PeruntokenTransferIterator struct { + Event *PeruntokenTransfer // 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 @@ -2366,7 +662,7 @@ type PerunTokenTransferIterator struct { // 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 *PerunTokenTransferIterator) Next() bool { +func (it *PeruntokenTransferIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -2375,7 +671,7 @@ func (it *PerunTokenTransferIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(PerunTokenTransfer) + it.Event = new(PeruntokenTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2390,7 +686,7 @@ func (it *PerunTokenTransferIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(PerunTokenTransfer) + it.Event = new(PeruntokenTransfer) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -2406,19 +702,19 @@ func (it *PerunTokenTransferIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *PerunTokenTransferIterator) Error() error { +func (it *PeruntokenTransferIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *PerunTokenTransferIterator) Close() error { +func (it *PeruntokenTransferIterator) Close() error { it.sub.Unsubscribe() return nil } -// PerunTokenTransfer represents a Transfer event raised by the PerunToken contract. -type PerunTokenTransfer struct { +// PeruntokenTransfer represents a Transfer event raised by the Peruntoken contract. +type PeruntokenTransfer struct { From common.Address To common.Address Value *big.Int @@ -2428,7 +724,7 @@ type PerunTokenTransfer struct { // FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_PerunToken *PerunTokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PerunTokenTransferIterator, error) { +func (_Peruntoken *PeruntokenFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*PeruntokenTransferIterator, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2439,17 +735,17 @@ func (_PerunToken *PerunTokenFilterer) FilterTransfer(opts *bind.FilterOpts, fro toRule = append(toRule, toItem) } - logs, sub, err := _PerunToken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + logs, sub, err := _Peruntoken.contract.FilterLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } - return &PerunTokenTransferIterator{contract: _PerunToken.contract, event: "Transfer", logs: logs, sub: sub}, nil + return &PeruntokenTransferIterator{contract: _Peruntoken.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 (_PerunToken *PerunTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *PerunTokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { +func (_Peruntoken *PeruntokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *PeruntokenTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { var fromRule []interface{} for _, fromItem := range from { @@ -2460,7 +756,7 @@ func (_PerunToken *PerunTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink toRule = append(toRule, toItem) } - logs, sub, err := _PerunToken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + logs, sub, err := _Peruntoken.contract.WatchLogs(opts, "Transfer", fromRule, toRule) if err != nil { return nil, err } @@ -2470,8 +766,8 @@ func (_PerunToken *PerunTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(PerunTokenTransfer) - if err := _PerunToken.contract.UnpackLog(event, "Transfer", log); err != nil { + event := new(PeruntokenTransfer) + if err := _Peruntoken.contract.UnpackLog(event, "Transfer", log); err != nil { return err } event.Raw = log @@ -2495,173 +791,11 @@ func (_PerunToken *PerunTokenFilterer) WatchTransfer(opts *bind.WatchOpts, sink // ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. // // Solidity: event Transfer(address indexed from, address indexed to, uint256 value) -func (_PerunToken *PerunTokenFilterer) ParseTransfer(log types.Log) (*PerunTokenTransfer, error) { - event := new(PerunTokenTransfer) - if err := _PerunToken.contract.UnpackLog(event, "Transfer", log); err != nil { +func (_Peruntoken *PeruntokenFilterer) ParseTransfer(log types.Log) (*PeruntokenTransfer, error) { + event := new(PeruntokenTransfer) + if err := _Peruntoken.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } event.Raw = log return event, nil } - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209d2110f8008a32668165aee96d39b9a3b210868f452685996027830739a87e3064736f6c63430007040033" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // 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 -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} diff --git a/bindings/peruntoken/PerunTokenBinRuntime.go b/bindings/peruntoken/PerunTokenBinRuntime.go index 45bbfaa..2b6d3a5 100644 --- a/bindings/peruntoken/PerunTokenBinRuntime.go +++ b/bindings/peruntoken/PerunTokenBinRuntime.go @@ -1,4 +1,4 @@ package peruntoken // import "github.com/perun-network/perun-eth-backend/bindings/peruntoken" // PerunTokenBinRuntime is the runtime part of the compiled bytecode used for deploying new contracts. -var PerunTokenBinRuntime = "608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012957806370a082311461013c57806395d89b411461014f578063a457c2d714610157578063a9059cbb1461016a578063dd62ed3e1461017d576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ec57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b6610190565b6040516100c39190610868565b60405180910390f35b6100df6100da366004610834565b610226565b6040516100c3919061085d565b6100f4610243565b6040516100c391906108bb565b6100df61010f3660046107f9565b610249565b61011c6102d0565b6040516100c391906108c4565b6100df610137366004610834565b6102d9565b6100f461014a3660046107ad565b610327565b6100b6610346565b6100df610165366004610834565b6103a7565b6100df610178366004610834565b61040f565b6100f461018b3660046107c7565b610423565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b820191906000526020600020905b8154815290600101906020018083116101ff57829003601f168201915b5050505050905090565b600061023a6102336104af565b84846104b3565b50600192915050565b60025490565b600061025684848461059f565b6102c6846102626104af565b6102c18560405180606001604052806028815260200161093e602891396001600160a01b038a166000908152600160205260408120906102a06104af565b6001600160a01b0316815260208101919091526040016000205491906106fa565b6104b3565b5060019392505050565b60055460ff1690565b600061023a6102e66104af565b846102c185600160006102f76104af565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061044e565b6001600160a01b0381166000908152602081905260409020545b919050565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b600061023a6103b46104af565b846102c1856040518060600160405280602581526020016109af60259139600160006103de6104af565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906106fa565b600061023a61041c6104af565b848461059f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000828201838110156104a8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166104f85760405162461bcd60e51b815260040180806020018281038252602481526020018061098b6024913960400191505060405180910390fd5b6001600160a01b03821661053d5760405162461bcd60e51b81526004018080602001828103825260228152602001806108f66022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166105e45760405162461bcd60e51b81526004018080602001828103825260258152602001806109666025913960400191505060405180910390fd5b6001600160a01b0382166106295760405162461bcd60e51b81526004018080602001828103825260238152602001806108d36023913960400191505060405180910390fd5b610634838383610791565b61067181604051806060016040528060268152602001610918602691396001600160a01b03861660009081526020819052604090205491906106fa565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106a0908261044e565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156107895760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561074e578181015183820152602001610736565b50505050905090810190601f16801561077b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b505050565b80356001600160a01b038116811461034157600080fd5b6000602082840312156107be578081fd5b6104a882610796565b600080604083850312156107d9578081fd5b6107e283610796565b91506107f060208401610796565b90509250929050565b60008060006060848603121561080d578081fd5b61081684610796565b925061082460208501610796565b9150604084013590509250925092565b60008060408385031215610846578182fd5b61084f83610796565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b8181101561089457858101830151858201604001528201610878565b818111156108a55783604083870101525b50601f01601f1916929092016040019392505050565b90815260200190565b60ff9190911681526020019056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122037474073085c66a29bfbd0f5f32114fd1ca80f646beac1ebc808dda1667e7bc064736f6c63430007040033" +var PerunTokenBinRuntime = "608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012957806370a082311461013c57806395d89b411461014f578063a457c2d714610157578063a9059cbb1461016a578063dd62ed3e1461017d576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ec57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b6610190565b6040516100c39190610868565b60405180910390f35b6100df6100da366004610834565b610226565b6040516100c3919061085d565b6100f4610243565b6040516100c391906108bb565b6100df61010f3660046107f9565b610249565b61011c6102d0565b6040516100c391906108c4565b6100df610137366004610834565b6102d9565b6100f461014a3660046107ad565b610327565b6100b6610346565b6100df610165366004610834565b6103a7565b6100df610178366004610834565b61040f565b6100f461018b3660046107c7565b610423565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b820191906000526020600020905b8154815290600101906020018083116101ff57829003601f168201915b5050505050905090565b600061023a6102336104af565b84846104b3565b50600192915050565b60025490565b600061025684848461059f565b6102c6846102626104af565b6102c18560405180606001604052806028815260200161093e602891396001600160a01b038a166000908152600160205260408120906102a06104af565b6001600160a01b0316815260208101919091526040016000205491906106fa565b6104b3565b5060019392505050565b60055460ff1690565b600061023a6102e66104af565b846102c185600160006102f76104af565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061044e565b6001600160a01b0381166000908152602081905260409020545b919050565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561021c5780601f106101f15761010080835404028352916020019161021c565b600061023a6103b46104af565b846102c1856040518060600160405280602581526020016109af60259139600160006103de6104af565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906106fa565b600061023a61041c6104af565b848461059f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000828201838110156104a8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b3390565b6001600160a01b0383166104f85760405162461bcd60e51b815260040180806020018281038252602481526020018061098b6024913960400191505060405180910390fd5b6001600160a01b03821661053d5760405162461bcd60e51b81526004018080602001828103825260228152602001806108f66022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166105e45760405162461bcd60e51b81526004018080602001828103825260258152602001806109666025913960400191505060405180910390fd5b6001600160a01b0382166106295760405162461bcd60e51b81526004018080602001828103825260238152602001806108d36023913960400191505060405180910390fd5b610634838383610791565b61067181604051806060016040528060268152602001610918602691396001600160a01b03861660009081526020819052604090205491906106fa565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546106a0908261044e565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156107895760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561074e578181015183820152602001610736565b50505050905090810190601f16801561077b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b505050565b80356001600160a01b038116811461034157600080fd5b6000602082840312156107be578081fd5b6104a882610796565b600080604083850312156107d9578081fd5b6107e283610796565b91506107f060208401610796565b90509250929050565b60008060006060848603121561080d578081fd5b61081684610796565b925061082460208501610796565b9150604084013590509250925092565b60008060408385031215610846578182fd5b61084f83610796565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b8181101561089457858101830151858201604001528201610878565b818111156108a55783604083870101525b50601f01601f1916929092016040019392505050565b90815260200190565b60ff9190911681526020019056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a6a62dd23e9025a655d63c6934c8cbda5a7b3e35be7fdd7e5872d995e1b252fc64736f6c63430007060033" diff --git a/bindings/trivialapp/TrivialApp.go b/bindings/trivialapp/TrivialApp.go index 6ffa239..a062fd1 100644 --- a/bindings/trivialapp/TrivialApp.go +++ b/bindings/trivialapp/TrivialApp.go @@ -4,6 +4,7 @@ package trivialapp import ( + "errors" "math/big" "strings" @@ -17,6 +18,7 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -59,1118 +61,135 @@ type ChannelSubAlloc struct { IndexMap []uint16 } -// AppABI is the input ABI used to generate the binding from. -const AppABI = "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"from\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"to\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"}],\"name\":\"validTransition\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]" - -// AppFuncSigs maps the 4-byte function signature to its string representation. -var AppFuncSigs = map[string]string{ - "0d1feb4f": "validTransition((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),uint256)", -} - -// App is an auto generated Go binding around an Ethereum contract. -type App struct { - AppCaller // Read-only binding to the contract - AppTransactor // Write-only binding to the contract - AppFilterer // Log filterer for contract events -} - -// AppCaller is an auto generated read-only Go binding around an Ethereum contract. -type AppCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AppTransactor is an auto generated write-only Go binding around an Ethereum contract. -type AppTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AppFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type AppFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// AppSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type AppSession struct { - Contract *App // 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 -} - -// AppCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type AppCallerSession struct { - Contract *AppCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// AppTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type AppTransactorSession struct { - Contract *AppTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// AppRaw is an auto generated low-level Go binding around an Ethereum contract. -type AppRaw struct { - Contract *App // Generic contract binding to access the raw methods on -} - -// AppCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type AppCallerRaw struct { - Contract *AppCaller // Generic read-only contract binding to access the raw methods on -} - -// AppTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type AppTransactorRaw struct { - Contract *AppTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewApp creates a new instance of App, bound to a specific deployed contract. -func NewApp(address common.Address, backend bind.ContractBackend) (*App, error) { - contract, err := bindApp(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &App{AppCaller: AppCaller{contract: contract}, AppTransactor: AppTransactor{contract: contract}, AppFilterer: AppFilterer{contract: contract}}, nil -} - -// NewAppCaller creates a new read-only instance of App, bound to a specific deployed contract. -func NewAppCaller(address common.Address, caller bind.ContractCaller) (*AppCaller, error) { - contract, err := bindApp(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &AppCaller{contract: contract}, nil -} - -// NewAppTransactor creates a new write-only instance of App, bound to a specific deployed contract. -func NewAppTransactor(address common.Address, transactor bind.ContractTransactor) (*AppTransactor, error) { - contract, err := bindApp(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &AppTransactor{contract: contract}, nil -} - -// NewAppFilterer creates a new log filterer instance of App, bound to a specific deployed contract. -func NewAppFilterer(address common.Address, filterer bind.ContractFilterer) (*AppFilterer, error) { - contract, err := bindApp(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &AppFilterer{contract: contract}, nil -} - -// bindApp binds a generic wrapper to an already deployed contract. -func bindApp(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(AppABI)) - 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 (_App *AppRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _App.Contract.AppCaller.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 (_App *AppRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _App.Contract.AppTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_App *AppRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _App.Contract.AppTransactor.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 (_App *AppCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _App.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 (_App *AppTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _App.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_App *AppTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _App.Contract.contract.Transact(opts, method, params...) -} - -// ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. -// -// Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_App *AppCaller) ValidTransition(opts *bind.CallOpts, params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - var out []interface{} - err := _App.contract.Call(opts, &out, "validTransition", params, from, to, actorIdx) - - if err != nil { - return err - } - - return err - -} - -// ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. -// -// Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_App *AppSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - return _App.Contract.ValidTransition(&_App.CallOpts, params, from, to, actorIdx) -} - -// ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. -// -// Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_App *AppCallerSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - return _App.Contract.ValidTransition(&_App.CallOpts, params, from, to, actorIdx) -} - -// ArrayABI is the input ABI used to generate the binding from. -const ArrayABI = "[]" - -// ArrayBin is the compiled bytecode used for deploying new contracts. -var ArrayBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220f03ababb0613234c3eb5710fd53ebb146b5257611ec7cb2eec2258d682ba631764736f6c63430007040033" - -// DeployArray deploys a new Ethereum contract, binding an instance of Array to it. -func DeployArray(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Array, error) { - parsed, err := abi.JSON(strings.NewReader(ArrayABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ArrayBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Array{ArrayCaller: ArrayCaller{contract: contract}, ArrayTransactor: ArrayTransactor{contract: contract}, ArrayFilterer: ArrayFilterer{contract: contract}}, nil -} - -// Array is an auto generated Go binding around an Ethereum contract. -type Array struct { - ArrayCaller // Read-only binding to the contract - ArrayTransactor // Write-only binding to the contract - ArrayFilterer // Log filterer for contract events -} - -// ArrayCaller is an auto generated read-only Go binding around an Ethereum contract. -type ArrayCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ArrayTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ArrayTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ArrayFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ArrayFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ArraySession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ArraySession struct { - Contract *Array // 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 -} - -// ArrayCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ArrayCallerSession struct { - Contract *ArrayCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ArrayTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ArrayTransactorSession struct { - Contract *ArrayTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ArrayRaw is an auto generated low-level Go binding around an Ethereum contract. -type ArrayRaw struct { - Contract *Array // Generic contract binding to access the raw methods on -} - -// ArrayCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ArrayCallerRaw struct { - Contract *ArrayCaller // Generic read-only contract binding to access the raw methods on -} - -// ArrayTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ArrayTransactorRaw struct { - Contract *ArrayTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewArray creates a new instance of Array, bound to a specific deployed contract. -func NewArray(address common.Address, backend bind.ContractBackend) (*Array, error) { - contract, err := bindArray(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Array{ArrayCaller: ArrayCaller{contract: contract}, ArrayTransactor: ArrayTransactor{contract: contract}, ArrayFilterer: ArrayFilterer{contract: contract}}, nil -} - -// NewArrayCaller creates a new read-only instance of Array, bound to a specific deployed contract. -func NewArrayCaller(address common.Address, caller bind.ContractCaller) (*ArrayCaller, error) { - contract, err := bindArray(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ArrayCaller{contract: contract}, nil -} - -// NewArrayTransactor creates a new write-only instance of Array, bound to a specific deployed contract. -func NewArrayTransactor(address common.Address, transactor bind.ContractTransactor) (*ArrayTransactor, error) { - contract, err := bindArray(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ArrayTransactor{contract: contract}, nil -} - -// NewArrayFilterer creates a new log filterer instance of Array, bound to a specific deployed contract. -func NewArrayFilterer(address common.Address, filterer bind.ContractFilterer) (*ArrayFilterer, error) { - contract, err := bindArray(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ArrayFilterer{contract: contract}, nil -} - -// bindArray binds a generic wrapper to an already deployed contract. -func bindArray(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ArrayABI)) - 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 (_Array *ArrayRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Array.Contract.ArrayCaller.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 (_Array *ArrayRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Array.Contract.ArrayTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Array *ArrayRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Array.Contract.ArrayTransactor.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 (_Array *ArrayCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Array.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 (_Array *ArrayTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Array.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Array *ArrayTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Array.Contract.contract.Transact(opts, method, params...) -} - -// ChannelABI is the input ABI used to generate the binding from. -const ChannelABI = "[]" - -// ChannelBin is the compiled bytecode used for deploying new contracts. -var ChannelBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122092cdd1cee89646209ed671e47b521f86313d39ebb86e786ab2cef1340b48353764736f6c63430007040033" - -// DeployChannel deploys a new Ethereum contract, binding an instance of Channel to it. -func DeployChannel(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Channel, error) { - parsed, err := abi.JSON(strings.NewReader(ChannelABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ChannelBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &Channel{ChannelCaller: ChannelCaller{contract: contract}, ChannelTransactor: ChannelTransactor{contract: contract}, ChannelFilterer: ChannelFilterer{contract: contract}}, nil -} - -// Channel is an auto generated Go binding around an Ethereum contract. -type Channel struct { - ChannelCaller // Read-only binding to the contract - ChannelTransactor // Write-only binding to the contract - ChannelFilterer // Log filterer for contract events -} - -// ChannelCaller is an auto generated read-only Go binding around an Ethereum contract. -type ChannelCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ChannelTransactor is an auto generated write-only Go binding around an Ethereum contract. -type ChannelTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ChannelFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ChannelFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ChannelSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ChannelSession struct { - Contract *Channel // 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 -} - -// ChannelCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ChannelCallerSession struct { - Contract *ChannelCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ChannelTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ChannelTransactorSession struct { - Contract *ChannelTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ChannelRaw is an auto generated low-level Go binding around an Ethereum contract. -type ChannelRaw struct { - Contract *Channel // Generic contract binding to access the raw methods on -} - -// ChannelCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ChannelCallerRaw struct { - Contract *ChannelCaller // Generic read-only contract binding to access the raw methods on -} - -// ChannelTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ChannelTransactorRaw struct { - Contract *ChannelTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewChannel creates a new instance of Channel, bound to a specific deployed contract. -func NewChannel(address common.Address, backend bind.ContractBackend) (*Channel, error) { - contract, err := bindChannel(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Channel{ChannelCaller: ChannelCaller{contract: contract}, ChannelTransactor: ChannelTransactor{contract: contract}, ChannelFilterer: ChannelFilterer{contract: contract}}, nil -} - -// NewChannelCaller creates a new read-only instance of Channel, bound to a specific deployed contract. -func NewChannelCaller(address common.Address, caller bind.ContractCaller) (*ChannelCaller, error) { - contract, err := bindChannel(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ChannelCaller{contract: contract}, nil -} - -// NewChannelTransactor creates a new write-only instance of Channel, bound to a specific deployed contract. -func NewChannelTransactor(address common.Address, transactor bind.ContractTransactor) (*ChannelTransactor, error) { - contract, err := bindChannel(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ChannelTransactor{contract: contract}, nil -} - -// NewChannelFilterer creates a new log filterer instance of Channel, bound to a specific deployed contract. -func NewChannelFilterer(address common.Address, filterer bind.ContractFilterer) (*ChannelFilterer, error) { - contract, err := bindChannel(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ChannelFilterer{contract: contract}, nil -} - -// bindChannel binds a generic wrapper to an already deployed contract. -func bindChannel(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ChannelABI)) - 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 (_Channel *ChannelRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Channel.Contract.ChannelCaller.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 (_Channel *ChannelRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Channel.Contract.ChannelTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Channel *ChannelRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Channel.Contract.ChannelTransactor.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 (_Channel *ChannelCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Channel.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 (_Channel *ChannelTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Channel.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Channel *ChannelTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Channel.Contract.contract.Transact(opts, method, params...) -} - -// ECDSAABI is the input ABI used to generate the binding from. -const ECDSAABI = "[]" - -// ECDSABin is the compiled bytecode used for deploying new contracts. -var ECDSABin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2e519b4a0a3509f02bba1abcf848979252df4c37ba062299b13fdabec46878464736f6c63430007040033" - -// DeployECDSA deploys a new Ethereum contract, binding an instance of ECDSA to it. -func DeployECDSA(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *ECDSA, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(ECDSABin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// ECDSA is an auto generated Go binding around an Ethereum contract. -type ECDSA struct { - ECDSACaller // Read-only binding to the contract - ECDSATransactor // Write-only binding to the contract - ECDSAFilterer // Log filterer for contract events -} - -// ECDSACaller is an auto generated read-only Go binding around an Ethereum contract. -type ECDSACaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSATransactor is an auto generated write-only Go binding around an Ethereum contract. -type ECDSATransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSAFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type ECDSAFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// ECDSASession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type ECDSASession struct { - Contract *ECDSA // 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 -} - -// ECDSACallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type ECDSACallerSession struct { - Contract *ECDSACaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// ECDSATransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type ECDSATransactorSession struct { - Contract *ECDSATransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// ECDSARaw is an auto generated low-level Go binding around an Ethereum contract. -type ECDSARaw struct { - Contract *ECDSA // Generic contract binding to access the raw methods on -} - -// ECDSACallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type ECDSACallerRaw struct { - Contract *ECDSACaller // Generic read-only contract binding to access the raw methods on -} - -// ECDSATransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type ECDSATransactorRaw struct { - Contract *ECDSATransactor // Generic write-only contract binding to access the raw methods on -} - -// NewECDSA creates a new instance of ECDSA, bound to a specific deployed contract. -func NewECDSA(address common.Address, backend bind.ContractBackend) (*ECDSA, error) { - contract, err := bindECDSA(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &ECDSA{ECDSACaller: ECDSACaller{contract: contract}, ECDSATransactor: ECDSATransactor{contract: contract}, ECDSAFilterer: ECDSAFilterer{contract: contract}}, nil -} - -// NewECDSACaller creates a new read-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSACaller(address common.Address, caller bind.ContractCaller) (*ECDSACaller, error) { - contract, err := bindECDSA(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &ECDSACaller{contract: contract}, nil -} - -// NewECDSATransactor creates a new write-only instance of ECDSA, bound to a specific deployed contract. -func NewECDSATransactor(address common.Address, transactor bind.ContractTransactor) (*ECDSATransactor, error) { - contract, err := bindECDSA(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &ECDSATransactor{contract: contract}, nil -} - -// NewECDSAFilterer creates a new log filterer instance of ECDSA, bound to a specific deployed contract. -func NewECDSAFilterer(address common.Address, filterer bind.ContractFilterer) (*ECDSAFilterer, error) { - contract, err := bindECDSA(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &ECDSAFilterer{contract: contract}, nil -} - -// bindECDSA binds a generic wrapper to an already deployed contract. -func bindECDSA(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(ECDSAABI)) - 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 (_ECDSA *ECDSARaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.Contract.ECDSACaller.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 (_ECDSA *ECDSARaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSARaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.ECDSATransactor.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 (_ECDSA *ECDSACallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _ECDSA.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 (_ECDSA *ECDSATransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_ECDSA *ECDSATransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _ECDSA.Contract.contract.Transact(opts, method, params...) -} - -// SafeMathABI is the input ABI used to generate the binding from. -const SafeMathABI = "[]" - -// SafeMathBin is the compiled bytecode used for deploying new contracts. -var SafeMathBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212209d2110f8008a32668165aee96d39b9a3b210868f452685996027830739a87e3064736f6c63430007040033" - -// DeploySafeMath deploys a new Ethereum contract, binding an instance of SafeMath to it. -func DeploySafeMath(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *SafeMath, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - if err != nil { - return common.Address{}, nil, nil, err - } - - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SafeMathBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// SafeMath is an auto generated Go binding around an Ethereum contract. -type SafeMath struct { - SafeMathCaller // Read-only binding to the contract - SafeMathTransactor // Write-only binding to the contract - SafeMathFilterer // Log filterer for contract events -} - -// SafeMathCaller is an auto generated read-only Go binding around an Ethereum contract. -type SafeMathCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SafeMathTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SafeMathFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SafeMathSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SafeMathSession struct { - Contract *SafeMath // 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 -} - -// SafeMathCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SafeMathCallerSession struct { - Contract *SafeMathCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SafeMathTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SafeMathTransactorSession struct { - Contract *SafeMathTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SafeMathRaw is an auto generated low-level Go binding around an Ethereum contract. -type SafeMathRaw struct { - Contract *SafeMath // Generic contract binding to access the raw methods on -} - -// SafeMathCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SafeMathCallerRaw struct { - Contract *SafeMathCaller // Generic read-only contract binding to access the raw methods on -} - -// SafeMathTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SafeMathTransactorRaw struct { - Contract *SafeMathTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSafeMath creates a new instance of SafeMath, bound to a specific deployed contract. -func NewSafeMath(address common.Address, backend bind.ContractBackend) (*SafeMath, error) { - contract, err := bindSafeMath(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &SafeMath{SafeMathCaller: SafeMathCaller{contract: contract}, SafeMathTransactor: SafeMathTransactor{contract: contract}, SafeMathFilterer: SafeMathFilterer{contract: contract}}, nil -} - -// NewSafeMathCaller creates a new read-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathCaller(address common.Address, caller bind.ContractCaller) (*SafeMathCaller, error) { - contract, err := bindSafeMath(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SafeMathCaller{contract: contract}, nil -} - -// NewSafeMathTransactor creates a new write-only instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeMathTransactor, error) { - contract, err := bindSafeMath(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SafeMathTransactor{contract: contract}, nil -} - -// NewSafeMathFilterer creates a new log filterer instance of SafeMath, bound to a specific deployed contract. -func NewSafeMathFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeMathFilterer, error) { - contract, err := bindSafeMath(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SafeMathFilterer{contract: contract}, nil -} - -// bindSafeMath binds a generic wrapper to an already deployed contract. -func bindSafeMath(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SafeMathABI)) - 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 (_SafeMath *SafeMathRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.Contract.SafeMathCaller.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 (_SafeMath *SafeMathRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.SafeMathTransactor.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 (_SafeMath *SafeMathCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _SafeMath.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 (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transfer(opts) +// TrivialappMetaData contains all meta data concerning the Trivialapp contract. +var TrivialappMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"from\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"to\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"}],\"name\":\"validTransition\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061011a806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80630d1feb4f14602d575b600080fd5b603c6038366004605a565b603e565b005b50505050565b600060a082840312156054578081fd5b50919050565b60008060008060808587031215606e578384fd5b843567ffffffffffffffff808211156084578586fd5b9086019060c082890312156096578586fd5b9094506020860135908082111560aa578485fd5b60b4888389016044565b9450604087013591508082111560c8578384fd5b5060d3878288016044565b94979396509394606001359350505056fea264697066735822122000d79e285efaa24e574f5cbede53d08d6d63f9839bad214f659f5ad6b15d82d064736f6c63430007060033", } -// Transact invokes the (paid) contract method with params as input values. -func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _SafeMath.Contract.contract.Transact(opts, method, params...) -} - -// SigABI is the input ABI used to generate the binding from. -const SigABI = "[]" - -// SigBin is the compiled bytecode used for deploying new contracts. -var SigBin = "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220c3751b740d506c41c776ad3c92ca113b46a314ff1f98b52d4b23f32eaccf354664736f6c63430007040033" +// TrivialappABI is the input ABI used to generate the binding from. +// Deprecated: Use TrivialappMetaData.ABI instead. +var TrivialappABI = TrivialappMetaData.ABI -// DeploySig deploys a new Ethereum contract, binding an instance of Sig to it. -func DeploySig(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Sig, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - if err != nil { - return common.Address{}, nil, nil, err - } +// TrivialappBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TrivialappMetaData.Bin instead. +var TrivialappBin = TrivialappMetaData.Bin - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(SigBin), backend) +// DeployTrivialapp deploys a new Ethereum contract, binding an instance of Trivialapp to it. +func DeployTrivialapp(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Trivialapp, error) { + parsed, err := TrivialappMetaData.GetAbi() if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// Sig is an auto generated Go binding around an Ethereum contract. -type Sig struct { - SigCaller // Read-only binding to the contract - SigTransactor // Write-only binding to the contract - SigFilterer // Log filterer for contract events -} - -// SigCaller is an auto generated read-only Go binding around an Ethereum contract. -type SigCaller struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigTransactor is an auto generated write-only Go binding around an Ethereum contract. -type SigTransactor struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type SigFilterer struct { - contract *bind.BoundContract // Generic contract wrapper for the low level calls -} - -// SigSession is an auto generated Go binding around an Ethereum contract, -// with pre-set call and transact options. -type SigSession struct { - Contract *Sig // 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 -} - -// SigCallerSession is an auto generated read-only Go binding around an Ethereum contract, -// with pre-set call options. -type SigCallerSession struct { - Contract *SigCaller // Generic contract caller binding to set the session for - CallOpts bind.CallOpts // Call options to use throughout this session -} - -// SigTransactorSession is an auto generated write-only Go binding around an Ethereum contract, -// with pre-set transact options. -type SigTransactorSession struct { - Contract *SigTransactor // Generic contract transactor binding to set the session for - TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session -} - -// SigRaw is an auto generated low-level Go binding around an Ethereum contract. -type SigRaw struct { - Contract *Sig // Generic contract binding to access the raw methods on -} - -// SigCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type SigCallerRaw struct { - Contract *SigCaller // Generic read-only contract binding to access the raw methods on -} - -// SigTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type SigTransactorRaw struct { - Contract *SigTransactor // Generic write-only contract binding to access the raw methods on -} - -// NewSig creates a new instance of Sig, bound to a specific deployed contract. -func NewSig(address common.Address, backend bind.ContractBackend) (*Sig, error) { - contract, err := bindSig(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &Sig{SigCaller: SigCaller{contract: contract}, SigTransactor: SigTransactor{contract: contract}, SigFilterer: SigFilterer{contract: contract}}, nil -} - -// NewSigCaller creates a new read-only instance of Sig, bound to a specific deployed contract. -func NewSigCaller(address common.Address, caller bind.ContractCaller) (*SigCaller, error) { - contract, err := bindSig(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &SigCaller{contract: contract}, nil -} - -// NewSigTransactor creates a new write-only instance of Sig, bound to a specific deployed contract. -func NewSigTransactor(address common.Address, transactor bind.ContractTransactor) (*SigTransactor, error) { - contract, err := bindSig(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &SigTransactor{contract: contract}, nil -} - -// NewSigFilterer creates a new log filterer instance of Sig, bound to a specific deployed contract. -func NewSigFilterer(address common.Address, filterer bind.ContractFilterer) (*SigFilterer, error) { - contract, err := bindSig(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &SigFilterer{contract: contract}, nil -} - -// bindSig binds a generic wrapper to an already deployed contract. -func bindSig(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(SigABI)) - 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 (_Sig *SigRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.Contract.SigCaller.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 (_Sig *SigRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.SigTransactor.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 (_Sig *SigCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _Sig.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 (_Sig *SigTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _Sig.Contract.contract.Transfer(opts) -} - -// Transact invokes the (paid) contract method with params as input values. -func (_Sig *SigTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _Sig.Contract.contract.Transact(opts, method, params...) -} - -// TrivialAppABI is the input ABI used to generate the binding from. -const TrivialAppABI = "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"ledgerChannel\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"virtualChannel\",\"type\":\"bool\"}],\"internalType\":\"structChannel.Params\",\"name\":\"params\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"from\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[][]\",\"name\":\"balances\",\"type\":\"uint256[][]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"ID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"balances\",\"type\":\"uint256[]\"},{\"internalType\":\"uint16[]\",\"name\":\"indexMap\",\"type\":\"uint16[]\"}],\"internalType\":\"structChannel.SubAlloc[]\",\"name\":\"locked\",\"type\":\"tuple[]\"}],\"internalType\":\"structChannel.Allocation\",\"name\":\"outcome\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"appData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isFinal\",\"type\":\"bool\"}],\"internalType\":\"structChannel.State\",\"name\":\"to\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"actorIdx\",\"type\":\"uint256\"}],\"name\":\"validTransition\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]" - -// TrivialAppFuncSigs maps the 4-byte function signature to its string representation. -var TrivialAppFuncSigs = map[string]string{ - "0d1feb4f": "validTransition((uint256,uint256,address[],address,bool,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool),uint256)", -} - -// TrivialAppBin is the compiled bytecode used for deploying new contracts. -var TrivialAppBin = "0x608060405234801561001057600080fd5b5061011a806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80630d1feb4f14602d575b600080fd5b603c6038366004605a565b603e565b005b50505050565b600060a082840312156054578081fd5b50919050565b60008060008060808587031215606e578384fd5b843567ffffffffffffffff808211156084578586fd5b9086019060c082890312156096578586fd5b9094506020860135908082111560aa578485fd5b60b4888389016044565b9450604087013591508082111560c8578384fd5b5060d3878288016044565b94979396509394606001359350505056fea264697066735822122077920077a5c82b826c4262e4501c371412aed951c27f8b2828b18ca00ad9792764736f6c63430007040033" - -// DeployTrivialApp deploys a new Ethereum contract, binding an instance of TrivialApp to it. -func DeployTrivialApp(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *TrivialApp, error) { - parsed, err := abi.JSON(strings.NewReader(TrivialAppABI)) - if err != nil { - return common.Address{}, nil, nil, err + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") } - address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(TrivialAppBin), backend) + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(TrivialappBin), backend) if err != nil { return common.Address{}, nil, nil, err } - return address, tx, &TrivialApp{TrivialAppCaller: TrivialAppCaller{contract: contract}, TrivialAppTransactor: TrivialAppTransactor{contract: contract}, TrivialAppFilterer: TrivialAppFilterer{contract: contract}}, nil + return address, tx, &Trivialapp{TrivialappCaller: TrivialappCaller{contract: contract}, TrivialappTransactor: TrivialappTransactor{contract: contract}, TrivialappFilterer: TrivialappFilterer{contract: contract}}, nil } -// TrivialApp is an auto generated Go binding around an Ethereum contract. -type TrivialApp struct { - TrivialAppCaller // Read-only binding to the contract - TrivialAppTransactor // Write-only binding to the contract - TrivialAppFilterer // Log filterer for contract events +// Trivialapp is an auto generated Go binding around an Ethereum contract. +type Trivialapp struct { + TrivialappCaller // Read-only binding to the contract + TrivialappTransactor // Write-only binding to the contract + TrivialappFilterer // Log filterer for contract events } -// TrivialAppCaller is an auto generated read-only Go binding around an Ethereum contract. -type TrivialAppCaller struct { +// TrivialappCaller is an auto generated read-only Go binding around an Ethereum contract. +type TrivialappCaller struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// TrivialAppTransactor is an auto generated write-only Go binding around an Ethereum contract. -type TrivialAppTransactor struct { +// TrivialappTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TrivialappTransactor struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// TrivialAppFilterer is an auto generated log filtering Go binding around an Ethereum contract events. -type TrivialAppFilterer struct { +// TrivialappFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TrivialappFilterer struct { contract *bind.BoundContract // Generic contract wrapper for the low level calls } -// TrivialAppSession is an auto generated Go binding around an Ethereum contract, +// TrivialappSession is an auto generated Go binding around an Ethereum contract, // with pre-set call and transact options. -type TrivialAppSession struct { - Contract *TrivialApp // Generic contract binding to set the session for +type TrivialappSession struct { + Contract *Trivialapp // 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 } -// TrivialAppCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// TrivialappCallerSession is an auto generated read-only Go binding around an Ethereum contract, // with pre-set call options. -type TrivialAppCallerSession struct { - Contract *TrivialAppCaller // Generic contract caller binding to set the session for +type TrivialappCallerSession struct { + Contract *TrivialappCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session } -// TrivialAppTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// TrivialappTransactorSession is an auto generated write-only Go binding around an Ethereum contract, // with pre-set transact options. -type TrivialAppTransactorSession struct { - Contract *TrivialAppTransactor // Generic contract transactor binding to set the session for +type TrivialappTransactorSession struct { + Contract *TrivialappTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session } -// TrivialAppRaw is an auto generated low-level Go binding around an Ethereum contract. -type TrivialAppRaw struct { - Contract *TrivialApp // Generic contract binding to access the raw methods on +// TrivialappRaw is an auto generated low-level Go binding around an Ethereum contract. +type TrivialappRaw struct { + Contract *Trivialapp // Generic contract binding to access the raw methods on } -// TrivialAppCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. -type TrivialAppCallerRaw struct { - Contract *TrivialAppCaller // Generic read-only contract binding to access the raw methods on +// TrivialappCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TrivialappCallerRaw struct { + Contract *TrivialappCaller // Generic read-only contract binding to access the raw methods on } -// TrivialAppTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. -type TrivialAppTransactorRaw struct { - Contract *TrivialAppTransactor // Generic write-only contract binding to access the raw methods on +// TrivialappTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TrivialappTransactorRaw struct { + Contract *TrivialappTransactor // Generic write-only contract binding to access the raw methods on } -// NewTrivialApp creates a new instance of TrivialApp, bound to a specific deployed contract. -func NewTrivialApp(address common.Address, backend bind.ContractBackend) (*TrivialApp, error) { - contract, err := bindTrivialApp(address, backend, backend, backend) +// NewTrivialapp creates a new instance of Trivialapp, bound to a specific deployed contract. +func NewTrivialapp(address common.Address, backend bind.ContractBackend) (*Trivialapp, error) { + contract, err := bindTrivialapp(address, backend, backend, backend) if err != nil { return nil, err } - return &TrivialApp{TrivialAppCaller: TrivialAppCaller{contract: contract}, TrivialAppTransactor: TrivialAppTransactor{contract: contract}, TrivialAppFilterer: TrivialAppFilterer{contract: contract}}, nil + return &Trivialapp{TrivialappCaller: TrivialappCaller{contract: contract}, TrivialappTransactor: TrivialappTransactor{contract: contract}, TrivialappFilterer: TrivialappFilterer{contract: contract}}, nil } -// NewTrivialAppCaller creates a new read-only instance of TrivialApp, bound to a specific deployed contract. -func NewTrivialAppCaller(address common.Address, caller bind.ContractCaller) (*TrivialAppCaller, error) { - contract, err := bindTrivialApp(address, caller, nil, nil) +// NewTrivialappCaller creates a new read-only instance of Trivialapp, bound to a specific deployed contract. +func NewTrivialappCaller(address common.Address, caller bind.ContractCaller) (*TrivialappCaller, error) { + contract, err := bindTrivialapp(address, caller, nil, nil) if err != nil { return nil, err } - return &TrivialAppCaller{contract: contract}, nil + return &TrivialappCaller{contract: contract}, nil } -// NewTrivialAppTransactor creates a new write-only instance of TrivialApp, bound to a specific deployed contract. -func NewTrivialAppTransactor(address common.Address, transactor bind.ContractTransactor) (*TrivialAppTransactor, error) { - contract, err := bindTrivialApp(address, nil, transactor, nil) +// NewTrivialappTransactor creates a new write-only instance of Trivialapp, bound to a specific deployed contract. +func NewTrivialappTransactor(address common.Address, transactor bind.ContractTransactor) (*TrivialappTransactor, error) { + contract, err := bindTrivialapp(address, nil, transactor, nil) if err != nil { return nil, err } - return &TrivialAppTransactor{contract: contract}, nil + return &TrivialappTransactor{contract: contract}, nil } -// NewTrivialAppFilterer creates a new log filterer instance of TrivialApp, bound to a specific deployed contract. -func NewTrivialAppFilterer(address common.Address, filterer bind.ContractFilterer) (*TrivialAppFilterer, error) { - contract, err := bindTrivialApp(address, nil, nil, filterer) +// NewTrivialappFilterer creates a new log filterer instance of Trivialapp, bound to a specific deployed contract. +func NewTrivialappFilterer(address common.Address, filterer bind.ContractFilterer) (*TrivialappFilterer, error) { + contract, err := bindTrivialapp(address, nil, nil, filterer) if err != nil { return nil, err } - return &TrivialAppFilterer{contract: contract}, nil + return &TrivialappFilterer{contract: contract}, nil } -// bindTrivialApp binds a generic wrapper to an already deployed contract. -func bindTrivialApp(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := abi.JSON(strings.NewReader(TrivialAppABI)) +// bindTrivialapp binds a generic wrapper to an already deployed contract. +func bindTrivialapp(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(TrivialappABI)) if err != nil { return nil, err } @@ -1181,46 +200,46 @@ func bindTrivialApp(address common.Address, caller bind.ContractCaller, transact // 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 (_TrivialApp *TrivialAppRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _TrivialApp.Contract.TrivialAppCaller.contract.Call(opts, result, method, params...) +func (_Trivialapp *TrivialappRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Trivialapp.Contract.TrivialappCaller.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 (_TrivialApp *TrivialAppRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TrivialApp.Contract.TrivialAppTransactor.contract.Transfer(opts) +func (_Trivialapp *TrivialappRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Trivialapp.Contract.TrivialappTransactor.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_TrivialApp *TrivialAppRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _TrivialApp.Contract.TrivialAppTransactor.contract.Transact(opts, method, params...) +func (_Trivialapp *TrivialappRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Trivialapp.Contract.TrivialappTransactor.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 (_TrivialApp *TrivialAppCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _TrivialApp.Contract.contract.Call(opts, result, method, params...) +func (_Trivialapp *TrivialappCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Trivialapp.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 (_TrivialApp *TrivialAppTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _TrivialApp.Contract.contract.Transfer(opts) +func (_Trivialapp *TrivialappTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Trivialapp.Contract.contract.Transfer(opts) } // Transact invokes the (paid) contract method with params as input values. -func (_TrivialApp *TrivialAppTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _TrivialApp.Contract.contract.Transact(opts, method, params...) +func (_Trivialapp *TrivialappTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Trivialapp.Contract.contract.Transact(opts, method, params...) } // ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. // // Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_TrivialApp *TrivialAppCaller) ValidTransition(opts *bind.CallOpts, params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { +func (_Trivialapp *TrivialappCaller) ValidTransition(opts *bind.CallOpts, params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { var out []interface{} - err := _TrivialApp.contract.Call(opts, &out, "validTransition", params, from, to, actorIdx) + err := _Trivialapp.contract.Call(opts, &out, "validTransition", params, from, to, actorIdx) if err != nil { return err @@ -1233,13 +252,13 @@ func (_TrivialApp *TrivialAppCaller) ValidTransition(opts *bind.CallOpts, params // ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. // // Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_TrivialApp *TrivialAppSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - return _TrivialApp.Contract.ValidTransition(&_TrivialApp.CallOpts, params, from, to, actorIdx) +func (_Trivialapp *TrivialappSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { + return _Trivialapp.Contract.ValidTransition(&_Trivialapp.CallOpts, params, from, to, actorIdx) } // ValidTransition is a free data retrieval call binding the contract method 0x0d1feb4f. // // Solidity: function validTransition((uint256,uint256,address[],address,bool,bool) params, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) from, (bytes32,uint64,(address[],uint256[][],(bytes32,uint256[],uint16[])[]),bytes,bool) to, uint256 actorIdx) pure returns() -func (_TrivialApp *TrivialAppCallerSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { - return _TrivialApp.Contract.ValidTransition(&_TrivialApp.CallOpts, params, from, to, actorIdx) +func (_Trivialapp *TrivialappCallerSession) ValidTransition(params ChannelParams, from ChannelState, to ChannelState, actorIdx *big.Int) error { + return _Trivialapp.Contract.ValidTransition(&_Trivialapp.CallOpts, params, from, to, actorIdx) } diff --git a/bindings/trivialapp/TrivialAppBinRuntime.go b/bindings/trivialapp/TrivialAppBinRuntime.go index 52bfb8d..585ce43 100644 --- a/bindings/trivialapp/TrivialAppBinRuntime.go +++ b/bindings/trivialapp/TrivialAppBinRuntime.go @@ -1,4 +1,4 @@ package trivialapp // import "github.com/perun-network/perun-eth-backend/bindings/trivialapp" // TrivialAppBinRuntime is the runtime part of the compiled bytecode used for deploying new contracts. -var TrivialAppBinRuntime = "6080604052348015600f57600080fd5b506004361060285760003560e01c80630d1feb4f14602d575b600080fd5b603c6038366004605a565b603e565b005b50505050565b600060a082840312156054578081fd5b50919050565b60008060008060808587031215606e578384fd5b843567ffffffffffffffff808211156084578586fd5b9086019060c082890312156096578586fd5b9094506020860135908082111560aa578485fd5b60b4888389016044565b9450604087013591508082111560c8578384fd5b5060d3878288016044565b94979396509394606001359350505056fea264697066735822122077920077a5c82b826c4262e4501c371412aed951c27f8b2828b18ca00ad9792764736f6c63430007040033" +var TrivialAppBinRuntime = "6080604052348015600f57600080fd5b506004361060285760003560e01c80630d1feb4f14602d575b600080fd5b603c6038366004605a565b603e565b005b50505050565b600060a082840312156054578081fd5b50919050565b60008060008060808587031215606e578384fd5b843567ffffffffffffffff808211156084578586fd5b9086019060c082890312156096578586fd5b9094506020860135908082111560aa578485fd5b60b4888389016044565b9450604087013591508082111560c8578384fd5b5060d3878288016044565b94979396509394606001359350505056fea264697066735822122000d79e285efaa24e574f5cbede53d08d6d63f9839bad214f659f5ad6b15d82d064736f6c63430007060033" diff --git a/channel/asset.go b/channel/asset.go index 15542a2..6ddfb66 100644 --- a/channel/asset.go +++ b/channel/asset.go @@ -91,7 +91,7 @@ func validateAssetHolder(ctx context.Context, return errors.WithMessage(err, "validating asset holder") } - assetHolder, err := assetholder.NewAssetHolder(assetHolderAddr, backend) + assetHolder, err := assetholder.NewAssetholder(assetHolderAddr, backend) if err != nil { return errors.Wrap(err, "binding AssetHolder") } diff --git a/channel/contractbackend.go b/channel/contractbackend.go index e99b0ba..aa1b6d1 100644 --- a/channel/contractbackend.go +++ b/channel/contractbackend.go @@ -29,6 +29,7 @@ import ( "github.com/pkg/errors" cherrors "github.com/perun-network/perun-eth-backend/channel/errors" + "perun.network/go-perun/log" pcontext "polycry.pt/poly-go/context" ) diff --git a/channel/deploy.go b/channel/deploy.go index 2344680..be07873 100644 --- a/channel/deploy.go +++ b/channel/deploy.go @@ -31,6 +31,7 @@ import ( "github.com/perun-network/perun-eth-backend/bindings/peruntoken" "github.com/perun-network/perun-eth-backend/bindings/trivialapp" cherrors "github.com/perun-network/perun-eth-backend/channel/errors" + "perun.network/go-perun/client" "perun.network/go-perun/log" pcontext "polycry.pt/poly-go/context" @@ -44,7 +45,7 @@ const deployGasLimit = 6600000 func DeployPerunToken(ctx context.Context, backend ContractBackend, deployer accounts.Account, initAccs []common.Address, initBals *big.Int) (common.Address, error) { return deployContract(ctx, backend, deployer, "PerunToken", func(auth *bind.TransactOpts, cb ContractBackend) (common.Address, *types.Transaction, error) { - addr, tx, _, err := peruntoken.DeployPerunToken(auth, backend, initAccs, initBals) + addr, tx, _, err := peruntoken.DeployPeruntoken(auth, backend, initAccs, initBals) return addr, tx, err }) } @@ -55,7 +56,7 @@ func DeployPerunToken(ctx context.Context, backend ContractBackend, deployer acc func DeployETHAssetholder(ctx context.Context, backend ContractBackend, adjudicatorAddr common.Address, deployer accounts.Account) (common.Address, error) { return deployContract(ctx, backend, deployer, "ETHAssetHolder", func(auth *bind.TransactOpts, cb ContractBackend) (common.Address, *types.Transaction, error) { - addr, tx, _, err := assetholdereth.DeployAssetHolderETH(auth, cb, adjudicatorAddr) + addr, tx, _, err := assetholdereth.DeployAssetholdereth(auth, cb, adjudicatorAddr) return addr, tx, err }) } @@ -66,7 +67,7 @@ func DeployETHAssetholder(ctx context.Context, backend ContractBackend, adjudica func DeployERC20Assetholder(ctx context.Context, backend ContractBackend, adjudicatorAddr common.Address, tokenAddr common.Address, deployer accounts.Account) (common.Address, error) { return deployContract(ctx, backend, deployer, "ERC20AssetHolder", func(auth *bind.TransactOpts, cb ContractBackend) (common.Address, *types.Transaction, error) { - addr, tx, _, err := assetholdererc20.DeployAssetHolderERC20(auth, backend, adjudicatorAddr, tokenAddr) + addr, tx, _, err := assetholdererc20.DeployAssetholdererc20(auth, backend, adjudicatorAddr, tokenAddr) return addr, tx, err }) } @@ -88,7 +89,7 @@ func DeployAdjudicator(ctx context.Context, backend ContractBackend, deployer ac func DeployTrivialApp(ctx context.Context, backend ContractBackend, deployer accounts.Account) (common.Address, error) { return deployContract(ctx, backend, deployer, "TrivialApp", func(auth *bind.TransactOpts, cb ContractBackend) (common.Address, *types.Transaction, error) { - addr, tx, _, err := trivialapp.DeployTrivialApp(auth, backend) + addr, tx, _, err := trivialapp.DeployTrivialapp(auth, backend) return addr, tx, errors.WithStack(err) }) } diff --git a/channel/erc20_depositor.go b/channel/erc20_depositor.go index 2821a62..8c796fe 100644 --- a/channel/erc20_depositor.go +++ b/channel/erc20_depositor.go @@ -49,12 +49,12 @@ func NewERC20Depositor(token common.Address) *ERC20Depositor { // requests's asset address. func (d *ERC20Depositor) Deposit(ctx context.Context, req DepositReq) (types.Transactions, error) { // Bind a `AssetHolderERC20` instance. - assetholder, err := assetholdererc20.NewAssetHolderERC20(common.Address(req.Asset.Address), req.CB) + assetholder, err := assetholdererc20.NewAssetholdererc20(common.Address(req.Asset.Address), req.CB) if err != nil { return nil, errors.Wrapf(err, "binding AssetHolderERC20 contract at: %x", req.Asset) } // Bind an `ERC20` instance. - token, err := peruntoken.NewERC20(d.Token, req.CB) + token, err := peruntoken.NewPeruntoken(d.Token, req.CB) if err != nil { return nil, errors.Wrapf(err, "binding ERC20 contract at: %x", d.Token) } diff --git a/channel/eth_depositor.go b/channel/eth_depositor.go index 6161c6b..06382be 100644 --- a/channel/eth_depositor.go +++ b/channel/eth_depositor.go @@ -43,7 +43,7 @@ func NewETHDepositor() *ETHDepositor { func (d *ETHDepositor) Deposit(ctx context.Context, req DepositReq) (types.Transactions, error) { // Bind an `AssetHolderETH` instance. Using `AssetHolder` is also possible // since we only use the interface functions here. - contract, err := assetholdereth.NewAssetHolderETH(req.Asset.EthAddress(), req.CB) + contract, err := assetholdereth.NewAssetholdereth(req.Asset.EthAddress(), req.CB) if err != nil { return nil, errors.Wrapf(err, "binding AssetHolderETH contract at: %x", req.Asset) } diff --git a/channel/funder.go b/channel/funder.go index 034033e..bb92ad9 100644 --- a/channel/funder.go +++ b/channel/funder.go @@ -31,6 +31,7 @@ import ( "github.com/perun-network/perun-eth-backend/bindings/assetholder" "github.com/perun-network/perun-eth-backend/subscription" "github.com/perun-network/perun-eth-backend/wallet" + "perun.network/go-perun/channel" "perun.network/go-perun/client" "perun.network/go-perun/log" @@ -40,7 +41,7 @@ import ( ) type assetHolder struct { - *assetholder.AssetHolder + *assetholder.Assetholder *common.Address contract *bind.BoundContract assetIndex channel.Index @@ -262,7 +263,7 @@ func (f *Funder) checkFunded(ctx context.Context, amount *big.Int, asset assetHo left := new(big.Int).Set(amount) for _event := range deposited { - event, ok := _event.Data.(*assetholder.AssetHolderDeposited) + event, ok := _event.Data.(*assetholder.AssetholderDeposited) if !ok { log.Panic("wrong event type") } @@ -279,7 +280,7 @@ func (f *Funder) depositedSub(ctx context.Context, contract *bind.BoundContract, event := func() *subscription.Event { return &subscription.Event{ Name: bindings.Events.AhDeposited, - Data: new(assetholder.AssetHolderDeposited), + Data: new(assetholder.AssetholderDeposited), Filter: [][]interface{}{filter}, } } @@ -313,7 +314,7 @@ func (f *Funder) waitForFundingConfirmation(ctx context.Context, request channel for N > 0 { select { case rawEvent := <-deposited: - event, ok := rawEvent.Data.(*assetholder.AssetHolderDeposited) + event, ok := rawEvent.Data.(*assetholder.AssetholderDeposited) if !ok { log.Panic("wrong event type") } diff --git a/channel/funder_test.go b/channel/funder_test.go index bcbdb63..c90fb74 100644 --- a/channel/funder_test.go +++ b/channel/funder_test.go @@ -34,6 +34,7 @@ import ( "github.com/perun-network/perun-eth-backend/channel/test" ethwallet "github.com/perun-network/perun-eth-backend/wallet" "github.com/perun-network/perun-eth-backend/wallet/keystore" + "perun.network/go-perun/channel" channeltest "perun.network/go-perun/channel/test" "perun.network/go-perun/wallet" @@ -449,7 +450,7 @@ func newNFunders( // fundERC20 funds `to` with ERC20 tokens from account `from`. func fundERC20(ctx context.Context, cb ethchannel.ContractBackend, from accounts.Account, to common.Address, token common.Address, asset ethchannel.Asset) error { - contract, err := peruntoken.NewERC20(token, cb) + contract, err := peruntoken.NewPeruntoken(token, cb) if err != nil { return errors.WithMessagef(err, "binding AssetHolderERC20 contract at: %v", asset) } @@ -489,7 +490,7 @@ func onChainAllocation(ctx context.Context, cb *ethchannel.ContractBackend, para for k, asset := range _assets { alloc[k] = make([]channel.Bal, len(params.Parts)) - contract, err := assetholder.NewAssetHolder(asset.(*ethchannel.Asset).EthAddress(), cb) + contract, err := assetholder.NewAssetholder(asset.(*ethchannel.Asset).EthAddress(), cb) if err != nil { return nil, err } diff --git a/channel/test/tokensetup.go b/channel/test/tokensetup.go index f929fee..2b66941 100644 --- a/channel/test/tokensetup.go +++ b/channel/test/tokensetup.go @@ -32,6 +32,7 @@ import ( "github.com/perun-network/perun-eth-backend/bindings/peruntoken" ethchannel "github.com/perun-network/perun-eth-backend/channel" "github.com/perun-network/perun-eth-backend/wallet/keystore" + channeltest "perun.network/go-perun/channel/test" wallettest "perun.network/go-perun/wallet/test" ) @@ -40,15 +41,15 @@ import ( type TokenSetup struct { SB *SimulatedBackend CB ethchannel.ContractBackend - Token *peruntoken.ERC20 + Token *peruntoken.Peruntoken Contract *bind.BoundContract R *require.Assertions T *testing.T Acc1, Acc2 *accounts.Account subApproval, subTransfer event.Subscription - SinkApproval chan *peruntoken.ERC20Approval - SinkTransfer chan *peruntoken.ERC20Transfer + SinkApproval chan *peruntoken.PeruntokenApproval + SinkTransfer chan *peruntoken.PeruntokenTransfer } const ( @@ -79,9 +80,9 @@ func NewTokenSetup(ctx context.Context, t *testing.T, rng *rand.Rand, txFinality defer sb.StopMining() tokenAddr, err := ethchannel.DeployPerunToken(ctx, cb, *acc1, []common.Address{acc1.Address}, channeltest.MaxBalance) require.NoError(t, err) - token, err := peruntoken.NewERC20(tokenAddr, cb) + token, err := peruntoken.NewPeruntoken(tokenAddr, cb) require.NoError(t, err) - contract := bind.NewBoundContract(tokenAddr, bindings.ABI.ERC20Token, cb, cb, cb) + contract := bind.NewBoundContract(tokenAddr, bindings.ABI.PerunToken, cb, cb, cb) return &TokenSetup{ SB: sb, @@ -98,11 +99,11 @@ func NewTokenSetup(ctx context.Context, t *testing.T, rng *rand.Rand, txFinality // StartSubs starts the Approval and Transfer subscriptions. func (s *TokenSetup) StartSubs() { // Approval sub. - sinkApproval := make(chan *peruntoken.ERC20Approval, eventBuffSize) + sinkApproval := make(chan *peruntoken.PeruntokenApproval, eventBuffSize) subApproval, err := s.Token.WatchApproval(&bind.WatchOpts{}, sinkApproval, nil, nil) require.NoError(s.T, err) // Transfer sub. - sinkTransfer := make(chan *peruntoken.ERC20Transfer, eventBuffSize) + sinkTransfer := make(chan *peruntoken.PeruntokenTransfer, eventBuffSize) subTransfer, err := s.Token.WatchTransfer(&bind.WatchOpts{}, sinkTransfer, nil, nil) require.NoError(s.T, err) @@ -146,7 +147,7 @@ func (s *TokenSetup) ConfirmTx(tx *types.Transaction, confirm bool) { // AllowanceEvent waits for an allowance event with value `v`. // `included` decided whether or not its `Removed` values should not be set. func (s *TokenSetup) AllowanceEvent(v uint64, included bool) { - var e *peruntoken.ERC20Approval + var e *peruntoken.PeruntokenApproval select { case e = <-s.SinkApproval: @@ -164,7 +165,7 @@ func (s *TokenSetup) AllowanceEvent(v uint64, included bool) { // TransferEvent waits for a transfer event. // `included` decided whether or not its `Removed` values should not be set. func (s *TokenSetup) TransferEvent(included bool) { - var e *peruntoken.ERC20Transfer + var e *peruntoken.PeruntokenTransfer select { case e = <-s.SinkTransfer: diff --git a/channel/withdraw.go b/channel/withdraw.go index 567a397..943ccbd 100644 --- a/channel/withdraw.go +++ b/channel/withdraw.go @@ -28,6 +28,7 @@ import ( cherrors "github.com/perun-network/perun-eth-backend/channel/errors" "github.com/perun-network/perun-eth-backend/subscription" "github.com/perun-network/perun-eth-backend/wallet" + "perun.network/go-perun/channel" "perun.network/go-perun/client" "perun.network/go-perun/log" @@ -105,7 +106,7 @@ func withdrawnEventType(fundingID [32]byte) subscription.EventFactory { return func() *subscription.Event { return &subscription.Event{ Name: bindings.Events.AhWithdrawn, - Data: new(assetholder.AssetHolderWithdrawn), + Data: new(assetholder.AssetholderWithdrawn), Filter: [][]interface{}{{fundingID}}, } } @@ -114,7 +115,7 @@ func withdrawnEventType(fundingID [32]byte) subscription.EventFactory { func bindAssetHolder(cb ContractBackend, asset channel.Asset, assetIndex channel.Index) assetHolder { // Decode and set the asset address. assetAddr := asset.(*Asset).EthAddress() - ctr, err := assetholder.NewAssetHolder(assetAddr, cb) + ctr, err := assetholder.NewAssetholder(assetAddr, cb) if err != nil { log.Panic("Invalid AssetHolder ABI definition.") } diff --git a/contracts b/contracts deleted file mode 160000 index 73b45de..0000000 --- a/contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 73b45dee752da4af2f95044c64c8b214459cda32 diff --git a/subscription/eventsub_test.go b/subscription/eventsub_test.go index fd40235..c94d437 100644 --- a/subscription/eventsub_test.go +++ b/subscription/eventsub_test.go @@ -32,6 +32,7 @@ import ( "github.com/perun-network/perun-eth-backend/channel/test" "github.com/perun-network/perun-eth-backend/subscription" "github.com/perun-network/perun-eth-backend/wallet/keystore" + channeltest "perun.network/go-perun/channel/test" "perun.network/go-perun/log" wallettest "perun.network/go-perun/wallet/test" @@ -68,7 +69,7 @@ func TestEventSub(t *testing.T) { // Setup Perun Token. tokenAddr, err := ethchannel.DeployPerunToken(ctx, cb, *account, []common.Address{account.Address}, channeltest.MaxBalance) require.NoError(t, err) - token, err := peruntoken.NewERC20(tokenAddr, cb) + token, err := peruntoken.NewPeruntoken(tokenAddr, cb) require.NoError(t, err) ct := pkgtest.NewConcurrent(t) @@ -93,13 +94,13 @@ func TestEventSub(t *testing.T) { sink := make(chan *subscription.Event, 10) eFact := func() *subscription.Event { return &subscription.Event{ - Name: bindings.Events.ERC20Approval, - Data: new(peruntoken.ERC20Approval), + Name: bindings.Events.PerunTokenApproval, + Data: new(peruntoken.PeruntokenApproval), } } // Setup the event sub after some events have been sent. <-waitSent - contract := bind.NewBoundContract(tokenAddr, bindings.ABI.ERC20Token, cb, cb, cb) + contract := bind.NewBoundContract(tokenAddr, bindings.ABI.PerunToken, cb, cb, cb) sub, err := subscription.NewEventSub(ctx, cb, contract, eFact, 10000) require.NoError(t, err) go ct.Stage("sub", func(t pkgtest.ConcT) { @@ -120,7 +121,7 @@ func TestEventSub(t *testing.T) { } lastTx = e.Log.TxHash - want := &peruntoken.ERC20Approval{ + want := &peruntoken.PeruntokenApproval{ Owner: account.Address, Spender: account.Address, Value: big.NewInt(int64(i + 1)), @@ -158,7 +159,7 @@ func TestEventSub_Filter(t *testing.T) { require.NoError(t, err) ahAddr, err := ethchannel.DeployETHAssetholder(ctx, cb, adjAddr, *account) require.NoError(t, err) - ah, err := assetholdereth.NewAssetHolder(ahAddr, cb) + ah, err := assetholdereth.NewAssetholdereth(ahAddr, cb) require.NoError(t, err) ct := pkgtest.NewConcurrent(t) @@ -180,7 +181,7 @@ func TestEventSub_Filter(t *testing.T) { eFact := func() *subscription.Event { return &subscription.Event{ Name: bindings.Events.AhDeposited, - Data: new(assetholder.AssetHolderDeposited), + Data: new(assetholder.AssetholderDeposited), Filter: [][]interface{}{Filter}, } } @@ -195,7 +196,7 @@ func TestEventSub_Filter(t *testing.T) { // Receive 1 event. e := <-sink require.NotNil(t, e) - want := &assetholder.AssetHolderDeposited{ + want := &assetholder.AssetholderDeposited{ FundingID: fundingID, Amount: big.NewInt(int64(1)), } diff --git a/subscription/resistanteventsub_test.go b/subscription/resistanteventsub_test.go index 1736179..8a6d7a2 100644 --- a/subscription/resistanteventsub_test.go +++ b/subscription/resistanteventsub_test.go @@ -25,6 +25,7 @@ import ( "github.com/perun-network/perun-eth-backend/bindings/peruntoken" "github.com/perun-network/perun-eth-backend/channel/test" "github.com/perun-network/perun-eth-backend/subscription" + "perun.network/go-perun/log" pctx "polycry.pt/poly-go/context" pkgtest "polycry.pt/poly-go/test" @@ -33,7 +34,7 @@ import ( var event = func() *subscription.Event { return &subscription.Event{ Name: "Approval", - Data: new(peruntoken.PerunTokenApproval), + Data: new(peruntoken.PeruntokenApproval), } }