diff --git a/backend/ethereum/bindings/adjudicator/Adjudicator.go b/backend/ethereum/bindings/adjudicator/Adjudicator.go index 24a06416..b5fc3133 100644 --- a/backend/ethereum/bindings/adjudicator/Adjudicator.go +++ b/backend/ethereum/bindings/adjudicator/Adjudicator.go @@ -66,20 +66,20 @@ type ChannelSubAlloc struct { } // AdjudicatorABI is the input ABI used to generate the binding from. -const AdjudicatorABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"Concluded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"FinalConcluded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"Progressed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"PushOutcome\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"Refuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"version\",\"type\":\"uint256\"}],\"name\":\"Registered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"}],\"name\":\"Stored\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"enumAdjudicator.DisputePhase\",\"name\":\"disputePhase\",\"type\":\"uint8\"}],\"name\":\"conclude\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\"},{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"internalType\":\"enumAdjudicator.DisputePhase\",\"name\":\"disputePhase\",\"type\":\"uint8\"},{\"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\":\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\"},{\"internalType\":\"uint256\",\"name\":\"timeout\",\"type\":\"uint256\"},{\"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\":\"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\":\"refute\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const AdjudicatorABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"Concluded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"FinalConcluded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Progressed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"}],\"name\":\"PushOutcome\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Refuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Registered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"}],\"name\":\"Stored\",\"type\":\"event\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":\"conclude\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"disputes\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"timeout\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"},{\"internalType\":\"uint8\",\"name\":\"disputePhase\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"stateHash\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":\"refute\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"challengeDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"participants\",\"type\":\"address[]\"}],\"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\":\"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\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // AdjudicatorFuncSigs maps the 4-byte function signature to its string representation. var AdjudicatorFuncSigs = map[string]string{ - "fbdcfa63": "conclude((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),uint256,uint8)", + "637a1e9d": "conclude((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool))", "6bbf706a": "concludeFinal((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),bytes[])", "11be1997": "disputes(bytes32)", - "2f1bf781": "progress((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),uint256,uint8,(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),uint256,bytes)", - "91a628a9": "refute((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),uint256,(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),bytes[])", + "36995831": "progress((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),uint256,bytes)", + "9b24e091": "refute((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),bytes[])", "170e6715": "register((uint256,uint256,address,address[]),(bytes32,uint64,(address[],uint256[][],(bytes32,uint256[])[]),bytes,bool),bytes[])", } // AdjudicatorBin is the compiled bytecode used for deploying new contracts. -var AdjudicatorBin = "0x608060405234801561001057600080fd5b5061266e806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806311be199714610067578063170e6715146100905780632f1bf781146100a55780636bbf706a146100b857806391a628a9146100cb578063fbdcfa63146100de575b600080fd5b61007a610075366004611305565b6100f1565b60405161008791906121a8565b60405180910390f35b6100a361009e36600461132b565b610103565b005b6100a36100b336600461144a565b6101c0565b6100a36100c636600461132b565b610322565b6100a36100d9366004611541565b610414565b6100a36100ec3660046113bc565b610530565b60006020819052908152604090205481565b600061010e846105d3565b8351909150811461013a5760405162461bcd60e51b81526004016101319061231c565b60405180910390fd5b600081815260208190526040902054156101665760405162461bcd60e51b81526004016101319061240c565b610171848484610619565b61017e84848360006106aa565b807fc8704a622f3eb8c9fc5a2ddf1775b5ea7695359b13dec8111874e266a4d5fbc984602001516040516101b291906124db565b60405180910390a250505050565b60008460018111156101ce57fe5b14156101f457844210156101f45760405162461bcd60e51b81526004016101319061239c565b86606001515182106102185760405162461bcd60e51b81526004016101319061232c565b6000610223886105d3565b845190915081146102465760405162461bcd60e51b81526004016101319061233c565b610251878787610735565b6000828152602081905260409020541461027d5760405162461bcd60e51b8152600401610131906122ec565b6102a761028985610776565b838a60600151868151811061029a57fe5b60200260200101516107f8565b6102c35760405162461bcd60e51b8152600401610131906123fc565b6102cf8888868661084e565b6102dc88858360016106aa565b807ff4281b4080401739d666896246578c79fcce7eed7f56c15b0f6dc49929138d29856020015160405161031091906124db565b60405180910390a25050505050505050565b608082015115156001146103485760405162461bcd60e51b8152600401610131906122ac565b6000610353846105d3565b835190915081146103765760405162461bcd60e51b81526004016101319061231c565b600081815260208190526040902054156103a25760405162461bcd60e51b81526004016101319061240c565b6103ad848484610619565b6103b8818585610932565b60405181907fc66555504438611dd09cb33bebae3edcd139b3251aacc295dc7958eb55302a9590600090a260405181907f3e659e9176c25a527f4575e010a270b3e1f8e9d1e94f5e49d4a91dd2c59e8cf890600090a250505050565b828042106104345760405162461bcd60e51b8152600401610131906123ac565b84602001516001600160401b031683602001516001600160401b03161161046d5760405162461bcd60e51b8152600401610131906123dc565b6000610478876105d3565b8451909150811461049b5760405162461bcd60e51b8152600401610131906122fc565b6104a786866000610735565b600082815260208190526040902054146104d35760405162461bcd60e51b8152600401610131906122ec565b6104de878585610619565b6104eb87858360006106aa565b807fd478cbccdd5ca6d246b145bb539b375b45c30ce42f63235b10ee19e4bc0f63c7856020015160405161051f91906124db565b60405180910390a250505050505050565b81804210156105515760405162461bcd60e51b81526004016101319061239c565b600061055c866105d3565b9050610569858585610735565b600082815260208190526040902054146105955760405162461bcd60e51b8152600401610131906122ec565b6105a0818787610932565b60405181907f3e659e9176c25a527f4575e010a270b3e1f8e9d1e94f5e49d4a91dd2c59e8cf890600090a2505050505050565b600081600001518260200151836040015184606001516040516020016105fc94939291906124a1565b604051602081830303815290604052805190602001209050919050565b606061062483610776565b905081518460600151511461064b5760405162461bcd60e51b81526004016101319061234c565b60005b82518110156106a35761067f8284838151811061066757fe5b60200260200101518760600151848151811061029a57fe5b61069b5760405162461bcd60e51b8152600401610131906122bc565b60010161064e565b5050505050565b604080840151015151156106bd57600080fd5b83516000906106d390429063ffffffff610af516565b90506106e0848284610735565b60008085815260200190815260200160002081905550827fde02b1ac594e3d12f3797b91ed3e93213c5fcb9a6963fe4003c2fc8287e67c318260405161072691906121a8565b60405180910390a25050505050565b6000838383600181111561074557fe5b60405160200161075793929190612474565b6040516020818303038152906040528051906020012090509392505050565b60408051602080820183526000825283830151805190820151935160609485936107a3939286910161216f565b604051602081830303815290604052905060608460000151856020015183876060015188608001516040516020016107df95949392919061221d565b60408051808303601f1901815291905295945050505050565b60008061080b8580519060200120610b23565b905060006108198286610b36565b90506001600160a01b03811661082e57600080fd5b836001600160a01b0316816001600160a01b031614925050509392505050565b82602001516001016001600160401b031682602001516001600160401b03161461088a5760405162461bcd60e51b8152600401610131906122cc565b6080830151156108ac5760405162461bcd60e51b81526004016101319061236c565b6108c483604001518360400151866060015151610c12565b6040808501519051637614eebf60e11b81526001600160a01b0382169063ec29dd7e906108fb90889088908890889060040161242c565b60006040518083038186803b15801561091357600080fd5b505afa158015610927573d6000803e3d6000fd5b505050505050505050565b60608160400151600001515160405190808252806020026020018201604052801561097157816020015b606081526020019060019003908161095c5790505b5090506060826040015160400151516040519080825280602002602001820160405280156109a9578160200160208202803883390190505b50905060005b60408401515151811015610ac257600084604001516000015182815181106109d357fe5b6020026020010151905085606001515185604001516020015183815181106109f757fe5b60200260200101515114610a1d5760405162461bcd60e51b81526004016101319061235c565b806001600160a01b03166379aad62e8888606001518860400151602001518681518110610a4657fe5b602002602001015187898881518110610a5b57fe5b60200260200101516040518663ffffffff1660e01b8152600401610a839594939291906121b6565b600060405180830381600087803b158015610a9d57600080fd5b505af1158015610ab1573d6000803e3d6000fd5b5050600190930192506109af915050565b5060405185907f18a580a4aab39f3e138ed4cf306861cb9702f09856253189563ccaec335f0ffb90600090a25050505050565b600082820183811015610b1a5760405162461bcd60e51b81526004016101319061230c565b90505b92915050565b6000816040516020016105fc919061214f565b60008151604114610b4957506000610b1d565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610b8f5760009350505050610b1d565b8060ff16601b14158015610ba757508060ff16601c14155b15610bb85760009350505050610b1d565b60018682858560405160008152602001604052604051610bdb9493929190612277565b6020604051602081039080840390855afa158015610bfd573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b81602001515183602001515114610c3b5760405162461bcd60e51b8152600401610131906123ec565b81515183515114610c5e5760405162461bcd60e51b8152600401610131906123bc565b60005b825151811015610e3f578251805182908110610c7957fe5b60200260200101516001600160a01b031684600001518281518110610c9a57fe5b60200260200101516001600160a01b031614610cc85760405162461bcd60e51b81526004016101319061238c565b60208401518051600091829185919085908110610ce157fe5b60200260200101515114610d075760405162461bcd60e51b8152600401610131906123cc565b8385602001518481518110610d1857fe5b60200260200101515114610d3e5760405162461bcd60e51b81526004016101319061241c565b60005b84811015610dcf57610d8687602001518581518110610d5c57fe5b60200260200101518281518110610d6f57fe5b602002602001015184610af590919063ffffffff16565b9250610dc586602001518581518110610d9b57fe5b60200260200101518281518110610dae57fe5b602002602001015183610af590919063ffffffff16565b9150600101610d41565b5060408601515115610df35760405162461bcd60e51b81526004016101319061237c565b60408501515115610e165760405162461bcd60e51b81526004016101319061237c565b808214610e355760405162461bcd60e51b8152600401610131906122dc565b5050600101610c61565b50505050565b8035610b1d816125ec565b600082601f830112610e6157600080fd5b8135610e74610e6f8261250f565b6124e9565b91508181835260208401935060208101905083856020840282011115610e9957600080fd5b60005b83811015610ec55781610eaf8882610e45565b8452506020928301929190910190600101610e9c565b5050505092915050565b600082601f830112610ee057600080fd5b8135610eee610e6f8261250f565b81815260209384019390925082018360005b83811015610ec55781358601610f168882610fe6565b8452506020928301929190910190600101610f00565b600082601f830112610f3d57600080fd5b8135610f4b610e6f8261250f565b81815260209384019390925082018360005b83811015610ec55781358601610f73888261106c565b8452506020928301929190910190600101610f5d565b600082601f830112610f9a57600080fd5b8135610fa8610e6f8261250f565b81815260209384019390925082018360005b83811015610ec55781358601610fd0888261129c565b8452506020928301929190910190600101610fba565b600082601f830112610ff757600080fd5b8135611005610e6f8261250f565b9150818183526020840193506020810190508385602084028201111561102a57600080fd5b60005b83811015610ec557816110408882611061565b845250602092830192919091019060010161102d565b8035610b1d81612603565b8035610b1d8161260c565b600082601f83011261107d57600080fd5b813561108b610e6f8261252f565b915080825260208301602083018583830111156110a757600080fd5b6110b28382846125aa565b50505092915050565b8035610b1d81612615565b6000606082840312156110d857600080fd5b6110e260606124e9565b905081356001600160401b038111156110fa57600080fd5b61110684828501610e50565b82525060208201356001600160401b0381111561112257600080fd5b61112e84828501610ecf565b60208301525060408201356001600160401b0381111561114d57600080fd5b61115984828501610f89565b60408301525092915050565b60006080828403121561117757600080fd5b61118160806124e9565b9050600061118f8484611061565b82525060206111a084848301611061565b60208301525060406111b484828501610e45565b60408301525060608201356001600160401b038111156111d357600080fd5b6111df84828501610e50565b60608301525092915050565b600060a082840312156111fd57600080fd5b61120760a06124e9565b905060006112158484611061565b8252506020611226848483016112fa565b60208301525060408201356001600160401b0381111561124557600080fd5b611251848285016110c6565b60408301525060608201356001600160401b0381111561127057600080fd5b61127c8482850161106c565b606083015250608061129084828501611056565b60808301525092915050565b6000604082840312156112ae57600080fd5b6112b860406124e9565b905060006112c68484611061565b82525060208201356001600160401b038111156112e257600080fd5b6112ee84828501610fe6565b60208301525092915050565b8035610b1d81612622565b60006020828403121561131757600080fd5b60006113238484611061565b949350505050565b60008060006060848603121561134057600080fd5b83356001600160401b0381111561135657600080fd5b61136286828701611165565b93505060208401356001600160401b0381111561137e57600080fd5b61138a868287016111eb565b92505060408401356001600160401b038111156113a657600080fd5b6113b286828701610f2c565b9150509250925092565b600080600080608085870312156113d257600080fd5b84356001600160401b038111156113e857600080fd5b6113f487828801611165565b94505060208501356001600160401b0381111561141057600080fd5b61141c878288016111eb565b935050604061142d87828801611061565b925050606061143e878288016110bb565b91505092959194509250565b600080600080600080600060e0888a03121561146557600080fd5b87356001600160401b0381111561147b57600080fd5b6114878a828b01611165565b97505060208801356001600160401b038111156114a357600080fd5b6114af8a828b016111eb565b96505060406114c08a828b01611061565b95505060606114d18a828b016110bb565b94505060808801356001600160401b038111156114ed57600080fd5b6114f98a828b016111eb565b93505060a061150a8a828b01611061565b92505060c08801356001600160401b0381111561152657600080fd5b6115328a828b0161106c565b91505092959891949750929550565b600080600080600060a0868803121561155957600080fd5b85356001600160401b0381111561156f57600080fd5b61157b88828901611165565b95505060208601356001600160401b0381111561159757600080fd5b6115a3888289016111eb565b94505060406115b488828901611061565b93505060608601356001600160401b038111156115d057600080fd5b6115dc888289016111eb565b92505060808601356001600160401b038111156115f857600080fd5b61160488828901610f2c565b9150509295509295909350565b600061161d8383611650565b505060200190565b60006116318383611884565b9392505050565b600061161d8383611929565b60006116318383612108565b6116598161256e565b82525050565b600061166a8261255c565b6116748185612560565b935061167f83612556565b8060005b838110156116ad5781516116978882611611565b97506116a283612556565b925050600101611683565b509495945050505050565b60006116c38261255c565b6116cd8185612560565b93506116d883612556565b8060005b838110156116ad5781516116f08882611611565b97506116fb83612556565b9250506001016116dc565b60006117118261255c565b61171b8185612560565b93508360208202850161172d85612556565b8060005b85811015611767578484038952815161174a8582611625565b945061175583612556565b60209a909a0199925050600101611731565b5091979650505050505050565b600061177f8261255c565b6117898185612560565b93508360208202850161179b85612556565b8060005b8581101561176757848403895281516117b88582611625565b94506117c383612556565b60209a909a019992505060010161179f565b60006117e08261255c565b6117ea8185612560565b93506117f583612556565b8060005b838110156116ad57815161180d8882611638565b975061181883612556565b9250506001016117f9565b600061182e8261255c565b6118388185612560565b93508360208202850161184a85612556565b8060005b8581101561176757848403895281516118678582611644565b945061187283612556565b60209a909a019992505060010161184e565b600061188f8261255c565b6118998185612560565b93506118a483612556565b8060005b838110156116ad5781516118bc8882611638565b97506118c783612556565b9250506001016118a8565b60006118dd8261255c565b6118e78185612560565b93506118f283612556565b8060005b838110156116ad57815161190a8882611638565b975061191583612556565b9250506001016118f6565b61165981612579565b6116598161257e565b61165961193e8261257e565b61257e565b600061194e8261255c565b6119588185612560565b93506119688185602086016125b6565b611971816125e2565b9093019392505050565b6000611988601883612560565b7f6f6e6c79206163636570742066696e616c207374617465730000000000000000815260200192915050565b60006119c1601183612560565b70696e76616c6964207369676e617475726560781b815260200192915050565b60006119ee601c83612569565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c0192915050565b6000611a27602b83612560565b7f63616e206f6e6c7920616476616e6365207468652076657273696f6e20636f7581526a6e746572206279206f6e6560a81b602082015260400192915050565b6000611a74602a83612560565b7f53756d206f662062616c616e63657320666f7220616e206173736574206d75738152691d08189948195c5d585b60b21b602082015260400192915050565b6000611ac0602383612560565b7f70726f76696465642077726f6e67206f6c64207374617465206f722074696d658152621bdd5d60ea1b602082015260400192915050565b6000611b05602783612560565b7f74726965642072656675746174696f6e207769746820696e76616c6964206368815266185b9b995b125160ca1b602082015260400192915050565b6000611b4e601b83612560565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000611b87602383612560565b7f7472696564207265676973746572696e6720696e76616c6964206368616e6e658152621b125160ea1b602082015260400192915050565b6000611bcc601583612560565b746163746f72496478206f7574206f662072616e676560581b815260200192915050565b6000611bfd602883612560565b7f74726965642070726f6772657373696e67207769746820696e76616c696420638152671a185b9b995b125160c21b602082015260400192915050565b6000611c47601c83612560565b7f696e76616c6964206c656e677468206f66207369676e61747572657300000000815260200192915050565b6000611c80603083612560565b7f62616c616e636573206c656e6774682073686f756c64206d617463682070617281526f0e8d2c6d2e0c2dce8e640d8cadccee8d60831b602082015260400192915050565b6000611cd2601f83612560565b7f63616e6e6f7420616476616e63652066726f6d2066696e616c20737461746500815260200192915050565b6000611d0b602383612560565b7f737562416c6c6f63732063757272656e746c79206e6f7420696d706c656d656e8152621d195960ea1b602082015260400192915050565b6000611d50601883612560565b7f617373657420616464726573736573206d69736d617463680000000000000000815260200192915050565b6000611d89601e83612560565b7f66756e6374696f6e2063616c6c6564206265666f72652074696d656f75740000815260200192915050565b6000611dc2601d83612560565b7f66756e6374696f6e2063616c6c65642061667465722074696d656f7574000000815260200192915050565b6000611dfb601d83612560565b7f6c656e677468206f662061737365747320646f206e6f74206d61746368000000815260200192915050565b6000611e34603983612560565b7f6c656e677468206f662062616c616e6365735b695d206f66206f6c64416c6c6f8152786320646f6573206e6f74206d61746368206e756d506172747360381b602082015260400192915050565b6000611e8f602d83612560565b7f6f6e6c7920612072656675746174696f6e20776974682061206e65776572207381526c1d185d19481a5cc81d985b1a59609a1b602082015260400192915050565b6000611ede601f83612560565b7f6c656e677468206f662062616c616e63657320646f206e6f74206d6174636800815260200192915050565b6000611f17602b83612560565b7f6163746f72496478206973206e6f742073657420746f20746865206964206f6681526a103a34329039b2b73232b960a91b602082015260400192915050565b6000611f64602083612560565b7f6120646973707574652077617320616c72656164792072656769737465726564815260200192915050565b6000611f9d603983612560565b7f6c656e677468206f662062616c616e6365735b695d20646f206e6577416c6c6f8152786320646f6573206e6f74206d61746368206e756d506172747360381b602082015260400192915050565b8051606080845260009190840190612003828261165f565b9150506020830151848203602086015261201d8282611706565b915050604083015184820360408601526120378282611823565b95945050505050565b805160009060808401906120548582611929565b5060208301516120676020860182611929565b50604083015161207a6040860182611650565b5060608301518482036060860152612037828261165f565b805160009060a08401906120a68582611929565b5060208301516120b9602086018261213d565b50604083015184820360408601526120d18282611feb565b915050606083015184820360608601526120eb8282611943565b91505060808301516121006080860182611920565b509392505050565b8051600090604084019061211c8582611929565b50602083015184820360208601526120378282611884565b6116598161259f565b6116598161258d565b61165981612599565b600061215a826119e1565b91506121668284611932565b50602001919050565b6060808252810161218081866116b8565b905081810360208301526121948185611774565b905081810360408301526120378184611943565b60208101610b1d8284611929565b60a081016121c48288611929565b81810360208301526121d681876116b8565b905081810360408301526121ea81866118d2565b905081810360608301526121fe81856117d5565b9050818103608083015261221281846118d2565b979650505050505050565b60a0810161222b8288611929565b612238602083018761213d565b818103604083015261224a8186611943565b9050818103606083015261225e8185611943565b905061226d6080830184611920565b9695505050505050565b608081016122858287611929565b6122926020830186612146565b61229f6040830185611929565b6120376060830184611929565b60208082528101610b1d8161197b565b60208082528101610b1d816119b4565b60208082528101610b1d81611a1a565b60208082528101610b1d81611a67565b60208082528101610b1d81611ab3565b60208082528101610b1d81611af8565b60208082528101610b1d81611b41565b60208082528101610b1d81611b7a565b60208082528101610b1d81611bbf565b60208082528101610b1d81611bf0565b60208082528101610b1d81611c3a565b60208082528101610b1d81611c73565b60208082528101610b1d81611cc5565b60208082528101610b1d81611cfe565b60208082528101610b1d81611d43565b60208082528101610b1d81611d7c565b60208082528101610b1d81611db5565b60208082528101610b1d81611dee565b60208082528101610b1d81611e27565b60208082528101610b1d81611e82565b60208082528101610b1d81611ed1565b60208082528101610b1d81611f0a565b60208082528101610b1d81611f57565b60208082528101610b1d81611f90565b6080808252810161243d8187612040565b905081810360208301526124518186612092565b905081810360408301526124658185612092565b90506120376060830184611929565b606080825281016124858186612092565b90506124946020830185611929565b6113236040830184611929565b608081016124af8287611929565b6124bc6020830186611929565b6124c96040830185611650565b818103606083015261226d81846116b8565b60208101610b1d8284612134565b6040518181016001600160401b038111828210171561250757600080fd5b604052919050565b60006001600160401b0382111561252557600080fd5b5060209081020190565b60006001600160401b0382111561254557600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b919050565b6000610b1d82612581565b151590565b90565b6001600160a01b031690565b6001600160401b031690565b60ff1690565b6000610b1d8261258d565b82818337506000910152565b60005b838110156125d15781810151838201526020016125b9565b83811115610e3f5750506000910152565b601f01601f191690565b6125f58161256e565b811461260057600080fd5b50565b6125f581612579565b6125f58161257e565b6002811061260057600080fd5b6125f58161258d56fea365627a7a7231582082755fd5bdb0cf75233172839485ffac9cb2c8ae12ffdc1fb3bb1a734f5245c56c6578706572696d656e74616cf564736f6c634300050d0040" +var AdjudicatorBin = "0x608060405234801561001057600080fd5b506126cd806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806311be199714610067578063170e67151461009357806336995831146100a8578063637a1e9d146100bb5780636bbf706a146100ce5780639b24e091146100e1575b600080fd5b61007a610075366004611408565b6100f4565b60405161008a9493929190612538565b60405180910390f35b6100a66100a1366004611495565b610130565b005b6100a66100b6366004611526565b6101f0565b6100a66100c936600461142e565b61038e565b6100a66100dc366004611495565b610464565b6100a66100ef366004611495565b610559565b600060208190529081526040902080546001909101546001600160401b0380831692600160401b810490911691600160801b90910460ff169084565b600061013b84610686565b835190915081146101675760405162461bcd60e51b815260040161015e9061235c565b60405180910390fd5b600081815260208190526040902060010154156101965760405162461bcd60e51b815260040161015e9061245c565b6101a18484846106cc565b6101ae848483600061075d565b807f614ec80aa8693b5d1c65e212c9150ed89cadbd09945b4c9dc8356ab775feea2c84602001516040516101e2919061250f565b60405180910390a250505050565b84606001515182106102145760405162461bcd60e51b815260040161015e9061236c565b600061021f86610686565b600081815260208190526040902054909150600160801b900460ff16610276576000818152602081905260409020546001600160401b03164210156102765760405162461bcd60e51b815260040161015e906123ec565b835181146102965760405162461bcd60e51b815260040161015e9061237c565b846040516020016102a791906124c4565b60408051601f198184030181529181528151602092830120600084815292839052912060010154146102eb5760405162461bcd60e51b815260040161015e906123ac565b6103156102f785610883565b838860600151868151811061030857fe5b6020026020010151610905565b6103315760405162461bcd60e51b815260040161015e9061241c565b61033d8686868661095c565b61034a868583600161075d565b807f7f204194f5cc64dfd0591b3a8ef245dc7c0f756d71a48344dd6d586d3f290ba9856020015160405161037e919061250f565b60405180910390a2505050505050565b600061039983610686565b600081815260208190526040902054909150426001600160401b03909116106103d45760405162461bcd60e51b815260040161015e906122dc565b816040516020016103e591906124c4565b60408051601f198184030181529181528151602092830120600084815292839052912060010154146104295760405162461bcd60e51b815260040161015e906123ac565b610434818484610a40565b60405181907f3e659e9176c25a527f4575e010a270b3e1f8e9d1e94f5e49d4a91dd2c59e8cf890600090a2505050565b6080820151151560011461048a5760405162461bcd60e51b815260040161015e906122ec565b600061049584610686565b835190915081146104b85760405162461bcd60e51b815260040161015e9061235c565b600081815260208190526040902060010154156104e75760405162461bcd60e51b815260040161015e9061245c565b6104f28484846106cc565b6104fd818585610a40565b60405181907fc66555504438611dd09cb33bebae3edcd139b3251aacc295dc7958eb55302a9590600090a260405181907f3e659e9176c25a527f4575e010a270b3e1f8e9d1e94f5e49d4a91dd2c59e8cf890600090a250505050565b600061056484610686565b835190915081146105875760405162461bcd60e51b815260040161015e9061233c565b60008181526020818152604090912054908401516001600160401b03600160401b90920482169116116105cc5760405162461bcd60e51b815260040161015e9061243c565b600081815260208190526040902054426001600160401b03909116116106045760405162461bcd60e51b815260040161015e9061242c565b600081815260208190526040902054600160801b900460ff161561063a5760405162461bcd60e51b815260040161015e906122fc565b6106458484846106cc565b610652848483600061075d565b807f501ceb562a76f0a7471e93a4cfe90c33ac65eeed378064384f3aa80c0c60d46484602001516040516101e2919061250f565b600081600001518260200151836040015184606001516040516020016106af94939291906124d5565b604051602081830303815290604052805190602001209050919050565b60606106d783610883565b90508151846060015151146106fe5760405162461bcd60e51b815260040161015e9061238c565b60005b8251811015610756576107328284838151811061071a57fe5b60200260200101518760600151848151811061030857fe5b61074e5760405162461bcd60e51b815260040161015e9061230c565b600101610701565b5050505050565b6040808401510151511561077057600080fd5b835160009061078690429063ffffffff610c0316565b90508360405160200161079991906124c4565b60408051808303601f1901815291815281516020928301206000868152928390529120600180820192909255805467ffffffffffffffff19166001600160401b03841617905582908111156107ea57fe5b6000848152602081815260409182902080549188015160ff60801b19909216600160801b60ff9590951694909402939093176fffffffffffffffff00000000000000001916600160401b6001600160401b03831602179092555184917ffc420848ac2a3b00435a990dc8d2a2b782b7ef4a2f700cdb3d3c0c821c477b12916108749190859061251d565b60405180910390a25050505050565b60408051602080820183526000825283830151805190820151935160609485936108b093928691016121ad565b604051602081830303815290604052905060608460000151856020015183876060015188608001516040516020016108ec95949392919061224d565b60408051808303601f1901815291905295945050505050565b6000806109188580519060200120610c31565b905060006109268286610c44565b90506001600160a01b03811661093b57600080fd5b836001600160a01b0316816001600160a01b031614925050505b9392505050565b82602001516001016001600160401b031682602001516001600160401b0316146109985760405162461bcd60e51b815260040161015e9061231c565b6080830151156109ba5760405162461bcd60e51b815260040161015e906123bc565b6109d283604001518360400151866060015151610d20565b6040808501519051637614eebf60e11b81526001600160a01b0382169063ec29dd7e90610a0990889088908890889060040161247c565b60006040518083038186803b158015610a2157600080fd5b505afa158015610a35573d6000803e3d6000fd5b505050505050505050565b606081604001516000015151604051908082528060200260200182016040528015610a7f57816020015b6060815260200190600190039081610a6a5790505b509050606082604001516040015151604051908082528060200260200182016040528015610ab7578160200160208202803883390190505b50905060005b60408401515151811015610bd05760008460400151600001518281518110610ae157fe5b602002602001015190508560600151518560400151602001518381518110610b0557fe5b60200260200101515114610b2b5760405162461bcd60e51b815260040161015e9061239c565b806001600160a01b03166379aad62e8888606001518860400151602001518681518110610b5457fe5b602002602001015187898881518110610b6957fe5b60200260200101516040518663ffffffff1660e01b8152600401610b919594939291906121e6565b600060405180830381600087803b158015610bab57600080fd5b505af1158015610bbf573d6000803e3d6000fd5b505060019093019250610abd915050565b5060405185907f18a580a4aab39f3e138ed4cf306861cb9702f09856253189563ccaec335f0ffb90600090a25050505050565b600082820183811015610c285760405162461bcd60e51b815260040161015e9061234c565b90505b92915050565b6000816040516020016106af919061218d565b60008151604114610c5757506000610c2b565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115610c9d5760009350505050610c2b565b8060ff16601b14158015610cb557508060ff16601c14155b15610cc65760009350505050610c2b565b60018682858560405160008152602001604052604051610ce994939291906122a7565b6020604051602081039080840390855afa158015610d0b573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b81602001515183602001515114610d495760405162461bcd60e51b815260040161015e9061244c565b81515183515114610d6c5760405162461bcd60e51b815260040161015e906123fc565b60005b825151811015610f4d578251805182908110610d8757fe5b60200260200101516001600160a01b031684600001518281518110610da857fe5b60200260200101516001600160a01b031614610dd65760405162461bcd60e51b815260040161015e906123dc565b60208401518051600091829185919085908110610def57fe5b60200260200101515114610e155760405162461bcd60e51b815260040161015e9061240c565b8385602001518481518110610e2657fe5b60200260200101515114610e4c5760405162461bcd60e51b815260040161015e9061246c565b60005b84811015610edd57610e9487602001518581518110610e6a57fe5b60200260200101518281518110610e7d57fe5b602002602001015184610c0390919063ffffffff16565b9250610ed386602001518581518110610ea957fe5b60200260200101518281518110610ebc57fe5b602002602001015183610c0390919063ffffffff16565b9150600101610e4f565b5060408601515115610f015760405162461bcd60e51b815260040161015e906123cc565b60408501515115610f245760405162461bcd60e51b815260040161015e906123cc565b808214610f435760405162461bcd60e51b815260040161015e9061232c565b5050600101610d6f565b50505050565b8035610c2b81612658565b600082601f830112610f6f57600080fd5b8135610f82610f7d82612586565b612560565b91508181835260208401935060208101905083856020840282011115610fa757600080fd5b60005b83811015610fd35781610fbd8882610f53565b8452506020928301929190910190600101610faa565b5050505092915050565b600082601f830112610fee57600080fd5b8135610ffc610f7d82612586565b81815260209384019390925082018360005b83811015610fd3578135860161102488826110f4565b845250602092830192919091019060010161100e565b600082601f83011261104b57600080fd5b8135611059610f7d82612586565b81815260209384019390925082018360005b83811015610fd35781358601611081888261117a565b845250602092830192919091019060010161106b565b600082601f8301126110a857600080fd5b81356110b6610f7d82612586565b81815260209384019390925082018360005b83811015610fd357813586016110de888261139f565b84525060209283019291909101906001016110c8565b600082601f83011261110557600080fd5b8135611113610f7d82612586565b9150818183526020840193506020810190508385602084028201111561113857600080fd5b60005b83811015610fd3578161114e888261116f565b845250602092830192919091019060010161113b565b8035610c2b8161266f565b8035610c2b81612678565b600082601f83011261118b57600080fd5b8135611199610f7d826125a6565b915080825260208301602083018583830111156111b557600080fd5b6111c0838284612616565b50505092915050565b6000606082840312156111db57600080fd5b6111e56060612560565b905081356001600160401b038111156111fd57600080fd5b61120984828501610f5e565b82525060208201356001600160401b0381111561122557600080fd5b61123184828501610fdd565b60208301525060408201356001600160401b0381111561125057600080fd5b61125c84828501611097565b60408301525092915050565b60006080828403121561127a57600080fd5b6112846080612560565b90506000611292848461116f565b82525060206112a38484830161116f565b60208301525060406112b784828501610f53565b60408301525060608201356001600160401b038111156112d657600080fd5b6112e284828501610f5e565b60608301525092915050565b600060a0828403121561130057600080fd5b61130a60a0612560565b90506000611318848461116f565b8252506020611329848483016113fd565b60208301525060408201356001600160401b0381111561134857600080fd5b611354848285016111c9565b60408301525060608201356001600160401b0381111561137357600080fd5b61137f8482850161117a565b606083015250608061139384828501611164565b60808301525092915050565b6000604082840312156113b157600080fd5b6113bb6040612560565b905060006113c9848461116f565b82525060208201356001600160401b038111156113e557600080fd5b6113f1848285016110f4565b60208301525092915050565b8035610c2b81612681565b60006020828403121561141a57600080fd5b6000611426848461116f565b949350505050565b6000806040838503121561144157600080fd5b82356001600160401b0381111561145757600080fd5b61146385828601611268565b92505060208301356001600160401b0381111561147f57600080fd5b61148b858286016112ee565b9150509250929050565b6000806000606084860312156114aa57600080fd5b83356001600160401b038111156114c057600080fd5b6114cc86828701611268565b93505060208401356001600160401b038111156114e857600080fd5b6114f4868287016112ee565b92505060408401356001600160401b0381111561151057600080fd5b61151c8682870161103a565b9150509250925092565b600080600080600060a0868803121561153e57600080fd5b85356001600160401b0381111561155457600080fd5b61156088828901611268565b95505060208601356001600160401b0381111561157c57600080fd5b611588888289016112ee565b94505060408601356001600160401b038111156115a457600080fd5b6115b0888289016112ee565b93505060606115c18882890161116f565b92505060808601356001600160401b038111156115dd57600080fd5b6115e98882890161117a565b9150509295509295909350565b6000611602838361162e565b505060200190565b60006109558383611862565b60006116028383611907565b6000610955838361214f565b611637816125e5565b82525050565b6000611648826125d3565b61165281856125d7565b935061165d836125cd565b8060005b8381101561168b57815161167588826115f6565b9750611680836125cd565b925050600101611661565b509495945050505050565b60006116a1826125d3565b6116ab81856125d7565b93506116b6836125cd565b8060005b8381101561168b5781516116ce88826115f6565b97506116d9836125cd565b9250506001016116ba565b60006116ef826125d3565b6116f981856125d7565b93508360208202850161170b856125cd565b8060005b858110156117455784840389528151611728858261160a565b9450611733836125cd565b60209a909a019992505060010161170f565b5091979650505050505050565b600061175d826125d3565b61176781856125d7565b935083602082028501611779856125cd565b8060005b858110156117455784840389528151611796858261160a565b94506117a1836125cd565b60209a909a019992505060010161177d565b60006117be826125d3565b6117c881856125d7565b93506117d3836125cd565b8060005b8381101561168b5781516117eb8882611616565b97506117f6836125cd565b9250506001016117d7565b600061180c826125d3565b61181681856125d7565b935083602082028501611828856125cd565b8060005b8581101561174557848403895281516118458582611622565b9450611850836125cd565b60209a909a019992505060010161182c565b600061186d826125d3565b61187781856125d7565b9350611882836125cd565b8060005b8381101561168b57815161189a8882611616565b97506118a5836125cd565b925050600101611886565b60006118bb826125d3565b6118c581856125d7565b93506118d0836125cd565b8060005b8381101561168b5781516118e88882611616565b97506118f3836125cd565b9250506001016118d4565b611637816125f0565b611637816125f5565b61163761191c826125f5565b6125f5565b600061192c826125d3565b61193681856125d7565b9350611946818560208601612622565b61194f8161264e565b9093019392505050565b6000611966601d836125d7565b7f747269656420636f6e636c756465206265666f72652074696d656f7574000000815260200192915050565b600061199f6018836125d7565b7f6f6e6c79206163636570742066696e616c207374617465730000000000000000815260200192915050565b60006119d8601f836125d7565b7f6368616e6e656c206973206e6f7420696e207374617465204449535055544500815260200192915050565b6000611a116011836125d7565b70696e76616c6964207369676e617475726560781b815260200192915050565b6000611a3e601c836125e0565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c0192915050565b6000611a77602b836125d7565b7f63616e206f6e6c7920616476616e6365207468652076657273696f6e20636f7581526a6e746572206279206f6e6560a81b602082015260400192915050565b6000611ac4602a836125d7565b7f53756d206f662062616c616e63657320666f7220616e206173736574206d75738152691d08189948195c5d585b60b21b602082015260400192915050565b6000611b106027836125d7565b7f74726965642072656675746174696f6e207769746820696e76616c6964206368815266185b9b995b125160ca1b602082015260400192915050565b6000611b59601b836125d7565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000611b926023836125d7565b7f7472696564207265676973746572696e6720696e76616c6964206368616e6e658152621b125160ea1b602082015260400192915050565b6000611bd76015836125d7565b746163746f72496478206f7574206f662072616e676560581b815260200192915050565b6000611c086028836125d7565b7f74726965642070726f6772657373696e67207769746820696e76616c696420638152671a185b9b995b125160c21b602082015260400192915050565b6000611c52601c836125d7565b7f696e76616c6964206c656e677468206f66207369676e61747572657300000000815260200192915050565b6000611c8b6030836125d7565b7f62616c616e636573206c656e6774682073686f756c64206d617463682070617281526f0e8d2c6d2e0c2dce8e640d8cadccee8d60831b602082015260400192915050565b6000611cdd6018836125d7565b7f70726f76696465642077726f6e67206f6c642073746174650000000000000000815260200192915050565b6000611d16601f836125d7565b7f63616e6e6f7420616476616e63652066726f6d2066696e616c20737461746500815260200192915050565b6000611d4f6023836125d7565b7f737562416c6c6f63732063757272656e746c79206e6f7420696d706c656d656e8152621d195960ea1b602082015260400192915050565b6000611d946018836125d7565b7f617373657420616464726573736573206d69736d617463680000000000000000815260200192915050565b6000611dcd601e836125d7565b7f66756e6374696f6e2063616c6c6564206265666f72652074696d656f75740000815260200192915050565b6000611e06601d836125d7565b7f6c656e677468206f662061737365747320646f206e6f74206d61746368000000815260200192915050565b6000611e3f6039836125d7565b7f6c656e677468206f662062616c616e6365735b695d206f66206f6c64416c6c6f8152786320646f6573206e6f74206d61746368206e756d506172747360381b602082015260400192915050565b6000611e9a602e836125d7565b7f6163746f72496478206973206e6f742073657420746f2074686520696e64657881526d1037b3103a34329039b2b73232b960911b602082015260400192915050565b6000611eea601e836125d7565b7f74726965642072656675746174696f6e2061667465722074696d656f75740000815260200192915050565b6000611f23602d836125d7565b7f6f6e6c7920612072656675746174696f6e20776974682061206e65776572207381526c1d185d19481a5cc81d985b1a59609a1b602082015260400192915050565b6000611f72601f836125d7565b7f6c656e677468206f662062616c616e63657320646f206e6f74206d6174636800815260200192915050565b6000611fab6020836125d7565b7f6120646973707574652077617320616c72656164792072656769737465726564815260200192915050565b6000611fe46039836125d7565b7f6c656e677468206f662062616c616e6365735b695d20646f206e6577416c6c6f8152786320646f6573206e6f74206d61746368206e756d506172747360381b602082015260400192915050565b805160608084526000919084019061204a828261163d565b9150506020830151848203602086015261206482826116e4565b9150506040830151848203604086015261207e8282611801565b95945050505050565b8051600090608084019061209b8582611907565b5060208301516120ae6020860182611907565b5060408301516120c1604086018261162e565b506060830151848203606086015261207e828261163d565b805160009060a08401906120ed8582611907565b506020830151612100602086018261217b565b50604083015184820360408601526121188282612032565b915050606083015184820360608601526121328282611921565b915050608083015161214760808601826118fe565b509392505050565b805160009060408401906121638582611907565b506020830151848203602086015261207e8282611862565b61163781612604565b61163781612610565b600061219882611a31565b91506121a48284611910565b50602001919050565b606080825281016121be8186611696565b905081810360208301526121d28185611752565b9050818103604083015261207e8184611921565b60a081016121f48288611907565b81810360208301526122068187611696565b9050818103604083015261221a81866118b0565b9050818103606083015261222e81856117b3565b9050818103608083015261224281846118b0565b979650505050505050565b60a0810161225b8288611907565b612268602083018761217b565b818103604083015261227a8186611921565b9050818103606083015261228e8185611921565b905061229d60808301846118fe565b9695505050505050565b608081016122b58287611907565b6122c26020830186612184565b6122cf6040830185611907565b61207e6060830184611907565b60208082528101610c2b81611959565b60208082528101610c2b81611992565b60208082528101610c2b816119cb565b60208082528101610c2b81611a04565b60208082528101610c2b81611a6a565b60208082528101610c2b81611ab7565b60208082528101610c2b81611b03565b60208082528101610c2b81611b4c565b60208082528101610c2b81611b85565b60208082528101610c2b81611bca565b60208082528101610c2b81611bfb565b60208082528101610c2b81611c45565b60208082528101610c2b81611c7e565b60208082528101610c2b81611cd0565b60208082528101610c2b81611d09565b60208082528101610c2b81611d42565b60208082528101610c2b81611d87565b60208082528101610c2b81611dc0565b60208082528101610c2b81611df9565b60208082528101610c2b81611e32565b60208082528101610c2b81611e8d565b60208082528101610c2b81611edd565b60208082528101610c2b81611f16565b60208082528101610c2b81611f65565b60208082528101610c2b81611f9e565b60208082528101610c2b81611fd7565b6080808252810161248d8187612087565b905081810360208301526124a181866120d9565b905081810360408301526124b581856120d9565b905061207e6060830184611907565b6020808252810161095581846120d9565b608081016124e38287611907565b6124f06020830186611907565b6124fd604083018561162e565b818103606083015261229d8184611696565b60208101610c2b828461217b565b6040810161252b828561217b565b610955602083018461217b565b60808101612546828761217b565b612553602083018661217b565b6122cf6040830185612184565b6040518181016001600160401b038111828210171561257e57600080fd5b604052919050565b60006001600160401b0382111561259c57600080fd5b5060209081020190565b60006001600160401b038211156125bc57600080fd5b506020601f91909101601f19160190565b60200190565b5190565b90815260200190565b919050565b6000610c2b826125f8565b151590565b90565b6001600160a01b031690565b6001600160401b031690565b60ff1690565b82818337506000910152565b60005b8381101561263d578181015183820152602001612625565b83811115610f4d5750506000910152565b601f01601f191690565b612661816125e5565b811461266c57600080fd5b50565b612661816125f0565b612661816125f5565b6126618161260456fea365627a7a72315820d316a5b4d1dee53f29d1f1695bf39c4b4946e8512b2d7acf88382028fd6223f26c6578706572696d656e74616cf564736f6c634300050d0040" // 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) { @@ -239,49 +239,67 @@ func (_Adjudicator *AdjudicatorTransactorRaw) Transact(opts *bind.TransactOpts, // Disputes is a free data retrieval call binding the contract method 0x11be1997. // -// Solidity: function disputes(bytes32 ) constant returns(bytes32) -func (_Adjudicator *AdjudicatorCaller) Disputes(opts *bind.CallOpts, arg0 [32]byte) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 +// Solidity: function disputes(bytes32 ) constant returns(uint64 timeout, uint64 version, uint8 disputePhase, bytes32 stateHash) +func (_Adjudicator *AdjudicatorCaller) Disputes(opts *bind.CallOpts, arg0 [32]byte) (struct { + Timeout uint64 + Version uint64 + DisputePhase uint8 + StateHash [32]byte +}, error) { + ret := new(struct { + Timeout uint64 + Version uint64 + DisputePhase uint8 + StateHash [32]byte + }) + out := ret err := _Adjudicator.contract.Call(opts, out, "disputes", arg0) - return *ret0, err + return *ret, err } // Disputes is a free data retrieval call binding the contract method 0x11be1997. // -// Solidity: function disputes(bytes32 ) constant returns(bytes32) -func (_Adjudicator *AdjudicatorSession) Disputes(arg0 [32]byte) ([32]byte, error) { +// Solidity: function disputes(bytes32 ) constant returns(uint64 timeout, uint64 version, uint8 disputePhase, bytes32 stateHash) +func (_Adjudicator *AdjudicatorSession) Disputes(arg0 [32]byte) (struct { + Timeout uint64 + Version uint64 + DisputePhase uint8 + StateHash [32]byte +}, error) { return _Adjudicator.Contract.Disputes(&_Adjudicator.CallOpts, arg0) } // Disputes is a free data retrieval call binding the contract method 0x11be1997. // -// Solidity: function disputes(bytes32 ) constant returns(bytes32) -func (_Adjudicator *AdjudicatorCallerSession) Disputes(arg0 [32]byte) ([32]byte, error) { +// Solidity: function disputes(bytes32 ) constant returns(uint64 timeout, uint64 version, uint8 disputePhase, bytes32 stateHash) +func (_Adjudicator *AdjudicatorCallerSession) Disputes(arg0 [32]byte) (struct { + Timeout uint64 + Version uint64 + DisputePhase uint8 + StateHash [32]byte +}, error) { return _Adjudicator.Contract.Disputes(&_Adjudicator.CallOpts, arg0) } -// Conclude is a paid mutator transaction binding the contract method 0xfbdcfa63. +// Conclude is a paid mutator transaction binding the contract method 0x637a1e9d. // -// Solidity: function conclude(ChannelParams params, ChannelState state, uint256 timeout, uint8 disputePhase) returns() -func (_Adjudicator *AdjudicatorTransactor) Conclude(opts *bind.TransactOpts, params ChannelParams, state ChannelState, timeout *big.Int, disputePhase uint8) (*types.Transaction, error) { - return _Adjudicator.contract.Transact(opts, "conclude", params, state, timeout, disputePhase) +// Solidity: function conclude(ChannelParams params, ChannelState state) returns() +func (_Adjudicator *AdjudicatorTransactor) Conclude(opts *bind.TransactOpts, params ChannelParams, state ChannelState) (*types.Transaction, error) { + return _Adjudicator.contract.Transact(opts, "conclude", params, state) } -// Conclude is a paid mutator transaction binding the contract method 0xfbdcfa63. +// Conclude is a paid mutator transaction binding the contract method 0x637a1e9d. // -// Solidity: function conclude(ChannelParams params, ChannelState state, uint256 timeout, uint8 disputePhase) returns() -func (_Adjudicator *AdjudicatorSession) Conclude(params ChannelParams, state ChannelState, timeout *big.Int, disputePhase uint8) (*types.Transaction, error) { - return _Adjudicator.Contract.Conclude(&_Adjudicator.TransactOpts, params, state, timeout, disputePhase) +// Solidity: function conclude(ChannelParams params, ChannelState state) returns() +func (_Adjudicator *AdjudicatorSession) Conclude(params ChannelParams, state ChannelState) (*types.Transaction, error) { + return _Adjudicator.Contract.Conclude(&_Adjudicator.TransactOpts, params, state) } -// Conclude is a paid mutator transaction binding the contract method 0xfbdcfa63. +// Conclude is a paid mutator transaction binding the contract method 0x637a1e9d. // -// Solidity: function conclude(ChannelParams params, ChannelState state, uint256 timeout, uint8 disputePhase) returns() -func (_Adjudicator *AdjudicatorTransactorSession) Conclude(params ChannelParams, state ChannelState, timeout *big.Int, disputePhase uint8) (*types.Transaction, error) { - return _Adjudicator.Contract.Conclude(&_Adjudicator.TransactOpts, params, state, timeout, disputePhase) +// Solidity: function conclude(ChannelParams params, ChannelState state) returns() +func (_Adjudicator *AdjudicatorTransactorSession) Conclude(params ChannelParams, state ChannelState) (*types.Transaction, error) { + return _Adjudicator.Contract.Conclude(&_Adjudicator.TransactOpts, params, state) } // ConcludeFinal is a paid mutator transaction binding the contract method 0x6bbf706a. @@ -305,46 +323,46 @@ func (_Adjudicator *AdjudicatorTransactorSession) ConcludeFinal(params ChannelPa return _Adjudicator.Contract.ConcludeFinal(&_Adjudicator.TransactOpts, params, state, sigs) } -// Progress is a paid mutator transaction binding the contract method 0x2f1bf781. +// Progress is a paid mutator transaction binding the contract method 0x36995831. // -// Solidity: function progress(ChannelParams params, ChannelState stateOld, uint256 timeout, uint8 disputePhase, ChannelState state, uint256 actorIdx, bytes sig) returns() -func (_Adjudicator *AdjudicatorTransactor) Progress(opts *bind.TransactOpts, params ChannelParams, stateOld ChannelState, timeout *big.Int, disputePhase uint8, state ChannelState, actorIdx *big.Int, sig []byte) (*types.Transaction, error) { - return _Adjudicator.contract.Transact(opts, "progress", params, stateOld, timeout, disputePhase, state, actorIdx, sig) +// Solidity: function progress(ChannelParams params, ChannelState stateOld, ChannelState state, uint256 actorIdx, bytes sig) returns() +func (_Adjudicator *AdjudicatorTransactor) Progress(opts *bind.TransactOpts, params ChannelParams, stateOld ChannelState, state ChannelState, actorIdx *big.Int, sig []byte) (*types.Transaction, error) { + return _Adjudicator.contract.Transact(opts, "progress", params, stateOld, state, actorIdx, sig) } -// Progress is a paid mutator transaction binding the contract method 0x2f1bf781. +// Progress is a paid mutator transaction binding the contract method 0x36995831. // -// Solidity: function progress(ChannelParams params, ChannelState stateOld, uint256 timeout, uint8 disputePhase, ChannelState state, uint256 actorIdx, bytes sig) returns() -func (_Adjudicator *AdjudicatorSession) Progress(params ChannelParams, stateOld ChannelState, timeout *big.Int, disputePhase uint8, state ChannelState, actorIdx *big.Int, sig []byte) (*types.Transaction, error) { - return _Adjudicator.Contract.Progress(&_Adjudicator.TransactOpts, params, stateOld, timeout, disputePhase, state, actorIdx, sig) +// Solidity: function progress(ChannelParams params, ChannelState stateOld, ChannelState state, uint256 actorIdx, bytes sig) returns() +func (_Adjudicator *AdjudicatorSession) Progress(params ChannelParams, stateOld ChannelState, state ChannelState, actorIdx *big.Int, sig []byte) (*types.Transaction, error) { + return _Adjudicator.Contract.Progress(&_Adjudicator.TransactOpts, params, stateOld, state, actorIdx, sig) } -// Progress is a paid mutator transaction binding the contract method 0x2f1bf781. +// Progress is a paid mutator transaction binding the contract method 0x36995831. // -// Solidity: function progress(ChannelParams params, ChannelState stateOld, uint256 timeout, uint8 disputePhase, ChannelState state, uint256 actorIdx, bytes sig) returns() -func (_Adjudicator *AdjudicatorTransactorSession) Progress(params ChannelParams, stateOld ChannelState, timeout *big.Int, disputePhase uint8, state ChannelState, actorIdx *big.Int, sig []byte) (*types.Transaction, error) { - return _Adjudicator.Contract.Progress(&_Adjudicator.TransactOpts, params, stateOld, timeout, disputePhase, state, actorIdx, sig) +// Solidity: function progress(ChannelParams params, ChannelState stateOld, ChannelState state, uint256 actorIdx, bytes sig) returns() +func (_Adjudicator *AdjudicatorTransactorSession) Progress(params ChannelParams, stateOld ChannelState, state ChannelState, actorIdx *big.Int, sig []byte) (*types.Transaction, error) { + return _Adjudicator.Contract.Progress(&_Adjudicator.TransactOpts, params, stateOld, state, actorIdx, sig) } -// Refute is a paid mutator transaction binding the contract method 0x91a628a9. +// Refute is a paid mutator transaction binding the contract method 0x9b24e091. // -// Solidity: function refute(ChannelParams params, ChannelState stateOld, uint256 timeout, ChannelState state, bytes[] sigs) returns() -func (_Adjudicator *AdjudicatorTransactor) Refute(opts *bind.TransactOpts, params ChannelParams, stateOld ChannelState, timeout *big.Int, state ChannelState, sigs [][]byte) (*types.Transaction, error) { - return _Adjudicator.contract.Transact(opts, "refute", params, stateOld, timeout, state, sigs) +// Solidity: function refute(ChannelParams params, ChannelState state, bytes[] sigs) returns() +func (_Adjudicator *AdjudicatorTransactor) Refute(opts *bind.TransactOpts, params ChannelParams, state ChannelState, sigs [][]byte) (*types.Transaction, error) { + return _Adjudicator.contract.Transact(opts, "refute", params, state, sigs) } -// Refute is a paid mutator transaction binding the contract method 0x91a628a9. +// Refute is a paid mutator transaction binding the contract method 0x9b24e091. // -// Solidity: function refute(ChannelParams params, ChannelState stateOld, uint256 timeout, ChannelState state, bytes[] sigs) returns() -func (_Adjudicator *AdjudicatorSession) Refute(params ChannelParams, stateOld ChannelState, timeout *big.Int, state ChannelState, sigs [][]byte) (*types.Transaction, error) { - return _Adjudicator.Contract.Refute(&_Adjudicator.TransactOpts, params, stateOld, timeout, state, sigs) +// Solidity: function refute(ChannelParams params, ChannelState state, bytes[] sigs) returns() +func (_Adjudicator *AdjudicatorSession) Refute(params ChannelParams, state ChannelState, sigs [][]byte) (*types.Transaction, error) { + return _Adjudicator.Contract.Refute(&_Adjudicator.TransactOpts, params, state, sigs) } -// Refute is a paid mutator transaction binding the contract method 0x91a628a9. +// Refute is a paid mutator transaction binding the contract method 0x9b24e091. // -// Solidity: function refute(ChannelParams params, ChannelState stateOld, uint256 timeout, ChannelState state, bytes[] sigs) returns() -func (_Adjudicator *AdjudicatorTransactorSession) Refute(params ChannelParams, stateOld ChannelState, timeout *big.Int, state ChannelState, sigs [][]byte) (*types.Transaction, error) { - return _Adjudicator.Contract.Refute(&_Adjudicator.TransactOpts, params, stateOld, timeout, state, sigs) +// Solidity: function refute(ChannelParams params, ChannelState state, bytes[] sigs) returns() +func (_Adjudicator *AdjudicatorTransactorSession) Refute(params ChannelParams, state ChannelState, sigs [][]byte) (*types.Transaction, error) { + return _Adjudicator.Contract.Refute(&_Adjudicator.TransactOpts, params, state, sigs) } // Register is a paid mutator transaction binding the contract method 0x170e6715. @@ -724,13 +742,13 @@ func (it *AdjudicatorProgressedIterator) Close() error { // AdjudicatorProgressed represents a Progressed event raised by the Adjudicator contract. type AdjudicatorProgressed struct { ChannelID [32]byte - Version *big.Int + Version uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterProgressed is a free log retrieval operation binding the contract event 0xf4281b4080401739d666896246578c79fcce7eed7f56c15b0f6dc49929138d29. +// FilterProgressed is a free log retrieval operation binding the contract event 0x7f204194f5cc64dfd0591b3a8ef245dc7c0f756d71a48344dd6d586d3f290ba9. // -// Solidity: event Progressed(bytes32 indexed channelID, uint256 version) +// Solidity: event Progressed(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) FilterProgressed(opts *bind.FilterOpts, channelID [][32]byte) (*AdjudicatorProgressedIterator, error) { var channelIDRule []interface{} @@ -745,9 +763,9 @@ func (_Adjudicator *AdjudicatorFilterer) FilterProgressed(opts *bind.FilterOpts, return &AdjudicatorProgressedIterator{contract: _Adjudicator.contract, event: "Progressed", logs: logs, sub: sub}, nil } -// WatchProgressed is a free log subscription operation binding the contract event 0xf4281b4080401739d666896246578c79fcce7eed7f56c15b0f6dc49929138d29. +// WatchProgressed is a free log subscription operation binding the contract event 0x7f204194f5cc64dfd0591b3a8ef245dc7c0f756d71a48344dd6d586d3f290ba9. // -// Solidity: event Progressed(bytes32 indexed channelID, uint256 version) +// Solidity: event Progressed(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) WatchProgressed(opts *bind.WatchOpts, sink chan<- *AdjudicatorProgressed, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} @@ -787,9 +805,9 @@ func (_Adjudicator *AdjudicatorFilterer) WatchProgressed(opts *bind.WatchOpts, s }), nil } -// ParseProgressed is a log parse operation binding the contract event 0xf4281b4080401739d666896246578c79fcce7eed7f56c15b0f6dc49929138d29. +// ParseProgressed is a log parse operation binding the contract event 0x7f204194f5cc64dfd0591b3a8ef245dc7c0f756d71a48344dd6d586d3f290ba9. // -// Solidity: event Progressed(bytes32 indexed channelID, uint256 version) +// Solidity: event Progressed(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) ParseProgressed(log types.Log) (*AdjudicatorProgressed, error) { event := new(AdjudicatorProgressed) if err := _Adjudicator.contract.UnpackLog(event, "Progressed", log); err != nil { @@ -1011,13 +1029,13 @@ func (it *AdjudicatorRefutedIterator) Close() error { // AdjudicatorRefuted represents a Refuted event raised by the Adjudicator contract. type AdjudicatorRefuted struct { ChannelID [32]byte - Version *big.Int + Version uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterRefuted is a free log retrieval operation binding the contract event 0xd478cbccdd5ca6d246b145bb539b375b45c30ce42f63235b10ee19e4bc0f63c7. +// FilterRefuted is a free log retrieval operation binding the contract event 0x501ceb562a76f0a7471e93a4cfe90c33ac65eeed378064384f3aa80c0c60d464. // -// Solidity: event Refuted(bytes32 indexed channelID, uint256 version) +// Solidity: event Refuted(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) FilterRefuted(opts *bind.FilterOpts, channelID [][32]byte) (*AdjudicatorRefutedIterator, error) { var channelIDRule []interface{} @@ -1032,9 +1050,9 @@ func (_Adjudicator *AdjudicatorFilterer) FilterRefuted(opts *bind.FilterOpts, ch return &AdjudicatorRefutedIterator{contract: _Adjudicator.contract, event: "Refuted", logs: logs, sub: sub}, nil } -// WatchRefuted is a free log subscription operation binding the contract event 0xd478cbccdd5ca6d246b145bb539b375b45c30ce42f63235b10ee19e4bc0f63c7. +// WatchRefuted is a free log subscription operation binding the contract event 0x501ceb562a76f0a7471e93a4cfe90c33ac65eeed378064384f3aa80c0c60d464. // -// Solidity: event Refuted(bytes32 indexed channelID, uint256 version) +// Solidity: event Refuted(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) WatchRefuted(opts *bind.WatchOpts, sink chan<- *AdjudicatorRefuted, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} @@ -1074,9 +1092,9 @@ func (_Adjudicator *AdjudicatorFilterer) WatchRefuted(opts *bind.WatchOpts, sink }), nil } -// ParseRefuted is a log parse operation binding the contract event 0xd478cbccdd5ca6d246b145bb539b375b45c30ce42f63235b10ee19e4bc0f63c7. +// ParseRefuted is a log parse operation binding the contract event 0x501ceb562a76f0a7471e93a4cfe90c33ac65eeed378064384f3aa80c0c60d464. // -// Solidity: event Refuted(bytes32 indexed channelID, uint256 version) +// Solidity: event Refuted(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) ParseRefuted(log types.Log) (*AdjudicatorRefuted, error) { event := new(AdjudicatorRefuted) if err := _Adjudicator.contract.UnpackLog(event, "Refuted", log); err != nil { @@ -1155,13 +1173,13 @@ func (it *AdjudicatorRegisteredIterator) Close() error { // AdjudicatorRegistered represents a Registered event raised by the Adjudicator contract. type AdjudicatorRegistered struct { ChannelID [32]byte - Version *big.Int + Version uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterRegistered is a free log retrieval operation binding the contract event 0xc8704a622f3eb8c9fc5a2ddf1775b5ea7695359b13dec8111874e266a4d5fbc9. +// FilterRegistered is a free log retrieval operation binding the contract event 0x614ec80aa8693b5d1c65e212c9150ed89cadbd09945b4c9dc8356ab775feea2c. // -// Solidity: event Registered(bytes32 indexed channelID, uint256 version) +// Solidity: event Registered(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) FilterRegistered(opts *bind.FilterOpts, channelID [][32]byte) (*AdjudicatorRegisteredIterator, error) { var channelIDRule []interface{} @@ -1176,9 +1194,9 @@ func (_Adjudicator *AdjudicatorFilterer) FilterRegistered(opts *bind.FilterOpts, return &AdjudicatorRegisteredIterator{contract: _Adjudicator.contract, event: "Registered", logs: logs, sub: sub}, nil } -// WatchRegistered is a free log subscription operation binding the contract event 0xc8704a622f3eb8c9fc5a2ddf1775b5ea7695359b13dec8111874e266a4d5fbc9. +// WatchRegistered is a free log subscription operation binding the contract event 0x614ec80aa8693b5d1c65e212c9150ed89cadbd09945b4c9dc8356ab775feea2c. // -// Solidity: event Registered(bytes32 indexed channelID, uint256 version) +// Solidity: event Registered(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) WatchRegistered(opts *bind.WatchOpts, sink chan<- *AdjudicatorRegistered, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} @@ -1218,9 +1236,9 @@ func (_Adjudicator *AdjudicatorFilterer) WatchRegistered(opts *bind.WatchOpts, s }), nil } -// ParseRegistered is a log parse operation binding the contract event 0xc8704a622f3eb8c9fc5a2ddf1775b5ea7695359b13dec8111874e266a4d5fbc9. +// ParseRegistered is a log parse operation binding the contract event 0x614ec80aa8693b5d1c65e212c9150ed89cadbd09945b4c9dc8356ab775feea2c. // -// Solidity: event Registered(bytes32 indexed channelID, uint256 version) +// Solidity: event Registered(bytes32 indexed channelID, uint64 version) func (_Adjudicator *AdjudicatorFilterer) ParseRegistered(log types.Log) (*AdjudicatorRegistered, error) { event := new(AdjudicatorRegistered) if err := _Adjudicator.contract.UnpackLog(event, "Registered", log); err != nil { @@ -1299,13 +1317,14 @@ func (it *AdjudicatorStoredIterator) Close() error { // AdjudicatorStored represents a Stored event raised by the Adjudicator contract. type AdjudicatorStored struct { ChannelID [32]byte - Timeout *big.Int + Version uint64 + Timeout uint64 Raw types.Log // Blockchain specific contextual infos } -// FilterStored is a free log retrieval operation binding the contract event 0xde02b1ac594e3d12f3797b91ed3e93213c5fcb9a6963fe4003c2fc8287e67c31. +// FilterStored is a free log retrieval operation binding the contract event 0xfc420848ac2a3b00435a990dc8d2a2b782b7ef4a2f700cdb3d3c0c821c477b12. // -// Solidity: event Stored(bytes32 indexed channelID, uint256 timeout) +// Solidity: event Stored(bytes32 indexed channelID, uint64 version, uint64 timeout) func (_Adjudicator *AdjudicatorFilterer) FilterStored(opts *bind.FilterOpts, channelID [][32]byte) (*AdjudicatorStoredIterator, error) { var channelIDRule []interface{} @@ -1320,9 +1339,9 @@ func (_Adjudicator *AdjudicatorFilterer) FilterStored(opts *bind.FilterOpts, cha return &AdjudicatorStoredIterator{contract: _Adjudicator.contract, event: "Stored", logs: logs, sub: sub}, nil } -// WatchStored is a free log subscription operation binding the contract event 0xde02b1ac594e3d12f3797b91ed3e93213c5fcb9a6963fe4003c2fc8287e67c31. +// WatchStored is a free log subscription operation binding the contract event 0xfc420848ac2a3b00435a990dc8d2a2b782b7ef4a2f700cdb3d3c0c821c477b12. // -// Solidity: event Stored(bytes32 indexed channelID, uint256 timeout) +// Solidity: event Stored(bytes32 indexed channelID, uint64 version, uint64 timeout) func (_Adjudicator *AdjudicatorFilterer) WatchStored(opts *bind.WatchOpts, sink chan<- *AdjudicatorStored, channelID [][32]byte) (event.Subscription, error) { var channelIDRule []interface{} @@ -1362,9 +1381,9 @@ func (_Adjudicator *AdjudicatorFilterer) WatchStored(opts *bind.WatchOpts, sink }), nil } -// ParseStored is a log parse operation binding the contract event 0xde02b1ac594e3d12f3797b91ed3e93213c5fcb9a6963fe4003c2fc8287e67c31. +// ParseStored is a log parse operation binding the contract event 0xfc420848ac2a3b00435a990dc8d2a2b782b7ef4a2f700cdb3d3c0c821c477b12. // -// Solidity: event Stored(bytes32 indexed channelID, uint256 timeout) +// Solidity: event Stored(bytes32 indexed channelID, uint64 version, uint64 timeout) func (_Adjudicator *AdjudicatorFilterer) ParseStored(log types.Log) (*AdjudicatorStored, error) { event := new(AdjudicatorStored) if err := _Adjudicator.contract.UnpackLog(event, "Stored", log); err != nil { @@ -1548,7 +1567,7 @@ func (_App *AppCallerSession) ValidTransition(params ChannelParams, from Channel } // 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\"},{\"constant\":true,\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAllocs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"subBalances\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +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\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAllocs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"subBalances\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // AssetHolderFuncSigs maps the 4-byte function signature to its string representation. var AssetHolderFuncSigs = map[string]string{ @@ -2130,6 +2149,150 @@ func (_AssetHolder *AssetHolderFilterer) ParseOutcomeSet(log types.Log) (*AssetH 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 { + Participant common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawn is a free log retrieval operation binding the contract event 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +func (_AssetHolder *AssetHolderFilterer) FilterWithdrawn(opts *bind.FilterOpts, participant []common.Address) (*AssetHolderWithdrawnIterator, error) { + + var participantRule []interface{} + for _, participantItem := range participant { + participantRule = append(participantRule, participantItem) + } + + logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Withdrawn", participantRule) + 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 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderWithdrawn, participant []common.Address) (event.Subscription, error) { + + var participantRule []interface{} + for _, participantItem := range participant { + participantRule = append(participantRule, participantItem) + } + + logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Withdrawn", participantRule) + 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 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +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 + } + return event, nil +} + // ChannelABI is the input ABI used to generate the binding from. const ChannelABI = "[]" diff --git a/backend/ethereum/bindings/assets/AssetHolderETH.go b/backend/ethereum/bindings/assets/AssetHolderETH.go index 68065029..4ef6443a 100644 --- a/backend/ethereum/bindings/assets/AssetHolderETH.go +++ b/backend/ethereum/bindings/assets/AssetHolderETH.go @@ -36,7 +36,7 @@ type AssetHolderWithdrawalAuth struct { } // 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\"},{\"constant\":true,\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAllocs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"subBalances\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +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\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAllocs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"subBalances\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // AssetHolderFuncSigs maps the 4-byte function signature to its string representation. var AssetHolderFuncSigs = map[string]string{ @@ -618,8 +618,152 @@ func (_AssetHolder *AssetHolderFilterer) ParseOutcomeSet(log types.Log) (*AssetH 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 { + Participant common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawn is a free log retrieval operation binding the contract event 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +func (_AssetHolder *AssetHolderFilterer) FilterWithdrawn(opts *bind.FilterOpts, participant []common.Address) (*AssetHolderWithdrawnIterator, error) { + + var participantRule []interface{} + for _, participantItem := range participant { + participantRule = append(participantRule, participantItem) + } + + logs, sub, err := _AssetHolder.contract.FilterLogs(opts, "Withdrawn", participantRule) + 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 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +func (_AssetHolder *AssetHolderFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderWithdrawn, participant []common.Address) (event.Subscription, error) { + + var participantRule []interface{} + for _, participantItem := range participant { + participantRule = append(participantRule, participantItem) + } + + logs, sub, err := _AssetHolder.contract.WatchLogs(opts, "Withdrawn", participantRule) + 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 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +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 + } + return event, nil +} + // AssetHolderETHABI is the input ABI used to generate the binding from. -const AssetHolderETHABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adjudicator\",\"type\":\"address\"}],\"payable\":false,\"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\"},{\"constant\":true,\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAllocs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"subBalances\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +const AssetHolderETHABI = "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adjudicator\",\"type\":\"address\"}],\"payable\":false,\"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\":\"address\",\"name\":\"participant\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"adjudicator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"fundingID\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"holdings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"channelID\",\"type\":\"bytes32\"},{\"internalType\":\"address[]\",\"name\":\"parts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"newBals\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"subAllocs\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"subBalances\",\"type\":\"uint256[]\"}],\"name\":\"setOutcome\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"settled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"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\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" // AssetHolderETHFuncSigs maps the 4-byte function signature to its string representation. var AssetHolderETHFuncSigs = map[string]string{ @@ -632,7 +776,7 @@ var AssetHolderETHFuncSigs = map[string]string{ } // AssetHolderETHBin is the compiled bytecode used for deploying new contracts. -var AssetHolderETHBin = "0x6080604052600280546001600160a01b031916905534801561002057600080fd5b506040516111ad3803806111ad83398101604081905261003f91610075565b600280546001600160a01b0319166001600160a01b03929092169190911790556100c3565b805161006f816100ac565b92915050565b60006020828403121561008757600080fd5b60006100938484610064565b949350505050565b60006001600160a01b03821661006f565b6100b58161009b565b81146100c057600080fd5b50565b6110db806100d26000396000f3fe6080604052600436106100555760003560e01c80631de26e161461005a5780634ed4283c1461006f57806353c2ed8e1461008f57806379aad62e146100ba578063ae9ee18c146100da578063d945af1d14610107575b600080fd5b61006d610068366004610a05565b610134565b005b34801561007b57600080fd5b5061006d61008a366004610a3f565b6101cd565b34801561009b57600080fd5b506100a461030a565b6040516100b19190610e72565b60405180910390f35b3480156100c657600080fd5b5061006d6100d536600461091f565b610319565b3480156100e657600080fd5b506100fa6100f5366004610901565b610561565b6040516100b19190610f8b565b34801561011357600080fd5b50610127610122366004610901565b610573565b6040516100b19190610e80565b80341461015c5760405162461bcd60e51b815260040161015390610efd565b60405180910390fd5b60008281526020819052604090205461017b908263ffffffff61058816565b60008084815260200190815260200160002081905550817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101c19190610f8b565b60405180910390a25050565b815160009081526001602052604090205460ff166101fd5760405162461bcd60e51b815260040161015390610f6d565b61022b826040516020016102119190610f7d565b6040516020818303038152906040528284602001516105b6565b6102475760405162461bcd60e51b815260040161015390610f3d565b600061025b8360000151846020015161060c565b606084015160008281526020819052604090205491925011156102905760405162461bcd60e51b815260040161015390610f1d565b60608301516000828152602081905260409020546102b39163ffffffff61063f16565b6000828152602081905260408082209290925584820151606086015192516001600160a01b039091169280156108fc0292909190818181858888f19350505050158015610304573d6000803e3d6000fd5b50505050565b6002546001600160a01b031681565b6002546001600160a01b031633146103435760405162461bcd60e51b815260040161015390610f5d565b8685146103625760405162461bcd60e51b815260040161015390610f0d565b8281146103815760405162461bcd60e51b815260040161015390610eed565b821561039f5760405162461bcd60e51b815260040161015390610f4d565b60008981526001602052604090205460ff16156103ce5760405162461bcd60e51b815260040161015390610f2d565b6000898152602081815260408083205481518b81528b8402810190930190915291906060908a801561040a578160200160208202803883390190505b50905060005b8a8110156104b65760006104448e8e8e8581811061042a57fe5b905060200201602061043f91908101906108db565b61060c565b90508083838151811061045357fe5b602002602001018181525050610484600080838152602001908152602001600020548661058890919063ffffffff16565b94506104ab8b8b8481811061049557fe5b905060200201358561058890919063ffffffff16565b935050600101610410565b508183106105105760005b8a81101561050e578989828181106104d557fe5b905060200201356000808484815181106104eb57fe5b6020908102919091018101518252810191909152604001600020556001016104c1565b505b60008c8152600160208190526040808320805460ff1916909217909155518d917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a2505050505050505050505050565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b6000828201838110156105ad5760405162461bcd60e51b815260040161015390610edd565b90505b92915050565b6000806105c98580519060200120610681565b905060006105d782866106b1565b90506001600160a01b0381166105ec57600080fd5b836001600160a01b0316816001600160a01b031614925050509392505050565b60008282604051602001610621929190610e2c565b60405160208183030381529060405280519060200120905092915050565b60006105ad83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061078d565b6000816040516020016106949190610e52565b604051602081830303815290604052805190602001209050919050565b600081516041146106c4575060006105b0565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561070a57600093505050506105b0565b8060ff16601b1415801561072257508060ff16601c14155b1561073357600093505050506105b0565b600186828585604051600081526020016040526040516107569493929190610e8e565b6020604051602081039080840390855afa158015610778573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b600081848411156107b15760405162461bcd60e51b81526004016101539190610ecc565b505050900390565b80356105b081611078565b60008083601f8401126107d657600080fd5b50813567ffffffffffffffff8111156107ee57600080fd5b60208301915083602082028301111561080657600080fd5b9250929050565b80356105b08161108f565b600082601f83011261082957600080fd5b813561083c61083782610fc0565b610f99565b9150808252602083016020830185838301111561085857600080fd5b61086383828461101f565b50505092915050565b60006080828403121561087e57600080fd5b6108886080610f99565b90506000610896848461080d565b82525060206108a7848483016107b9565b60208301525060406108bb848285016107b9565b60408301525060606108cf8482850161080d565b60608301525092915050565b6000602082840312156108ed57600080fd5b60006108f984846107b9565b949350505050565b60006020828403121561091357600080fd5b60006108f9848461080d565b600080600080600080600080600060a08a8c03121561093d57600080fd5b60006109498c8c61080d565b99505060208a013567ffffffffffffffff81111561096657600080fd5b6109728c828d016107c4565b985098505060408a013567ffffffffffffffff81111561099157600080fd5b61099d8c828d016107c4565b965096505060608a013567ffffffffffffffff8111156109bc57600080fd5b6109c88c828d016107c4565b945094505060808a013567ffffffffffffffff8111156109e757600080fd5b6109f38c828d016107c4565b92509250509295985092959850929598565b60008060408385031215610a1857600080fd5b6000610a24858561080d565b9250506020610a358582860161080d565b9150509250929050565b60008060a08385031215610a5257600080fd5b6000610a5e858561086c565b925050608083013567ffffffffffffffff811115610a7b57600080fd5b610a3585828601610818565b610a9081610ffa565b82525050565b610a90610aa282610ffa565b611057565b610a9081611005565b610a908161100a565b610a90610ac58261100a565b61100a565b6000610ad582610fe8565b610adf8185610fec565b9350610aef81856020860161102b565b610af881611068565b9093019392505050565b6000610b0f601c83610ff5565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c0192915050565b6000610b48601b83610fec565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000610b81603383610fec565b7f6c656e677468206f6620737562416c6c6f637320616e642073756242616c616e81527218d95cc81cda1bdd5b1908189948195c5d585b606a1b602082015260400192915050565b6000610bd6601f83610fec565b7f77726f6e6720616d6f756e74206f662045544820666f72206465706f73697400815260200192915050565b6000610c0f602983610fec565b7f7061727469636970616e7473206c656e6774682073686f756c6420657175616c8152682062616c616e63657360b81b602082015260400192915050565b6000610c5a601f83610fec565b7f696e73756666696369656e742045544820666f72207769746864726177616c00815260200192915050565b6000610c93602583610fec565b7f747279696e6720746f2073657420616c726561647920736574746c6564206368815264185b9b995b60da1b602082015260400192915050565b6000610cda601d83610fec565b7f7369676e617475726520766572696669636174696f6e206661696c6564000000815260200192915050565b6000610d13602383610fec565b7f737562416c6c6f63732063757272656e746c79206e6f7420696d706c656d656e8152621d195960ea1b602082015260400192915050565b6000610d58603a83610fec565b7f54686973206d6574686f642063616e206f6e6c792062652063616c6c6564206281527f79207468652061646a7564696361746f7220636f6e7472616374000000000000602082015260400192915050565b6000610db7601383610fec565b7218da185b9b995b081b9bdd081cd95d1d1b1959606a1b815260200192915050565b80516080830190610dea8482610ab0565b506020820151610dfd6020850182610a87565b506040820151610e106040850182610a87565b5060608201516103046060850182610ab0565b610a9081611019565b6000610e388285610ab9565b602082019150610e488284610a96565b5060140192915050565b6000610e5d82610b02565b9150610e698284610ab9565b50602001919050565b602081016105b08284610a87565b602081016105b08284610aa7565b60808101610e9c8287610ab0565b610ea96020830186610e23565b610eb66040830185610ab0565b610ec36060830184610ab0565b95945050505050565b602080825281016105ad8184610aca565b602080825281016105b081610b3b565b602080825281016105b081610b74565b602080825281016105b081610bc9565b602080825281016105b081610c02565b602080825281016105b081610c4d565b602080825281016105b081610c86565b602080825281016105b081610ccd565b602080825281016105b081610d06565b602080825281016105b081610d4b565b602080825281016105b081610daa565b608081016105b08284610dd9565b602081016105b08284610ab0565b60405181810167ffffffffffffffff81118282101715610fb857600080fd5b604052919050565b600067ffffffffffffffff821115610fd757600080fd5b506020601f91909101601f19160190565b5190565b90815260200190565b919050565b60006105b08261100d565b151590565b90565b6001600160a01b031690565b60ff1690565b82818337506000910152565b60005b8381101561104657818101518382015260200161102e565b838111156103045750506000910152565b60006105b08260006105b082611072565b601f01601f191690565b60601b90565b61108181610ffa565b811461108c57600080fd5b50565b6110818161100a56fea365627a7a723158200b3e09bea1fba893e9a4032c706923fbee00f3e1b24485ce940e295b26fb29c76c6578706572696d656e74616cf564736f6c634300050d0040" +var AssetHolderETHBin = "0x6080604052600280546001600160a01b031916905534801561002057600080fd5b506040516111cf3803806111cf83398101604081905261003f91610075565b600280546001600160a01b0319166001600160a01b03929092169190911790556100c3565b805161006f816100ac565b92915050565b60006020828403121561008757600080fd5b60006100938484610064565b949350505050565b60006001600160a01b03821661006f565b6100b58161009b565b81146100c057600080fd5b50565b6110fd806100d26000396000f3fe6080604052600436106100555760003560e01c80631de26e161461005a5780634ed4283c1461006f57806353c2ed8e1461008f57806379aad62e146100ba578063ae9ee18c146100da578063d945af1d14610107575b600080fd5b61006d610068366004610a54565b610134565b005b34801561007b57600080fd5b5061006d61008a366004610a8e565b6101cd565b34801561009b57600080fd5b506100a4610353565b6040516100b19190610e90565b60405180910390f35b3480156100c657600080fd5b5061006d6100d536600461096e565b610362565b3480156100e657600080fd5b506100fa6100f5366004610950565b6105af565b6040516100b19190610fc4565b34801561011357600080fd5b50610127610122366004610950565b6105c1565b6040516100b19190610e9e565b80341461015c5760405162461bcd60e51b815260040161015390610f36565b60405180910390fd5b60008281526020819052604090205461017b908263ffffffff6105d616565b60008084815260200190815260200160002081905550817fcd2fe07293de5928c5df9505b65a8d6506f8668dfe81af09090920687edc48a9826040516101c19190610fc4565b60405180910390a25050565b815160009081526001602052604090205460ff166101fd5760405162461bcd60e51b815260040161015390610fa6565b61022b826040516020016102119190610fb6565b604051602081830303815290604052828460200151610604565b6102475760405162461bcd60e51b815260040161015390610f76565b600061025b8360000151846020015161065b565b606084015160008281526020819052604090205491925011156102905760405162461bcd60e51b815260040161015390610f56565b60608301516000828152602081905260409020546102b39163ffffffff61068e16565b6000828152602081905260408082209290925584820151606086015192516001600160a01b039091169280156108fc0292909190818181858888f19350505050158015610304573d6000803e3d6000fd5b5082602001516001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d584606001516040516103469190610fc4565b60405180910390a2505050565b6002546001600160a01b031681565b6002546001600160a01b0316331461038c5760405162461bcd60e51b815260040161015390610f96565b8685146103ab5760405162461bcd60e51b815260040161015390610f46565b8281146103ca5760405162461bcd60e51b815260040161015390610f26565b82156103e85760405162461bcd60e51b815260040161015390610f86565b60008981526001602052604090205460ff16156104175760405162461bcd60e51b815260040161015390610f66565b60008981526020818152604080832080549084905581518b81528b8402810190930190915291906060908a8015610458578160200160208202803883390190505b50905060005b8a8110156105045760006104928e8e8e8581811061047857fe5b905060200201602061048d919081019061092a565b61065b565b9050808383815181106104a157fe5b6020026020010181815250506104d260008083815260200190815260200160002054866105d690919063ffffffff16565b94506104f98b8b848181106104e357fe5b90506020020135856105d690919063ffffffff16565b93505060010161045e565b5081831061055e5760005b8a81101561055c5789898281811061052357fe5b9050602002013560008084848151811061053957fe5b60209081029190910181015182528101919091526040016000205560010161050f565b505b60008c8152600160208190526040808320805460ff1916909217909155518d917fef898d6cd3395b6dfe67a3c1923e5c726c1b154e979fb0a25a9c41d0093168b891a2505050505050505050505050565b60006020819052908152604090205481565b60016020526000908152604090205460ff1681565b6000828201838110156105fb5760405162461bcd60e51b815260040161015390610f16565b90505b92915050565b60008061061785805190602001206106d0565b905060006106258286610700565b90506001600160a01b03811661063a57600080fd5b836001600160a01b0316816001600160a01b031614925050505b9392505050565b60008282604051602001610670929190610eac565b60405160208183030381529060405280519060200120905092915050565b60006105fb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506107dc565b6000816040516020016106e39190610e70565b604051602081830303815290604052805190602001209050919050565b60008151604114610713575060006105fe565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561075957600093505050506105fe565b8060ff16601b1415801561077157508060ff16601c14155b1561078257600093505050506105fe565b600186828585604051600081526020016040526040516107a59493929190610ec7565b6020604051602081039080840390855afa1580156107c7573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b600081848411156108005760405162461bcd60e51b81526004016101539190610f05565b505050900390565b80356105fe8161109a565b60008083601f84011261082557600080fd5b50813567ffffffffffffffff81111561083d57600080fd5b60208301915083602082028301111561085557600080fd5b9250929050565b80356105fe816110b1565b600082601f83011261087857600080fd5b813561088b61088682610ff9565b610fd2565b915080825260208301602083018583830111156108a757600080fd5b6108b2838284611058565b50505092915050565b6000608082840312156108cd57600080fd5b6108d76080610fd2565b905060006108e5848461085c565b82525060206108f684848301610808565b602083015250604061090a84828501610808565b604083015250606061091e8482850161085c565b60608301525092915050565b60006020828403121561093c57600080fd5b60006109488484610808565b949350505050565b60006020828403121561096257600080fd5b6000610948848461085c565b600080600080600080600080600060a08a8c03121561098c57600080fd5b60006109988c8c61085c565b99505060208a013567ffffffffffffffff8111156109b557600080fd5b6109c18c828d01610813565b985098505060408a013567ffffffffffffffff8111156109e057600080fd5b6109ec8c828d01610813565b965096505060608a013567ffffffffffffffff811115610a0b57600080fd5b610a178c828d01610813565b945094505060808a013567ffffffffffffffff811115610a3657600080fd5b610a428c828d01610813565b92509250509295985092959850929598565b60008060408385031215610a6757600080fd5b6000610a73858561085c565b9250506020610a848582860161085c565b9150509250929050565b60008060a08385031215610aa157600080fd5b6000610aad85856108bb565b925050608083013567ffffffffffffffff811115610aca57600080fd5b610a8485828601610867565b610adf81611033565b82525050565b610adf8161103e565b610adf81611043565b610adf610b0382611043565b611043565b6000610b1382611021565b610b1d8185611025565b9350610b2d818560208601611064565b610b3681611090565b9093019392505050565b6000610b4d601c8361102e565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c0192915050565b6000610b86601b83611025565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000610bbf603383611025565b7f6c656e677468206f6620737562416c6c6f637320616e642073756242616c616e81527218d95cc81cda1bdd5b1908189948195c5d585b606a1b602082015260400192915050565b6000610c14601f83611025565b7f77726f6e6720616d6f756e74206f662045544820666f72206465706f73697400815260200192915050565b6000610c4d602983611025565b7f7061727469636970616e7473206c656e6774682073686f756c6420657175616c8152682062616c616e63657360b81b602082015260400192915050565b6000610c98601f83611025565b7f696e73756666696369656e742045544820666f72207769746864726177616c00815260200192915050565b6000610cd1602583611025565b7f747279696e6720746f2073657420616c726561647920736574746c6564206368815264185b9b995b60da1b602082015260400192915050565b6000610d18601d83611025565b7f7369676e617475726520766572696669636174696f6e206661696c6564000000815260200192915050565b6000610d51602383611025565b7f737562416c6c6f63732063757272656e746c79206e6f7420696d706c656d656e8152621d195960ea1b602082015260400192915050565b6000610d96603a83611025565b7f54686973206d6574686f642063616e206f6e6c792062652063616c6c6564206281527f79207468652061646a7564696361746f7220636f6e7472616374000000000000602082015260400192915050565b6000610df5601383611025565b7218da185b9b995b081b9bdd081cd95d1d1b1959606a1b815260200192915050565b80516080830190610e288482610aee565b506020820151610e3b6020850182610ad6565b506040820151610e4e6040850182610ad6565b506060820151610e616060850182610aee565b50505050565b610adf81611052565b6000610e7b82610b40565b9150610e878284610af7565b50602001919050565b602081016105fe8284610ad6565b602081016105fe8284610ae5565b60408101610eba8285610aee565b6106546020830184610ad6565b60808101610ed58287610aee565b610ee26020830186610e67565b610eef6040830185610aee565b610efc6060830184610aee565b95945050505050565b602080825281016105fb8184610b08565b602080825281016105fe81610b79565b602080825281016105fe81610bb2565b602080825281016105fe81610c07565b602080825281016105fe81610c40565b602080825281016105fe81610c8b565b602080825281016105fe81610cc4565b602080825281016105fe81610d0b565b602080825281016105fe81610d44565b602080825281016105fe81610d89565b602080825281016105fe81610de8565b608081016105fe8284610e17565b602081016105fe8284610aee565b60405181810167ffffffffffffffff81118282101715610ff157600080fd5b604052919050565b600067ffffffffffffffff82111561101057600080fd5b506020601f91909101601f19160190565b5190565b90815260200190565b919050565b60006105fe82611046565b151590565b90565b6001600160a01b031690565b60ff1690565b82818337506000910152565b60005b8381101561107f578181015183820152602001611067565b83811115610e615750506000910152565b601f01601f191690565b6110a381611033565b81146110ae57600080fd5b50565b6110a38161104356fea365627a7a7231582068115243497932e9980eba7d7e1d8a2a07d1c6731c66898200efa88f4f3ff3a26c6578706572696d656e74616cf564736f6c634300050d0040" // 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) { @@ -1218,6 +1362,150 @@ func (_AssetHolderETH *AssetHolderETHFilterer) ParseOutcomeSet(log types.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 { + Participant common.Address + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawn is a free log retrieval operation binding the contract event 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +func (_AssetHolderETH *AssetHolderETHFilterer) FilterWithdrawn(opts *bind.FilterOpts, participant []common.Address) (*AssetHolderETHWithdrawnIterator, error) { + + var participantRule []interface{} + for _, participantItem := range participant { + participantRule = append(participantRule, participantItem) + } + + logs, sub, err := _AssetHolderETH.contract.FilterLogs(opts, "Withdrawn", participantRule) + 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 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +func (_AssetHolderETH *AssetHolderETHFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *AssetHolderETHWithdrawn, participant []common.Address) (event.Subscription, error) { + + var participantRule []interface{} + for _, participantItem := range participant { + participantRule = append(participantRule, participantItem) + } + + logs, sub, err := _AssetHolderETH.contract.WatchLogs(opts, "Withdrawn", participantRule) + 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 0x7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5. +// +// Solidity: event Withdrawn(address indexed participant, uint256 amount) +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 + } + return event, nil +} + // ECDSAABI is the input ABI used to generate the binding from. const ECDSAABI = "[]" diff --git a/backend/ethereum/channel/adjudicator.go b/backend/ethereum/channel/adjudicator.go new file mode 100644 index 00000000..755f76c5 --- /dev/null +++ b/backend/ethereum/channel/adjudicator.go @@ -0,0 +1,112 @@ +// Copyright (c) 2020 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel // import "perun.network/go-perun/backend/ethereum/channel" + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + + "perun.network/go-perun/backend/ethereum/bindings/adjudicator" + "perun.network/go-perun/channel" + "perun.network/go-perun/log" + psync "perun.network/go-perun/pkg/sync" +) + +// compile time check that we implement the perun adjudicator interface +var _ channel.Adjudicator = (*Adjudicator)(nil) + +// The Adjudicator struct implements the channel.Adjudicator interface +// It provides all functionality to close a channel. +type Adjudicator struct { + ContractBackend + contract *adjudicator.Adjudicator + // The address to which we send all funds. + Receiver common.Address + // Structured logger + log log.Logger + // Transaction mutex + mu psync.Mutex +} + +// NewAdjudicator creates a new ethereum adjudicator. +func NewAdjudicator(backend ContractBackend, contract common.Address, onchainAddress common.Address) *Adjudicator { + contr, err := adjudicator.NewAdjudicator(contract, backend) + if err != nil { + panic("Could not create a new instance of adjudicator") + } + return &Adjudicator{ + ContractBackend: backend, + contract: contr, + Receiver: onchainAddress, + log: log.WithField("account", backend.account.Address), + } +} + +func (a *Adjudicator) callRegister(ctx context.Context, req channel.AdjudicatorReq) error { + return a.call(ctx, req, a.contract.Register) +} + +func (a *Adjudicator) callRefute(ctx context.Context, req channel.AdjudicatorReq) error { + return a.call(ctx, req, a.contract.Refute) +} + +func (a *Adjudicator) callConclude(ctx context.Context, req channel.AdjudicatorReq) error { + // Wrapped call to Conclude, ignoring sig + conclude := func( + opts *bind.TransactOpts, + params adjudicator.ChannelParams, + state adjudicator.ChannelState, + _ [][]byte, + ) (*types.Transaction, error) { + return a.contract.Conclude(opts, params, state) + } + return a.call(ctx, req, conclude) +} + +func (a *Adjudicator) callConcludeFinal(ctx context.Context, req channel.AdjudicatorReq) error { + return a.call(ctx, req, a.contract.ConcludeFinal) +} + +type adjFunc = func( + opts *bind.TransactOpts, + params adjudicator.ChannelParams, + state adjudicator.ChannelState, + sigs [][]byte, +) (*types.Transaction, error) + +// call calls the given contract function `fn` with the data from `req`. +// `fn` should be a method of `a.contract`, like `a.contract.Register`. +func (a *Adjudicator) call(ctx context.Context, req channel.AdjudicatorReq, fn adjFunc) error { + ethParams := channelParamsToEthParams(req.Params) + ethState := channelStateToEthState(req.Tx.State) + tx, err := func() (*types.Transaction, error) { + if !a.mu.TryLockCtx(ctx) { + return nil, errors.Wrap(ctx.Err(), "context canceled while acquiring tx lock") + } + defer a.mu.Unlock() + + trans, err := a.newTransactor(ctx, big.NewInt(0), GasLimit) + if err != nil { + return nil, errors.WithMessage(err, "creating transactor") + } + tx, err := fn(trans, ethParams, ethState, req.Tx.Sigs) + if err != nil { + return nil, errors.Wrap(err, "calling adjudicator function") + } + log.Debugf("Sent transaction %v", tx.Hash().Hex()) + return tx, nil + }() + if err != nil { + return err + } + + return errors.WithMessage(confirmTransaction(ctx, a.ContractBackend, tx), "mining transaction") +} diff --git a/backend/ethereum/channel/adjudicator_test.go b/backend/ethereum/channel/adjudicator_test.go new file mode 100644 index 00000000..c01e03d0 --- /dev/null +++ b/backend/ethereum/channel/adjudicator_test.go @@ -0,0 +1,149 @@ +// Copyright (c) 2020 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel + +import ( + "context" + "math/big" + "math/rand" + "testing" + "time" + + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "perun.network/go-perun/backend/ethereum/channel/test" + "perun.network/go-perun/backend/ethereum/wallet" + ethwallettest "perun.network/go-perun/backend/ethereum/wallet/test" + "perun.network/go-perun/channel" + channeltest "perun.network/go-perun/channel/test" + perunwallet "perun.network/go-perun/wallet" + wallettest "perun.network/go-perun/wallet/test" +) + +func newAdjudicator(t *testing.T, rng *rand.Rand, n int) ([]perunwallet.Account, []perunwallet.Address, []*Funder, []*Adjudicator, common.Address) { + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + simBackend := test.NewSimulatedBackend() + ks := ethwallettest.GetKeystore() + deployAccount := wallettest.NewRandomAccount(rng).(*wallet.Account).Account + simBackend.FundAddress(ctx, deployAccount.Address) + contractBackend := NewContractBackend(simBackend, ks, deployAccount) + // Deploy Adjudicator + adjudicator, err := DeployAdjudicator(context.Background(), contractBackend) + require.NoError(t, err, "Deploying the adjudicator should not error") + // Deploy Assetholder + assetETH, err := DeployETHAssetholder(ctx, contractBackend, adjudicator) + require.NoError(t, err, "Deploying asset holder failed") + t.Logf("asset holder address is %v", assetETH) + t.Logf("adjudicator address is %v", adjudicator) + accs := make([]perunwallet.Account, n) + parts := make([]perunwallet.Address, n) + funders := make([]*Funder, n) + adjudicators := make([]*Adjudicator, n) + for i := 0; i < n; i++ { + acc := wallettest.NewRandomAccount(rng).(*wallet.Account) + simBackend.FundAddress(ctx, acc.Account.Address) + accs[i] = acc + parts[i] = acc.Address() + cb := NewContractBackend(simBackend, ks, acc.Account) + funders[i] = NewETHFunder(cb, assetETH) + adjudicators[i] = NewAdjudicator(cb, adjudicator, deployAccount.Address) + } + return accs, parts, funders, adjudicators, assetETH +} + +func signState(t *testing.T, accounts []perunwallet.Account, params *channel.Params, state *channel.State) channel.Transaction { + // Sign valid state. + sigs := make([][]byte, len(accounts)) + for i := 0; i < len(accounts); i++ { + sig, err := Sign(accounts[i], params, state) + assert.NoError(t, err, "Sign should not return error") + sigs[i] = sig + } + return channel.Transaction{ + State: state, + Sigs: sigs, + } +} + +func TestSubscribeRegistered(t *testing.T) { + seed := time.Now().UnixNano() + t.Logf("seed is %v", seed) + rng := rand.New(rand.NewSource(int64(seed))) + // create new Adjudicator + accs, parts, funders, adjs, asset := newAdjudicator(t, rng, 1) + // create valid state and params + app := channeltest.NewRandomApp(rng) + params := channel.NewParamsUnsafe(uint64(100*time.Second), parts, app.Def(), big.NewInt(rng.Int63())) + state := newValidState(rng, params, asset) + // Set up subscription + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + registered, err := adjs[0].SubscribeRegistered(ctx, params) + assert.NoError(t, err, "Subscribing to valid params should not error") + // we need to properly fund the channel + fundingCtx, funCancel := context.WithTimeout(context.Background(), timeout) + defer funCancel() + // fund the contract + reqFund := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(0), + } + require.NoError(t, funders[0].Fund(fundingCtx, reqFund), "funding should succeed") + // Now test the register function + ctxReg, regCancel := context.WithTimeout(context.Background(), timeout) + defer regCancel() + tx := signState(t, accs, params, state) + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[0], + Idx: channel.Index(0), + Tx: tx, + } + event, err := adjs[0].Register(ctxReg, req) + assert.NoError(t, err, "Registering state should succeed") + assert.Equal(t, event, registered.Next(), "Events should be equal") + assert.NoError(t, registered.Close(), "Closing event channel should not error") + assert.Nil(t, registered.Next(), "Next on closed channel should produce nil") + assert.NoError(t, registered.Err(), "Closing should produce no error") + // Setup a new subscription + registered2, err := adjs[0].SubscribeRegistered(ctx, params) + assert.NoError(t, err, "registering two subscriptions should not fail") + assert.Equal(t, event, registered2.Next(), "Events should be equal") + assert.NoError(t, registered2.Close(), "Closing event channel should not error") + assert.Nil(t, registered2.Next(), "Next on closed channel should produce nil") + assert.NoError(t, registered2.Err(), "Closing should produce no error") +} + +func newValidState(rng *rand.Rand, params *channel.Params, assetholder common.Address) *channel.State { + // Create valid state. + assets := []channel.Asset{ + &Asset{Address: assetholder}, + } + ofparts := make([][]channel.Bal, len(params.Parts)) + for i := 0; i < len(ofparts); i++ { + ofparts[i] = make([]channel.Bal, len(assets)) + for k := 0; k < len(assets); k++ { + ofparts[i][k] = big.NewInt(rng.Int63n(999) + 1) + } + } + allocation := channel.Allocation{ + Assets: assets, + OfParts: ofparts, + Locked: []channel.SubAlloc{}, + } + + return &channel.State{ + ID: params.ID(), + Version: 4, + App: params.App, + Allocation: allocation, + Data: channeltest.NewRandomData(rng), + IsFinal: false, + } +} diff --git a/backend/ethereum/channel/backend.go b/backend/ethereum/channel/backend.go index c9e4d69a..87671643 100644 --- a/backend/ethereum/channel/backend.go +++ b/backend/ethereum/channel/backend.go @@ -25,15 +25,15 @@ var ( // compile time check that we implement the channel backend interface. _ channel.Backend = new(Backend) // Definition of ABI datatypes. - abiUint256, _ = abi.NewType("uint256", nil) - abiUint256Arr, _ = abi.NewType("uint256[]", nil) - abiUint256ArrArr, _ = abi.NewType("uint256[][]", nil) - abiAddress, _ = abi.NewType("address", nil) - abiAddressArr, _ = abi.NewType("address[]", nil) - abiBytes, _ = abi.NewType("bytes", nil) - abiBytes32, _ = abi.NewType("bytes32", nil) - abiUint64, _ = abi.NewType("uint64", nil) - abiBool, _ = abi.NewType("bool", nil) + abiUint256, _ = abi.NewType("uint256", "", nil) + abiUint256Arr, _ = abi.NewType("uint256[]", "", nil) + abiUint256ArrArr, _ = abi.NewType("uint256[][]", "", nil) + abiAddress, _ = abi.NewType("address", "", nil) + abiAddressArr, _ = abi.NewType("address[]", "", nil) + abiBytes, _ = abi.NewType("bytes", "", nil) + abiBytes32, _ = abi.NewType("bytes32", "", nil) + abiUint64, _ = abi.NewType("uint64", "", nil) + abiBool, _ = abi.NewType("bool", "", nil) ) // Backend implements the interface defined in channel/Backend.go. diff --git a/backend/ethereum/channel/conclude.go b/backend/ethereum/channel/conclude.go new file mode 100644 index 00000000..58e1100f --- /dev/null +++ b/backend/ethereum/channel/conclude.go @@ -0,0 +1,81 @@ +// Copyright (c) 2020 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel // import "perun.network/go-perun/backend/ethereum/channel" + +import ( + "context" + + "github.com/pkg/errors" + "perun.network/go-perun/backend/ethereum/bindings/adjudicator" + + "perun.network/go-perun/channel" +) + +// ensureConcluded ensures that conclude or concludeFinal (for non-final and +// final states, resp.) is called on the adjudicator. +// - a subscription on Concluded events is established +// - it searches for a past concluded event +// - if found, channel is already concluded and success is returned +// - if none found, conclude/concludeFinal is called on the adjudicator +// - it waits for a Concluded event from the blockchain +func (a *Adjudicator) ensureConcluded(ctx context.Context, req channel.AdjudicatorReq) error { + // Listen for Concluded event. + watchOpts, err := a.newWatchOpts(ctx) + if err != nil { + return errors.WithMessage(err, "creating watchOpts") + } + concluded := make(chan *adjudicator.AdjudicatorConcluded) + sub, err := a.contract.WatchConcluded(watchOpts, concluded, [][32]byte{req.Params.ID()}) + if err != nil { + return errors.Wrap(err, "WatchConcluded failed") + } + defer sub.Unsubscribe() + + if found, err := a.filterConcluded(ctx, req.Params.ID()); err != nil { + return errors.WithMessage(err, "filtering old Concluded events") + } else if found { + return nil + } + + // No conclude event found in the past, send transaction. + if req.Tx.IsFinal { + err = errors.WithMessage(a.callConcludeFinal(ctx, req), "calling concludeFinal") + } else { + err = errors.WithMessage(a.callConclude(ctx, req), "calling conclude") + } + if IsTxFailedError(err) { + a.log.Warn("Calling conclude(Final) failed, waiting for event anyways...") + } else if err != nil { + return err + } + + select { + case <-concluded: + return nil + case <-ctx.Done(): + return errors.Wrap(ctx.Err(), "context cancelled") + case err = <-sub.Err(): + return errors.Wrap(err, "subscription error") + } +} + +// filterConcluded returns whether there has been a Concluded event in the past. +func (a *Adjudicator) filterConcluded(ctx context.Context, channelID channel.ID) (bool, error) { + filterOpts, err := a.newFilterOpts(ctx) + if err != nil { + return false, err + } + iter, err := a.contract.FilterConcluded(filterOpts, [][32]byte{channelID}) + if err != nil { + return false, errors.Wrap(err, "creating iterator") + } + + if !iter.Next() { + return false, errors.Wrap(iter.Error(), "iterating") + } + // Event found + return true, nil +} diff --git a/backend/ethereum/channel/contractbackend.go b/backend/ethereum/channel/contractbackend.go index 6c989faa..291d71bb 100644 --- a/backend/ethereum/channel/contractbackend.go +++ b/backend/ethereum/channel/contractbackend.go @@ -55,9 +55,33 @@ func NewContractBackend(cf ContractInterface, ks *keystore.KeyStore, acc *accoun } func (c *ContractBackend) newWatchOpts(ctx context.Context) (*bind.WatchOpts, error) { + blockNum, err := c.getBlockNum(ctx) + if err != nil { + return nil, errors.WithMessage(err, "new watch opts") + } + + return &bind.WatchOpts{ + Start: &blockNum, + Context: ctx, + }, nil +} + +func (c *ContractBackend) newFilterOpts(ctx context.Context) (*bind.FilterOpts, error) { + blockNum, err := c.getBlockNum(ctx) + if err != nil { + return nil, errors.WithMessage(err, "new filter opts") + } + return &bind.FilterOpts{ + Start: blockNum, + End: nil, + Context: ctx, + }, nil +} + +func (c *ContractBackend) getBlockNum(ctx context.Context) (uint64, error) { latestBlock, err := c.BlockByNumber(ctx, nil) if err != nil { - return nil, errors.Wrap(err, "Could not retrieve latest block") + return uint64(0), errors.Wrap(err, "Could not retrieve latest block") } // max(1, latestBlock - offset) var blockNum uint64 @@ -66,27 +90,23 @@ func (c *ContractBackend) newWatchOpts(ctx context.Context) (*bind.WatchOpts, er } else { blockNum = 1 } - - return &bind.WatchOpts{ - Start: &blockNum, - Context: ctx, - }, nil + return blockNum, nil } func (c *ContractBackend) newTransactor(ctx context.Context, valueWei *big.Int, gasLimit uint64) (*bind.TransactOpts, error) { nonce, err := c.PendingNonceAt(ctx, c.account.Address) if err != nil { - return nil, err + return nil, errors.Wrap(err, "querying pending nonce") } gasPrice, err := c.SuggestGasPrice(ctx) if err != nil { - return nil, err + return nil, errors.Wrap(err, "querying suggested gas price") } auth, err := bind.NewKeyStoreTransactor(c.ks, *c.account) if err != nil { - return nil, err + return nil, errors.Wrap(err, "creating transactor") } auth.Nonce = new(big.Int).SetUint64(nonce) diff --git a/backend/ethereum/channel/deploy.go b/backend/ethereum/channel/deploy.go index 56f2b32e..c4322336 100644 --- a/backend/ethereum/channel/deploy.go +++ b/backend/ethereum/channel/deploy.go @@ -7,6 +7,7 @@ package channel import ( "context" + stderrors "errors" "math/big" "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -30,7 +31,7 @@ func DeployETHAssetholder(ctx context.Context, backend ContractBackend, adjudica if err != nil { return common.Address{}, errors.WithMessage(err, "could not create transaction") } - if err := deployedSuccessful(ctx, backend, tx); err != nil { + if err := confirmDeployment(ctx, backend, tx); err != nil { return common.Address{}, errors.WithMessage(err, "deploying ethassetholder") } log.Infof("Successfully deployed AssetHolderETH at %v.", addr.Hex()) @@ -47,25 +48,33 @@ func DeployAdjudicator(ctx context.Context, backend ContractBackend) (common.Add if err != nil { return common.Address{}, errors.WithMessage(err, "could not create transaction") } - if err = deployedSuccessful(ctx, backend, tx); err != nil { + if err = confirmDeployment(ctx, backend, tx); err != nil { return common.Address{}, errors.WithMessage(err, "deploying adjudicator") } log.Infof("Successfully deployed Adjudicator at %v.", addr.Hex()) return addr, nil } -func deployedSuccessful(ctx context.Context, backend ContractBackend, tx *types.Transaction) error { +func confirmDeployment(ctx context.Context, backend ContractBackend, tx *types.Transaction) error { _, err := bind.WaitDeployed(ctx, backend, tx) return errors.Wrap(err, "could not execute transaction") } -func execSuccessful(ctx context.Context, backend ContractBackend, tx *types.Transaction) error { +func confirmTransaction(ctx context.Context, backend ContractBackend, tx *types.Transaction) error { receipt, err := bind.WaitMined(ctx, backend, tx) if err != nil { return errors.Wrap(err, "could not execute transaction") } if receipt.Status == types.ReceiptStatusFailed { - return errors.New("transaction failed") + return errors.WithStack(ErrorTxFailed) } return nil } + +// ErrorTxFailed signals a failed, i.e., reverted, transaction. +var ErrorTxFailed = stderrors.New("transaction failed") + +// IsTxFailedError returns whether the cause of the error was a failed transaction. +func IsTxFailedError(err error) bool { + return errors.Cause(err) == ErrorTxFailed +} diff --git a/backend/ethereum/channel/funder.go b/backend/ethereum/channel/funder.go index d04fe8a9..7fd33880 100644 --- a/backend/ethereum/channel/funder.go +++ b/backend/ethereum/channel/funder.go @@ -24,8 +24,8 @@ import ( var ( // Declaration for abi-encoding. - abibytes32, _ = abi.NewType("bytes32", nil) - abiaddress, _ = abi.NewType("address", nil) + abibytes32, _ = abi.NewType("bytes32", "", nil) + abiaddress, _ = abi.NewType("address", "", nil) ) type assetHolder struct { @@ -129,7 +129,7 @@ func (f *Funder) sendFundingTransaction(ctx context.Context, request channel.Fun if err != nil { return errors.WithMessagef(err, "depositing asset %d", asset.assetIndex) } - if err := execSuccessful(ctx, f.ContractBackend, tx); err != nil { + if err := confirmTransaction(ctx, f.ContractBackend, tx); err != nil { return errors.WithMessage(err, "mining transaction") } f.log.Debugf("peer[%d] Transaction with txHash: [%v] executed successful", request.Idx, tx.Hash().Hex()) diff --git a/backend/ethereum/channel/register.go b/backend/ethereum/channel/register.go new file mode 100644 index 00000000..936fac02 --- /dev/null +++ b/backend/ethereum/channel/register.go @@ -0,0 +1,217 @@ +// Copyright (c) 2020 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel // import "perun.network/go-perun/backend/ethereum/channel" + +import ( + "context" + "sync" + "time" + + "github.com/ethereum/go-ethereum/event" + "github.com/pkg/errors" + + "perun.network/go-perun/backend/ethereum/bindings/adjudicator" + "perun.network/go-perun/channel" +) + +// Register registers a state on-chain. +// If the state is a final state, register becomes a no-op. +func (a *Adjudicator) Register(ctx context.Context, req channel.AdjudicatorReq) (*channel.Registered, error) { + if req.Tx.State.IsFinal { + return a.registerFinal(ctx, req) + } + return a.registerNonFinal(ctx, req) +} + +// registerFinal registers a final state. It ensures that the final state is +// concluded on the adjudicator conctract. +func (a *Adjudicator) registerFinal(ctx context.Context, req channel.AdjudicatorReq) (*channel.Registered, error) { + // In the case of final states, we already call concludeFinal on the + // adjudicator. Method ensureConcluded calls concludeFinal for final states. + if err := a.ensureConcluded(ctx, req); err != nil { + return nil, errors.WithMessage(err, "ensuring Concluded") + } + + return &channel.Registered{ + ID: req.Params.ID(), + Timeout: time.Time{}, // concludeFinal skips registration + Version: req.Tx.Version, + }, nil +} + +func (a *Adjudicator) registerNonFinal(ctx context.Context, req channel.AdjudicatorReq) (*channel.Registered, error) { + _sub, err := a.SubscribeRegistered(ctx, req.Params) + if err != nil { + return nil, err + } + sub := _sub.(*RegisteredSub) + defer sub.Close() + + // call register if there was no past event + if !sub.hasPast() { + if err := a.callRegister(ctx, req); IsTxFailedError(err) { + a.log.Warn("Calling register failed, waiting for event anyways...") + } else if err != nil { + return nil, errors.WithMessage(err, "calling register") + } + } + + // iterate over state registrations and call refute until correct version got + // registered. + for { + s := sub.Next() + if s == nil { + // the subscription error might be nil, so to ensure a non-nil error, we + // create a new one. + return nil, errors.Errorf("subscription closed with error %v", sub.Err()) + } + + if req.Tx.Version > s.Version { + if err := a.callRefute(ctx, req); IsTxFailedError(err) { + a.log.Warn("Calling refute failed, waiting for event anyways...") + } else if err != nil { + return nil, errors.WithMessage(err, "calling refute") + } + continue // wait for next event + } + return s, nil // version matches, we're done + } +} + +// SubscribeRegistered returns a new subscription to registered events. +func (a *Adjudicator) SubscribeRegistered(ctx context.Context, params *channel.Params) (channel.RegisteredSubscription, error) { + stored := make(chan *adjudicator.AdjudicatorStored) + sub, iter, err := a.filterWatchStored(ctx, stored, params) + if err != nil { + return nil, errors.WithMessage(err, "filter/watch Stored event") + } + + // find past event, if any + var ev *adjudicator.AdjudicatorStored + for iter.Next() { + ev = iter.Event // fast-forward to newest event + } + iter.Close() + if err := iter.Error(); err != nil { + return nil, errors.Wrap(err, "event iterator error") + } + + // if the subscription already caught an event, use it as a past event, if newer + select { + case ev2 := <-stored: + if ev2 != nil && (ev == nil || ev2.Version > ev.Version) { + ev = ev2 + } + default: + } + + return &RegisteredSub{ + sub: sub, + stored: stored, + pastStored: ev, + }, nil +} + +// filterWatchStored sets up a filter and a subscription on Stored events. +func (a *Adjudicator) filterWatchStored(ctx context.Context, stored chan *adjudicator.AdjudicatorStored, params *channel.Params) (sub event.Subscription, iter *adjudicator.AdjudicatorStoredIterator, err error) { + defer func() { + if err != nil && sub != nil { + sub.Unsubscribe() + } + }() + // Watch new events + watchOpts, err := a.newWatchOpts(ctx) + if err != nil { + return nil, nil, errors.WithMessage(err, "creating watchopts") + } + sub, err = a.contract.WatchStored(watchOpts, stored, []channel.ID{params.ID()}) + if err != nil { + return nil, nil, errors.Wrapf(err, "watching stored events") + } + + // Filter old Events + filterOpts, err := a.newFilterOpts(ctx) + if err != nil { + return nil, nil, errors.WithMessage(err, "creating filter opts") + } + iter, err = a.contract.FilterStored(filterOpts, []channel.ID{params.ID()}) + if err != nil { + return nil, nil, errors.Wrap(err, "filtering stored events") + } + + return sub, iter, nil +} + +// RegisteredSub implements the channel.RegisteredSubscription interface. +type RegisteredSub struct { + sub event.Subscription + stored chan *adjudicator.AdjudicatorStored + pastStored *adjudicator.AdjudicatorStored // if there was any + err error // error from subscription + errMu sync.Mutex // guards err and sub.Err() access +} + +// hasPast returns whether there was a past event when the subscription was set +// up. +func (r *RegisteredSub) hasPast() bool { + return r.pastStored != nil +} + +// Next returns the newest past or next blockchain event. +// It blocks until an event is returned from the blockchain or the subscription +// is closed. If the subscription is closed, Next immediately returns nil. +// If there was a past event when the subscription was set up, the first call to +// Next will return it. +func (r *RegisteredSub) Next() *channel.Registered { + if r.pastStored != nil { + s := r.pastStored + r.pastStored = nil + return storedToRegisteredEvent(s) + } + + r.errMu.Lock() + defer r.errMu.Unlock() + + select { + case stored := <-r.stored: + return storedToRegisteredEvent(stored) + case err := <-r.sub.Err(): + r.updateErr(errors.Wrap(err, "event subscription")) + return nil + } +} + +// Close closes this subscription. Any pending calls to Next will return nil. +func (r *RegisteredSub) Close() error { + r.sub.Unsubscribe() + close(r.stored) + return r.Err() +} + +// Err returns the error of the event subscription. +func (r *RegisteredSub) Err() error { + r.errMu.Lock() + defer r.errMu.Unlock() + return r.updateErr(errors.Wrap(<-r.sub.Err(), "event subscription")) +} + +func (r *RegisteredSub) updateErr(err error) error { + if err != nil { + r.err = err + } + return r.err +} + +func storedToRegisteredEvent(event *adjudicator.AdjudicatorStored) *channel.Registered { + if event == nil { + return nil + } + return &channel.Registered{ + ID: event.ChannelID, + Version: event.Version, + Timeout: time.Unix(int64(event.Timeout), 0), + } +} diff --git a/backend/ethereum/channel/register_test.go b/backend/ethereum/channel/register_test.go new file mode 100644 index 00000000..6a78fbc3 --- /dev/null +++ b/backend/ethereum/channel/register_test.go @@ -0,0 +1,180 @@ +// Copyright (c) 2020 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel // import "perun.network/go-perun/backend/ethereum/channel" + +import ( + "context" + "math/big" + "math/rand" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "perun.network/go-perun/channel" + channeltest "perun.network/go-perun/channel/test" +) + +func TestAdjudicator_MultipleRegisters(t *testing.T) { + t.Run("Register 1 party parallel", func(t *testing.T) { registerMultipleConcurrent(t, 1, true) }) + t.Run("Register 2 party parallel", func(t *testing.T) { registerMultipleConcurrent(t, 2, true) }) + t.Run("Register 5 party parallel", func(t *testing.T) { registerMultipleConcurrent(t, 5, true) }) + t.Run("Register 10 party parallel", func(t *testing.T) { registerMultipleConcurrent(t, 10, true) }) + t.Run("Register 1 party sequential", func(t *testing.T) { registerMultipleConcurrent(t, 1, false) }) + t.Run("Register 2 party sequential", func(t *testing.T) { registerMultipleConcurrent(t, 2, false) }) + t.Run("Register 5 party sequential", func(t *testing.T) { registerMultipleConcurrent(t, 5, false) }) +} + +func registerMultipleConcurrent(t *testing.T, numParts int, parallel bool) { + seed := time.Now().UnixNano() + t.Logf("seed is %v", seed) + if parallel { + seed++ + } + rng := rand.New(rand.NewSource(int64(seed))) + // create new Adjudicators + accs, parts, funders, adjs, asset := newAdjudicator(t, rng, numParts) + // create valid state and params + app := channeltest.NewRandomApp(rng) + params := channel.NewParamsUnsafe(uint64(100*time.Second), parts, app.Def(), big.NewInt(rng.Int63())) + state := newValidState(rng, params, asset) + // we need to properly fund the channel + fundingCtx, funCancel := context.WithTimeout(context.Background(), timeout) + defer funCancel() + // fund the contract + var wgFund sync.WaitGroup + wgFund.Add(numParts) + for i, funder := range funders { + sleepTime := time.Duration(rng.Int63n(10) + 1) + go func(i int, funder *Funder) { + defer wgFund.Done() + time.Sleep(sleepTime * time.Millisecond) + req := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(i), + } + require.NoError(t, funders[i].Fund(fundingCtx, req), "funding should succeed") + }(i, funder) + } + wgFund.Wait() + + // Now test the register function + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + var wg sync.WaitGroup + startBarrier := make(chan struct{}) + if parallel { + wg.Add(numParts) + } + for i := 0; i < numParts; i++ { + sleepDuration := time.Duration(rng.Int63n(10)+1) * time.Millisecond + // manipulate the state + state.Version = uint64(int(state.Version) + i) + tx := signState(t, accs, params, state) + reg := func(i int, tx channel.Transaction) { + if parallel { + defer wg.Done() + <-startBarrier + time.Sleep(sleepDuration) + } + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[i], + Idx: channel.Index(i), + Tx: tx, + } + event, err := adjs[i].Register(ctx, req) + assert.NoError(t, err, "Registering should succeed") + assert.NotEqual(t, event, &channel.Registered{}, "registering should return valid event") + t.Logf("Peer[%d] registered successful", i) + } + if parallel { + go reg(i, tx) + } else { + reg(i, tx) + } + } + if parallel { + close(startBarrier) + wg.Wait() + } +} + +func TestRegister_FinalState(t *testing.T) { + seed := time.Now().UnixNano() + t.Logf("seed is %v", seed) + rng := rand.New(rand.NewSource(int64(seed))) + // create new Adjudicator + accs, parts, funders, adjs, asset := newAdjudicator(t, rng, 1) + // create valid state and params + app := channeltest.NewRandomApp(rng) + params := channel.NewParamsUnsafe(uint64(100*time.Second), parts, app.Def(), big.NewInt(rng.Int63())) + state := newValidState(rng, params, asset) + state.IsFinal = true + // we need to properly fund the channel + fundingCtx, funCancel := context.WithTimeout(context.Background(), timeout) + defer funCancel() + // fund the contract + reqFund := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(0), + } + require.NoError(t, funders[0].Fund(fundingCtx, reqFund), "funding should succeed") + // Now test the register function + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + tx := signState(t, accs, params, state) + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[0], + Idx: channel.Index(0), + Tx: tx, + } + event, err := adjs[0].Register(ctx, req) + assert.NoError(t, err, "Registering final state should succeed") + assert.NotEqual(t, event, &channel.Registered{}, "registering should return valid event") + assert.Equal(t, time.Time{}, event.Timeout, "Registering final state should produce zero timeout") + t.Logf("Peer[%d] registered successful", 0) +} + +func TestRegister_CancelledContext(t *testing.T) { + seed := time.Now().UnixNano() + t.Logf("seed is %v", seed) + rng := rand.New(rand.NewSource(int64(seed))) + // create new Adjudicator + accs, parts, funders, adjs, asset := newAdjudicator(t, rng, 1) + // create valid state and params + app := channeltest.NewRandomApp(rng) + params := channel.NewParamsUnsafe(uint64(100*time.Second), parts, app.Def(), big.NewInt(rng.Int63())) + state := newValidState(rng, params, asset) + // we need to properly fund the channel + fundingCtx, funCancel := context.WithTimeout(context.Background(), timeout) + defer funCancel() + // fund the contract + reqFund := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(0), + } + require.NoError(t, funders[0].Fund(fundingCtx, reqFund), "funding should succeed") + // Now test the register function + ctx, cancel := context.WithTimeout(context.Background(), timeout) + // directly cancel timeout + cancel() + tx := signState(t, accs, params, state) + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[0], + Idx: channel.Index(0), + Tx: tx, + } + event, err := adjs[0].Register(ctx, req) + assert.Error(t, err, "Registering with canceled context should error") + assert.Nil(t, event, "should not produce valid event") +} diff --git a/backend/ethereum/channel/withdraw.go b/backend/ethereum/channel/withdraw.go new file mode 100644 index 00000000..a3726b5c --- /dev/null +++ b/backend/ethereum/channel/withdraw.go @@ -0,0 +1,174 @@ +// Copyright (c) 2020 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel + +import ( + "context" + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/pkg/errors" + "golang.org/x/sync/errgroup" + + "perun.network/go-perun/backend/ethereum/bindings/assets" + "perun.network/go-perun/backend/ethereum/wallet" + "perun.network/go-perun/channel" + "perun.network/go-perun/log" +) + +// Withdraw ensures that a channel has been concluded and the final outcome +// withdrawn from the asset holders. +func (a *Adjudicator) Withdraw(ctx context.Context, req channel.AdjudicatorReq) error { + if err := a.ensureConcluded(ctx, req); err != nil { + return errors.WithMessage(err, "ensure Concluded") + } + + return errors.WithMessage(a.ensureWithdrawn(ctx, req), "ensure Withdrawn") +} + +func (a *Adjudicator) ensureWithdrawn(ctx context.Context, request channel.AdjudicatorReq) error { + assets := request.Tx.Allocation.Assets + + g, ctx := errgroup.WithContext(ctx) + for index, asset := range assets { + g.Go(func() error { + contract, err := connectToAssetHolder(a.ContractBackend, asset, index) + if err != nil { + return errors.WithMessage(err, "connecting asset holder") + } + + if err := a.callAssetWithdraw(ctx, request, contract); err != nil { + return errors.Wrap(err, "withdrawing assets failed") + } + return a.waitForWithdrawnEvent(ctx, request, contract) + }) + } + return g.Wait() +} + +func connectToAssetHolder(backend ContractBackend, asset channel.Asset, assetIndex int) (assetHolder, error) { + // Decode and set the asset address. + assetAddr := asset.(*Asset).Address + ctr, err := assets.NewAssetHolder(assetAddr, backend) + if err != nil { + return assetHolder{}, errors.Wrap(err, "connecting to assetholder") + } + return assetHolder{ctr, &assetAddr, assetIndex}, nil +} + +func (a *Adjudicator) waitForWithdrawnEvent(ctx context.Context, request channel.AdjudicatorReq, asset assetHolder) error { + withdrawn := make(chan *assets.AssetHolderWithdrawn) + participant := request.Params.Parts[request.Idx].(*wallet.Address).Address + // Watch new events + watchOpts, err := a.newWatchOpts(ctx) + if err != nil { + return errors.WithMessage(err, "error creating watchopts") + } + sub, err := asset.WatchWithdrawn(watchOpts, withdrawn, []common.Address{participant}) + if err != nil { + return errors.Wrapf(err, "WatchWithdrawn on asset %d failed", asset.assetIndex) + } + defer sub.Unsubscribe() + + // we let the filter queries and all subscription errors write into this error + // channel. + errChan := make(chan error, 1) + go func() { + errChan <- errors.Wrapf(<-sub.Err(), "subscription for asset %d", asset.assetIndex) + }() + + // Query old events + go func() { + // Setup filter + filterOpts, err := a.newFilterOpts(ctx) + if err != nil { + errChan <- err + } + iter, err := asset.FilterWithdrawn(filterOpts, []common.Address{participant}) + if err != nil { + errChan <- errors.WithStack(err) + } + if iter.Next() { + withdrawn <- iter.Event + } + // No event found, just return normally + }() + + select { + case event := <-withdrawn: + log.Debugf("peer[%d] has successfully withdrawn %v", request.Idx, event.Amount) + return nil + case <-ctx.Done(): + errors.New("Timed out while withdrawing") + case err := <-errChan: + return err + } + return nil +} + +func (a *Adjudicator) callAssetWithdraw(ctx context.Context, request channel.AdjudicatorReq, asset assetHolder) error { + auth, sig, err := a.newWithdrawalAuth(request, asset) + if err != nil { + return errors.WithMessage(err, "creating withdrawal auth") + } + tx, err := func() (*types.Transaction, error) { + if !a.mu.TryLockCtx(ctx) { + return nil, errors.Wrap(ctx.Err(), "context canceled while acquiring tx lock") + } + defer a.mu.Unlock() + trans, err := a.newTransactor(ctx, big.NewInt(0), GasLimit) + if err != nil { + return nil, errors.WithMessagef(err, "creating transactor for asset %d", asset.assetIndex) + } + + tx, err := asset.Withdraw(trans, auth, sig) + if err != nil { + return nil, errors.Wrapf(err, "withdrawing asset %d", asset.assetIndex) + } + log.Debugf("Sent transaction %v", tx.Hash().Hex()) + return tx, nil + }() + if err != nil { + return err + } + + return errors.WithMessage(confirmTransaction(ctx, a.ContractBackend, tx), "mining transaction") +} + +func (a *Adjudicator) newWithdrawalAuth(request channel.AdjudicatorReq, asset assetHolder) (assets.AssetHolderWithdrawalAuth, []byte, error) { + auth := assets.AssetHolderWithdrawalAuth{ + ChannelID: request.Params.ID(), + Participant: request.Acc.Address().(*wallet.Address).Address, + Receiver: a.Receiver, + Amount: request.Tx.Allocation.OfParts[request.Idx][asset.assetIndex], + } + enc, err := encodeAssetHolderWithdrawalAuth(auth) + if err != nil { + return assets.AssetHolderWithdrawalAuth{}, nil, errors.WithMessage(err, "encoding withdrawal auth") + } + + sig, err := request.Acc.SignData(enc) + return auth, sig, errors.WithMessage(err, "sign data") +} + +func encodeAssetHolderWithdrawalAuth(auth assets.AssetHolderWithdrawalAuth) ([]byte, error) { + // encodeAssetHolderWithdrawalAuth encodes the AssetHolderWithdrawalAuth as with abi.encode() in the smart contracts. + args := abi.Arguments{ + {Type: abiBytes32}, + {Type: abiAddress}, + {Type: abiAddress}, + {Type: abiUint256}, + } + enc, err := args.Pack( + auth.ChannelID, + auth.Participant, + auth.Receiver, + auth.Amount, + ) + return enc, errors.WithStack(err) +} diff --git a/backend/ethereum/channel/withdraw_test.go b/backend/ethereum/channel/withdraw_test.go new file mode 100644 index 00000000..81484a2b --- /dev/null +++ b/backend/ethereum/channel/withdraw_test.go @@ -0,0 +1,160 @@ +// Copyright (c) 2019 Chair of Applied Cryptography, Technische Universität +// Darmstadt, Germany. All rights reserved. This file is part of go-perun. Use +// of this source code is governed by a MIT-style license that can be found in +// the LICENSE file. + +package channel + +import ( + "context" + "math/big" + "math/rand" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "perun.network/go-perun/channel" + channeltest "perun.network/go-perun/channel/test" +) + +func TestAdjudicator_MultipleWithdraws_FinalState(t *testing.T) { + t.Run("Withdraw 1 party parallel", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 1, true) }) + t.Run("Withdraw 2 party parallel", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 2, true) }) + t.Run("Withdraw 5 party parallel", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 5, true) }) + t.Run("Withdraw 10 party parallel", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 10, true) }) + t.Run("Withdraw 1 party sequential", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 1, false) }) + t.Run("Withdraw 2 party sequential", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 2, false) }) + t.Run("Withdraw 5 party sequential", func(t *testing.T) { withdrawMultipleConcurrentFinal(t, 5, false) }) +} + +func withdrawMultipleConcurrentFinal(t *testing.T, numParts int, parallel bool) { + seed := time.Now().UnixNano() + t.Logf("seed is %v", seed) + if parallel { + seed++ + } + rng := rand.New(rand.NewSource(int64(seed))) + // create new Adjudicators + accs, parts, funders, adjs, asset := newAdjudicator(t, rng, numParts) + // create valid state and params + app := channeltest.NewRandomApp(rng) + params := channel.NewParamsUnsafe(uint64(0), parts, app.Def(), big.NewInt(rng.Int63())) + state := newValidState(rng, params, asset) + // we need to properly fund the channel + fundingCtx, funCancel := context.WithTimeout(context.Background(), timeout) + defer funCancel() + // fund the contract + var wg sync.WaitGroup + wg.Add(numParts) + for i, funder := range funders { + sleepTime := time.Duration(rng.Int63n(10) + 1) + go func(i int, funder *Funder) { + defer wg.Done() + time.Sleep(sleepTime * time.Millisecond) + req := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(i), + } + require.NoError(t, funders[i].Fund(fundingCtx, req), "funding should succeed") + }(i, funder) + } + wg.Wait() + // manipulate the state + state.IsFinal = true + tx := signState(t, accs, params, state) + + // Now test the withdraw function + ctx, cancel := context.WithTimeout(context.Background(), timeout) + defer cancel() + if parallel { + startBarrier := make(chan struct{}) + var wg sync.WaitGroup + wg.Add(numParts) + for i := 0; i < numParts; i++ { + sleepDuration := time.Duration(rng.Int63n(10)+1) * time.Millisecond + go func(i int) { + defer wg.Done() + <-startBarrier + time.Sleep(sleepDuration) + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[i], + Idx: channel.Index(i), + Tx: tx, + } + err := adjs[i].Withdraw(ctx, req) + assert.NoError(t, err, "Withdrawing should succeed") + }(i) + } + close(startBarrier) + wg.Wait() + } else { + for i := 0; i < numParts; i++ { + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[i], + Idx: channel.Index(i), + Tx: tx, + } + err := adjs[i].Withdraw(ctx, req) + assert.NoError(t, err, "Withdrawing should succeed") + } + } + assertHoldingsZero(ctx, t, funders, params, state) +} + +func TestWithdrawNonFinalState(t *testing.T) { + seed := time.Now().UnixNano() + t.Logf("seed is %v", seed) + rng := rand.New(rand.NewSource(int64(seed))) + // create new Adjudicators + accs, parts, funders, adjs, asset := newAdjudicator(t, rng, 1) + // create valid state and params + app := channeltest.NewRandomApp(rng) + params := channel.NewParamsUnsafe(uint64(0), parts, app.Def(), big.NewInt(rng.Int63())) + state := newValidState(rng, params, asset) + // we need to properly fund the channel + fundingCtx, funCancel := context.WithTimeout(context.Background(), timeout) + defer funCancel() + // fund the contract + fundingReq := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(0), + } + require.NoError(t, funders[0].Fund(fundingCtx, fundingReq), "funding should succeed") + // try to withdraw non-final state + tx := signState(t, accs, params, state) + ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + defer cancel() + req := channel.AdjudicatorReq{ + Params: params, + Acc: accs[0], + Idx: channel.Index(0), + Tx: tx, + } + err := adjs[0].Withdraw(ctx, req) + assert.Error(t, err, "Withdrawing non-final state should fail") +} + +func assertHoldingsZero(ctx context.Context, t *testing.T, funders []*Funder, params *channel.Params, state *channel.State) { + for i, funder := range funders { + req := channel.FundingReq{ + Params: params, + Allocation: &state.Allocation, + Idx: channel.Index(i), + } + alloc, err := getOnChainAllocation(ctx, funder, req) + assert.NoError(t, err, "Getting on-chain allocs should succeed") + sum := big.NewInt(0) + for x := range alloc { + for y := range alloc[x] { + sum = sum.Add(sum, alloc[x][y]) + } + } + assert.Equal(t, big.NewInt(0), sum, "Holdings should be set to zero after withdraw") + } +} diff --git a/backend/ethereum/contracts b/backend/ethereum/contracts index ff834391..c1687468 160000 --- a/backend/ethereum/contracts +++ b/backend/ethereum/contracts @@ -1 +1 @@ -Subproject commit ff834391c8d13998db199c2eab0147f92bf9bbdf +Subproject commit c168746899ebb858d661154df72fa4f06a345928 diff --git a/backend/ethereum/init.go b/backend/ethereum/init.go index 702494af..b632dda0 100644 --- a/backend/ethereum/init.go +++ b/backend/ethereum/init.go @@ -3,7 +3,7 @@ // of this source code is governed by a MIT-style license that can be found in // the LICENSE file. -package channel // import "perun.network/go-perun/backend/ethereum" +package ethereum // import "perun.network/go-perun/backend/ethereum" import ( _ "perun.network/go-perun/backend/ethereum/channel" // backend init diff --git a/go.mod b/go.mod index 151840e7..a3725383 100644 --- a/go.mod +++ b/go.mod @@ -10,18 +10,12 @@ require ( github.com/deckarep/golang-set v1.7.1 // indirect github.com/edsrzf/mmap-go v1.0.0 // indirect github.com/elastic/gosigar v0.10.4 // indirect - github.com/ethereum/go-ethereum v1.9.0 + github.com/ethereum/go-ethereum v1.9.10 github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect - github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/hashicorp/golang-lru v0.5.3 // indirect github.com/huin/goupnp v1.0.0 // indirect - github.com/jackpal/go-nat-pmp v1.0.1 // indirect - github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 // indirect - github.com/kr/pretty v0.1.0 // indirect github.com/mattn/go-colorable v0.1.4 // indirect github.com/mattn/go-isatty v0.0.10 // indirect - github.com/mattn/go-runewidth v0.0.4 // indirect - github.com/olekukonko/tablewriter v0.0.1 // indirect github.com/pborman/uuid v1.2.0 // indirect github.com/pkg/errors v0.8.1 github.com/prometheus/tsdb v0.10.0 // indirect @@ -29,14 +23,10 @@ require ( github.com/rs/cors v1.7.0 // indirect github.com/sirupsen/logrus v1.4.2 github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect - github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 // indirect - github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect github.com/stretchr/testify v1.4.0 - github.com/syndtr/goleveldb v1.0.0 + github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d github.com/tyler-smith/go-bip39 v1.0.2 // indirect - github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 // indirect golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190709231704-1e4459ed25ff // indirect - gopkg.in/urfave/cli.v1 v1.20.0 // indirect ) diff --git a/go.sum b/go.sum index b2253591..407f8ef9 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,35 @@ +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.5.3 h1:2odJnXLbFZcoV9KYtQ+7TH1UOq3dn3AssMgieaezkR4= +github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/aristanetworks/goarista v0.0.0-20190704150520-f44d68189fd7 h1:fKnuvQ/O22ZpD7HaJjGQXn/GxOdDJOQFL8bpM8Xe3X8= github.com/aristanetworks/goarista v0.0.0-20190704150520-f44d68189fd7/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8 h1:mOg8/RgDSHTQ1R0IR+LMDuW4TDShPv+JzYHuR4GLoNA= github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= @@ -17,24 +39,40 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/elastic/gosigar v0.10.4 h1:6jfw75dsoflhBMRdO6QPzQUgLqUYTsQQQRkkcsHsuPo= github.com/elastic/gosigar v0.10.4/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/ethereum/go-ethereum v1.9.0 h1:9Kaf7UfDkV3aIUJlf14hI/GgEgRAUq60u4fBlb9dLWw= github.com/ethereum/go-ethereum v1.9.0/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY= github.com/ethereum/go-ethereum v1.9.7 h1:p4O+z0MGzB7xxngHbplcYNloxkFwGkeComhkzWnq0ig= +github.com/ethereum/go-ethereum v1.9.10 h1:jooX7tWcscpC7ytufk73t9JMCeJQ7aJF2YmZJQEuvFo= +github.com/ethereum/go-ethereum v1.9.10/go.mod h1:lXHkVo/MTvsEXfYsmNzelZ8R1e0DTvdk/wMZJIRpaRw= +github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= @@ -43,6 +81,7 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -50,24 +89,37 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c h1:zqAKixg3cTcIasAMJV+EcfVbWwLpOZ7LeoWJvcuD/5Q= +github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989 h1:giknQ4mEuDFmmHSrGcbargOuLHQGtywqo4mheITex54= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= github.com/huin/goupnp v1.0.0 h1:wg75sLpL6DZqwHQN6E1Cfk6mtfzS45z8OV+ic+DtHRo= github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= github.com/jackpal/go-nat-pmp v1.0.1 h1:i0LektDkO1QlrTm/cSuP+PyBCDnYvjPLGl4LdWEMiaA= github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= @@ -79,27 +131,40 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10 h1:qxFzApOv4WsAL965uUPIsXzAKCZxN2p9UqdhFS4ZW10= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.1 h1:b3iUnf1v+ppJiOfNX4yxxqfWKMQPZR5yoh8urCTFX88= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c h1:1RHs3tNxjXGHeul8z2t6H2N2TlAqpKe5yryJztRx4Jk= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -109,19 +174,29 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= +github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= +github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 h1:ju5UTwk5Odtm4trrY+4Ca4RMj5OyXbmVeDAVad2T0Jw= github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= @@ -138,8 +213,12 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -152,31 +231,43 @@ golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190709231704-1e4459ed25ff h1:uuol9OUzSvZntY1v963NAbVd7A+PHLMz1FlCe3Lorcs= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190709231704-1e4459ed25ff/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= @@ -185,3 +276,4 @@ gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=