From 403df7a1e795341e46e062fb0868431ae50bc96f Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Tue, 5 Mar 2024 09:41:31 +0100 Subject: [PATCH 1/7] add command to add safe contracts to genesis --- cmd/exrpd/cmd/contracts.go | 167 ++++++++++++++++++++++ cmd/exrpd/cmd/gencontracts.go | 254 ++++++++++++++++++++++++++++++++++ cmd/exrpd/cmd/root.go | 11 +- 3 files changed, 428 insertions(+), 4 deletions(-) create mode 100644 cmd/exrpd/cmd/contracts.go create mode 100644 cmd/exrpd/cmd/gencontracts.go diff --git a/cmd/exrpd/cmd/contracts.go b/cmd/exrpd/cmd/contracts.go new file mode 100644 index 0000000..ff0d3d5 --- /dev/null +++ b/cmd/exrpd/cmd/contracts.go @@ -0,0 +1,167 @@ +package cmd + +import ( + "encoding/hex" + "strconv" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + evmtypes "github.com/evmos/evmos/v15/x/evm/types" +) + +const witnessInitCoins = "10000000000000000000000" + BaseDenom +const safeInitCoins = "10000000000000000000000000000000000" + BaseDenom +const safeContractName = "SafeProxyImplementation" +const fallbackHandlerAddress = "f48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4" +const safeMasterAddress = "3E5c63644E683549055b9Be8653de26E0B4CD36E" + +type GenesisContract struct { + name string + address string + bytecode string + memory evmtypes.Storage +} + +func getGenesisContracts(witnesses []string, threshold int64) ([]GenesisContract, error) { + // TODO: Remove (Testing) + if len(witnesses) == 1 { + return append([]GenesisContract{}, GenesisContract{ + name: "Pizza", + address: "d9145CCE52D386f254917e481eB44e9943F39138", + bytecode: "608060405234801561000f575f80fd5b506004361061003f575f3560e01c80630832958514610043578063c0da1e681461004d578063f8e19b8a1461006c575b5f80fd5b61004b610088565b005b6100556100c9565b604051610063929190610228565b60405180910390f35b610086600480360381019061008191906102bf565b61016d565b005b5f8081819054906101000a900460030b809291906100a590610337565b91906101000a81548163ffffffff021916908360030b63ffffffff16021790555050565b5f60605f8054906101000a900460030b60018080546100e79061038f565b80601f01602080910402602001604051908101604052809291908181526020018280546101139061038f565b801561015e5780601f106101355761010080835404028352916020019161015e565b820191905f5260205f20905b81548152906001019060200180831161014157829003601f168201915b50505050509050915091509091565b81816001918261017e92919061059c565b505050565b5f8160030b9050919050565b61019881610183565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156101d55780820151818401526020810190506101ba565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6101fa8261019e565b61020481856101a8565b93506102148185602086016101b8565b61021d816101e0565b840191505092915050565b5f60408201905061023b5f83018561018f565b818103602083015261024d81846101f0565b90509392505050565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261027f5761027e61025e565b5b8235905067ffffffffffffffff81111561029c5761029b610262565b5b6020830191508360018202830111156102b8576102b7610266565b5b9250929050565b5f80602083850312156102d5576102d4610256565b5b5f83013567ffffffffffffffff8111156102f2576102f161025a565b5b6102fe8582860161026a565b92509250509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61034182610183565b9150637fffffff82036103575761035661030a565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806103a657607f821691505b6020821081036103b9576103b8610362565b5b50919050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026104527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610417565b61045c8683610417565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6104a061049b61049684610474565b61047d565b610474565b9050919050565b5f819050919050565b6104b983610486565b6104cd6104c5826104a7565b848454610423565b825550505050565b5f90565b6104e16104d5565b6104ec8184846104b0565b505050565b5b8181101561050f576105045f826104d9565b6001810190506104f2565b5050565b601f82111561055457610525816103f6565b61052e84610408565b8101602085101561053d578190505b61055161054985610408565b8301826104f1565b50505b505050565b5f82821c905092915050565b5f6105745f1984600802610559565b1980831691505092915050565b5f61058c8383610565565b9150826002028217905092915050565b6105a683836103bf565b67ffffffffffffffff8111156105bf576105be6103c9565b5b6105c9825461038f565b6105d4828285610513565b5f601f831160018114610601575f84156105ef578287013590505b6105f98582610581565b865550610660565b601f19841661060f866103f6565b5f5b8281101561063657848901358255600182019150602085019450602081019050610611565b86831015610653578489013561064f601f891682610565565b8355505b6001600288020188555050505b5050505050505056fea26469706673582212203ababc2b608421fc0c59f25da283abcd26bf317a5e7603e8aba6004af5a1875e64736f6c63430008180033", + memory: evmtypes.Storage{}, + }), nil + } + + // Build safe storage + safeStorage := evmtypes.Storage{ + evmtypes.State{ + Key: "0x" + padZeroes("0"), + Value: "0x" + padZeroes(safeMasterAddress), + }, + } + modulesStorage, err := buildSentinel([]string{}, padZeroes("1")) + if err != nil { + return nil, err + } + safeStorage = append(safeStorage, modulesStorage...) + witnessesStorage, err := buildSentinel(witnesses, padZeroes("2")) + if err != nil { + return nil, err + } + safeStorage = append(safeStorage, witnessesStorage...) + safeStorage = append(safeStorage, evmtypes.State{ + Key: "0x" + padZeroes("3"), + Value: "0x" + padZeroes(strconv.FormatInt(int64(len(witnesses)), 16)), + }) + safeStorage = append(safeStorage, evmtypes.State{ + Key: "0x" + padZeroes("4"), + Value: "0x" + padZeroes(strconv.FormatInt(threshold, 16)), + }) + safeStorage = append(safeStorage, evmtypes.State{ + Key: "0x6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d5", + Value: "0x" + padZeroes(fallbackHandlerAddress), + }) + + return append([]GenesisContract{}, GenesisContract{ + name: "SimulateTxAccessor", + address: "59AD6735bCd8152B84860Cb256dD9e96b85F69Da", + bytecode: "608060405234801561001057600080fd5b506004361061002b5760003560e01c80631c5fb21114610030575b600080fd5b6100de6004803603608081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561008d57600080fd5b82018360208201111561009f57600080fd5b803590602001918460018302840111640100000000831117156100c157600080fd5b9091929391929390803560ff169060200190929190505050610169565b60405180848152602001831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561012c578082015181840152602081019050610111565b50505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008060607f00000000000000000000000059ad6735bcd8152b84860cb256dd9e96b85f69da73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610213576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806102e46039913960400191505060405180910390fd5b60005a9050610269898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050885a610297565b92505a8103935060405160203d0181016040523d81523d6000602083013e8092505050955095509592505050565b60006001808111156102a557fe5b8360018111156102b157fe5b14156102ca576000808551602087018986f490506102da565b600080855160208701888a87f190505b9594505050505056fe53696d756c61746554784163636573736f722073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca2646970667358221220405c212754c23731ee9658f3175dafa74dea363d2619aad9d5576f5a9d4982f764736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "GnosisSafeProxyFactory", + address: "a6B71E26C5e0845f74c812102Ca7114b6a896AB2", + bytecode: "608060405234801561001057600080fd5b50600436106100625760003560e01c80631688f0b9146100675780632500510e1461017657806353e5d9351461024357806361b69abd146102c6578063addacc0f146103cb578063d18af54d1461044e575b600080fd5b61014a6004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156100ba57600080fd5b8201836020820111156100cc57600080fd5b803590602001918460018302840111640100000000831117156100ee57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919050505061057d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102176004803603606081101561018c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156101c957600080fd5b8201836020820111156101db57600080fd5b803590602001918460018302840111640100000000831117156101fd57600080fd5b909192939192939080359060200190929190505050610624565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61024b610751565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028b578082015181840152602081019050610270565b50505050905090810190601f1680156102b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61039f600480360360408110156102dc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561031957600080fd5b82018360208201111561032b57600080fd5b8035906020019184600183028401116401000000008311171561034d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061077c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103d3610861565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104135780820151818401526020810190506103f8565b50505050905090810190601f1680156104405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105516004803603608081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104a157600080fd5b8201836020820111156104b357600080fd5b803590602001918460018302840111640100000000831117156104d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061088c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600061058a848484610a3b565b90506000835111156105b25760008060008551602087016000865af114156105b157600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358185604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a19392505050565b60006106758585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a3b565b905080604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107165780820151818401526020810190506106fb565b50505050905090810190601f1680156107435780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60606040518060200161076390610bde565b6020820181038252601f19601f82011660405250905090565b60008260405161078b90610bde565b808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f0801580156107c7573d6000803e3d6000fd5b5090506000825111156107f05760008060008451602086016000865af114156107ef57600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358184604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a192915050565b60606040518060200161087390610beb565b6020820181038252601f19601f82011660405250905090565b6000808383604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060001c90506108e786868361057d565b9150600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610a32578273ffffffffffffffffffffffffffffffffffffffff16631e52b518838888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156109ca5780820151818401526020810190506109af565b50505050905090810190601f1680156109f75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015610a1957600080fd5b505af1158015610a2d573d6000803e3d6000fd5b505050505b50949350505050565b6000808380519060200120836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050600060405180602001610a8890610bde565b6020820181038252601f19601f820116604052508673ffffffffffffffffffffffffffffffffffffffff166040516020018083805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040516020818303038152906040529050818151826020016000f59250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f437265617465322063616c6c206661696c65640000000000000000000000000081525060200191505060405180910390fd5b50509392505050565b6101e680610bf883390190565b60ab80610dde8339019056fe608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033a26469706673582212200c75fe2196b9f752c82794253f2ebce0d821afef5997e1d5a35ec316ce592f6664736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "DefaultCallbackHandler", + address: "1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd", + bytecode: "608060405234801561001057600080fd5b506004361061007c5760003560e01c8063a3f4df7e1161005b578063a3f4df7e14610312578063bc197c8114610395578063f23a6e611461052b578063ffa1ad741461062b5761007c565b806223de291461008157806301ffc9a7146101b9578063150b7a021461021c575b600080fd5b6101b7600480360360c081101561009757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561011e57600080fd5b82018360208201111561013057600080fd5b8035906020019184600183028401116401000000008311171561015257600080fd5b90919293919293908035906020019064010000000081111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460018302840111640100000000831117156101a757600080fd5b90919293919293905050506106ae565b005b610204600480360360208110156101cf57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106b8565b60405180821515815260200191505060405180910390f35b6102dd6004803603608081101561023257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561029957600080fd5b8201836020820111156102ab57600080fd5b803590602001918460018302840111640100000000831117156102cd57600080fd5b90919293919293905050506107f2565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61031a610807565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035a57808201518184015260208101905061033f565b50505050905090810190601f1680156103875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104f6600480360360a08110156103ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561040857600080fd5b82018360208201111561041a57600080fd5b8035906020019184602083028401116401000000008311171561043c57600080fd5b90919293919293908035906020019064010000000081111561045d57600080fd5b82018360208201111561046f57600080fd5b8035906020019184602083028401116401000000008311171561049157600080fd5b9091929391929390803590602001906401000000008111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460018302840111640100000000831117156104e657600080fd5b9091929391929390505050610840565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6105f6600480360360a081101561054157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105b257600080fd5b8201836020820111156105c457600080fd5b803590602001918460018302840111640100000000831117156105e657600080fd5b9091929391929390505050610858565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61063361086e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610673578082015181840152602081019050610658565b50505050905090810190601f1680156106a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b5050505050505050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061078357507f150b7a02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107eb57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600063150b7a0260e01b905095945050505050565b6040518060400160405280601881526020017f44656661756c742043616c6c6261636b2048616e646c6572000000000000000081525081565b600063bc197c8160e01b905098975050505050505050565b600063f23a6e6160e01b90509695505050505050565b6040518060400160405280600581526020017f312e302e300000000000000000000000000000000000000000000000000000008152508156fea26469706673582212200bbabd2b02039e0c6d17ac82e70232971fd892df99a0509daa50ef3d6edad0bc64736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "CompatibilityFallbackHandler", + address: fallbackHandlerAddress, + bytecode: "608060405234801561001057600080fd5b50600436106100ce5760003560e01c80636ac247841161008c578063bc197c8111610066578063bc197c81146107bb578063bd61951d14610951578063f23a6e6114610a63578063ffa1ad7414610b63576100ce565b80636ac24784146105ea578063a3f4df7e146106d9578063b2494df31461075c576100ce565b806223de29146100d357806301ffc9a71461020b5780630a1028c41461026e578063150b7a021461033d5780631626ba7e1461043357806320c13b0b146104e9575b600080fd5b610209600480360360c08110156100e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b9091929391929390803590602001906401000000008111156101c557600080fd5b8201836020820111156101d757600080fd5b803590602001918460018302840111640100000000831117156101f957600080fd5b9091929391929390505050610be6565b005b6102566004803603602081101561022157600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610bf0565b60405180821515815260200191505060405180910390f35b6103276004803603602081101561028457600080fd5b81019080803590602001906401000000008111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460018302840111640100000000831117156102d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610d2a565b6040518082815260200191505060405180910390f35b6103fe6004803603608081101561035357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156103ba57600080fd5b8201836020820111156103cc57600080fd5b803590602001918460018302840111640100000000831117156103ee57600080fd5b9091929391929390505050610d3d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104b46004803603604081101561044957600080fd5b81019080803590602001909291908035906020019064010000000081111561047057600080fd5b82018360208201111561048257600080fd5b803590602001918460018302840111640100000000831117156104a457600080fd5b9091929391929390505050610d52565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6105b5600480360360408110156104ff57600080fd5b810190808035906020019064010000000081111561051c57600080fd5b82018360208201111561052e57600080fd5b8035906020019184600183028401116401000000008311171561055057600080fd5b90919293919293908035906020019064010000000081111561057157600080fd5b82018360208201111561058357600080fd5b803590602001918460018302840111640100000000831117156105a557600080fd5b9091929391929390505050610f0a565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6106c36004803603604081101561060057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561063d57600080fd5b82018360208201111561064f57600080fd5b8035906020019184600183028401116401000000008311171561067157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061115b565b6040518082815260200191505060405180910390f35b6106e16112cd565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610721578082015181840152602081019050610706565b50505050905090810190601f16801561074e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610764611306565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107a757808201518184015260208101905061078c565b505050509050019250505060405180910390f35b61091c600480360360a08110156107d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561082e57600080fd5b82018360208201111561084057600080fd5b8035906020019184602083028401116401000000008311171561086257600080fd5b90919293919293908035906020019064010000000081111561088357600080fd5b82018360208201111561089557600080fd5b803590602001918460208302840111640100000000831117156108b757600080fd5b9091929391929390803590602001906401000000008111156108d857600080fd5b8201836020820111156108ea57600080fd5b8035906020019184600183028401116401000000008311171561090c57600080fd5b909192939192939050505061146d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6109e86004803603604081101561096757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156109a457600080fd5b8201836020820111156109b657600080fd5b803590602001918460018302840111640100000000831117156109d857600080fd5b9091929391929390505050611485565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a28578082015181840152602081019050610a0d565b50505050905090810190601f168015610a555780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b2e600480360360a0811015610a7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610aea57600080fd5b820183602082011115610afc57600080fd5b80359060200191846001830284011164010000000083111715610b1e57600080fd5b90919293919293905050506114ef565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b6b611505565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610bab578082015181840152602081019050610b90565b50505050905090810190601f168015610bd85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b5050505050505050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610cbb57507f150b7a02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610d2357507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000610d36338361115b565b9050919050565b600063150b7a0260e01b905095945050505050565b60008033905060008173ffffffffffffffffffffffffffffffffffffffff166320c13b0b876040516020018082815260200191505060405160208183030381529060405287876040518463ffffffff1660e01b8152600401808060200180602001838103835286818151815260200191508051906020019080838360005b83811015610deb578082015181840152602081019050610dd0565b50505050905090810190601f168015610e185780820380516001836020036101000a031916815260200191505b508381038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610e6357600080fd5b505afa158015610e77573d6000803e3d6000fd5b505050506040513d6020811015610e8d57600080fd5b810190808051906020019092919050505090506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610ef657600060e01b610eff565b631626ba7e60e01b5b925050509392505050565b6000803390506000610f608288888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061115b565b905060008585905014156110755760008273ffffffffffffffffffffffffffffffffffffffff16635ae6bd37836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fc157600080fd5b505afa158015610fd5573d6000803e3d6000fd5b505050506040513d6020811015610feb57600080fd5b81019080805190602001909291905050501415611070576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f48617368206e6f7420617070726f76656400000000000000000000000000000081525060200191505060405180910390fd5b611147565b8173ffffffffffffffffffffffffffffffffffffffff1663934f3a1182898989896040518663ffffffff1660e01b81526004018086815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060006040518083038186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050505b6320c13b0b60e01b92505050949350505050565b6000807f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca60001b83805190602001206040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050601960f81b600160f81b8573ffffffffffffffffffffffffffffffffffffffff1663f698da256040518163ffffffff1660e01b815260040160206040518083038186803b15801561120957600080fd5b505afa15801561121d573d6000803e3d6000fd5b505050506040513d602081101561123357600080fd5b81019080805190602001909291905050508360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040528051906020012091505092915050565b6040518060400160405280601881526020017f44656661756c742043616c6c6261636b2048616e646c6572000000000000000081525081565b6060600033905060008173ffffffffffffffffffffffffffffffffffffffff1663cc2f84526001600a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060408110156113be57600080fd5b81019080805160405193929190846401000000008211156113de57600080fd5b838201915060208201858111156113f457600080fd5b825186602082028301116401000000008211171561141157600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561144857808201518184015260208101905061142d565b5050505090500160405260200180519060200190929190505050509050809250505090565b600063bc197c8160e01b905098975050505050505050565b60606040517fb4faba09000000000000000000000000000000000000000000000000000000008152600436036004808301376020600036836000335af15060203d036040519250808301604052806020843e6000516114e657825160208401fd5b50509392505050565b600063f23a6e6160e01b90509695505050505050565b6040518060400160405280600581526020017f312e302e300000000000000000000000000000000000000000000000000000008152508156fea26469706673582212204251d58f2a197439239faafa82818b7696d25bb75655794a81cc773a0e39ed2b64736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "CreateCall", + address: "7cbB62EaA69F79e6873cD1ecB2392971036cFAa4", + bytecode: "608060405234801561001057600080fd5b50600436106100365760003560e01c80634847be6f1461003b5780634c8c9ea114610134575b600080fd5b6101086004803603606081101561005157600080fd5b81019080803590602001909291908035906020019064010000000081111561007857600080fd5b82018360208201111561008a57600080fd5b803590602001918460018302840111640100000000831117156100ac57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050610223565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f76004803603604081101561014a57600080fd5b81019080803590602001909291908035906020019064010000000081111561017157600080fd5b82018360208201111561018357600080fd5b803590602001918460018302840111640100000000831117156101a557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610327565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008183518460200186f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436f756c64206e6f74206465706c6f7920636f6e74726163740000000000000081525060200191505060405180910390fd5b7f4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b51181604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a19392505050565b600081516020830184f09050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436f756c64206e6f74206465706c6f7920636f6e74726163740000000000000081525060200191505060405180910390fd5b7f4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b51181604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a19291505056fea26469706673582212203aa87bc5f141a4ee0319caa1412f294b7a71e2ffc270a0cc5e506a8b320df24464736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "MultiSend", + address: "A238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761", + bytecode: "60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b6100dc6004803603602081101561003957600080fd5b810190808035906020019064010000000081111561005657600080fd5b82018360208201111561006857600080fd5b8035906020019184600183028401116401000000008311171561008a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506100de565b005b7f000000000000000000000000a238cbeb142c10ef7ad8442c6d1f9e89e07e776173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610183576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806102106030913960400191505060405180910390fd5b805160205b8181101561020a578083015160f81c6001820184015160601c6015830185015160358401860151605585018701600085600081146101cd57600181146101dd576101e8565b6000808585888a5af191506101e8565b6000808585895af491505b5060008114156101f757600080fd5b8260550187019650505050505050610188565b50505056fe4d756c746953656e642073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca26469706673582212205c784303626eec02b71940b551976170b500a8a36cc5adcbeb2c19751a76d05464736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "MultiSendCallOnly", + address: "40A2aCCbd92BCA938b02010E17A5b8929b49130D", + bytecode: "60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b6100dc6004803603602081101561003957600080fd5b810190808035906020019064010000000081111561005657600080fd5b82018360208201111561006857600080fd5b8035906020019184600183028401116401000000008311171561008a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506100de565b005b805160205b8181101561015f578083015160f81c6001820184015160601c60158301850151603584018601516055850187016000856000811461012857600181146101385761013d565b6000808585888a5af1915061013d565b600080fd5b50600081141561014c57600080fd5b82605501870196505050505050506100e3565b50505056fea264697066735822122035246402746c96964495cae5b36461fd44dfb89f8e6cf6f6b8d60c0aa89f414864736f6c63430007060033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "GnosisSafeL2", + address: safeMasterAddress, + bytecode: "6080604052600436106101dc5760003560e01c8063affed0e011610102578063e19a9dd911610095578063f08a032311610064578063f08a032314611647578063f698da2514611698578063f8dc5dd9146116c3578063ffa1ad741461173e57610231565b8063e19a9dd91461139b578063e318b52b146113ec578063e75235b81461147d578063e86637db146114a857610231565b8063cc2f8452116100d1578063cc2f8452146110e8578063d4d9bdcd146111b5578063d8d11f78146111f0578063e009cfde1461132a57610231565b8063affed0e014610d94578063b4faba0914610dbf578063b63e800d14610ea7578063c4ca3a9c1461101757610231565b80635624b25b1161017a5780636a761202116101495780636a761202146109945780637d83297414610b50578063934f3a1114610bbf578063a0e67e2b14610d2857610231565b80635624b25b146107fb5780635ae6bd37146108b9578063610b592514610908578063694e80c31461095957610231565b80632f54bf6e116101b65780632f54bf6e146104d35780633408e4701461053a578063468721a7146105655780635229073f1461067a57610231565b80630d582f131461029e57806312fb68e0146102f95780632d9ad53d1461046c57610231565b36610231573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d346040518082815260200191505060405180910390a2005b34801561023d57600080fd5b5060007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061027257600080f35b36600080373360601b365260008060143601600080855af13d6000803e80610299573d6000fd5b3d6000f35b3480156102aa57600080fd5b506102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117ce565b005b34801561030557600080fd5b5061046a6004803603608081101561031c57600080fd5b81019080803590602001909291908035906020019064010000000081111561034357600080fd5b82018360208201111561035557600080fd5b8035906020019184600183028401116401000000008311171561037757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103da57600080fd5b8201836020820111156103ec57600080fd5b8035906020019184600183028401116401000000008311171561040e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611bbe565b005b34801561047857600080fd5b506104bb6004803603602081101561048f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612440565b60405180821515815260200191505060405180910390f35b3480156104df57600080fd5b50610522600480360360208110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612512565b60405180821515815260200191505060405180910390f35b34801561054657600080fd5b5061054f6125e4565b6040518082815260200191505060405180910390f35b34801561057157600080fd5b506106626004803603608081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105cf57600080fd5b8201836020820111156105e157600080fd5b8035906020019184600183028401116401000000008311171561060357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506125f1565b60405180821515815260200191505060405180910390f35b34801561068657600080fd5b506107776004803603608081101561069d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156106e457600080fd5b8201836020820111156106f657600080fd5b8035906020019184600183028401116401000000008311171561071857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506126fc565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bf5780820151818401526020810190506107a4565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561080757600080fd5b5061083e6004803603604081101561081e57600080fd5b810190808035906020019092919080359060200190929190505050612732565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561087e578082015181840152602081019050610863565b50505050905090810190601f1680156108ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108c557600080fd5b506108f2600480360360208110156108dc57600080fd5b81019080803590602001909291905050506127b9565b6040518082815260200191505060405180910390f35b34801561091457600080fd5b506109576004803603602081101561092b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127d1565b005b34801561096557600080fd5b506109926004803603602081101561097c57600080fd5b8101908080359060200190929190505050612b63565b005b610b3860048036036101408110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109f257600080fd5b820183602082011115610a0457600080fd5b80359060200191846001830284011164010000000083111715610a2657600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610ab257600080fd5b820183602082011115610ac457600080fd5b80359060200191846001830284011164010000000083111715610ae657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612c9d565b60405180821515815260200191505060405180910390f35b348015610b5c57600080fd5b50610ba960048036036040811015610b7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612edc565b6040518082815260200191505060405180910390f35b348015610bcb57600080fd5b50610d2660048036036060811015610be257600080fd5b810190808035906020019092919080359060200190640100000000811115610c0957600080fd5b820183602082011115610c1b57600080fd5b80359060200191846001830284011164010000000083111715610c3d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610ca057600080fd5b820183602082011115610cb257600080fd5b80359060200191846001830284011164010000000083111715610cd457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612f01565b005b348015610d3457600080fd5b50610d3d612f90565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d80578082015181840152602081019050610d65565b505050509050019250505060405180910390f35b348015610da057600080fd5b50610da9613139565b6040518082815260200191505060405180910390f35b348015610dcb57600080fd5b50610ea560048036036040811015610de257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610e1f57600080fd5b820183602082011115610e3157600080fd5b80359060200191846001830284011164010000000083111715610e5357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061313f565b005b348015610eb357600080fd5b506110156004803603610100811015610ecb57600080fd5b8101908080359060200190640100000000811115610ee857600080fd5b820183602082011115610efa57600080fd5b80359060200191846020830284011164010000000083111715610f1c57600080fd5b909192939192939080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610f6757600080fd5b820183602082011115610f7957600080fd5b80359060200191846001830284011164010000000083111715610f9b57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613161565b005b34801561102357600080fd5b506110d26004803603608081101561103a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561108157600080fd5b82018360208201111561109357600080fd5b803590602001918460018302840111640100000000831117156110b557600080fd5b9091929391929390803560ff16906020019092919050505061331f565b6040518082815260200191505060405180910390f35b3480156110f457600080fd5b506111416004803603604081101561110b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613447565b60405180806020018373ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156111a0578082015181840152602081019050611185565b50505050905001935050505060405180910390f35b3480156111c157600080fd5b506111ee600480360360208110156111d857600080fd5b8101908080359060200190929190505050613639565b005b3480156111fc57600080fd5b50611314600480360361014081101561121457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561125b57600080fd5b82018360208201111561126d57600080fd5b8035906020019184600183028401116401000000008311171561128f57600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506137d8565b6040518082815260200191505060405180910390f35b34801561133657600080fd5b506113996004803603604081101561134d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613805565b005b3480156113a757600080fd5b506113ea600480360360208110156113be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b96565b005b3480156113f857600080fd5b5061147b6004803603606081101561140f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613c1a565b005b34801561148957600080fd5b5061149261428c565b6040518082815260200191505060405180910390f35b3480156114b457600080fd5b506115cc60048036036101408110156114cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561151357600080fd5b82018360208201111561152557600080fd5b8035906020019184600183028401116401000000008311171561154757600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614296565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561160c5780820151818401526020810190506115f1565b50505050905090810190601f1680156116395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561165357600080fd5b506116966004803603602081101561166a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061443e565b005b3480156116a457600080fd5b506116ad61449f565b6040518082815260200191505060405180910390f35b3480156116cf57600080fd5b5061173c600480360360608110156116e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061451d565b005b34801561174a57600080fd5b50611753614950565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611793578082015181840152602081019050611778565b50505050905090810190601f1680156117c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6117d6614989565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156118405750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561187857503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b6118ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600081548092919060010191905055507f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2682604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a18060045414611bba57611bb981612b63565b5b5050565b611bd2604182614a2c90919063ffffffff16565b82511015611c48576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808060008060005b8681101561243457611c648882614a66565b80945081955082965050505060008460ff16141561206d578260001c9450611c96604188614a2c90919063ffffffff16565b8260001c1015611d0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8751611d2760208460001c614a9590919063ffffffff16565b1115611d9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006020838a01015190508851611dd182611dc360208760001c614a9590919063ffffffff16565b614a9590919063ffffffff16565b1115611e45576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60606020848b010190506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b8d846040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611ee7578082015181840152602081019050611ecc565b50505050905090810190601f168015611f145780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611f4d578082015181840152602081019050611f32565b50505050905090810190601f168015611f7a5780820380516001836020036101000a031916815260200191505b5094505050505060206040518083038186803b158015611f9957600080fd5b505afa158015611fad573d6000803e3d6000fd5b505050506040513d6020811015611fc357600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612066576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b50506122b2565b60018460ff161415612181578260001c94508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061210a57506000600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c81526020019081526020016000205414155b61217c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6122b1565b601e8460ff1611156122495760018a60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012060048603858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612238573d6000803e3d6000fd5b5050506020604051035194506122b0565b60018a85858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156122a3573d6000803e3d6000fd5b5050506020604051035194505b5b5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161180156123795750600073ffffffffffffffffffffffffffffffffffffffff16600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156123b25750600173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b612424576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323600000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8495508080600101915050611c52565b50505050505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600173ffffffffffffffffffffffffffffffffffffffff161415801561250b5750600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156125dd5750600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000804690508091505090565b60007fb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e3386868686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183600181111561266b57fe5b8152602001828103825284818151815260200191508051906020019080838360005b838110156126a857808201518184015260208101905061268d565b50505050905090810190601f1680156126d55780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a16126f285858585614ab4565b9050949350505050565b6000606061270c868686866125f1565b915060405160203d0181016040523d81523d6000602083013e8091505094509492505050565b606060006020830267ffffffffffffffff8111801561275057600080fd5b506040519080825280601f01601f1916602001820160405280156127835781602001600182028036833780820191505090505b50905060005b838110156127ae57808501548060208302602085010152508080600101915050612789565b508091505092915050565b60076020528060005260406000206000915090505481565b6127d9614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156128435750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6128b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146129b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b612b6b614989565b600354811115612be3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001811015612c5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b806004819055507f610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c936004546040518082815260200191505060405180910390a150565b6000606060055433600454604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405160208183030381529060405290507f66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed8d8d8d8d8d8d8d8d8d8d8d8c604051808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001806020018a6001811115612d5057fe5b81526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200184810384528e8e82818152602001925080828437600081840152601f19601f820116905080830192505050848103835286818151815260200191508051906020019080838360005b83811015612e0a578082015181840152602081019050612def565b50505050905090810190601f168015612e375780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b83811015612e70578082015181840152602081019050612e55565b50505050905090810190601f168015612e9d5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390a1612eca8d8d8d8d8d8d8d8d8d8d8d614c9a565b9150509b9a5050505050505050505050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000600454905060008111612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b612f8a84848484611bbe565b50505050565b6060600060035467ffffffffffffffff81118015612fad57600080fd5b50604051908082528060200260200182016040528015612fdc5781602001602082028036833780820191505090505b50905060008060026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613130578083838151811061308757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508180600101925050613046565b82935050505090565b60055481565b600080825160208401855af4806000523d6020523d600060403e60403d016000fd5b6131ac8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050896151d7565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146131ea576131e9846156d7565b5b6132388787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050615706565b60008211156132525761325082600060018685615941565b505b3373ffffffffffffffffffffffffffffffffffffffff167f141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a88b8b8b8b8960405180806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281038252878782818152602001925060200280828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a250505050505050505050565b6000805a9050613376878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050865a615b47565b61337f57600080fd5b60005a8203905080604051602001808281526020019150506040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561340c5780820151818401526020810190506133f1565b50505050905090810190601f1680156134395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b606060008267ffffffffffffffff8111801561346257600080fd5b506040519080825280602002602001820160405280156134915781602001602082028036833780820191505090505b509150600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156135645750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561356f57508482105b1561362a578084838151811061358157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081806001019250506134fa565b80925081845250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561373b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330333000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16817ff2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c60405160405180910390a350565b60006137ed8c8c8c8c8c8c8c8c8c8c8c614296565b8051906020012090509b9a5050505050505050505050565b61380d614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156138775750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6138e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146139e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace405427681604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b613b9e614989565b60007f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b90508181557f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa282604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b613c22614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015613c8c5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015613cc457503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613d36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015613ea15750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b613f13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614013576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a17f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2681604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b6000600454905090565b606060007fbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d860001b8d8d8d8d60405180838380828437808301925050509250505060405180910390208c8c8c8c8c8c8c604051602001808c81526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a815260200189815260200188600181111561432757fe5b81526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019b505050505050505050505050604051602081830303815290604052805190602001209050601960f81b600160f81b6143b361449f565b8360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040529150509b9a5050505050505050505050565b614446614989565b61444f816156d7565b7f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b6144cd6125e4565b30604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405160208183030381529060405280519060200120905090565b614525614989565b8060016003540310156145a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561460a5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61467c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461477c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360008154809291906001900391905055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1806004541461494b5761494a81612b63565b5b505050565b6040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614a2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330333100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b565b600080831415614a3f5760009050614a60565b6000828402905082848281614a5057fe5b0414614a5b57600080fd5b809150505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b600080828401905083811015614aaa57600080fd5b8091505092915050565b6000600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015614b7f5750600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b614bf1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614bfe858585855a615b47565b90508015614c4e573373ffffffffffffffffffffffffffffffffffffffff167f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb860405160405180910390a2614c92565b3373ffffffffffffffffffffffffffffffffffffffff167facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd37560405160405180910390a25b949350505050565b6000806000614cb48e8e8e8e8e8e8e8e8e8e600554614296565b905060056000815480929190600101919050555080805190602001209150614cdd828286612f01565b506000614ce8615b93565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614614ece578073ffffffffffffffffffffffffffffffffffffffff166375f0bb528f8f8f8f8f8f8f8f8f8f8f336040518d63ffffffff1660e01b8152600401808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001806020018a6001811115614d8b57fe5b81526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018473ffffffffffffffffffffffffffffffffffffffff16815260200183810383528d8d82818152602001925080828437600081840152601f19601f820116905080830192505050838103825285818151815260200191508051906020019080838360005b83811015614e5d578082015181840152602081019050614e42565b50505050905090810190601f168015614e8a5780820380516001836020036101000a031916815260200191505b509e505050505050505050505050505050600060405180830381600087803b158015614eb557600080fd5b505af1158015614ec9573d6000803e3d6000fd5b505050505b6101f4614ef56109c48b01603f60408d0281614ee657fe5b04615bc490919063ffffffff16565b015a1015614f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005a9050614fd48f8f8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e60008d14614fc9578e614fcf565b6109c45a035b615b47565b9350614fe95a82615bde90919063ffffffff16565b90508380614ff8575060008a14155b80615004575060008814155b615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808911156150905761508d828b8b8b8b615941565b90505b84156150da577f442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e8482604051808381526020018281526020019250505060405180910390a161511a565b7f23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d238482604051808381526020018281526020019250505060405180910390a15b5050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146151c6578073ffffffffffffffffffffffffffffffffffffffff16639327136883856040518363ffffffff1660e01b815260040180838152602001821515815260200192505050600060405180830381600087803b1580156151ad57600080fd5b505af11580156151c1573d6000803e3d6000fd5b505050505b50509b9a5050505050505050505050565b60006004541461524f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b81518111156152c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600181101561533d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006001905060005b835181101561564357600084828151811061535d57fe5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156153d15750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561540957503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561544157508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6154b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146155b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550809250508080600101915050615346565b506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550825160038190555081600481905550505050565b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b90508181555050565b600073ffffffffffffffffffffffffffffffffffffffff1660016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614615808576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001806000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461593d576158ca8260008360015a615b47565b61593c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b5050565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461597e5782615980565b325b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415615a98576159ea3a86106159c7573a6159c9565b855b6159dc888a614a9590919063ffffffff16565b614a2c90919063ffffffff16565b91508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050615a93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b615b3d565b615abd85615aaf888a614a9590919063ffffffff16565b614a2c90919063ffffffff16565b9150615aca848284615bfe565b615b3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b5095945050505050565b6000600180811115615b5557fe5b836001811115615b6157fe5b1415615b7a576000808551602087018986f49050615b8a565b600080855160208701888a87f190505b95945050505050565b6000807f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b9050805491505090565b600081831015615bd45781615bd6565b825b905092915050565b600082821115615bed57600080fd5b600082840390508091505092915050565b60008063a9059cbb8484604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050602060008251602084016000896127105a03f13d60008114615ca55760208114615cad5760009350615cb8565b819350615cb8565b600051158215171593505b505050939250505056fea2646970667358221220047fac33099ca576d1c4f1ac6a8abdb0396e42ad6a397d2cb2f4dc1624cc0c5b64736f6c63430007060033", + memory: evmtypes.Storage{ + evmtypes.State{ + Key: "0x0000000000000000000000000000000000000000000000000000000000000004", + Value: "0x0000000000000000000000000000000000000000000000000000000000000001", + }, + }, + }, GenesisContract{ + name: safeContractName, + address: "B5f762798A53d543a014CAf8b297CFF8F2F937e8", + bytecode: "608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033", + memory: safeStorage, + }), nil +} + +func buildSentinel(addresses []string, slot string) ([]evmtypes.State, error) { + baseSlot, err := hex.DecodeString(slot) + if err != nil { + return nil, err + } + entries := make([]evmtypes.State, len(addresses)+1) + + sentinel := "0000000000000000000000000000000000000001" + key := sentinel + for i, addr := range addresses { + entry, err := getEntryFromValues(baseSlot, key, addr) + if err != nil { + return nil, err + } + + entries[i] = *entry + key = addr + } + + entry, err := getEntryFromValues(baseSlot, key, sentinel) + if err != nil { + return nil, err + } + entries[len(addresses)] = *entry + + return entries, nil +} + +func getEntryFromValues(slot []byte, key, addr string) (*evmtypes.State, error) { + paddedKey, err := hex.DecodeString(padZeroes(key)) + if err != nil { + return nil, err + } + + derivedKey := common.BytesToHash(crypto.Keccak256(append(paddedKey, slot...))).Hex() + entry := evmtypes.State{ + Key: derivedKey, + Value: "0x" + padZeroes(addr), + } + + return &entry, nil +} + +func padZeroes(input string) string { + for len(input) < 64 { + input = "0" + input + } + return input +} diff --git a/cmd/exrpd/cmd/gencontracts.go b/cmd/exrpd/cmd/gencontracts.go new file mode 100644 index 0000000..59f527b --- /dev/null +++ b/cmd/exrpd/cmd/gencontracts.go @@ -0,0 +1,254 @@ +package cmd + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/server" + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/cosmos/cosmos-sdk/x/genutil" + genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + ethermint "github.com/evmos/evmos/v15/types" + evmtypes "github.com/evmos/evmos/v15/x/evm/types" + "github.com/spf13/cobra" +) + +func AddGenesisContractsCmd(defaultNodeHome string) *cobra.Command { + cmd := &cobra.Command{ + Use: "add-genesis-contracts [witness][,[witness]] [threshold]", + Short: "Adds genesis contracts to genesis.json", + Long: `Adds genesis contracts to genesis.json. First it adds the safe contracts and afterwards + the bridge contract paired with its proxy.`, + + Args: cobra.ExactArgs(2), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + serverCtx := server.GetServerContextFromCmd(cmd) + config := serverCtx.Config + + config.SetRoot(clientCtx.HomeDir) + + witnesses, witnessesEvm, err := ParseWitnesses(args[0]) + if err != nil { + return fmt.Errorf("failed to parse witnesses: %w", err) + } + + threshold, err := ParseThreshold(args[1], len(witnesses)) + if err != nil { + return fmt.Errorf("failed to parse threshold: %w", err) + } + + balances := []banktypes.Balance{} + addresses := []sdk.AccAddress{} + genAccounts := []authtypes.GenesisAccount{} + evmGenAccounts := []evmtypes.GenesisAccount{} + + contracts, err := getGenesisContracts(witnessesEvm, threshold) + if err != nil { + return fmt.Errorf("failed to get genesis contracts: %w", err) + } + + for _, contract := range contracts { + addr, err := sdk.AccAddressFromHexUnsafe(contract.address) + if err != nil { + return fmt.Errorf("failed to parse address: %w", err) + } + + data, err := hex.DecodeString(contract.bytecode) + if err != nil { + return fmt.Errorf("failed to decode contract bytecode: %w", err) + } + + baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) + genAccount := ðermint.EthAccount{ + BaseAccount: baseAccount, + CodeHash: common.BytesToHash(crypto.Keccak256(data)).Hex(), + } + + if err := genAccount.Validate(); err != nil { + return fmt.Errorf("failed to validate new genesis account: %w", err) + } + + if contract.name == safeContractName { + coins, err := sdk.ParseCoinsNormalized(safeInitCoins) + if err != nil { + return fmt.Errorf("failed to parse coins: %w", err) + } + balances = append(balances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) + } + + addresses = append(addresses, addr) + genAccounts = append(genAccounts, genAccount) + evmGenAccounts = append(evmGenAccounts, evmtypes.GenesisAccount{ + Address: "0x" + contract.address, + Code: contract.bytecode, + Storage: contract.memory, + }) + } + + for _, witness := range witnesses { + baseAccount := authtypes.NewBaseAccount(witness, nil, 0, 0) + genAccount := ðermint.EthAccount{ + BaseAccount: baseAccount, + CodeHash: common.BytesToHash(evmtypes.EmptyCodeHash).Hex(), + } + genAccounts = append(genAccounts, genAccount) + + coins, err := sdk.ParseCoinsNormalized(witnessInitCoins) + if err != nil { + return fmt.Errorf("failed to parse coins: %w", err) + } + balances = append(balances, banktypes.Balance{Address: witness.String(), Coins: coins.Sort()}) + } + + genFile := config.GenesisFile() + appState, genDoc, err := genutiltypes.GenesisStateFromGenFile(genFile) + if err != nil { + return fmt.Errorf("failed to unmarshal genesis state: %w", err) + } + + // ---------------------------------------------------------------- + // Auth genesis state update + // ---------------------------------------------------------------- + authGenState := authtypes.GetGenesisStateFromAppState(clientCtx.Codec, appState) + + accs, err := authtypes.UnpackAccounts(authGenState.Accounts) + if err != nil { + return fmt.Errorf("failed to get accounts from any: %w", err) + } + + for _, addr := range addresses { + if accs.Contains(addr) { + return fmt.Errorf("cannot add account at existing address %s", addr) + } + } + + // Add the new accounts to the set of genesis accounts and sanitize the + // accounts afterwards. + accs = append(accs, genAccounts...) + accs = authtypes.SanitizeGenesisAccounts(accs) + + genAccs, err := authtypes.PackAccounts(accs) + if err != nil { + return fmt.Errorf("failed to convert accounts into any's: %w", err) + } + authGenState.Accounts = genAccs + + authGenStateBz, err := clientCtx.Codec.MarshalJSON(&authGenState) + if err != nil { + return fmt.Errorf("failed to marshal auth genesis state: %w", err) + } + + appState[authtypes.ModuleName] = authGenStateBz + + // ---------------------------------------------------------------- + // EVM genesis state update + // ---------------------------------------------------------------- + evmGenState := &evmtypes.GenesisState{} + if appState[evmtypes.ModuleName] != nil { + err = clientCtx.Codec.UnmarshalJSON(appState[evmtypes.ModuleName], evmGenState) + if err != nil { + return fmt.Errorf("failed to unmarshal evm genesis state: %w", err) + } + } else { + evmGenState = evmtypes.NewGenesisState(evmtypes.DefaultParams(), []evmtypes.GenesisAccount{}) + } + + // Add evm accounts to genesis state + evmGenState.Accounts = append(evmGenState.Accounts, evmGenAccounts...) + + evmGenStateBz, err := clientCtx.Codec.MarshalJSON(evmGenState) + if err != nil { + return fmt.Errorf("failed to marshal evm genesis state: %w", err) + } + appState[evmtypes.ModuleName] = evmGenStateBz + + // ---------------------------------------------------------------- + // Bank genesis state update + // ---------------------------------------------------------------- + bankGenState := banktypes.GetGenesisStateFromAppState(clientCtx.Codec, appState) + bankGenState.Balances = append(bankGenState.Balances, balances...) + bankGenState.Balances = banktypes.SanitizeGenesisBalances(bankGenState.Balances) + for _, balance := range balances { + bankGenState.Supply = bankGenState.Supply.Add(balance.Coins...) + } + + bankGenStateBz, err := clientCtx.Codec.MarshalJSON(bankGenState) + if err != nil { + return fmt.Errorf("failed to marshal bank genesis state: %w", err) + } + appState[banktypes.ModuleName] = bankGenStateBz + + // ---------------------------------------------------------------- + // Update and export app genesis state + // ---------------------------------------------------------------- + appStateJSON, err := json.Marshal(appState) + if err != nil { + return fmt.Errorf("failed to marshal application genesis state: %w", err) + } + + genDoc.AppState = appStateJSON + return genutil.ExportGenesisFile(genDoc, genFile) + }, + } + + cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)") + cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func ParseWitnesses(witnessesStr string) ([]sdk.AccAddress, []string, error) { + witnessesStr = strings.TrimSpace(witnessesStr) + if len(witnessesStr) == 0 { + return nil, nil, nil + } + + witnessesStrs := strings.Split(witnessesStr, ",") + addresses := make([]sdk.AccAddress, len(witnessesStrs)) + evmAddresses := make([]string, len(witnessesStrs)) + for i, witnessStr := range witnessesStrs { + // Is it in evm format? + witnessStr = strings.TrimPrefix(witnessStr, "0x") + addr, err := sdk.AccAddressFromHexUnsafe(witnessStr) + if err != nil { + // Is it in bech32 format? + witness, err := sdk.AccAddressFromBech32(witnessStr) + if err != nil { + return nil, nil, err + } + + evmAddresses[i] = hex.EncodeToString(witness.Bytes()) + addresses[i] = witness + } else { + evmAddresses[i] = witnessStr + addresses[i] = addr + } + } + + return addresses, evmAddresses, nil +} + +func ParseThreshold(thresholdStr string, witnessesLength int) (int64, error) { + threshold, err := strconv.ParseInt(thresholdStr, 10, 64) + if err != nil { + return 0, err + } + + if threshold > int64(witnessesLength) || threshold <= 0 { + return 0, fmt.Errorf("threshold must be greater than 0 and less than or equal of witnesses length %d", witnessesLength) + } + + return threshold, nil +} diff --git a/cmd/exrpd/cmd/root.go b/cmd/exrpd/cmd/root.go index 78229f9..8675b45 100644 --- a/cmd/exrpd/cmd/root.go +++ b/cmd/exrpd/cmd/root.go @@ -1,8 +1,12 @@ package cmd import ( - simappparams "cosmossdk.io/simapp/params" "errors" + "io" + "os" + "path/filepath" + + simappparams "cosmossdk.io/simapp/params" dbm "github.com/cometbft/cometbft-db" tmcfg "github.com/cometbft/cometbft/config" tmcli "github.com/cometbft/cometbft/libs/cli" @@ -31,9 +35,7 @@ import ( "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" - "io" - "os" - "path/filepath" + // this line is used by starport scaffolding # root/moduleImport "github.com/Peersyst/exrp/app" @@ -126,6 +128,7 @@ func initRootCmd( ), genutilcli.ValidateGenesisCmd(app.ModuleBasics), AddGenesisAccountCmd(app.DefaultNodeHome), + AddGenesisContractsCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), ethermintclient.NewTestnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), From f07a0391893072812d6d5065a35e0c42b7bb612c Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Mon, 11 Mar 2024 12:29:43 +0100 Subject: [PATCH 2/7] add bridge contracts and storage + native bridge --- cmd/exrpd/cmd/contracts.go | 195 +++++++++++++++++++++++++++++++--- cmd/exrpd/cmd/gencontracts.go | 69 ++++++++++-- config.yml | 1 + go.mod | 2 +- go.sum | 4 +- 5 files changed, 240 insertions(+), 31 deletions(-) diff --git a/cmd/exrpd/cmd/contracts.go b/cmd/exrpd/cmd/contracts.go index ff0d3d5..57ef21a 100644 --- a/cmd/exrpd/cmd/contracts.go +++ b/cmd/exrpd/cmd/contracts.go @@ -2,6 +2,8 @@ package cmd import ( "encoding/hex" + "fmt" + "math/big" "strconv" "github.com/ethereum/go-ethereum/common" @@ -9,11 +11,16 @@ import ( evmtypes "github.com/evmos/evmos/v15/x/evm/types" ) -const witnessInitCoins = "10000000000000000000000" + BaseDenom -const safeInitCoins = "10000000000000000000000000000000000" + BaseDenom -const safeContractName = "SafeProxyImplementation" -const fallbackHandlerAddress = "f48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4" -const safeMasterAddress = "3E5c63644E683549055b9Be8653de26E0B4CD36E" +const ( + witnessInitCoins = "10000000000000000000000" + "token" + safeInitCoins = "10000000000000000000000000000000000" + "token" + safeContractName = "SafeProxyImplementation" + safeProxyAddress = "b5f762798a53d543a014caf8b297cff8f2f937e8" + fallbackHandlerAddress = "f48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4" + safeMasterAddress = "3E5c63644E683549055b9Be8653de26E0B4CD36E" + bridgeProxyModuleAddress = "a025DD2C018c159489a85d288a1b420a07C43f87" + bridgeDoorAddress = "f35225d1d59e77ee66012f5bf4c41675a3d2ec7b" +) type GenesisContract struct { name string @@ -22,17 +29,13 @@ type GenesisContract struct { memory evmtypes.Storage } -func getGenesisContracts(witnesses []string, threshold int64) ([]GenesisContract, error) { - // TODO: Remove (Testing) - if len(witnesses) == 1 { - return append([]GenesisContract{}, GenesisContract{ - name: "Pizza", - address: "d9145CCE52D386f254917e481eB44e9943F39138", - bytecode: "608060405234801561000f575f80fd5b506004361061003f575f3560e01c80630832958514610043578063c0da1e681461004d578063f8e19b8a1461006c575b5f80fd5b61004b610088565b005b6100556100c9565b604051610063929190610228565b60405180910390f35b610086600480360381019061008191906102bf565b61016d565b005b5f8081819054906101000a900460030b809291906100a590610337565b91906101000a81548163ffffffff021916908360030b63ffffffff16021790555050565b5f60605f8054906101000a900460030b60018080546100e79061038f565b80601f01602080910402602001604051908101604052809291908181526020018280546101139061038f565b801561015e5780601f106101355761010080835404028352916020019161015e565b820191905f5260205f20905b81548152906001019060200180831161014157829003601f168201915b50505050509050915091509091565b81816001918261017e92919061059c565b505050565b5f8160030b9050919050565b61019881610183565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156101d55780820151818401526020810190506101ba565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6101fa8261019e565b61020481856101a8565b93506102148185602086016101b8565b61021d816101e0565b840191505092915050565b5f60408201905061023b5f83018561018f565b818103602083015261024d81846101f0565b90509392505050565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261027f5761027e61025e565b5b8235905067ffffffffffffffff81111561029c5761029b610262565b5b6020830191508360018202830111156102b8576102b7610266565b5b9250929050565b5f80602083850312156102d5576102d4610256565b5b5f83013567ffffffffffffffff8111156102f2576102f161025a565b5b6102fe8582860161026a565b92509250509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61034182610183565b9150637fffffff82036103575761035661030a565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806103a657607f821691505b6020821081036103b9576103b8610362565b5b50919050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026104527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610417565b61045c8683610417565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f6104a061049b61049684610474565b61047d565b610474565b9050919050565b5f819050919050565b6104b983610486565b6104cd6104c5826104a7565b848454610423565b825550505050565b5f90565b6104e16104d5565b6104ec8184846104b0565b505050565b5b8181101561050f576105045f826104d9565b6001810190506104f2565b5050565b601f82111561055457610525816103f6565b61052e84610408565b8101602085101561053d578190505b61055161054985610408565b8301826104f1565b50505b505050565b5f82821c905092915050565b5f6105745f1984600802610559565b1980831691505092915050565b5f61058c8383610565565b9150826002028217905092915050565b6105a683836103bf565b67ffffffffffffffff8111156105bf576105be6103c9565b5b6105c9825461038f565b6105d4828285610513565b5f601f831160018114610601575f84156105ef578287013590505b6105f98582610581565b865550610660565b601f19841661060f866103f6565b5f5b8281101561063657848901358255600182019150602085019450602081019050610611565b86831015610653578489013561064f601f891682610565565b8355505b6001600288020188555050505b5050505050505056fea26469706673582212203ababc2b608421fc0c59f25da283abcd26bf317a5e7603e8aba6004af5a1875e64736f6c63430008180033", - memory: evmtypes.Storage{}, - }), nil - } +type BridgeInitInfo struct { + lockingAddress string + minCreateAmount int64 + signatureReward int64 +} +func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInitInfo) ([]GenesisContract, error) { // Build safe storage safeStorage := evmtypes.Storage{ evmtypes.State{ @@ -40,7 +43,7 @@ func getGenesisContracts(witnesses []string, threshold int64) ([]GenesisContract Value: "0x" + padZeroes(safeMasterAddress), }, } - modulesStorage, err := buildSentinel([]string{}, padZeroes("1")) + modulesStorage, err := buildSentinel([]string{bridgeProxyModuleAddress}, padZeroes("1")) if err != nil { return nil, err } @@ -63,7 +66,116 @@ func getGenesisContracts(witnesses []string, threshold int64) ([]GenesisContract Value: "0x" + padZeroes(fallbackHandlerAddress), }) + bridgeProxyStorage := evmtypes.Storage{ + evmtypes.State{ + Key: "0x" + padZeroes("0"), + Value: "0x" + padZeroes("1"), + }, + evmtypes.State{ + Key: "0x" + padZeroes("97"), + Value: "0x" + padZeroes(safeProxyAddress), + }, + evmtypes.State{ + Key: "0x" + padZeroes("fd"), + Value: "0x" + padZeroes(safeProxyAddress), + }, + evmtypes.State{ + Key: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + Value: "0x" + padZeroes(bridgeDoorAddress), + }, + } + + if bridge != nil { + // Array of bridge keys size + bridgeKeysArrMem := padZeroes("fc") + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + bridgeKeysArrMem, + Value: "0x" + padZeroes("1"), + }) + + // Bridge hash save + bridgeKeysArrMemBytes, err := hex.DecodeString(bridgeKeysArrMem) + if err != nil { + return nil, err + } + encodedBridge, err := hex.DecodeString(getBridgeEncoding(bridge)) + if err != nil { + return nil, err + } + bridgeKeyBytes := crypto.Keccak256(encodedBridge) + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + hex.EncodeToString(crypto.Keccak256(bridgeKeysArrMemBytes)), + Value: "0x" + hex.EncodeToString(bridgeKeyBytes), + }) + + // Compute bridge initial memory + baseSlot, err := hex.DecodeString(padZeroes("fb")) // Map memory slot + if err != nil { + return nil, err + } + + startMem := hex.EncodeToString(crypto.Keccak256(append(bridgeKeyBytes, baseSlot...))) + memBI, success := big.NewInt(0).SetString(startMem, 16) + if !success { + return nil, fmt.Errorf("error setting hex string to big int") + } + + // Bridge lock value + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x" + padZeroes("1"), + }) + memBI = memBI.Add(memBI, big.NewInt(1)) + + // Bridge minCreateAmount + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x" + padZeroes(strconv.FormatInt(bridge.minCreateAmount, 16)), + }) + memBI = memBI.Add(memBI, big.NewInt(1)) + + // Bridge signatureReward + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x" + padZeroes(strconv.FormatInt(bridge.signatureReward, 16)), + }) + memBI = memBI.Add(memBI, big.NewInt(1)) + + // Bridge lockingAddress + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x" + padZeroes(bridge.lockingAddress), + }) + memBI = memBI.Add(memBI, big.NewInt(2)) // Sum 2 as lockingIssuer is 0 and not present + + // Bridge lockingIssue currency (XRP in hex + size (6)) + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x5852500000000000000000000000000000000000000000000000000000000006", + }) + memBI = memBI.Add(memBI, big.NewInt(1)) + + // Bridge issuingAddress + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x" + padZeroes(safeProxyAddress), + }) + memBI = memBI.Add(memBI, big.NewInt(2)) // Sum 2 as lockingIssuer is 0 and not present + + // Bridge issuingIssue currency (XRP in hex + size (6)) + bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ + Key: "0x" + fmt.Sprintf("%x", memBI), + Value: "0x5852500000000000000000000000000000000000000000000000000000000006", + }) + + } + return append([]GenesisContract{}, GenesisContract{ + name: "DeployerContract", + address: "4e59b44847b379578588920cA78FbF26c0B4956C", + bytecode: "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3", + memory: evmtypes.Storage{}, + }, GenesisContract{ name: "SimulateTxAccessor", address: "59AD6735bCd8152B84860Cb256dD9e96b85F69Da", bytecode: "608060405234801561001057600080fd5b506004361061002b5760003560e01c80631c5fb21114610030575b600080fd5b6100de6004803603608081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561008d57600080fd5b82018360208201111561009f57600080fd5b803590602001918460018302840111640100000000831117156100c157600080fd5b9091929391929390803560ff169060200190929190505050610169565b60405180848152602001831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561012c578082015181840152602081019050610111565b50505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008060607f00000000000000000000000059ad6735bcd8152b84860cb256dd9e96b85f69da73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610213576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806102e46039913960400191505060405180910390fd5b60005a9050610269898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050885a610297565b92505a8103935060405160203d0181016040523d81523d6000602083013e8092505050955095509592505050565b60006001808111156102a557fe5b8360018111156102b157fe5b14156102ca576000808551602087018986f490506102da565b600080855160208701888a87f190505b9594505050505056fe53696d756c61746554784163636573736f722073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca2646970667358221220405c212754c23731ee9658f3175dafa74dea363d2619aad9d5576f5a9d4982f764736f6c63430007060033", @@ -110,9 +222,34 @@ func getGenesisContracts(witnesses []string, threshold int64) ([]GenesisContract }, }, GenesisContract{ name: safeContractName, - address: "B5f762798A53d543a014CAf8b297CFF8F2F937e8", + address: safeProxyAddress, bytecode: "608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033", memory: safeStorage, + }, GenesisContract{ + name: "Utils", + address: "8a05Be8B6099C65E7c403EA8e0f5Fc6Fda720627", + bytecode: "738a05be8b6099c65e7c403ea8e0f5fc6fda72062730146080604052600436106100405760003560e01c806346bdca9a146100455780638df02a601461006c575b600080fd5b610058610053366004610187565b61007f565b604051901515815260200160405180910390f35b61005861007a36600461020f565b6100c6565b600083821480156100bd5750828260405161009b929190610293565b604051809103902085856040516100b3929190610293565b6040518091039020145b95945050505050565b600082815b8181101561013057836001600160a01b03168686838181106100ef576100ef6102a3565b905060200201602081019061010491906102b9565b6001600160a01b0316141561011e57600192505050610137565b80610128816102d4565b9150506100cb565b5060009150505b9392505050565b60008083601f84011261015057600080fd5b50813567ffffffffffffffff81111561016857600080fd5b60208301915083602082850101111561018057600080fd5b9250929050565b6000806000806040858703121561019d57600080fd5b843567ffffffffffffffff808211156101b557600080fd5b6101c18883890161013e565b909650945060208701359150808211156101da57600080fd5b506101e78782880161013e565b95989497509550505050565b80356001600160a01b038116811461020a57600080fd5b919050565b60008060006040848603121561022457600080fd5b833567ffffffffffffffff8082111561023c57600080fd5b818601915086601f83011261025057600080fd5b81358181111561025f57600080fd5b8760208260051b850101111561027457600080fd5b60209283019550935061028a91860190506101f3565b90509250925092565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156102cb57600080fd5b610137826101f3565b60006000198214156102f657634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220cce1793b7833e7c749695098636a76d7628a86eeda4248710025afd945c8f25f64736f6c634300080c0033", + memory: evmtypes.Storage{}, + }, GenesisContract{ + name: "XChainUtils", + address: "5A2819Ffba212CeD4F48188090031dd197293af6", + bytecode: "735a2819ffba212ced4f48188090031dd197293af630146080604052600436106200008b5760003560e01c80631fefdd741462000090578063561f3ce914620000a957806358f4986114620000da5780636a8d3078146200010257806392d253bd1462000119578063c3f2420c1462000130578063d9de78c6146200016e578063df4bc1891462000185575b600080fd5b620000a7620000a136600462001849565b620001ad565b005b620000c0620000ba366004620018ea565b620009a0565b604051620000d19392919062001986565b60405180910390f35b620000f1620000eb36600462001849565b62000c55565b6040519015158152602001620000d1565b620000f16200011336600462001849565b62000d3c565b620000f16200012a36600462001849565b62000d4f565b8180156200013d57600080fd5b50620001556200014f366004620019b2565b62000d65565b6040516001600160a01b039091168152602001620000d1565b620000f16200017f36600462001849565b62000eec565b6200019c6200019636600462001a66565b62000efa565b604051620000d19392919062001ad6565b815160408301516001600160a01b038381169281168314929116148180620001d25750805b620002555760405162461bcd60e51b815260206004820152604260248201527f496e76616c69642062726964676520636f6e6669673a2042726964676520697360448201527f206e6f74206c6f636b696e67436861696e206e6f722069737375696e6743686160648201526134b760f11b608482015260a4015b60405180910390fd5b602080850151015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000295919060040162001b5c565b602060405180830381865af4158015620002b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002d9919062001b96565b15620005f4576020840151516001600160a01b031615620003935760405162461bcd60e51b815260206004820152606160248201527f496e76616c69642062726964676520636f6e6669673a204e6174697665206c6f60448201527f636b696e6720627269646765206d7573742068617665206c6f636b696e67436860648201527f61696e49737375652e6973737565722073657420746f206164647265737328306084820152602960f81b60a482015260c4016200024c565b60608401516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a91620003d4919060040162001b5c565b602060405180830381865af4158015620003f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000418919062001b96565b15620005b4576060840151516001600160a01b031615620004d25760405162461bcd60e51b815260206004820152606160248201527f496e76616c69642062726964676520636f6e6669673a204e617469766520697360448201527f7375696e6720627269646765206d75737420686176652069737375696e67436860648201527f61696e49737375652e6973737565722073657420746f206164647265737328306084820152602960f81b60a482015260c4016200024c565b83604001516001600160a01b031673b5f762798a53d543a014caf8b297cff8f2f937e86001600160a01b031614620005ae5760405162461bcd60e51b815260206004820152606c60248201527f496e76616c69642062726964676520636f6e6669673a204e617469766520697360448201527f7375696e672062726964676520646f6f72206163636f756e74206d757374206260648201527f652030784235663736323739384135336435343361303134434166386232393760848201526b0868c8c708c648c72666eca760a31b60a482015260c4016200024c565b6200099a565b8360600151600001516001600160a01b031684604001516001600160a01b031614620005ae5760405162461bcd60e51b81526004016200024c9062001bb6565b83516020850151516001600160a01b03908116911614156200069f5760405162461bcd60e51b815260206004820152605760248201527f496e76616c69642062726964676520636f6e6669673a206c6f636b696e67436860448201527f61696e49737375652e697373756572206d75737420626520646966666572656e6064820152763a103a3430b7103637b1b5b4b733a1b430b4b72237b7b960491b608482015260a4016200024c565b60608401516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a91620006e0919060040162001b5c565b602060405180830381865af4158015620006fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000724919062001b96565b15620007b65760405162461bcd60e51b815260206004820152605460248201527f496e76616c69642062726964676520636f6e6669673a2049737375696e67206360448201527f6861696e2069737375652063616e2774206265204e6174697665206966206c6f60648201527331b5b4b7339031b430b4b71034b9902a37b5b2b760611b608482015260a4016200024c565b8360600151600001516001600160a01b031684604001516001600160a01b031614620007f65760405162461bcd60e51b81526004016200024c9062001bb6565b81156200099a57738a05be8b6099c65e7c403ea8e0f5fc6fda7206276346bdca9a8560200151600001516001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200085e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000888919081019062001c39565b8660200151602001516040518363ffffffff1660e01b8152600401620008b092919062001caf565b602060405180830381865af4158015620008ce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f4919062001b96565b620005ae5760405162461bcd60e51b815260206004820152606360248201527f496e76616c69642062726964676520636f6e6669673a20546f6b656e2062726960448201527f646765206c6f636b696e67436861696e49737375652e63757272656e6379206d60648201527f757374206265207468652073616d65206173207468652045524332302073796d608482015262189bdb60ea1b60a482015260c4016200024c565b50505050565b6000806060838280805b8381101562000acd576000808c60010160008c8c86818110620009d157620009d162001cd8565b9050602002016020810190620009e8919062001cee565b6001600160a01b0316815260208101919091526040016000205490508062000a1257505062000ab8565b60005b8681101562000aa45760008e60010160008e8e8581811062000a3b5762000a3b62001cd8565b905060200201602081019062000a52919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000205490508281141562000a8e578362000a8a8162001d22565b9450505b508062000a9b8162001d22565b91505062000a15565b508382111562000ab5578193508094505b50505b8062000ac48162001d22565b915050620009aa565b5088811015801562000adf5750600082115b1562000c2f576000816001600160401b0381111562000b025762000b026200163d565b60405190808252806020026020018201604052801562000b2c578160200160208202803683370190505b5090506000805b8581101562000c1b5760008d60010160008d8d8581811062000b595762000b5962001cd8565b905060200201602081019062000b70919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000205490508581141562000c05578b8b8381811062000bb15762000bb162001cd8565b905060200201602081019062000bc8919062001cee565b84848151811062000bdd5762000bdd62001cd8565b6001600160a01b03909216602092830291909101909101528262000c018162001d22565b9350505b508062000c128162001d22565b91505062000b33565b5060019750929550935062000c4b92505050565b6040805160008082526020820190925281909550955095505050505b9450945094915050565b600062000c63838362000d3c565b1562000cf557602080840151015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000ca9919060040162001b5c565b602060405180830381865af415801562000cc7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ced919062001b96565b905062000d36565b60608301516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000ca9919060040162001b5c565b92915050565b90516001600160a01b0390811691161490565b600062000d5d838362000c55565b159392505050565b600062000d738484620001ad565b62000d7f848462000d4f565b1562000ec15781511562000da657604051630ff40f9b60e21b815260040160405180910390fd5b62000db2848462000d3c565b1562000dc5575060208301515162000ee5565b600062000de38560200151600001516001600160a01b0316620013ec565b85606001516020015160405160200162000dff92919062001d40565b604051602081830303815290604052905060008186606001516020015160405162000e2a906200162f565b62000e3792919062001caf565b604051809103906000f08015801562000e54573d6000803e3d6000fd5b5060405163f2fde38b60e01b81526001600160a01b0387811660048301529192509082169063f2fde38b90602401600060405180830381600087803b15801562000e9d57600080fd5b505af115801562000eb2573d6000803e3d6000fd5b50505050809250505062000ee5565b815162000ee157604051630ff40f9b60e21b815260040160405180910390fd5b5060005b9392505050565b600062000d5d838362000d3c565b6003850154600090819060609060ff1662000f285760405163022af77760e11b815260040160405180910390fd5b8460008080805b84811015620012125760008d60020160008d8d8581811062000f555762000f5562001cd8565b905060200201602081019062000f6c919062001cee565b6001600160a01b0316815260208101919091526040016000206001015462000f955750620011fd565b60005b8681101562001144578e60020160008e8e8681811062000fbc5762000fbc62001cd8565b905060200201602081019062000fd3919062001cee565b6001600160a01b03166001600160a01b03168152602001908152602001600020600101548f60020160008f8f8581811062001012576200101262001cd8565b905060200201602081019062001029919062001cee565b6001600160a01b03166001600160a01b03168152602001908152602001600020600101541480156200111957508e60020160008e8e8481811062001071576200107162001cd8565b905060200201602081019062001088919062001cee565b6001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b03166001600160a01b03168f60020160008f8f87818110620010e357620010e362001cd8565b9050602002016020810190620010fa919062001cee565b6001600160a01b03908116825260208201929092526040016000205416145b156200112f57816200112b8162001d22565b9250505b806200113b8162001d22565b91505062000f98565b5083811115620011fb578093508d60020160008d8d858181106200116c576200116c62001cd8565b905060200201602081019062001183919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015494508d60020160008d8d85818110620011c457620011c462001cd8565b9050602002016020810190620011db919062001cee565b6001600160a01b0390811682526020820192909252604001600020541692505b505b80620012098162001d22565b91505062000f2f565b506000826001600160401b038111156200123057620012306200163d565b6040519080825280602002602001820160405280156200125a578160200160208202803683370190505b5090508880156200126a57508b83105b156200128457600097508796509450620013e19350505050565b8b83108062001291575083155b15620012b05760405163f0b0305760e01b815260040160405180910390fd5b6000805b86811015620013d35760008f60020160008f8f85818110620012da57620012da62001cd8565b9050602002016020810190620012f1919062001cee565b6001600160a01b0390811682526020808301939093526040918201600020825180840190935280549091168252600101549181018290529150871480156200134e5750846001600160a01b031681600001516001600160a01b0316145b15620013bd578d8d8381811062001369576200136962001cd8565b905060200201602081019062001380919062001cee565b84848151811062001395576200139562001cd8565b6001600160a01b039092166020928302919091019091015282620013b98162001d22565b9350505b5080620013ca8162001d22565b915050620012b4565b509197509295509193505050505b955095509592505050565b606062000d3682620013fe8462001407565b60010162001476565b600080608083901c15620014205760809290921c916010015b604083901c15620014365760409290921c916008015b602083901c156200144c5760209290921c916004015b601083901c15620014625760109290921c916002015b600883901c1562000d365760010192915050565b606060006200148783600262001d96565b6200149490600262001db8565b6001600160401b03811115620014ae57620014ae6200163d565b6040519080825280601f01601f191660200182016040528015620014d9576020820181803683370190505b509050600360fc1b81600081518110620014f757620014f762001cd8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062001529576200152962001cd8565b60200101906001600160f81b031916908160001a90535060006200154f84600262001d96565b6200155c90600162001db8565b90505b6001811115620015de576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062001594576200159462001cd8565b1a60f81b828281518110620015ad57620015ad62001cd8565b60200101906001600160f81b031916908160001a90535060049490941c93620015d68162001dd3565b90506200155f565b50831562000ee55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200024c565b610f738062001dee83390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200167e576200167e6200163d565b604052919050565b80356001600160a01b03811681146200169e57600080fd5b919050565b60006001600160401b03821115620016bf57620016bf6200163d565b50601f01601f191660200190565b600060408284031215620016e057600080fd5b604051604081016001600160401b0382821081831117156200170657620017066200163d565b81604052829350620017188562001686565b83526020915081850135818111156200173057600080fd5b85019050601f810186136200174457600080fd5b80356200175b6200175582620016a3565b62001653565b81815287848385010111156200177057600080fd5b818484018583013760008483830101528084860152505050505092915050565b600060808284031215620017a357600080fd5b604051608081016001600160401b038282108183111715620017c957620017c96200163d565b81604052829350620017db8562001686565b83526020850135915080821115620017f257600080fd5b6200180086838701620016cd565b6020840152620018136040860162001686565b604084015260608501359150808211156200182d57600080fd5b506200183c85828601620016cd565b6060830152505092915050565b600080604083850312156200185d57600080fd5b82356001600160401b038111156200187457600080fd5b620018828582860162001790565b925050620018936020840162001686565b90509250929050565b60008083601f840112620018af57600080fd5b5081356001600160401b03811115620018c757600080fd5b6020830191508360208260051b8501011115620018e357600080fd5b9250929050565b600080600080606085870312156200190157600080fd5b843593506020850135925060408501356001600160401b038111156200192657600080fd5b62001934878288016200189c565b95989497509550505050565b600081518084526020808501945080840160005b838110156200197b5781516001600160a01b03168752958201959082019060010162001954565b509495945050505050565b8315158152826020820152606060408201526000620019a9606083018462001940565b95945050505050565b60008060008385036080811215620019c957600080fd5b84356001600160401b0380821115620019e157600080fd5b620019ef8883890162001790565b9550620019ff6020880162001686565b94506040603f198401121562001a1457600080fd5b6040519250604083019150828210818311171562001a365762001a366200163d565b50604090815285013581526060909401356020850152509093909250565b801515811462001a6357600080fd5b50565b60008060008060006080868803121562001a7f57600080fd5b853594506020860135935060408601356001600160401b0381111562001aa457600080fd5b62001ab2888289016200189c565b909450925050606086013562001ac88162001a54565b809150509295509295909350565b60018060a01b0384168152826020820152606060408201526000620019a9606083018462001940565b60005b8381101562001b1c57818101518382015260200162001b02565b838111156200099a5750506000910152565b6000815180845262001b4881602086016020860162001aff565b601f01601f19169290920160200192915050565b60408152600062001b71604083018462001b2e565b8281036020840152600381526205852560ec1b60208201526040810191505092915050565b60006020828403121562001ba957600080fd5b815162000ee58162001a54565b6020808252605e908201527f496e76616c69642062726964676520636f6e6669673a20546f6b656e2062726960408201527f6467652069737375696e67436861696e446f6f72206d7573742062652065717560608201527f616c20746f2069737375696e67436861696e49737375652e6973737565720000608082015260a00190565b60006020828403121562001c4c57600080fd5b81516001600160401b0381111562001c6357600080fd5b8201601f8101841362001c7557600080fd5b805162001c866200175582620016a3565b81815285602083850101111562001c9c57600080fd5b620019a982602083016020860162001aff565b60408152600062001cc4604083018562001b2e565b8281036020840152620019a9818562001b2e565b634e487b7160e01b600052603260045260246000fd5b60006020828403121562001d0157600080fd5b62000ee58262001686565b634e487b7160e01b600052601160045260246000fd5b600060001982141562001d395762001d3962001d0c565b5060010190565b670213934b233b2b2160c51b81526000835162001d6581600885016020880162001aff565b6201016960ed1b600891840191820152835162001d8a81600b84016020880162001aff565b01600b01949350505050565b600081600019048311821515161562001db35762001db362001d0c565b500290565b6000821982111562001dce5762001dce62001d0c565b500190565b60008162001de55762001de562001d0c565b50600019019056fe60806040523480156200001157600080fd5b5060405162000f7338038062000f73833981016040819052620000349162000251565b8151829082906200004d906003906020850190620000de565b50805162000063906004906020840190620000de565b505050620000806200007a6200008860201b60201c565b6200008c565b5050620002f8565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000ec90620002bb565b90600052602060002090601f0160209004810192826200011057600085556200015b565b82601f106200012b57805160ff19168380011785556200015b565b828001600101855582156200015b579182015b828111156200015b5782518255916020019190600101906200013e565b50620001699291506200016d565b5090565b5b808211156200016957600081556001016200016e565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001ac57600080fd5b81516001600160401b0380821115620001c957620001c962000184565b604051601f8301601f19908116603f01168101908282118183101715620001f457620001f462000184565b816040528381526020925086838588010111156200021157600080fd5b600091505b8382101562000235578582018301518183018401529082019062000216565b83821115620002475760008385830101525b9695505050505050565b600080604083850312156200026557600080fd5b82516001600160401b03808211156200027d57600080fd5b6200028b868387016200019a565b93506020850151915080821115620002a257600080fd5b50620002b1858286016200019a565b9150509250929050565b600181811c90821680620002d057607f821691505b60208210811415620002f257634e487b7160e01b600052602260045260246000fd5b50919050565b610c6b80620003086000396000f3fe608060405234801561001057600080fd5b50600436106100eb5760003560e01c806370a082311161009257806370a08231146101a0578063715018a6146101c957806379cc6790146101d15780638da5cb5b146101e457806395d89b41146101ff578063a457c2d714610207578063a9059cbb1461021a578063dd62ed3e1461022d578063f2fde38b1461024057600080fd5b806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013157806323b872dd14610143578063313ce56714610156578063395093511461016557806340c10f191461017857806342966c681461018d575b600080fd5b6100f8610253565b6040516101059190610a6f565b60405180910390f35b61012161011c366004610ae0565b6102e5565b6040519015158152602001610105565b6002545b604051908152602001610105565b610121610151366004610b0a565b6102fd565b60405160128152602001610105565b610121610173366004610ae0565b610321565b61018b610186366004610ae0565b610343565b005b61018b61019b366004610b46565b610359565b6101356101ae366004610b5f565b6001600160a01b031660009081526020819052604090205490565b61018b610366565b61018b6101df366004610ae0565b61037a565b6005546040516001600160a01b039091168152602001610105565b6100f861038f565b610121610215366004610ae0565b61039e565b610121610228366004610ae0565b61041e565b61013561023b366004610b81565b61042c565b61018b61024e366004610b5f565b610457565b60606003805461026290610bb4565b80601f016020809104026020016040519081016040528092919081815260200182805461028e90610bb4565b80156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b5050505050905090565b6000336102f38185856104cd565b5060019392505050565b60003361030b8582856105f2565b61031685858561066c565b506001949350505050565b6000336102f3818585610334838361042c565b61033e9190610bef565b6104cd565b61034b6107fe565b6103558282610858565b5050565b6103633382610905565b50565b61036e6107fe565b6103786000610a1d565b565b6103858233836105f2565b6103558282610905565b60606004805461026290610bb4565b600033816103ac828661042c565b9050838110156104115760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61031682868684036104cd565b6000336102f381858561066c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61045f6107fe565b6001600160a01b0381166104c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610408565b61036381610a1d565b6001600160a01b03831661052f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610408565b6001600160a01b0382166105905760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610408565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006105fe848461042c565b9050600019811461066657818110156106595760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610408565b61066684848484036104cd565b50505050565b6001600160a01b0383166106d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610408565b6001600160a01b0382166107325760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610408565b6001600160a01b038316600090815260208190526040902054818110156107aa5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610408565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610c16833981519152910160405180910390a3610666565b6005546001600160a01b031633146103785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610408565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610408565b80600260008282546108c09190610bef565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610c16833981519152910160405180910390a35050565b6001600160a01b0382166109655760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610408565b6001600160a01b038216600090815260208190526040902054818110156109d95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610408565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610c1683398151915291016105e5565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208083528351808285015260005b81811015610a9c57858101830151858201604001528201610a80565b81811115610aae576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610adb57600080fd5b919050565b60008060408385031215610af357600080fd5b610afc83610ac4565b946020939093013593505050565b600080600060608486031215610b1f57600080fd5b610b2884610ac4565b9250610b3660208501610ac4565b9150604084013590509250925092565b600060208284031215610b5857600080fd5b5035919050565b600060208284031215610b7157600080fd5b610b7a82610ac4565b9392505050565b60008060408385031215610b9457600080fd5b610b9d83610ac4565b9150610bab60208401610ac4565b90509250929050565b600181811c90821680610bc857607f821691505b60208210811415610be957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610c1057634e487b7160e01b600052601160045260246000fd5b50019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a9df4775bb669b37e3d342f691e9d59ab438b4f2c907cfca0a73c86668ea940464736f6c634300080c0033a264697066735822122081a519022e5ce81af97e22f33353dc46323da2c244cb16b47443a05aec94909d64736f6c634300080c0033", + memory: evmtypes.Storage{}, // TODO: set library storage + }, GenesisContract{ + name: "BridgeDoorMultiToken", + address: bridgeDoorAddress, + bytecode: "6080604052600436106101b25760003560e01c80635bafd0c1116100ed5780638da5cb5b116100905780638da5cb5b146104b957806395fa18dd146104d757806396d195bd146104f7578063a6c0873b14610519578063c45ddbc214610539578063c4d66de814610581578063d794559a146105a1578063e684ab76146105be578063f2fde38b146105de57600080fd5b80635bafd0c1146103dc5780635c975abb146103fc578063715018a61461041457806372e0376f1461042957806375f1d5041461045e5780638436c642146104715780638456cb59146104915780638d5cd5bd146104a657600080fd5b80633659cfe6116101555780633659cfe6146103095780633f2702e4146103295780633f4ba83a1461033c5780634072c3b3146103515780634a07d673146103665780634f1ef28614610386578063519454471461039957806352d1902d146103b957600080fd5b80630b2c50d2146101be57806310231036146101f9578063192dd3cc1461020e57806326aa101f1461022e5780632a983d3a1461025e5780632ca4cb531461028b5780632d92de741461029e57806334525b1b146102db57600080fd5b366101b957005b600080fd5b3480156101ca57600080fd5b506101de6101d9366004613779565b6105fe565b6040516101f096959493929190613805565b60405180910390f35b61020c61020736600461385f565b61077b565b005b34801561021a57600080fd5b5061020c61022936600461387c565b610883565b34801561023a57600080fd5b5061024e61024936600461385f565b610a02565b60405190151581526020016101f0565b34801561026a57600080fd5b5060fd5461027e906001600160a01b031681565b6040516101f091906138f3565b61020c610299366004613907565b610a87565b3480156102aa57600080fd5b506102be6102b9366004613954565b610b55565b6040805193845291151560208401521515908201526060016101f0565b3480156102e757600080fd5b506102fb6102f63660046139a5565b610b88565b6040516101f0929190613a34565b34801561031557600080fd5b5061020c61032436600461385f565b610ee2565b61020c610337366004613af1565b610fb4565b34801561034857600080fd5b5061020c611078565b34801561035d57600080fd5b5061020c611092565b34801561037257600080fd5b5061020c610381366004613b4f565b6110c9565b61020c610394366004613bdf565b6111d2565b3480156103a557600080fd5b5061024e6103b4366004613c2e565b611288565b3480156103c557600080fd5b506103ce6112db565b6040519081526020016101f0565b3480156103e857600080fd5b506103ce6103f7366004613779565b611389565b34801561040857600080fd5b5060c95460ff1661024e565b34801561042057600080fd5b5061020c6113d9565b34801561043557600080fd5b50610449610444366004613779565b6113eb565b604080519283526020830191909152016101f0565b61020c61046c366004613af1565b61140f565b34801561047d57600080fd5b5061020c61048c366004613c9d565b6114da565b34801561049d57600080fd5b5061020c6115e1565b6103ce6104b4366004613954565b6115f9565b3480156104c557600080fd5b506097546001600160a01b031661027e565b3480156104e357600080fd5b5061020c6104f2366004613af1565b6116f6565b34801561050357600080fd5b5061050c611824565b6040516101f09190613cf4565b34801561052557600080fd5b5061027e610534366004613779565b61189b565b34801561054557600080fd5b50610559610554366004613d41565b6118e8565b604080516001600160a01b0394851681529390921660208401521515908201526060016101f0565b34801561058d57600080fd5b5061020c61059c36600461385f565b611923565b3480156105ad57600080fd5b506103ce68015af1d78b58c4000081565b3480156105ca57600080fd5b5061020c6105d936600461385f565b611ad6565b3480156105ea57600080fd5b5061020c6105f936600461385f565b611b2d565b60008060606000806060600061061388611ba3565b60038101546004820154600683015460078401546005850180549596506001600160a01b0394851695938516949093928116929116906008870190849061065990613d85565b80601f016020809104026020016040519081016040528092919081815260200182805461068590613d85565b80156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b505050505093508080546106e590613d85565b80601f016020809104026020016040519081016040528092919081815260200182805461071190613d85565b801561075e5780601f106107335761010080835404028352916020019161075e565b820191906000526020600020905b81548152906001019060200180831161074157829003601f168201915b505050505090509650965096509650965096505091939550919395565b610783611bee565b7f54942c22b4f7613321d895cad0749836eeb5c8b282c630c4478e07913f814dbc816040516107b291906138f3565b60405180910390a168015af1d78b58c400003410156107e457604051636bbdb6db60e11b815260040160405180910390fd5b6107ed81610a02565b1561080b57604051633ea7ffd960e11b815260040160405180910390fd5b60fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610858576040519150601f19603f3d011682016040523d82523d6000602084013e61085d565b606091505b505090508061087f57604051638a48aa1f60e01b815260040160405180910390fd5b5050565b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906108b39033906004016138f3565b602060405180830381865afa1580156108d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190613dd5565b61091157604051631ce32a2360e31b815260040160405180910390fd5b610919611bee565b60006109258686611c34565b600381015490915060ff1661094d5760405163022af77760e11b815260040160405180910390fd5b60018101546001600160a01b0384811691161461097d57604051636edaef2f60e11b815260040160405180910390fd5b336000818152600283016020526040902080546001600160a01b0319166001600160a01b038516178155600101859055856109b788611389565b7f750bc14bd61ac34397f57970e1a0fd14fd27247cc77aa2b3c304e2e973c52a4087866040516109e8929190613df0565b60405180910390a46109fa8686611c56565b505050505050565b60fc54600090815b81811015610a7d57836001600160a01b031660fb600060fc8481548110610a3357610a33613e07565b600091825260208083209091015483528201929092526040019020600901546001600160a01b03161415610a6b575060019392505050565b80610a7581613e33565b915050610a0a565b5060009392505050565b610a8f611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f4986191610ad59187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015610af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b169190613dd5565b15610b2b57610b26838383611c97565b505050565b3415610b4a576040516311c36b7360e11b815260040160405180910390fd5b610b26838383611d78565b600080600080610b658686611f5b565b805460029091015490945060ff8082169450610100909104169150509250925092565b60fc5460408051600a808252610160820190925260609283929182816020015b610bb0613482565b815260200190600190039081610ba8579050509350816001600160401b03811115610bdd57610bdd61357d565b604051908082528060200260200182016040528015610c2257816020015b6040805180820190915260008082526020820152815260200190600190039081610bfb5790505b5092506000610c318387613ed0565b9050805b610c3f8483613eef565b81108015610c4c57508281105b15610ed95760fb600060fc8381548110610c6857610c68613e07565b60009182526020808320909101548352828101939093526040918201902081516080810183526003820180546001600160a01b039081168352845180860190955260048401805490911685526005909301805492959194868301949093909284019190610cd490613d85565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0090613d85565b8015610d4d5780601f10610d2257610100808354040283529160200191610d4d565b820191906000526020600020905b815481529060010190602001808311610d3057829003601f168201915b50505091909252505050815260038201546001600160a01b0390811660208084019190915260408051808201825260048601805490941681526005860180549290950194909392840191610da090613d85565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcc90613d85565b8015610e195780601f10610dee57610100808354040283529160200191610e19565b820191906000526020600020905b815481529060010190602001808311610dfc57829003601f168201915b5050509190925250505090525086610e318484613f07565b81518110610e4157610e41613e07565b602002602001018190525060fb600060fc8381548110610e6357610e63613e07565b9060005260206000200154815260200190815260200160002060010160405180604001604052908160008201548152602001600182015481525050858383610eab9190613f07565b81518110610ebb57610ebb613e07565b60200260200101819052508080610ed190613e33565b915050610c35565b50505050915091565b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b161415610f345760405162461bcd60e51b8152600401610f2b90613f1e565b60405180910390fd5b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b0316610f66611f8b565b6001600160a01b031614610f8c5760405162461bcd60e51b8152600401610f2b90613f6a565b610f9581611fa7565b60408051600080825260208201909252610fb191839190611faf565b50565b610fbc611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f49861916110029188916001600160a01b0390911690600401613ea6565b602060405180830381865af415801561101f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110439190613dd5565b15611059576110548484848461211a565b611072565b604051631cc6a69960e11b815260040160405180910390fd5b50505050565b61108061225f565b6110886122b9565b611090612302565b565b600054610100900460ff166110b95760405162461bcd60e51b8152600401610f2b90613fb6565b6110c161234e565b61109061237d565b6110d161225f565b6110d9611bee565b6110e282611389565b82516020808501518051908201516040808801516060890151805195015191517fe8155fae5a2ff8b2ff714dc22bb65489bdf14794bdc7e5802d7ba8e62f0c3ccf9661113396909594939091613805565b60405180910390a260fd546040516330fc908360e21b8152600091735a2819ffba212ced4f48188090031dd197293af69163c3f2420c916111849187916001600160a01b0316908790600401614001565b602060405180830381865af41580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c5919061403c565b9050610b268383836123ac565b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b16141561121b5760405162461bcd60e51b8152600401610f2b90613f1e565b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b031661124d611f8b565b6001600160a01b0316146112735760405162461bcd60e51b8152600401610f2b90613f6a565b61127c82611fa7565b61087f82826001611faf565b600061129261225f565b60001960018360018111156112a9576112a9614059565b14156112c2576000808551602087018985f491506112d2565b600080855160208701888a86f191505b50949350505050565b6000306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b16146113765760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c6044820152771b1959081d1a1c9bdd59da0819195b1959d85d1958d85b1b60421b6064820152608401610f2b565b5060008051602061438183398151915290565b8051602080830151805190820151604080860151606087015180519086015192516000976113bc97909695949101613805565b604051602081830303815290604052805190602001209050919050565b6113e161225f565b6110906000612531565b60008060006113f984611ba3565b6001810154600290910154909590945092505050565b611417611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f498619161145d9188916001600160a01b0390911690600401613ea6565b602060405180830381865af415801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e9190613dd5565b156114af5761105484848484612583565b34156114ce576040516311c36b7360e11b815260040160405180910390fd5b6110728484848461266a565b6114e2611bee565b600080606060006114f38888611c34565b600381015490915060ff1661151b5760405163022af77760e11b815260040160405180910390fd5b80546001600160a01b0316331461154557604051632a118c8960e01b815260040160405180910390fd5b61155188886000612850565b919550935091508583146115785760405163162908e360e11b815260040160405180910390fd5b33876115838a611389565b7f436897f58db529a6e27c5b7aa31967d35b9b81540e4c797b9322c1740441bf5489896040516115b4929190613df0565b60405180910390a46001600160a01b0384166115d7576115d7888887898661297d565b5050505050505050565b6115e961225f565b6115f1611bee565b6110906129e2565b6000611603611bee565b600061160e846113eb565b915050803414611631576040516311c36b7360e11b815260040160405180910390fd5b600061163e853386612a1f565b9050338161164b87611389565b7fc7ecca132ed5d1d6c462587819023eee197ef7fb00b399bbfc2ce032587f0c6d8760405161167a91906138f3565b60405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d80600081146116cf576040519150601f19603f3d011682016040523d82523d6000602084013e6116d4565b606091505b50509050806112d257604051638a48aa1f60e01b815260040160405180910390fd5b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906117269033906004016138f3565b602060405180830381865afa158015611743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117679190613dd5565b61178457604051631ce32a2360e31b815260040160405180910390fd5b61178c611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f49861916117d29188916001600160a01b0390911690600401613ea6565b602060405180830381865af41580156117ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118139190613dd5565b156110595761105484848484612a94565b60fd546040805163a0e67e2b60e01b815290516060926001600160a01b03169163a0e67e2b9160048083019260009291908290030181865afa15801561186e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261189691908101906140f7565b905090565b6000806118a783611ba3565b60098101549091506001600160a01b03166118d55760405163258b5e0560e21b815260040160405180910390fd5b600901546001600160a01b031692915050565b6000806000806118f88686611c34565b805460018201546003909201546001600160a01b0391821696509116935060ff169150509250925092565b600054610100900460ff16158080156119435750600054600160ff909116105b8061195d5750303b15801561195d575060005460ff166001145b6119c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f2b565b6000805460ff1916600117905580156119e3576000805461ff0019166101001790555b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b161415611a2c5760405162461bcd60e51b8152600401610f2b90613f1e565b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b0316611a5e611f8b565b6001600160a01b031614611a845760405162461bcd60e51b8152600401610f2b90613f6a565b611a8d82611ad6565b801561087f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600054610100900460ff16611afd5760405162461bcd60e51b8152600401610f2b90613fb6565b611b05612d49565b611b0d611092565b60fd80546001600160a01b0319166001600160a01b038316179055610fb1815b611b3561225f565b6001600160a01b038116611b9a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f2b565b610fb181612531565b60008060fb6000611bb385611389565b81526020810191909152604001600020805490915060ff16611be8576040516331f0d02960e11b815260040160405180910390fd5b92915050565b60c95460ff16156110905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f2b565b600080611c4084611ba3565b6000938452600b01602052505060409020919050565b6000806060611c6785856001612850565b919450925090506001600160a01b038316611c83575050505050565b611c90858585858561297d565b5050505050565b611c9f611bee565b3415610b265780341015611cc6576040516311c36b7360e11b815260040160405180910390fd5b3382611cd185611389565b6040518481527f32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa19060200160405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611d51576040519150601f19603f3d011682016040523d82523d6000602084013e611d56565b606091505b505090508061107257604051638a48aa1f60e01b815260040160405180910390fd5b611d80611bee565b3382611d8b85611389565b6040518481527f32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa19060200160405180910390a460fd54604051630d51a60f60e31b8152735a2819ffba212ced4f48188090031dd197293af691636a8d307891611e049187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015611e21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e459190613dd5565b15611eee576000611e558461189b565b60fd546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92611e8b92339290911690879060040161412b565b6020604051808303816000875af1158015611eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ece9190613dd5565b90508061107257604051638a48aa1f60e01b815260040160405180910390fd5b611ef78361189b565b6001600160a01b03166379cc679033836040518363ffffffff1660e01b8152600401611f2492919061414f565b600060405180830381600087803b158015611f3e57600080fd5b505af1158015611f52573d6000803e3d6000fd5b50505050505050565b600080611f6784611ba3565b6001600160a01b0384166000908152600c9091016020526040902091505092915050565b600080516020614381833981519152546001600160a01b031690565b610fb161225f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611fe257610b2683612d70565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561203c575060408051601f3d908101601f1916820190925261203991810190614168565b60015b61209f5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610f2b565b600080516020614381833981519152811461210e5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610f2b565b50610b26838383612e0c565b612122611bee565b60008061212e866113eb565b915091508083101561215357604051636bbdb6db60e11b815260040160405180910390fd5b8184101561217457604051632ca2f52b60e11b815260040160405180910390fd5b61217e8484613eef565b34101561219e576040516311c36b7360e11b815260040160405180910390fd5b6001600160a01b038516336121b288611389565b60408051888152602081018890527f32ebca0d0dd8fc03a488dcaab22112132af86cbc4c2df086bc7f328d751f5d7e910160405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612238576040519150601f19603f3d011682016040523d82523d6000602084013e61223d565b606091505b5050905080611f5257604051638a48aa1f60e01b815260040160405180910390fd5b6097546001600160a01b031633146110905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f2b565b60c95460ff166110905760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f2b565b61230a6122b9565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161234491906138f3565b60405180910390a1565b600054610100900460ff166123755760405162461bcd60e51b8152600401610f2b90613fb6565b611090612e31565b600054610100900460ff166123a45760405162461bcd60e51b8152600401610f2b90613fb6565b611090612e64565b60006123b784611389565b600081815260fb6020526040902080549192509060ff16156123eb5760405162b84eb160e51b815260040160405180910390fd5b600082815260fb602090815260409091208054600160ff199091168117825586519082015585820151600282015586516003820180546001600160a01b03199081166001600160a01b0393841617825589850151805160048601805490931694169390931781558285015180518b969395929361246d936005019201906134e4565b50505060408201516003820180546001600160a01b03199081166001600160a01b039384161790915560608401518051600485018054909316931692909217815560208083015180516124c692600587019201906134e4565b505050600084815260fb6020526040812060090180546001600160a01b0319166001600160a01b039790971696909617909555505060fc80546001810182559352507f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c0909101555050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61258b611bee565b341561107257803410156125b2576040516311c36b7360e11b815260040160405180910390fd5b33826125bd86611389565b7f290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a1184876040516125ee929190613df0565b60405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612643576040519150601f19603f3d011682016040523d82523d6000602084013e612648565b606091505b5050905080611c9057604051638a48aa1f60e01b815260040160405180910390fd5b612672611bee565b338261267d86611389565b7f290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a1184876040516126ae929190613df0565b60405180910390a460fd54604051630d51a60f60e31b8152735a2819ffba212ced4f48188090031dd197293af691636a8d3078916126fc9188916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015612719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273d9190613dd5565b156127ec57600061274d8561189b565b60fd546040516323b872dd60e01b81526001600160a01b03928316926323b872dd9261278392339290911690879060040161412b565b6020604051808303816000875af11580156127a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c69190613dd5565b9050806127e657604051638a48aa1f60e01b815260040160405180910390fd5b50611072565b6127f58461189b565b6001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040161282292919061414f565b600060405180830381600087803b15801561283c57600080fd5b505af11580156115d7573d6000803e3d6000fd5b600080606060006128618787611c34565b9050600061286d611824565b9050600080735a2819ffba212ced4f48188090031dd197293af663df4bc1898560fd60009054906101000a90046001600160a01b03166001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129049190614168565b868c6040518563ffffffff1660e01b815260040161292594939291906141ba565b600060405180830381865af4158015612942573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261296a91908101906141ec565b919c909b50909950975050505050505050565b6129878585612e94565b826001600160a01b03168461299b87611389565b6040518581527e87db26e45ef9d7e62d7966c0bc6310075c3e120cae4af40d1791e1b01f7e719060200160405180910390a46129d8858484612ee3565b611c908582612f85565b6129ea611bee565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123373390565b600080612a2b85611ba3565b90506000612a3886612fe5565b6000818152600b93909301602052604090922080546001600160a01b03199081166001600160a01b03978816178255600180830180549092169690971695909517909455506003909201805460ff191690931790925592915050565b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e90612ac49033906004016138f3565b602060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190613dd5565b612b2257604051631ce32a2360e31b815260040160405180910390fd5b612b2a611bee565b6000612b35856113eb565b50905080831015612b5957604051632ca2f52b60e11b815260040160405180910390fd5b6000612b658686611f5b565b6002810154909150610100900460ff16612b8457612b84868685613010565b6000612b908787611f5b565b600281015490915060ff1615612bb95760405163e242fbdf60e01b815260040160405180910390fd5b33600081815260018301602052604090208690556001600160a01b03871690612be189611389565b6040518881527f64f8fc141a8c2d310942bbc5236041fa0a0c6c39a9fb295be5c959224382815e9060200160405180910390a46060600080735a2819ffba212ced4f48188090031dd197293af663561f3ce98560fd60009054906101000a90046001600160a01b03166001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cab9190614168565b612cb3611824565b6040518463ffffffff1660e01b8152600401612cd193929190614245565b600060405180830381865af4158015612cee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d169190810190614264565b9450925090508015612d3d5760028401805460ff19166001179055612d3d8a8a848661304f565b50505050505050505050565b600054610100900460ff166110905760405162461bcd60e51b8152600401610f2b90613fb6565b6001600160a01b0381163b612ddd5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610f2b565b60008051602061438183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612e15836130a6565b600082511180612e225750805b15610b265761107283836130e6565b600054610100900460ff16612e585760405162461bcd60e51b8152600401610f2b90613fb6565b60c9805460ff19169055565b600054610100900460ff16612e8b5760405162461bcd60e51b8152600401610f2b90613fb6565b61109033612531565b600060fb6000612ea385611389565b8152602001908152602001600020600b01600083815260200190815260200160002060030160006101000a81548160ff0219169083151502179055505050565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f4986191612f299187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015612f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6a9190613dd5565b15612f7a57610b2683838361310b565b610b26838383613115565b6000612f90836113eb565b835190925090506000612fa382846142a4565b905060005b828110156109fa57612fd3858281518110612fc557612fc5613e07565b6020026020010151836132ca565b80612fdd81613e33565b915050612fa8565b600080612ff183611ba3565b905061300381600a0180546001019055565b600a8101545b9392505050565b600061301b84611ba3565b6001600160a01b039093166000908152600c909301602052506040909120908155600201805461ffff191661010017905550565b826001600160a01b03167f85841522199c696c3d4a549fea06732153559ded5db5cf6dfa3bb099827f2c848360405161308a91815260200190565b60405180910390a261309c83836132ca565b6110728482612f85565b6130af81612d70565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061300983836040518060600160405280602781526020016143a160279139613362565b610b2682826132ca565b60fd54604051630d51a60f60e31b8152606091735a2819ffba212ced4f48188090031dd197293af691636a8d30789161315c9188916001600160a01b031690600401613ea6565b602060405180830381865af4158015613179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319d9190613dd5565b156131e65782826040516024016131b592919061414f565b60408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b1790529050613226565b82826040516024016131f992919061414f565b60408051601f198184030181529190526020810180516001600160e01b03166340c10f1960e01b17905290505b60fd546000906001600160a01b031663468721a76132438761189b565b60008560006040518563ffffffff1660e01b815260040161326794939291906142e8565b6020604051808303816000875af1158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa9190613dd5565b905080611c9057604051638a48aa1f60e01b815260040160405180910390fd5b60fd5460405163468721a760e01b81526000916001600160a01b03169063468721a7906132ff9086908690869060040161431e565b6020604051808303816000875af115801561331e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133429190613dd5565b905080610b2657604051638a48aa1f60e01b815260040160405180910390fd5b6060600080856001600160a01b03168560405161337f9190614351565b600060405180830381855af49150503d80600081146133ba576040519150601f19603f3d011682016040523d82523d6000602084013e6133bf565b606091505b50915091506133d0868383876133da565b9695505050505050565b6060831561344657825161343f576001600160a01b0385163b61343f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f2b565b5081613450565b6134508383613458565b949350505050565b8151156134685781518083602001fd5b8060405162461bcd60e51b8152600401610f2b919061436d565b604051806080016040528060006001600160a01b031681526020016134b860408051808201909152600081526060602082015290565b8152600060208201526040016134df60408051808201909152600081526060602082015290565b905290565b8280546134f090613d85565b90600052602060002090601f0160209004810192826135125760008555613558565b82601f1061352b57805160ff1916838001178555613558565b82800160010185558215613558579182015b8281111561355857825182559160200191906001019061353d565b50613564929150613568565b5090565b5b808211156135645760008155600101613569565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156135b5576135b561357d565b60405290565b604051601f8201601f191681016001600160401b03811182821017156135e3576135e361357d565b604052919050565b6001600160a01b0381168114610fb157600080fd5b60006001600160401b038311156136195761361961357d565b61362c601f8401601f19166020016135bb565b905082815283838301111561364057600080fd5b828260208301376000602084830101529392505050565b60006040828403121561366957600080fd5b613671613593565b9050813561367e816135eb565b815260208201356001600160401b0381111561369957600080fd5b8201601f810184136136aa57600080fd5b6136b984823560208401613600565b60208301525092915050565b6000608082840312156136d757600080fd5b604051608081016001600160401b0382821081831117156136fa576136fa61357d565b816040528293508435915061370e826135eb565b9082526020840135908082111561372457600080fd5b61373086838701613657565b602084015260408501359150613745826135eb565b816040840152606085013591508082111561375f57600080fd5b5061376c85828601613657565b6060830152505092915050565b60006020828403121561378b57600080fd5b81356001600160401b038111156137a157600080fd5b613450848285016136c5565b60005b838110156137c85781810151838201526020016137b0565b838111156110725750506000910152565b600081518084526137f18160208601602086016137ad565b601f01601f19169290920160200192915050565b600060018060a01b038089168352808816602084015260c0604084015261382f60c08401886137d9565b8187166060850152818616608085015283810360a085015261385181866137d9565b9a9950505050505050505050565b60006020828403121561387157600080fd5b8135613009816135eb565b600080600080600060a0868803121561389457600080fd5b85356001600160401b038111156138aa57600080fd5b6138b6888289016136c5565b955050602086013593506040860135925060608601356138d5816135eb565b915060808601356138e5816135eb565b809150509295509295909350565b6001600160a01b0391909116815260200190565b60008060006060848603121561391c57600080fd5b83356001600160401b0381111561393257600080fd5b61393e868287016136c5565b9660208601359650604090950135949350505050565b6000806040838503121561396757600080fd5b82356001600160401b0381111561397d57600080fd5b613989858286016136c5565b925050602083013561399a816135eb565b809150509250929050565b6000602082840312156139b757600080fd5b5035919050565b60018060a01b038151168252600060208201516040602085015261345060408501826137d9565b600081518084526020808501945080840160005b83811015613a2957613a1687835180518252602090810151910152565b60409690960195908201906001016139f9565b509495945050505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b84811015613ad157898403605f19018652815180516001600160a01b0390811686528482015160808688018190529190613a99838901826139be565b848d0151909216888d015250918901518683038a880152919050613abd81836139be565b978501979550505090820190600101613a5d565b505087820390880152613ae481896139e5565b9998505050505050505050565b60008060008060808587031215613b0757600080fd5b84356001600160401b03811115613b1d57600080fd5b613b29878288016136c5565b9450506020850135613b3a816135eb565b93969395505050506040820135916060013590565b6000808284036060811215613b6357600080fd5b83356001600160401b03811115613b7957600080fd5b613b85868287016136c5565b9350506040601f1982011215613b9a57600080fd5b50613ba3613593565b6020840135815260408401356020820152809150509250929050565b600082601f830112613bd057600080fd5b61300983833560208501613600565b60008060408385031215613bf257600080fd5b8235613bfd816135eb565b915060208301356001600160401b03811115613c1857600080fd5b613c2485828601613bbf565b9150509250929050565b60008060008060808587031215613c4457600080fd5b8435613c4f816135eb565b93506020850135925060408501356001600160401b03811115613c7157600080fd5b613c7d87828801613bbf565b925050606085013560028110613c9257600080fd5b939692955090935050565b60008060008060808587031215613cb357600080fd5b84356001600160401b03811115613cc957600080fd5b613cd5878288016136c5565b94505060208501359250604085013591506060850135613c92816135eb565b6020808252825182820181905260009190848201906040850190845b81811015613d355783516001600160a01b031683529284019291840191600101613d10565b50909695505050505050565b60008060408385031215613d5457600080fd5b82356001600160401b03811115613d6a57600080fd5b613d76858286016136c5565b95602094909401359450505050565b600181811c90821680613d9957607f821691505b60208210811415613dba57634e487b7160e01b600052602260045260246000fd5b50919050565b80518015158114613dd057600080fd5b919050565b600060208284031215613de757600080fd5b61300982613dc0565b9182526001600160a01b0316602082015260400190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613e4757613e47613e1d565b5060010190565b600060018060a01b03808351168452602083015160806020860152613e7660808601826139be565b9050816040850151166040860152606084015191508481036060860152613e9d81836139be565b95945050505050565b604081526000613eb96040830185613e4e565b905060018060a01b03831660208301529392505050565b6000816000190483118215151615613eea57613eea613e1d565b500290565b60008219821115613f0257613f02613e1d565b500190565b600082821015613f1957613f19613e1d565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6080815260006140146080830186613e4e565b6001600160a01b03851660208401529050613450604083018480518252602090810151910152565b60006020828403121561404e57600080fd5b8151613009816135eb565b634e487b7160e01b600052602160045260246000fd5b600082601f83011261408057600080fd5b815160206001600160401b0382111561409b5761409b61357d565b8160051b6140aa8282016135bb565b92835284810182019282810190878511156140c457600080fd5b83870192505b848310156140ec5782516140dd816135eb565b825291830191908301906140ca565b979650505050505050565b60006020828403121561410957600080fd5b81516001600160401b0381111561411f57600080fd5b6134508482850161406f565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561417a57600080fd5b5051919050565b600081518084526020808501945080840160005b83811015613a295781516001600160a01b031687529582019590820190600101614195565b8481528360208201526080604082015260006141d96080830185614181565b9050821515606083015295945050505050565b60008060006060848603121561420157600080fd5b835161420c816135eb565b6020850151604086015191945092506001600160401b0381111561422f57600080fd5b61423b8682870161406f565b9150509250925092565b838152826020820152606060408201526000613e9d6060830184614181565b60008060006060848603121561427957600080fd5b61428284613dc0565b92506020840151915060408401516001600160401b0381111561422f57600080fd5b6000826142c157634e487b7160e01b600052601260045260246000fd5b500490565b600281106142e457634e487b7160e01b600052602160045260246000fd5b9052565b60018060a01b038516815283602082015260806040820152600061430f60808301856137d9565b9050613e9d60608301846142c6565b6001600160a01b03841681526020810183905260806040820181905260009082015260a0810161345060608301846142c6565b600082516143638184602087016137ad565b9190910192915050565b60208152600061300960208301846137d956fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122015fb8364cec436767d9aa40830bdb81e639b63ea6b2797ecd5863642975f7ba364736f6c634300080c0033", + memory: evmtypes.Storage{ + evmtypes.State{ + Key: "0x" + padZeroes("0"), + Value: "0x" + padZeroes("ff"), + }, + }, + }, GenesisContract{ + name: "ProxyBridgeDoorMultiToken", + address: bridgeProxyModuleAddress, + bytecode: "60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ff8e6f2d761d58b3bd984933269e01a7ff1f70a460b808056daa4cff1ee8ab6964736f6c63430008090033", + memory: bridgeProxyStorage, }), nil } @@ -165,3 +302,27 @@ func padZeroes(input string) string { } return input } + +func padZeroesRight(input string) string { + for len(input) < 64 { + input += "0" + } + return input +} + +func getBridgeEncoding(bridge *BridgeInitInfo) string { + currency := "XRP" + currencyEncoded := []byte(currency) + encoding := padZeroes(bridge.lockingAddress) // Locking address + encoding += padZeroes("0") // Locking issuer + encoding += padZeroes("c0") // c0 = 192 => bytes before string start + encoding += padZeroes(safeProxyAddress) // Issuing address + encoding += padZeroes("0") // Issuing issuer + encoding += padZeroes("100") // c0 = 256 => bytes before string start + encoding += padZeroes(strconv.FormatInt(int64(len(currencyEncoded)), 16)) // Position 192, first string, indicates size + encoding += padZeroesRight(hex.EncodeToString(currencyEncoded)) // String encoded + encoding += padZeroes(strconv.FormatInt(int64(len(currencyEncoded)), 16)) // Position 256, second string, indicates size + encoding += padZeroesRight(hex.EncodeToString(currencyEncoded)) // String encoded + + return encoding +} diff --git a/cmd/exrpd/cmd/gencontracts.go b/cmd/exrpd/cmd/gencontracts.go index 59f527b..98d661b 100644 --- a/cmd/exrpd/cmd/gencontracts.go +++ b/cmd/exrpd/cmd/gencontracts.go @@ -24,12 +24,11 @@ import ( func AddGenesisContractsCmd(defaultNodeHome string) *cobra.Command { cmd := &cobra.Command{ - Use: "add-genesis-contracts [witness][,[witness]] [threshold]", + Use: "add-genesis-contracts [witness][,[witness]] [threshold] [bridgeLckChainAddress,minCreateAmount,signatureReward]?", Short: "Adds genesis contracts to genesis.json", - Long: `Adds genesis contracts to genesis.json. First it adds the safe contracts and afterwards - the bridge contract paired with its proxy.`, + Long: `Adds genesis contracts to genesis.json. Adds the safe contracts and bridge contracts as well as a native bridge if indicated.`, - Args: cobra.ExactArgs(2), + Args: cobra.RangeArgs(2, 3), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) @@ -38,6 +37,9 @@ func AddGenesisContractsCmd(defaultNodeHome string) *cobra.Command { config.SetRoot(clientCtx.HomeDir) + // ---------------------------------------------------------------- + // Parse args + // ---------------------------------------------------------------- witnesses, witnessesEvm, err := ParseWitnesses(args[0]) if err != nil { return fmt.Errorf("failed to parse witnesses: %w", err) @@ -48,16 +50,27 @@ func AddGenesisContractsCmd(defaultNodeHome string) *cobra.Command { return fmt.Errorf("failed to parse threshold: %w", err) } - balances := []banktypes.Balance{} - addresses := []sdk.AccAddress{} - genAccounts := []authtypes.GenesisAccount{} - evmGenAccounts := []evmtypes.GenesisAccount{} + var bridge *BridgeInitInfo = nil + if len(args) > 2 { + bridge, err = ParseBridge(args[2]) + if err != nil { + return fmt.Errorf("failed to parse bridge: %w", err) + } + } - contracts, err := getGenesisContracts(witnessesEvm, threshold) + // ---------------------------------------------------------------- + // Prepare contracts, accounts, addresses and balances + // ---------------------------------------------------------------- + contracts, err := getGenesisContracts(witnessesEvm, threshold, bridge) if err != nil { return fmt.Errorf("failed to get genesis contracts: %w", err) } + balances := []banktypes.Balance{} + addresses := []sdk.AccAddress{} + genAccounts := []authtypes.GenesisAccount{} + evmGenAccounts := []evmtypes.GenesisAccount{} + for _, contract := range contracts { addr, err := sdk.AccAddressFromHexUnsafe(contract.address) if err != nil { @@ -212,7 +225,7 @@ func AddGenesisContractsCmd(defaultNodeHome string) *cobra.Command { func ParseWitnesses(witnessesStr string) ([]sdk.AccAddress, []string, error) { witnessesStr = strings.TrimSpace(witnessesStr) if len(witnessesStr) == 0 { - return nil, nil, nil + return nil, nil, fmt.Errorf("no witnesses indicated") } witnessesStrs := strings.Split(witnessesStr, ",") @@ -243,7 +256,7 @@ func ParseWitnesses(witnessesStr string) ([]sdk.AccAddress, []string, error) { func ParseThreshold(thresholdStr string, witnessesLength int) (int64, error) { threshold, err := strconv.ParseInt(thresholdStr, 10, 64) if err != nil { - return 0, err + return 0, fmt.Errorf("error parsing threshold: %w", err) } if threshold > int64(witnessesLength) || threshold <= 0 { @@ -252,3 +265,37 @@ func ParseThreshold(thresholdStr string, witnessesLength int) (int64, error) { return threshold, nil } + +func ParseBridge(bridgeStr string) (*BridgeInitInfo, error) { + bridgeStr = strings.TrimSpace(bridgeStr) + if len(bridgeStr) == 0 { + return nil, nil + } + + bridgeInfoStrs := strings.Split(bridgeStr, ",") + if len(bridgeInfoStrs) != 3 { + return nil, fmt.Errorf("invalid bridge info format") + } + + lockingAddress := strings.TrimPrefix(bridgeInfoStrs[0], "0x") + _, err := sdk.AccAddressFromHexUnsafe(lockingAddress) + if err != nil { + return nil, fmt.Errorf("invalid bridge locking address format: %w", err) + } + + minCreateAmount, err := strconv.ParseInt(bridgeInfoStrs[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("error parsing bridge min create amount: %w", err) + } + + signatureReward, err := strconv.ParseInt(bridgeInfoStrs[2], 10, 64) + if err != nil { + return nil, fmt.Errorf("error parsing bridge signature reward: %w", err) + } + + return &BridgeInitInfo{ + lockingAddress: lockingAddress, + minCreateAmount: minCreateAmount, + signatureReward: signatureReward, + }, nil +} diff --git a/config.yml b/config.yml index 74ca24e..21d833b 100644 --- a/config.yml +++ b/config.yml @@ -23,6 +23,7 @@ genesis: params: evm_denom: token allow_unprotected_txs: true + active_precompiles: [] gov: params: min_deposit: diff --git a/go.mod b/go.mod index 9e39095..5d6643b 100644 --- a/go.mod +++ b/go.mod @@ -226,7 +226,7 @@ replace ( // use Evmos geth fork github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc2 // use exrp Evmos fork - github.com/evmos/evmos/v15 => github.com/Peersyst/evmos/v15 v15.0.0-exrp.1 + github.com/evmos/evmos/v15 => github.com/Peersyst/evmos/v15 v15.0.0-exrp.2 // Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 // replace broken goleveldb diff --git a/go.sum b/go.sum index 768ab5e..0c3dc8c 100644 --- a/go.sum +++ b/go.sum @@ -232,8 +232,8 @@ github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2y github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Peersyst/evmos/v15 v15.0.0-exrp.1 h1:hZo97kG5OIKacTd3cTfWXwZAX3bXOEnfZP0bgVdjVAw= -github.com/Peersyst/evmos/v15 v15.0.0-exrp.1/go.mod h1:15ZOo7jqFRe5elw2ipTb3oHq3x7rebUjwq4y2vJEj4Q= +github.com/Peersyst/evmos/v15 v15.0.0-exrp.2 h1:tvBzN2PbH+zH6mW3TI2oJs4SE6qdubXCWc+vtN/q95c= +github.com/Peersyst/evmos/v15 v15.0.0-exrp.2/go.mod h1:15ZOo7jqFRe5elw2ipTb3oHq3x7rebUjwq4y2vJEj4Q= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= From be184d5156fa473a01eb997fd876d0c4da0374e9 Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Wed, 20 Mar 2024 12:14:30 +0100 Subject: [PATCH 3/7] change uint to bigint for big minCreateAmount+sigReward values --- cmd/exrpd/cmd/contracts.go | 42 +++++++++++++++++------------------ cmd/exrpd/cmd/gencontracts.go | 13 ++++++----- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/cmd/exrpd/cmd/contracts.go b/cmd/exrpd/cmd/contracts.go index 57ef21a..be0211e 100644 --- a/cmd/exrpd/cmd/contracts.go +++ b/cmd/exrpd/cmd/contracts.go @@ -15,10 +15,10 @@ const ( witnessInitCoins = "10000000000000000000000" + "token" safeInitCoins = "10000000000000000000000000000000000" + "token" safeContractName = "SafeProxyImplementation" - safeProxyAddress = "b5f762798a53d543a014caf8b297cff8f2f937e8" + SafeProxyAddress = "b5f762798a53d543a014caf8b297cff8f2f937e8" fallbackHandlerAddress = "f48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4" safeMasterAddress = "3E5c63644E683549055b9Be8653de26E0B4CD36E" - bridgeProxyModuleAddress = "a025DD2C018c159489a85d288a1b420a07C43f87" + BridgeProxyModuleAddress = "a025DD2C018c159489a85d288a1b420a07C43f87" bridgeDoorAddress = "f35225d1d59e77ee66012f5bf4c41675a3d2ec7b" ) @@ -31,8 +31,8 @@ type GenesisContract struct { type BridgeInitInfo struct { lockingAddress string - minCreateAmount int64 - signatureReward int64 + minCreateAmount *big.Int + signatureReward *big.Int } func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInitInfo) ([]GenesisContract, error) { @@ -43,7 +43,7 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit Value: "0x" + padZeroes(safeMasterAddress), }, } - modulesStorage, err := buildSentinel([]string{bridgeProxyModuleAddress}, padZeroes("1")) + modulesStorage, err := buildSentinel([]string{BridgeProxyModuleAddress}, padZeroes("1")) if err != nil { return nil, err } @@ -73,11 +73,11 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit }, evmtypes.State{ Key: "0x" + padZeroes("97"), - Value: "0x" + padZeroes(safeProxyAddress), + Value: "0x" + padZeroes(SafeProxyAddress), }, evmtypes.State{ Key: "0x" + padZeroes("fd"), - Value: "0x" + padZeroes(safeProxyAddress), + Value: "0x" + padZeroes(SafeProxyAddress), }, evmtypes.State{ Key: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", @@ -122,49 +122,49 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit // Bridge lock value bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), Value: "0x" + padZeroes("1"), }) memBI = memBI.Add(memBI, big.NewInt(1)) // Bridge minCreateAmount bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), - Value: "0x" + padZeroes(strconv.FormatInt(bridge.minCreateAmount, 16)), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), + Value: "0x" + padZeroes(fmt.Sprintf("%x", bridge.minCreateAmount)), }) memBI = memBI.Add(memBI, big.NewInt(1)) // Bridge signatureReward bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), - Value: "0x" + padZeroes(strconv.FormatInt(bridge.signatureReward, 16)), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), + Value: "0x" + padZeroes(fmt.Sprintf("%x", bridge.signatureReward)), }) memBI = memBI.Add(memBI, big.NewInt(1)) // Bridge lockingAddress bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), Value: "0x" + padZeroes(bridge.lockingAddress), }) memBI = memBI.Add(memBI, big.NewInt(2)) // Sum 2 as lockingIssuer is 0 and not present // Bridge lockingIssue currency (XRP in hex + size (6)) bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), Value: "0x5852500000000000000000000000000000000000000000000000000000000006", }) memBI = memBI.Add(memBI, big.NewInt(1)) // Bridge issuingAddress bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), - Value: "0x" + padZeroes(safeProxyAddress), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), + Value: "0x" + padZeroes(SafeProxyAddress), }) - memBI = memBI.Add(memBI, big.NewInt(2)) // Sum 2 as lockingIssuer is 0 and not present + memBI = memBI.Add(memBI, big.NewInt(2)) // Sum 2 as issuingIssuer is 0 and not present // Bridge issuingIssue currency (XRP in hex + size (6)) bridgeProxyStorage = append(bridgeProxyStorage, evmtypes.State{ - Key: "0x" + fmt.Sprintf("%x", memBI), + Key: "0x" + padZeroes(fmt.Sprintf("%x", memBI)), Value: "0x5852500000000000000000000000000000000000000000000000000000000006", }) @@ -222,7 +222,7 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit }, }, GenesisContract{ name: safeContractName, - address: safeProxyAddress, + address: SafeProxyAddress, bytecode: "608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033", memory: safeStorage, }, GenesisContract{ @@ -247,7 +247,7 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit }, }, GenesisContract{ name: "ProxyBridgeDoorMultiToken", - address: bridgeProxyModuleAddress, + address: BridgeProxyModuleAddress, bytecode: "60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ff8e6f2d761d58b3bd984933269e01a7ff1f70a460b808056daa4cff1ee8ab6964736f6c63430008090033", memory: bridgeProxyStorage, }), nil @@ -316,7 +316,7 @@ func getBridgeEncoding(bridge *BridgeInitInfo) string { encoding := padZeroes(bridge.lockingAddress) // Locking address encoding += padZeroes("0") // Locking issuer encoding += padZeroes("c0") // c0 = 192 => bytes before string start - encoding += padZeroes(safeProxyAddress) // Issuing address + encoding += padZeroes(SafeProxyAddress) // Issuing address encoding += padZeroes("0") // Issuing issuer encoding += padZeroes("100") // c0 = 256 => bytes before string start encoding += padZeroes(strconv.FormatInt(int64(len(currencyEncoded)), 16)) // Position 192, first string, indicates size diff --git a/cmd/exrpd/cmd/gencontracts.go b/cmd/exrpd/cmd/gencontracts.go index 98d661b..544c1bf 100644 --- a/cmd/exrpd/cmd/gencontracts.go +++ b/cmd/exrpd/cmd/gencontracts.go @@ -4,6 +4,7 @@ import ( "encoding/hex" "encoding/json" "fmt" + "math/big" "strconv" "strings" @@ -283,14 +284,14 @@ func ParseBridge(bridgeStr string) (*BridgeInitInfo, error) { return nil, fmt.Errorf("invalid bridge locking address format: %w", err) } - minCreateAmount, err := strconv.ParseInt(bridgeInfoStrs[1], 10, 64) - if err != nil { - return nil, fmt.Errorf("error parsing bridge min create amount: %w", err) + minCreateAmount, success := big.NewInt(0).SetString(bridgeInfoStrs[1], 10) + if !success { + return nil, fmt.Errorf("error parsing bridge min create amount") } - signatureReward, err := strconv.ParseInt(bridgeInfoStrs[2], 10, 64) - if err != nil { - return nil, fmt.Errorf("error parsing bridge signature reward: %w", err) + signatureReward, success := big.NewInt(0).SetString(bridgeInfoStrs[2], 10) + if !success { + return nil, fmt.Errorf("error parsing bridge signature reward") } return &BridgeInitInfo{ From e5baabc907cd51ea255cab1d7a928f2c871bf56d Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Wed, 20 Mar 2024 12:16:28 +0100 Subject: [PATCH 4/7] add new test suite to test generated contracts --- tools/contracts-tester/.env | 6 + tools/contracts-tester/.env.example | 6 + .../bridge/BridgeDoorMultiToken.go | 3793 +++++++++++++++++ tools/contracts-tester/bridge/bridge.go | 158 + tools/contracts-tester/bridge/events.go | 196 + tools/contracts-tester/bridge/getters.go | 200 + tools/contracts-tester/bridge/transact.go | 528 +++ tools/contracts-tester/contracts_test.go | 31 + tools/contracts-tester/docker-compose.yml | 28 + tools/contracts-tester/docker/node.Dockerfile | 27 + tools/contracts-tester/docker/test.Dockerfile | 10 + tools/contracts-tester/safe/SafeL2.go | 3408 +++++++++++++++ tools/contracts-tester/safe/safe.go | 106 + tools/contracts-tester/types/types.go | 154 + 14 files changed, 8651 insertions(+) create mode 100644 tools/contracts-tester/.env create mode 100644 tools/contracts-tester/.env.example create mode 100644 tools/contracts-tester/bridge/BridgeDoorMultiToken.go create mode 100644 tools/contracts-tester/bridge/bridge.go create mode 100644 tools/contracts-tester/bridge/events.go create mode 100644 tools/contracts-tester/bridge/getters.go create mode 100644 tools/contracts-tester/bridge/transact.go create mode 100644 tools/contracts-tester/contracts_test.go create mode 100644 tools/contracts-tester/docker-compose.yml create mode 100644 tools/contracts-tester/docker/node.Dockerfile create mode 100644 tools/contracts-tester/docker/test.Dockerfile create mode 100644 tools/contracts-tester/safe/SafeL2.go create mode 100644 tools/contracts-tester/safe/safe.go create mode 100644 tools/contracts-tester/types/types.go diff --git a/tools/contracts-tester/.env b/tools/contracts-tester/.env new file mode 100644 index 0000000..89a986d --- /dev/null +++ b/tools/contracts-tester/.env @@ -0,0 +1,6 @@ +NODE_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f,aa569354684B5F48ed9a3291a328e704E406506F,68f727c3cd7aeB5a04acB864B770f5aa193676Bd +SAFE_THRESHOLD=2 +BRIDGE=254708b47465919e27da0768caf337cb6a5da50f,25000000000000000000,1000000000000000000 +BRIDGE_KEY=e4867441b2cda3c3d770a30327048a9853ba78e2ef908eca8c2a14b0e5443157 +TEST_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f:29b10d36d005d4c540da657081bba9f737e195126f14821f227cb1f5dbd669c8,aa569354684B5F48ed9a3291a328e704E406506F:c76db272e2287acec7a554814acfdb2b35769f51cead4cc4f1ff71a7268a5bbb,68f727c3cd7aeB5a04acB864B770f5aa193676Bd:f5ac42fd86cdb55f0ad85f201b5e929188213316787b171bb4626c30dce03a79 +CLAIMER_ACCOUNT=fCD6E97a730C114a6D8fd4684c0CaC15b2F81088:54170bebb7d2dae201dacdcb4b7e506a3d57b07f858877c52dbfdae342ab8a4a diff --git a/tools/contracts-tester/.env.example b/tools/contracts-tester/.env.example new file mode 100644 index 0000000..89a986d --- /dev/null +++ b/tools/contracts-tester/.env.example @@ -0,0 +1,6 @@ +NODE_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f,aa569354684B5F48ed9a3291a328e704E406506F,68f727c3cd7aeB5a04acB864B770f5aa193676Bd +SAFE_THRESHOLD=2 +BRIDGE=254708b47465919e27da0768caf337cb6a5da50f,25000000000000000000,1000000000000000000 +BRIDGE_KEY=e4867441b2cda3c3d770a30327048a9853ba78e2ef908eca8c2a14b0e5443157 +TEST_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f:29b10d36d005d4c540da657081bba9f737e195126f14821f227cb1f5dbd669c8,aa569354684B5F48ed9a3291a328e704E406506F:c76db272e2287acec7a554814acfdb2b35769f51cead4cc4f1ff71a7268a5bbb,68f727c3cd7aeB5a04acB864B770f5aa193676Bd:f5ac42fd86cdb55f0ad85f201b5e929188213316787b171bb4626c30dce03a79 +CLAIMER_ACCOUNT=fCD6E97a730C114a6D8fd4684c0CaC15b2F81088:54170bebb7d2dae201dacdcb4b7e506a3d57b07f858877c52dbfdae342ab8a4a diff --git a/tools/contracts-tester/bridge/BridgeDoorMultiToken.go b/tools/contracts-tester/bridge/BridgeDoorMultiToken.go new file mode 100644 index 0000000..5b665e1 --- /dev/null +++ b/tools/contracts-tester/bridge/BridgeDoorMultiToken.go @@ -0,0 +1,3793 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bridge + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// XChainTypesBridgeChainIssue is an auto generated low-level Go binding around an user-defined struct. +type XChainTypesBridgeChainIssue struct { + Issuer common.Address + Currency string +} + +// XChainTypesBridgeConfig is an auto generated low-level Go binding around an user-defined struct. +type XChainTypesBridgeConfig struct { + LockingChainDoor common.Address + LockingChainIssue XChainTypesBridgeChainIssue + IssuingChainDoor common.Address + IssuingChainIssue XChainTypesBridgeChainIssue +} + +// XChainTypesBridgeParams is an auto generated low-level Go binding around an user-defined struct. +type XChainTypesBridgeParams struct { + MinCreateAmount *big.Int + SignatureReward *big.Int +} + +// BridgeMetaData contains all meta data concerning the Bridge contract. +var BridgeMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AccountAlreadyCreated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BridgeAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BridgeNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerIsNotCreator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerIsNotWitness\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientReward\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidOperation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSentAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoBridgeToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SendError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadyRegistered\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"witness\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"AddClaimAttestation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"witness\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"AddCreateAccountAttestation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"Commit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"CommitWithoutAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"CreateAccount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"signatureReward\",\"type\":\"uint256\"}],\"name\":\"CreateAccountCommit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"lockingChainIssueIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"lockingChainIssueCurrency\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"issuingChainIssueIssuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"issuingChainIssueCurrency\",\"type\":\"string\"}],\"name\":\"CreateBridge\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"CreateBridgeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"CreateClaim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"bridgeKey\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Credit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"MIN_CREATE_BRIDGE_REWARD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractGnosisSafeL2\",\"name\":\"safe\",\"type\":\"address\"}],\"name\":\"__BridgeDoorCommon_init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"__Manageable_init\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_safe\",\"outputs\":[{\"internalType\":\"contractGnosisSafeL2\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"addClaimAttestation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureReward\",\"type\":\"uint256\"}],\"name\":\"addCreateAccountAttestation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"commitWithoutAddress\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureReward\",\"type\":\"uint256\"}],\"name\":\"createAccountCommit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"minCreateAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureReward\",\"type\":\"uint256\"}],\"internalType\":\"structXChainTypes.BridgeParams\",\"name\":\"params\",\"type\":\"tuple\"}],\"name\":\"createBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"createBridgeRequest\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"createClaimId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"claimId\",\"type\":\"uint256\"}],\"name\":\"getBridgeClaim\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"}],\"name\":\"getBridgeConfig\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getBridgeCreateAccount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"}],\"name\":\"getBridgeKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"}],\"name\":\"getBridgeParams\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig\",\"name\":\"bridgeConfig\",\"type\":\"tuple\"}],\"name\":\"getBridgeToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"page\",\"type\":\"uint256\"}],\"name\":\"getBridgesPaginated\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"lockingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"lockingChainIssue\",\"type\":\"tuple\"},{\"internalType\":\"address\",\"name\":\"issuingChainDoor\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"currency\",\"type\":\"string\"}],\"internalType\":\"structXChainTypes.BridgeChainIssue\",\"name\":\"issuingChainIssue\",\"type\":\"tuple\"}],\"internalType\":\"structXChainTypes.BridgeConfig[]\",\"name\":\"configs\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"minCreateAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"signatureReward\",\"type\":\"uint256\"}],\"internalType\":\"structXChainTypes.BridgeParams[]\",\"name\":\"params\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWitnesses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractGnosisSafeL2\",\"name\":\"safe\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isTokenRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", +} + +// BridgeABI is the input ABI used to generate the binding from. +// Deprecated: Use BridgeMetaData.ABI instead. +var BridgeABI = BridgeMetaData.ABI + +// Bridge is an auto generated Go binding around an Ethereum contract. +type Bridge struct { + BridgeCaller // Read-only binding to the contract + BridgeTransactor // Write-only binding to the contract + BridgeFilterer // Log filterer for contract events +} + +// BridgeCaller is an auto generated read-only Go binding around an Ethereum contract. +type BridgeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type BridgeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type BridgeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// BridgeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type BridgeSession struct { + Contract *Bridge // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type BridgeCallerSession struct { + Contract *BridgeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// BridgeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type BridgeTransactorSession struct { + Contract *BridgeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// BridgeRaw is an auto generated low-level Go binding around an Ethereum contract. +type BridgeRaw struct { + Contract *Bridge // Generic contract binding to access the raw methods on +} + +// BridgeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type BridgeCallerRaw struct { + Contract *BridgeCaller // Generic read-only contract binding to access the raw methods on +} + +// BridgeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type BridgeTransactorRaw struct { + Contract *BridgeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewBridge creates a new instance of Bridge, bound to a specific deployed contract. +func NewBridge(address common.Address, backend bind.ContractBackend) (*Bridge, error) { + contract, err := bindBridge(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Bridge{BridgeCaller: BridgeCaller{contract: contract}, BridgeTransactor: BridgeTransactor{contract: contract}, BridgeFilterer: BridgeFilterer{contract: contract}}, nil +} + +// NewBridgeCaller creates a new read-only instance of Bridge, bound to a specific deployed contract. +func NewBridgeCaller(address common.Address, caller bind.ContractCaller) (*BridgeCaller, error) { + contract, err := bindBridge(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &BridgeCaller{contract: contract}, nil +} + +// NewBridgeTransactor creates a new write-only instance of Bridge, bound to a specific deployed contract. +func NewBridgeTransactor(address common.Address, transactor bind.ContractTransactor) (*BridgeTransactor, error) { + contract, err := bindBridge(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &BridgeTransactor{contract: contract}, nil +} + +// NewBridgeFilterer creates a new log filterer instance of Bridge, bound to a specific deployed contract. +func NewBridgeFilterer(address common.Address, filterer bind.ContractFilterer) (*BridgeFilterer, error) { + contract, err := bindBridge(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &BridgeFilterer{contract: contract}, nil +} + +// bindBridge binds a generic wrapper to an already deployed contract. +func bindBridge(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(BridgeABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Bridge *BridgeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Bridge.Contract.BridgeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Bridge *BridgeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.Contract.BridgeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Bridge *BridgeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Bridge.Contract.BridgeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Bridge *BridgeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Bridge.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Bridge *BridgeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Bridge *BridgeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Bridge.Contract.contract.Transact(opts, method, params...) +} + +// MINCREATEBRIDGEREWARD is a free data retrieval call binding the contract method 0xd794559a. +// +// Solidity: function MIN_CREATE_BRIDGE_REWARD() view returns(uint256) +func (_Bridge *BridgeCaller) MINCREATEBRIDGEREWARD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "MIN_CREATE_BRIDGE_REWARD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINCREATEBRIDGEREWARD is a free data retrieval call binding the contract method 0xd794559a. +// +// Solidity: function MIN_CREATE_BRIDGE_REWARD() view returns(uint256) +func (_Bridge *BridgeSession) MINCREATEBRIDGEREWARD() (*big.Int, error) { + return _Bridge.Contract.MINCREATEBRIDGEREWARD(&_Bridge.CallOpts) +} + +// MINCREATEBRIDGEREWARD is a free data retrieval call binding the contract method 0xd794559a. +// +// Solidity: function MIN_CREATE_BRIDGE_REWARD() view returns(uint256) +func (_Bridge *BridgeCallerSession) MINCREATEBRIDGEREWARD() (*big.Int, error) { + return _Bridge.Contract.MINCREATEBRIDGEREWARD(&_Bridge.CallOpts) +} + +// Safe is a free data retrieval call binding the contract method 0x2a983d3a. +// +// Solidity: function _safe() view returns(address) +func (_Bridge *BridgeCaller) Safe(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "_safe") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Safe is a free data retrieval call binding the contract method 0x2a983d3a. +// +// Solidity: function _safe() view returns(address) +func (_Bridge *BridgeSession) Safe() (common.Address, error) { + return _Bridge.Contract.Safe(&_Bridge.CallOpts) +} + +// Safe is a free data retrieval call binding the contract method 0x2a983d3a. +// +// Solidity: function _safe() view returns(address) +func (_Bridge *BridgeCallerSession) Safe() (common.Address, error) { + return _Bridge.Contract.Safe(&_Bridge.CallOpts) +} + +// GetBridgeClaim is a free data retrieval call binding the contract method 0xc45ddbc2. +// +// Solidity: function getBridgeClaim((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId) view returns(address, address, bool) +func (_Bridge *BridgeCaller) GetBridgeClaim(opts *bind.CallOpts, bridgeConfig XChainTypesBridgeConfig, claimId *big.Int) (common.Address, common.Address, bool, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgeClaim", bridgeConfig, claimId) + + if err != nil { + return *new(common.Address), *new(common.Address), *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out1 := *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + out2 := *abi.ConvertType(out[2], new(bool)).(*bool) + + return out0, out1, out2, err + +} + +// GetBridgeClaim is a free data retrieval call binding the contract method 0xc45ddbc2. +// +// Solidity: function getBridgeClaim((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId) view returns(address, address, bool) +func (_Bridge *BridgeSession) GetBridgeClaim(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int) (common.Address, common.Address, bool, error) { + return _Bridge.Contract.GetBridgeClaim(&_Bridge.CallOpts, bridgeConfig, claimId) +} + +// GetBridgeClaim is a free data retrieval call binding the contract method 0xc45ddbc2. +// +// Solidity: function getBridgeClaim((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId) view returns(address, address, bool) +func (_Bridge *BridgeCallerSession) GetBridgeClaim(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int) (common.Address, common.Address, bool, error) { + return _Bridge.Contract.GetBridgeClaim(&_Bridge.CallOpts, bridgeConfig, claimId) +} + +// GetBridgeConfig is a free data retrieval call binding the contract method 0x0b2c50d2. +// +// Solidity: function getBridgeConfig((address,(address,string),address,(address,string)) bridgeConfig) view returns(address, address, string, address, address, string) +func (_Bridge *BridgeCaller) GetBridgeConfig(opts *bind.CallOpts, bridgeConfig XChainTypesBridgeConfig) (common.Address, common.Address, string, common.Address, common.Address, string, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgeConfig", bridgeConfig) + + if err != nil { + return *new(common.Address), *new(common.Address), *new(string), *new(common.Address), *new(common.Address), *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + out1 := *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + out2 := *abi.ConvertType(out[2], new(string)).(*string) + out3 := *abi.ConvertType(out[3], new(common.Address)).(*common.Address) + out4 := *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + out5 := *abi.ConvertType(out[5], new(string)).(*string) + + return out0, out1, out2, out3, out4, out5, err + +} + +// GetBridgeConfig is a free data retrieval call binding the contract method 0x0b2c50d2. +// +// Solidity: function getBridgeConfig((address,(address,string),address,(address,string)) bridgeConfig) view returns(address, address, string, address, address, string) +func (_Bridge *BridgeSession) GetBridgeConfig(bridgeConfig XChainTypesBridgeConfig) (common.Address, common.Address, string, common.Address, common.Address, string, error) { + return _Bridge.Contract.GetBridgeConfig(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeConfig is a free data retrieval call binding the contract method 0x0b2c50d2. +// +// Solidity: function getBridgeConfig((address,(address,string),address,(address,string)) bridgeConfig) view returns(address, address, string, address, address, string) +func (_Bridge *BridgeCallerSession) GetBridgeConfig(bridgeConfig XChainTypesBridgeConfig) (common.Address, common.Address, string, common.Address, common.Address, string, error) { + return _Bridge.Contract.GetBridgeConfig(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeCreateAccount is a free data retrieval call binding the contract method 0x2d92de74. +// +// Solidity: function getBridgeCreateAccount((address,(address,string),address,(address,string)) bridgeConfig, address account) view returns(uint256, bool, bool) +func (_Bridge *BridgeCaller) GetBridgeCreateAccount(opts *bind.CallOpts, bridgeConfig XChainTypesBridgeConfig, account common.Address) (*big.Int, bool, bool, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgeCreateAccount", bridgeConfig, account) + + if err != nil { + return *new(*big.Int), *new(bool), *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(bool)).(*bool) + out2 := *abi.ConvertType(out[2], new(bool)).(*bool) + + return out0, out1, out2, err + +} + +// GetBridgeCreateAccount is a free data retrieval call binding the contract method 0x2d92de74. +// +// Solidity: function getBridgeCreateAccount((address,(address,string),address,(address,string)) bridgeConfig, address account) view returns(uint256, bool, bool) +func (_Bridge *BridgeSession) GetBridgeCreateAccount(bridgeConfig XChainTypesBridgeConfig, account common.Address) (*big.Int, bool, bool, error) { + return _Bridge.Contract.GetBridgeCreateAccount(&_Bridge.CallOpts, bridgeConfig, account) +} + +// GetBridgeCreateAccount is a free data retrieval call binding the contract method 0x2d92de74. +// +// Solidity: function getBridgeCreateAccount((address,(address,string),address,(address,string)) bridgeConfig, address account) view returns(uint256, bool, bool) +func (_Bridge *BridgeCallerSession) GetBridgeCreateAccount(bridgeConfig XChainTypesBridgeConfig, account common.Address) (*big.Int, bool, bool, error) { + return _Bridge.Contract.GetBridgeCreateAccount(&_Bridge.CallOpts, bridgeConfig, account) +} + +// GetBridgeKey is a free data retrieval call binding the contract method 0x5bafd0c1. +// +// Solidity: function getBridgeKey((address,(address,string),address,(address,string)) bridgeConfig) pure returns(bytes32) +func (_Bridge *BridgeCaller) GetBridgeKey(opts *bind.CallOpts, bridgeConfig XChainTypesBridgeConfig) ([32]byte, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgeKey", bridgeConfig) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetBridgeKey is a free data retrieval call binding the contract method 0x5bafd0c1. +// +// Solidity: function getBridgeKey((address,(address,string),address,(address,string)) bridgeConfig) pure returns(bytes32) +func (_Bridge *BridgeSession) GetBridgeKey(bridgeConfig XChainTypesBridgeConfig) ([32]byte, error) { + return _Bridge.Contract.GetBridgeKey(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeKey is a free data retrieval call binding the contract method 0x5bafd0c1. +// +// Solidity: function getBridgeKey((address,(address,string),address,(address,string)) bridgeConfig) pure returns(bytes32) +func (_Bridge *BridgeCallerSession) GetBridgeKey(bridgeConfig XChainTypesBridgeConfig) ([32]byte, error) { + return _Bridge.Contract.GetBridgeKey(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeParams is a free data retrieval call binding the contract method 0x72e0376f. +// +// Solidity: function getBridgeParams((address,(address,string),address,(address,string)) bridgeConfig) view returns(uint256, uint256) +func (_Bridge *BridgeCaller) GetBridgeParams(opts *bind.CallOpts, bridgeConfig XChainTypesBridgeConfig) (*big.Int, *big.Int, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgeParams", bridgeConfig) + + if err != nil { + return *new(*big.Int), *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + +} + +// GetBridgeParams is a free data retrieval call binding the contract method 0x72e0376f. +// +// Solidity: function getBridgeParams((address,(address,string),address,(address,string)) bridgeConfig) view returns(uint256, uint256) +func (_Bridge *BridgeSession) GetBridgeParams(bridgeConfig XChainTypesBridgeConfig) (*big.Int, *big.Int, error) { + return _Bridge.Contract.GetBridgeParams(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeParams is a free data retrieval call binding the contract method 0x72e0376f. +// +// Solidity: function getBridgeParams((address,(address,string),address,(address,string)) bridgeConfig) view returns(uint256, uint256) +func (_Bridge *BridgeCallerSession) GetBridgeParams(bridgeConfig XChainTypesBridgeConfig) (*big.Int, *big.Int, error) { + return _Bridge.Contract.GetBridgeParams(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeToken is a free data retrieval call binding the contract method 0xa6c0873b. +// +// Solidity: function getBridgeToken((address,(address,string),address,(address,string)) bridgeConfig) view returns(address) +func (_Bridge *BridgeCaller) GetBridgeToken(opts *bind.CallOpts, bridgeConfig XChainTypesBridgeConfig) (common.Address, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgeToken", bridgeConfig) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetBridgeToken is a free data retrieval call binding the contract method 0xa6c0873b. +// +// Solidity: function getBridgeToken((address,(address,string),address,(address,string)) bridgeConfig) view returns(address) +func (_Bridge *BridgeSession) GetBridgeToken(bridgeConfig XChainTypesBridgeConfig) (common.Address, error) { + return _Bridge.Contract.GetBridgeToken(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgeToken is a free data retrieval call binding the contract method 0xa6c0873b. +// +// Solidity: function getBridgeToken((address,(address,string),address,(address,string)) bridgeConfig) view returns(address) +func (_Bridge *BridgeCallerSession) GetBridgeToken(bridgeConfig XChainTypesBridgeConfig) (common.Address, error) { + return _Bridge.Contract.GetBridgeToken(&_Bridge.CallOpts, bridgeConfig) +} + +// GetBridgesPaginated is a free data retrieval call binding the contract method 0x34525b1b. +// +// Solidity: function getBridgesPaginated(uint256 page) view returns((address,(address,string),address,(address,string))[] configs, (uint256,uint256)[] params) +func (_Bridge *BridgeCaller) GetBridgesPaginated(opts *bind.CallOpts, page *big.Int) (struct { + Configs []XChainTypesBridgeConfig + Params []XChainTypesBridgeParams +}, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getBridgesPaginated", page) + + outstruct := new(struct { + Configs []XChainTypesBridgeConfig + Params []XChainTypesBridgeParams + }) + if err != nil { + return *outstruct, err + } + + outstruct.Configs = *abi.ConvertType(out[0], new([]XChainTypesBridgeConfig)).(*[]XChainTypesBridgeConfig) + outstruct.Params = *abi.ConvertType(out[1], new([]XChainTypesBridgeParams)).(*[]XChainTypesBridgeParams) + + return *outstruct, err + +} + +// GetBridgesPaginated is a free data retrieval call binding the contract method 0x34525b1b. +// +// Solidity: function getBridgesPaginated(uint256 page) view returns((address,(address,string),address,(address,string))[] configs, (uint256,uint256)[] params) +func (_Bridge *BridgeSession) GetBridgesPaginated(page *big.Int) (struct { + Configs []XChainTypesBridgeConfig + Params []XChainTypesBridgeParams +}, error) { + return _Bridge.Contract.GetBridgesPaginated(&_Bridge.CallOpts, page) +} + +// GetBridgesPaginated is a free data retrieval call binding the contract method 0x34525b1b. +// +// Solidity: function getBridgesPaginated(uint256 page) view returns((address,(address,string),address,(address,string))[] configs, (uint256,uint256)[] params) +func (_Bridge *BridgeCallerSession) GetBridgesPaginated(page *big.Int) (struct { + Configs []XChainTypesBridgeConfig + Params []XChainTypesBridgeParams +}, error) { + return _Bridge.Contract.GetBridgesPaginated(&_Bridge.CallOpts, page) +} + +// GetWitnesses is a free data retrieval call binding the contract method 0x96d195bd. +// +// Solidity: function getWitnesses() view returns(address[]) +func (_Bridge *BridgeCaller) GetWitnesses(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "getWitnesses") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetWitnesses is a free data retrieval call binding the contract method 0x96d195bd. +// +// Solidity: function getWitnesses() view returns(address[]) +func (_Bridge *BridgeSession) GetWitnesses() ([]common.Address, error) { + return _Bridge.Contract.GetWitnesses(&_Bridge.CallOpts) +} + +// GetWitnesses is a free data retrieval call binding the contract method 0x96d195bd. +// +// Solidity: function getWitnesses() view returns(address[]) +func (_Bridge *BridgeCallerSession) GetWitnesses() ([]common.Address, error) { + return _Bridge.Contract.GetWitnesses(&_Bridge.CallOpts) +} + +// IsTokenRegistered is a free data retrieval call binding the contract method 0x26aa101f. +// +// Solidity: function isTokenRegistered(address token) view returns(bool) +func (_Bridge *BridgeCaller) IsTokenRegistered(opts *bind.CallOpts, token common.Address) (bool, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "isTokenRegistered", token) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTokenRegistered is a free data retrieval call binding the contract method 0x26aa101f. +// +// Solidity: function isTokenRegistered(address token) view returns(bool) +func (_Bridge *BridgeSession) IsTokenRegistered(token common.Address) (bool, error) { + return _Bridge.Contract.IsTokenRegistered(&_Bridge.CallOpts, token) +} + +// IsTokenRegistered is a free data retrieval call binding the contract method 0x26aa101f. +// +// Solidity: function isTokenRegistered(address token) view returns(bool) +func (_Bridge *BridgeCallerSession) IsTokenRegistered(token common.Address) (bool, error) { + return _Bridge.Contract.IsTokenRegistered(&_Bridge.CallOpts, token) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Bridge *BridgeCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Bridge *BridgeSession) Owner() (common.Address, error) { + return _Bridge.Contract.Owner(&_Bridge.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Bridge *BridgeCallerSession) Owner() (common.Address, error) { + return _Bridge.Contract.Owner(&_Bridge.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Bridge *BridgeCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Bridge *BridgeSession) Paused() (bool, error) { + return _Bridge.Contract.Paused(&_Bridge.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_Bridge *BridgeCallerSession) Paused() (bool, error) { + return _Bridge.Contract.Paused(&_Bridge.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Bridge *BridgeCaller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Bridge.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Bridge *BridgeSession) ProxiableUUID() ([32]byte, error) { + return _Bridge.Contract.ProxiableUUID(&_Bridge.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Bridge *BridgeCallerSession) ProxiableUUID() ([32]byte, error) { + return _Bridge.Contract.ProxiableUUID(&_Bridge.CallOpts) +} + +// BridgeDoorCommonInit is a paid mutator transaction binding the contract method 0xe684ab76. +// +// Solidity: function __BridgeDoorCommon_init(address safe) returns() +func (_Bridge *BridgeTransactor) BridgeDoorCommonInit(opts *bind.TransactOpts, safe common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "__BridgeDoorCommon_init", safe) +} + +// BridgeDoorCommonInit is a paid mutator transaction binding the contract method 0xe684ab76. +// +// Solidity: function __BridgeDoorCommon_init(address safe) returns() +func (_Bridge *BridgeSession) BridgeDoorCommonInit(safe common.Address) (*types.Transaction, error) { + return _Bridge.Contract.BridgeDoorCommonInit(&_Bridge.TransactOpts, safe) +} + +// BridgeDoorCommonInit is a paid mutator transaction binding the contract method 0xe684ab76. +// +// Solidity: function __BridgeDoorCommon_init(address safe) returns() +func (_Bridge *BridgeTransactorSession) BridgeDoorCommonInit(safe common.Address) (*types.Transaction, error) { + return _Bridge.Contract.BridgeDoorCommonInit(&_Bridge.TransactOpts, safe) +} + +// ManageableInit is a paid mutator transaction binding the contract method 0x4072c3b3. +// +// Solidity: function __Manageable_init() returns() +func (_Bridge *BridgeTransactor) ManageableInit(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "__Manageable_init") +} + +// ManageableInit is a paid mutator transaction binding the contract method 0x4072c3b3. +// +// Solidity: function __Manageable_init() returns() +func (_Bridge *BridgeSession) ManageableInit() (*types.Transaction, error) { + return _Bridge.Contract.ManageableInit(&_Bridge.TransactOpts) +} + +// ManageableInit is a paid mutator transaction binding the contract method 0x4072c3b3. +// +// Solidity: function __Manageable_init() returns() +func (_Bridge *BridgeTransactorSession) ManageableInit() (*types.Transaction, error) { + return _Bridge.Contract.ManageableInit(&_Bridge.TransactOpts) +} + +// AddClaimAttestation is a paid mutator transaction binding the contract method 0x192dd3cc. +// +// Solidity: function addClaimAttestation((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount, address sender, address destination) returns() +func (_Bridge *BridgeTransactor) AddClaimAttestation(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int, sender common.Address, destination common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "addClaimAttestation", bridgeConfig, claimId, amount, sender, destination) +} + +// AddClaimAttestation is a paid mutator transaction binding the contract method 0x192dd3cc. +// +// Solidity: function addClaimAttestation((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount, address sender, address destination) returns() +func (_Bridge *BridgeSession) AddClaimAttestation(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int, sender common.Address, destination common.Address) (*types.Transaction, error) { + return _Bridge.Contract.AddClaimAttestation(&_Bridge.TransactOpts, bridgeConfig, claimId, amount, sender, destination) +} + +// AddClaimAttestation is a paid mutator transaction binding the contract method 0x192dd3cc. +// +// Solidity: function addClaimAttestation((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount, address sender, address destination) returns() +func (_Bridge *BridgeTransactorSession) AddClaimAttestation(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int, sender common.Address, destination common.Address) (*types.Transaction, error) { + return _Bridge.Contract.AddClaimAttestation(&_Bridge.TransactOpts, bridgeConfig, claimId, amount, sender, destination) +} + +// AddCreateAccountAttestation is a paid mutator transaction binding the contract method 0x95fa18dd. +// +// Solidity: function addCreateAccountAttestation((address,(address,string),address,(address,string)) bridgeConfig, address destination, uint256 amount, uint256 signatureReward) returns() +func (_Bridge *BridgeTransactor) AddCreateAccountAttestation(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, destination common.Address, amount *big.Int, signatureReward *big.Int) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "addCreateAccountAttestation", bridgeConfig, destination, amount, signatureReward) +} + +// AddCreateAccountAttestation is a paid mutator transaction binding the contract method 0x95fa18dd. +// +// Solidity: function addCreateAccountAttestation((address,(address,string),address,(address,string)) bridgeConfig, address destination, uint256 amount, uint256 signatureReward) returns() +func (_Bridge *BridgeSession) AddCreateAccountAttestation(bridgeConfig XChainTypesBridgeConfig, destination common.Address, amount *big.Int, signatureReward *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.AddCreateAccountAttestation(&_Bridge.TransactOpts, bridgeConfig, destination, amount, signatureReward) +} + +// AddCreateAccountAttestation is a paid mutator transaction binding the contract method 0x95fa18dd. +// +// Solidity: function addCreateAccountAttestation((address,(address,string),address,(address,string)) bridgeConfig, address destination, uint256 amount, uint256 signatureReward) returns() +func (_Bridge *BridgeTransactorSession) AddCreateAccountAttestation(bridgeConfig XChainTypesBridgeConfig, destination common.Address, amount *big.Int, signatureReward *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.AddCreateAccountAttestation(&_Bridge.TransactOpts, bridgeConfig, destination, amount, signatureReward) +} + +// Claim is a paid mutator transaction binding the contract method 0x8436c642. +// +// Solidity: function claim((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount, address destination) returns() +func (_Bridge *BridgeTransactor) Claim(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int, destination common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "claim", bridgeConfig, claimId, amount, destination) +} + +// Claim is a paid mutator transaction binding the contract method 0x8436c642. +// +// Solidity: function claim((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount, address destination) returns() +func (_Bridge *BridgeSession) Claim(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int, destination common.Address) (*types.Transaction, error) { + return _Bridge.Contract.Claim(&_Bridge.TransactOpts, bridgeConfig, claimId, amount, destination) +} + +// Claim is a paid mutator transaction binding the contract method 0x8436c642. +// +// Solidity: function claim((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount, address destination) returns() +func (_Bridge *BridgeTransactorSession) Claim(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int, destination common.Address) (*types.Transaction, error) { + return _Bridge.Contract.Claim(&_Bridge.TransactOpts, bridgeConfig, claimId, amount, destination) +} + +// Commit is a paid mutator transaction binding the contract method 0x75f1d504. +// +// Solidity: function commit((address,(address,string),address,(address,string)) bridgeConfig, address receiver, uint256 claimId, uint256 amount) payable returns() +func (_Bridge *BridgeTransactor) Commit(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, receiver common.Address, claimId *big.Int, amount *big.Int) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "commit", bridgeConfig, receiver, claimId, amount) +} + +// Commit is a paid mutator transaction binding the contract method 0x75f1d504. +// +// Solidity: function commit((address,(address,string),address,(address,string)) bridgeConfig, address receiver, uint256 claimId, uint256 amount) payable returns() +func (_Bridge *BridgeSession) Commit(bridgeConfig XChainTypesBridgeConfig, receiver common.Address, claimId *big.Int, amount *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.Commit(&_Bridge.TransactOpts, bridgeConfig, receiver, claimId, amount) +} + +// Commit is a paid mutator transaction binding the contract method 0x75f1d504. +// +// Solidity: function commit((address,(address,string),address,(address,string)) bridgeConfig, address receiver, uint256 claimId, uint256 amount) payable returns() +func (_Bridge *BridgeTransactorSession) Commit(bridgeConfig XChainTypesBridgeConfig, receiver common.Address, claimId *big.Int, amount *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.Commit(&_Bridge.TransactOpts, bridgeConfig, receiver, claimId, amount) +} + +// CommitWithoutAddress is a paid mutator transaction binding the contract method 0x2ca4cb53. +// +// Solidity: function commitWithoutAddress((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount) payable returns() +func (_Bridge *BridgeTransactor) CommitWithoutAddress(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "commitWithoutAddress", bridgeConfig, claimId, amount) +} + +// CommitWithoutAddress is a paid mutator transaction binding the contract method 0x2ca4cb53. +// +// Solidity: function commitWithoutAddress((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount) payable returns() +func (_Bridge *BridgeSession) CommitWithoutAddress(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.CommitWithoutAddress(&_Bridge.TransactOpts, bridgeConfig, claimId, amount) +} + +// CommitWithoutAddress is a paid mutator transaction binding the contract method 0x2ca4cb53. +// +// Solidity: function commitWithoutAddress((address,(address,string),address,(address,string)) bridgeConfig, uint256 claimId, uint256 amount) payable returns() +func (_Bridge *BridgeTransactorSession) CommitWithoutAddress(bridgeConfig XChainTypesBridgeConfig, claimId *big.Int, amount *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.CommitWithoutAddress(&_Bridge.TransactOpts, bridgeConfig, claimId, amount) +} + +// CreateAccountCommit is a paid mutator transaction binding the contract method 0x3f2702e4. +// +// Solidity: function createAccountCommit((address,(address,string),address,(address,string)) bridgeConfig, address destination, uint256 amount, uint256 signatureReward) payable returns() +func (_Bridge *BridgeTransactor) CreateAccountCommit(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, destination common.Address, amount *big.Int, signatureReward *big.Int) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "createAccountCommit", bridgeConfig, destination, amount, signatureReward) +} + +// CreateAccountCommit is a paid mutator transaction binding the contract method 0x3f2702e4. +// +// Solidity: function createAccountCommit((address,(address,string),address,(address,string)) bridgeConfig, address destination, uint256 amount, uint256 signatureReward) payable returns() +func (_Bridge *BridgeSession) CreateAccountCommit(bridgeConfig XChainTypesBridgeConfig, destination common.Address, amount *big.Int, signatureReward *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.CreateAccountCommit(&_Bridge.TransactOpts, bridgeConfig, destination, amount, signatureReward) +} + +// CreateAccountCommit is a paid mutator transaction binding the contract method 0x3f2702e4. +// +// Solidity: function createAccountCommit((address,(address,string),address,(address,string)) bridgeConfig, address destination, uint256 amount, uint256 signatureReward) payable returns() +func (_Bridge *BridgeTransactorSession) CreateAccountCommit(bridgeConfig XChainTypesBridgeConfig, destination common.Address, amount *big.Int, signatureReward *big.Int) (*types.Transaction, error) { + return _Bridge.Contract.CreateAccountCommit(&_Bridge.TransactOpts, bridgeConfig, destination, amount, signatureReward) +} + +// CreateBridge is a paid mutator transaction binding the contract method 0x4a07d673. +// +// Solidity: function createBridge((address,(address,string),address,(address,string)) config, (uint256,uint256) params) returns() +func (_Bridge *BridgeTransactor) CreateBridge(opts *bind.TransactOpts, config XChainTypesBridgeConfig, params XChainTypesBridgeParams) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "createBridge", config, params) +} + +// CreateBridge is a paid mutator transaction binding the contract method 0x4a07d673. +// +// Solidity: function createBridge((address,(address,string),address,(address,string)) config, (uint256,uint256) params) returns() +func (_Bridge *BridgeSession) CreateBridge(config XChainTypesBridgeConfig, params XChainTypesBridgeParams) (*types.Transaction, error) { + return _Bridge.Contract.CreateBridge(&_Bridge.TransactOpts, config, params) +} + +// CreateBridge is a paid mutator transaction binding the contract method 0x4a07d673. +// +// Solidity: function createBridge((address,(address,string),address,(address,string)) config, (uint256,uint256) params) returns() +func (_Bridge *BridgeTransactorSession) CreateBridge(config XChainTypesBridgeConfig, params XChainTypesBridgeParams) (*types.Transaction, error) { + return _Bridge.Contract.CreateBridge(&_Bridge.TransactOpts, config, params) +} + +// CreateBridgeRequest is a paid mutator transaction binding the contract method 0x10231036. +// +// Solidity: function createBridgeRequest(address tokenAddress) payable returns() +func (_Bridge *BridgeTransactor) CreateBridgeRequest(opts *bind.TransactOpts, tokenAddress common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "createBridgeRequest", tokenAddress) +} + +// CreateBridgeRequest is a paid mutator transaction binding the contract method 0x10231036. +// +// Solidity: function createBridgeRequest(address tokenAddress) payable returns() +func (_Bridge *BridgeSession) CreateBridgeRequest(tokenAddress common.Address) (*types.Transaction, error) { + return _Bridge.Contract.CreateBridgeRequest(&_Bridge.TransactOpts, tokenAddress) +} + +// CreateBridgeRequest is a paid mutator transaction binding the contract method 0x10231036. +// +// Solidity: function createBridgeRequest(address tokenAddress) payable returns() +func (_Bridge *BridgeTransactorSession) CreateBridgeRequest(tokenAddress common.Address) (*types.Transaction, error) { + return _Bridge.Contract.CreateBridgeRequest(&_Bridge.TransactOpts, tokenAddress) +} + +// CreateClaimId is a paid mutator transaction binding the contract method 0x8d5cd5bd. +// +// Solidity: function createClaimId((address,(address,string),address,(address,string)) bridgeConfig, address sender) payable returns(uint256) +func (_Bridge *BridgeTransactor) CreateClaimId(opts *bind.TransactOpts, bridgeConfig XChainTypesBridgeConfig, sender common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "createClaimId", bridgeConfig, sender) +} + +// CreateClaimId is a paid mutator transaction binding the contract method 0x8d5cd5bd. +// +// Solidity: function createClaimId((address,(address,string),address,(address,string)) bridgeConfig, address sender) payable returns(uint256) +func (_Bridge *BridgeSession) CreateClaimId(bridgeConfig XChainTypesBridgeConfig, sender common.Address) (*types.Transaction, error) { + return _Bridge.Contract.CreateClaimId(&_Bridge.TransactOpts, bridgeConfig, sender) +} + +// CreateClaimId is a paid mutator transaction binding the contract method 0x8d5cd5bd. +// +// Solidity: function createClaimId((address,(address,string),address,(address,string)) bridgeConfig, address sender) payable returns(uint256) +func (_Bridge *BridgeTransactorSession) CreateClaimId(bridgeConfig XChainTypesBridgeConfig, sender common.Address) (*types.Transaction, error) { + return _Bridge.Contract.CreateClaimId(&_Bridge.TransactOpts, bridgeConfig, sender) +} + +// Execute is a paid mutator transaction binding the contract method 0x51945447. +// +// Solidity: function execute(address to, uint256 value, bytes data, uint8 operation) returns(bool success) +func (_Bridge *BridgeTransactor) Execute(opts *bind.TransactOpts, to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "execute", to, value, data, operation) +} + +// Execute is a paid mutator transaction binding the contract method 0x51945447. +// +// Solidity: function execute(address to, uint256 value, bytes data, uint8 operation) returns(bool success) +func (_Bridge *BridgeSession) Execute(to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Bridge.Contract.Execute(&_Bridge.TransactOpts, to, value, data, operation) +} + +// Execute is a paid mutator transaction binding the contract method 0x51945447. +// +// Solidity: function execute(address to, uint256 value, bytes data, uint8 operation) returns(bool success) +func (_Bridge *BridgeTransactorSession) Execute(to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Bridge.Contract.Execute(&_Bridge.TransactOpts, to, value, data, operation) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address safe) returns() +func (_Bridge *BridgeTransactor) Initialize(opts *bind.TransactOpts, safe common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "initialize", safe) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address safe) returns() +func (_Bridge *BridgeSession) Initialize(safe common.Address) (*types.Transaction, error) { + return _Bridge.Contract.Initialize(&_Bridge.TransactOpts, safe) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address safe) returns() +func (_Bridge *BridgeTransactorSession) Initialize(safe common.Address) (*types.Transaction, error) { + return _Bridge.Contract.Initialize(&_Bridge.TransactOpts, safe) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Bridge *BridgeTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Bridge *BridgeSession) Pause() (*types.Transaction, error) { + return _Bridge.Contract.Pause(&_Bridge.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_Bridge *BridgeTransactorSession) Pause() (*types.Transaction, error) { + return _Bridge.Contract.Pause(&_Bridge.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Bridge *BridgeTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Bridge *BridgeSession) RenounceOwnership() (*types.Transaction, error) { + return _Bridge.Contract.RenounceOwnership(&_Bridge.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Bridge *BridgeTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Bridge.Contract.RenounceOwnership(&_Bridge.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Bridge *BridgeTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Bridge *BridgeSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Bridge.Contract.TransferOwnership(&_Bridge.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Bridge *BridgeTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Bridge.Contract.TransferOwnership(&_Bridge.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Bridge *BridgeTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Bridge *BridgeSession) Unpause() (*types.Transaction, error) { + return _Bridge.Contract.Unpause(&_Bridge.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_Bridge *BridgeTransactorSession) Unpause() (*types.Transaction, error) { + return _Bridge.Contract.Unpause(&_Bridge.TransactOpts) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_Bridge *BridgeTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "upgradeTo", newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_Bridge *BridgeSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _Bridge.Contract.UpgradeTo(&_Bridge.TransactOpts, newImplementation) +} + +// UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6. +// +// Solidity: function upgradeTo(address newImplementation) returns() +func (_Bridge *BridgeTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) { + return _Bridge.Contract.UpgradeTo(&_Bridge.TransactOpts, newImplementation) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Bridge *BridgeTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Bridge.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Bridge *BridgeSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Bridge.Contract.UpgradeToAndCall(&_Bridge.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Bridge *BridgeTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Bridge.Contract.UpgradeToAndCall(&_Bridge.TransactOpts, newImplementation, data) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Bridge *BridgeTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Bridge.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Bridge *BridgeSession) Receive() (*types.Transaction, error) { + return _Bridge.Contract.Receive(&_Bridge.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Bridge *BridgeTransactorSession) Receive() (*types.Transaction, error) { + return _Bridge.Contract.Receive(&_Bridge.TransactOpts) +} + +// BridgeAddClaimAttestationIterator is returned from FilterAddClaimAttestation and is used to iterate over the raw logs and unpacked data for AddClaimAttestation events raised by the Bridge contract. +type BridgeAddClaimAttestationIterator struct { + Event *BridgeAddClaimAttestation // 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 *BridgeAddClaimAttestationIterator) 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(BridgeAddClaimAttestation) + 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(BridgeAddClaimAttestation) + 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 *BridgeAddClaimAttestationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeAddClaimAttestationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeAddClaimAttestation represents a AddClaimAttestation event raised by the Bridge contract. +type BridgeAddClaimAttestation struct { + BridgeKey [32]byte + ClaimId *big.Int + Witness common.Address + Value *big.Int + Receiver common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAddClaimAttestation is a free log retrieval operation binding the contract event 0x750bc14bd61ac34397f57970e1a0fd14fd27247cc77aa2b3c304e2e973c52a40. +// +// Solidity: event AddClaimAttestation(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed witness, uint256 value, address receiver) +func (_Bridge *BridgeFilterer) FilterAddClaimAttestation(opts *bind.FilterOpts, bridgeKey [][32]byte, claimId []*big.Int, witness []common.Address) (*BridgeAddClaimAttestationIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var witnessRule []interface{} + for _, witnessItem := range witness { + witnessRule = append(witnessRule, witnessItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "AddClaimAttestation", bridgeKeyRule, claimIdRule, witnessRule) + if err != nil { + return nil, err + } + return &BridgeAddClaimAttestationIterator{contract: _Bridge.contract, event: "AddClaimAttestation", logs: logs, sub: sub}, nil +} + +// WatchAddClaimAttestation is a free log subscription operation binding the contract event 0x750bc14bd61ac34397f57970e1a0fd14fd27247cc77aa2b3c304e2e973c52a40. +// +// Solidity: event AddClaimAttestation(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed witness, uint256 value, address receiver) +func (_Bridge *BridgeFilterer) WatchAddClaimAttestation(opts *bind.WatchOpts, sink chan<- *BridgeAddClaimAttestation, bridgeKey [][32]byte, claimId []*big.Int, witness []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var witnessRule []interface{} + for _, witnessItem := range witness { + witnessRule = append(witnessRule, witnessItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "AddClaimAttestation", bridgeKeyRule, claimIdRule, witnessRule) + 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(BridgeAddClaimAttestation) + if err := _Bridge.contract.UnpackLog(event, "AddClaimAttestation", 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 +} + +// ParseAddClaimAttestation is a log parse operation binding the contract event 0x750bc14bd61ac34397f57970e1a0fd14fd27247cc77aa2b3c304e2e973c52a40. +// +// Solidity: event AddClaimAttestation(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed witness, uint256 value, address receiver) +func (_Bridge *BridgeFilterer) ParseAddClaimAttestation(log types.Log) (*BridgeAddClaimAttestation, error) { + event := new(BridgeAddClaimAttestation) + if err := _Bridge.contract.UnpackLog(event, "AddClaimAttestation", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeAddCreateAccountAttestationIterator is returned from FilterAddCreateAccountAttestation and is used to iterate over the raw logs and unpacked data for AddCreateAccountAttestation events raised by the Bridge contract. +type BridgeAddCreateAccountAttestationIterator struct { + Event *BridgeAddCreateAccountAttestation // 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 *BridgeAddCreateAccountAttestationIterator) 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(BridgeAddCreateAccountAttestation) + 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(BridgeAddCreateAccountAttestation) + 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 *BridgeAddCreateAccountAttestationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeAddCreateAccountAttestationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeAddCreateAccountAttestation represents a AddCreateAccountAttestation event raised by the Bridge contract. +type BridgeAddCreateAccountAttestation struct { + BridgeKey [32]byte + Witness common.Address + Receiver common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAddCreateAccountAttestation is a free log retrieval operation binding the contract event 0x64f8fc141a8c2d310942bbc5236041fa0a0c6c39a9fb295be5c959224382815e. +// +// Solidity: event AddCreateAccountAttestation(bytes32 indexed bridgeKey, address indexed witness, address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) FilterAddCreateAccountAttestation(opts *bind.FilterOpts, bridgeKey [][32]byte, witness []common.Address, receiver []common.Address) (*BridgeAddCreateAccountAttestationIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var witnessRule []interface{} + for _, witnessItem := range witness { + witnessRule = append(witnessRule, witnessItem) + } + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "AddCreateAccountAttestation", bridgeKeyRule, witnessRule, receiverRule) + if err != nil { + return nil, err + } + return &BridgeAddCreateAccountAttestationIterator{contract: _Bridge.contract, event: "AddCreateAccountAttestation", logs: logs, sub: sub}, nil +} + +// WatchAddCreateAccountAttestation is a free log subscription operation binding the contract event 0x64f8fc141a8c2d310942bbc5236041fa0a0c6c39a9fb295be5c959224382815e. +// +// Solidity: event AddCreateAccountAttestation(bytes32 indexed bridgeKey, address indexed witness, address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) WatchAddCreateAccountAttestation(opts *bind.WatchOpts, sink chan<- *BridgeAddCreateAccountAttestation, bridgeKey [][32]byte, witness []common.Address, receiver []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var witnessRule []interface{} + for _, witnessItem := range witness { + witnessRule = append(witnessRule, witnessItem) + } + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "AddCreateAccountAttestation", bridgeKeyRule, witnessRule, receiverRule) + 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(BridgeAddCreateAccountAttestation) + if err := _Bridge.contract.UnpackLog(event, "AddCreateAccountAttestation", 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 +} + +// ParseAddCreateAccountAttestation is a log parse operation binding the contract event 0x64f8fc141a8c2d310942bbc5236041fa0a0c6c39a9fb295be5c959224382815e. +// +// Solidity: event AddCreateAccountAttestation(bytes32 indexed bridgeKey, address indexed witness, address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) ParseAddCreateAccountAttestation(log types.Log) (*BridgeAddCreateAccountAttestation, error) { + event := new(BridgeAddCreateAccountAttestation) + if err := _Bridge.contract.UnpackLog(event, "AddCreateAccountAttestation", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the Bridge contract. +type BridgeAdminChangedIterator struct { + Event *BridgeAdminChanged // 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 *BridgeAdminChangedIterator) 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(BridgeAdminChanged) + 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(BridgeAdminChanged) + 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 *BridgeAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeAdminChanged represents a AdminChanged event raised by the Bridge contract. +type BridgeAdminChanged struct { + PreviousAdmin common.Address + NewAdmin common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_Bridge *BridgeFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*BridgeAdminChangedIterator, error) { + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return &BridgeAdminChangedIterator{contract: _Bridge.contract, event: "AdminChanged", logs: logs, sub: sub}, nil +} + +// WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_Bridge *BridgeFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *BridgeAdminChanged) (event.Subscription, error) { + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "AdminChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BridgeAdminChanged) + if err := _Bridge.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f. +// +// Solidity: event AdminChanged(address previousAdmin, address newAdmin) +func (_Bridge *BridgeFilterer) ParseAdminChanged(log types.Log) (*BridgeAdminChanged, error) { + event := new(BridgeAdminChanged) + if err := _Bridge.contract.UnpackLog(event, "AdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeBeaconUpgradedIterator is returned from FilterBeaconUpgraded and is used to iterate over the raw logs and unpacked data for BeaconUpgraded events raised by the Bridge contract. +type BridgeBeaconUpgradedIterator struct { + Event *BridgeBeaconUpgraded // 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 *BridgeBeaconUpgradedIterator) 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(BridgeBeaconUpgraded) + 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(BridgeBeaconUpgraded) + 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 *BridgeBeaconUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeBeaconUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeBeaconUpgraded represents a BeaconUpgraded event raised by the Bridge contract. +type BridgeBeaconUpgraded struct { + Beacon common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterBeaconUpgraded is a free log retrieval operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_Bridge *BridgeFilterer) FilterBeaconUpgraded(opts *bind.FilterOpts, beacon []common.Address) (*BridgeBeaconUpgradedIterator, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "BeaconUpgraded", beaconRule) + if err != nil { + return nil, err + } + return &BridgeBeaconUpgradedIterator{contract: _Bridge.contract, event: "BeaconUpgraded", logs: logs, sub: sub}, nil +} + +// WatchBeaconUpgraded is a free log subscription operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_Bridge *BridgeFilterer) WatchBeaconUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeBeaconUpgraded, beacon []common.Address) (event.Subscription, error) { + + var beaconRule []interface{} + for _, beaconItem := range beacon { + beaconRule = append(beaconRule, beaconItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "BeaconUpgraded", beaconRule) + 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(BridgeBeaconUpgraded) + if err := _Bridge.contract.UnpackLog(event, "BeaconUpgraded", 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 +} + +// ParseBeaconUpgraded is a log parse operation binding the contract event 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e. +// +// Solidity: event BeaconUpgraded(address indexed beacon) +func (_Bridge *BridgeFilterer) ParseBeaconUpgraded(log types.Log) (*BridgeBeaconUpgraded, error) { + event := new(BridgeBeaconUpgraded) + if err := _Bridge.contract.UnpackLog(event, "BeaconUpgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeClaimIterator is returned from FilterClaim and is used to iterate over the raw logs and unpacked data for Claim events raised by the Bridge contract. +type BridgeClaimIterator struct { + Event *BridgeClaim // 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 *BridgeClaimIterator) 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(BridgeClaim) + 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(BridgeClaim) + 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 *BridgeClaimIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeClaimIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeClaim represents a Claim event raised by the Bridge contract. +type BridgeClaim struct { + BridgeKey [32]byte + ClaimId *big.Int + Sender common.Address + Value *big.Int + Destination common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterClaim is a free log retrieval operation binding the contract event 0x436897f58db529a6e27c5b7aa31967d35b9b81540e4c797b9322c1740441bf54. +// +// Solidity: event Claim(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value, address destination) +func (_Bridge *BridgeFilterer) FilterClaim(opts *bind.FilterOpts, bridgeKey [][32]byte, claimId []*big.Int, sender []common.Address) (*BridgeClaimIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Claim", bridgeKeyRule, claimIdRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeClaimIterator{contract: _Bridge.contract, event: "Claim", logs: logs, sub: sub}, nil +} + +// WatchClaim is a free log subscription operation binding the contract event 0x436897f58db529a6e27c5b7aa31967d35b9b81540e4c797b9322c1740441bf54. +// +// Solidity: event Claim(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value, address destination) +func (_Bridge *BridgeFilterer) WatchClaim(opts *bind.WatchOpts, sink chan<- *BridgeClaim, bridgeKey [][32]byte, claimId []*big.Int, sender []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Claim", bridgeKeyRule, claimIdRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BridgeClaim) + if err := _Bridge.contract.UnpackLog(event, "Claim", 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 +} + +// ParseClaim is a log parse operation binding the contract event 0x436897f58db529a6e27c5b7aa31967d35b9b81540e4c797b9322c1740441bf54. +// +// Solidity: event Claim(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value, address destination) +func (_Bridge *BridgeFilterer) ParseClaim(log types.Log) (*BridgeClaim, error) { + event := new(BridgeClaim) + if err := _Bridge.contract.UnpackLog(event, "Claim", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCommitIterator is returned from FilterCommit and is used to iterate over the raw logs and unpacked data for Commit events raised by the Bridge contract. +type BridgeCommitIterator struct { + Event *BridgeCommit // 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 *BridgeCommitIterator) 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(BridgeCommit) + 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(BridgeCommit) + 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 *BridgeCommitIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCommitIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCommit represents a Commit event raised by the Bridge contract. +type BridgeCommit struct { + BridgeKey [32]byte + ClaimId *big.Int + Sender common.Address + Value *big.Int + Receiver common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCommit is a free log retrieval operation binding the contract event 0x290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a11. +// +// Solidity: event Commit(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value, address receiver) +func (_Bridge *BridgeFilterer) FilterCommit(opts *bind.FilterOpts, bridgeKey [][32]byte, claimId []*big.Int, sender []common.Address) (*BridgeCommitIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Commit", bridgeKeyRule, claimIdRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeCommitIterator{contract: _Bridge.contract, event: "Commit", logs: logs, sub: sub}, nil +} + +// WatchCommit is a free log subscription operation binding the contract event 0x290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a11. +// +// Solidity: event Commit(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value, address receiver) +func (_Bridge *BridgeFilterer) WatchCommit(opts *bind.WatchOpts, sink chan<- *BridgeCommit, bridgeKey [][32]byte, claimId []*big.Int, sender []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Commit", bridgeKeyRule, claimIdRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BridgeCommit) + if err := _Bridge.contract.UnpackLog(event, "Commit", 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 +} + +// ParseCommit is a log parse operation binding the contract event 0x290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a11. +// +// Solidity: event Commit(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value, address receiver) +func (_Bridge *BridgeFilterer) ParseCommit(log types.Log) (*BridgeCommit, error) { + event := new(BridgeCommit) + if err := _Bridge.contract.UnpackLog(event, "Commit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCommitWithoutAddressIterator is returned from FilterCommitWithoutAddress and is used to iterate over the raw logs and unpacked data for CommitWithoutAddress events raised by the Bridge contract. +type BridgeCommitWithoutAddressIterator struct { + Event *BridgeCommitWithoutAddress // 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 *BridgeCommitWithoutAddressIterator) 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(BridgeCommitWithoutAddress) + 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(BridgeCommitWithoutAddress) + 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 *BridgeCommitWithoutAddressIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCommitWithoutAddressIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCommitWithoutAddress represents a CommitWithoutAddress event raised by the Bridge contract. +type BridgeCommitWithoutAddress struct { + BridgeKey [32]byte + ClaimId *big.Int + Sender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCommitWithoutAddress is a free log retrieval operation binding the contract event 0x32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa1. +// +// Solidity: event CommitWithoutAddress(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value) +func (_Bridge *BridgeFilterer) FilterCommitWithoutAddress(opts *bind.FilterOpts, bridgeKey [][32]byte, claimId []*big.Int, sender []common.Address) (*BridgeCommitWithoutAddressIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "CommitWithoutAddress", bridgeKeyRule, claimIdRule, senderRule) + if err != nil { + return nil, err + } + return &BridgeCommitWithoutAddressIterator{contract: _Bridge.contract, event: "CommitWithoutAddress", logs: logs, sub: sub}, nil +} + +// WatchCommitWithoutAddress is a free log subscription operation binding the contract event 0x32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa1. +// +// Solidity: event CommitWithoutAddress(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value) +func (_Bridge *BridgeFilterer) WatchCommitWithoutAddress(opts *bind.WatchOpts, sink chan<- *BridgeCommitWithoutAddress, bridgeKey [][32]byte, claimId []*big.Int, sender []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "CommitWithoutAddress", bridgeKeyRule, claimIdRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BridgeCommitWithoutAddress) + if err := _Bridge.contract.UnpackLog(event, "CommitWithoutAddress", 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 +} + +// ParseCommitWithoutAddress is a log parse operation binding the contract event 0x32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa1. +// +// Solidity: event CommitWithoutAddress(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed sender, uint256 value) +func (_Bridge *BridgeFilterer) ParseCommitWithoutAddress(log types.Log) (*BridgeCommitWithoutAddress, error) { + event := new(BridgeCommitWithoutAddress) + if err := _Bridge.contract.UnpackLog(event, "CommitWithoutAddress", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCreateAccountIterator is returned from FilterCreateAccount and is used to iterate over the raw logs and unpacked data for CreateAccount events raised by the Bridge contract. +type BridgeCreateAccountIterator struct { + Event *BridgeCreateAccount // 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 *BridgeCreateAccountIterator) 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(BridgeCreateAccount) + 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(BridgeCreateAccount) + 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 *BridgeCreateAccountIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCreateAccountIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCreateAccount represents a CreateAccount event raised by the Bridge contract. +type BridgeCreateAccount struct { + Receiver common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCreateAccount is a free log retrieval operation binding the contract event 0x85841522199c696c3d4a549fea06732153559ded5db5cf6dfa3bb099827f2c84. +// +// Solidity: event CreateAccount(address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) FilterCreateAccount(opts *bind.FilterOpts, receiver []common.Address) (*BridgeCreateAccountIterator, error) { + + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "CreateAccount", receiverRule) + if err != nil { + return nil, err + } + return &BridgeCreateAccountIterator{contract: _Bridge.contract, event: "CreateAccount", logs: logs, sub: sub}, nil +} + +// WatchCreateAccount is a free log subscription operation binding the contract event 0x85841522199c696c3d4a549fea06732153559ded5db5cf6dfa3bb099827f2c84. +// +// Solidity: event CreateAccount(address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) WatchCreateAccount(opts *bind.WatchOpts, sink chan<- *BridgeCreateAccount, receiver []common.Address) (event.Subscription, error) { + + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "CreateAccount", receiverRule) + 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(BridgeCreateAccount) + if err := _Bridge.contract.UnpackLog(event, "CreateAccount", 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 +} + +// ParseCreateAccount is a log parse operation binding the contract event 0x85841522199c696c3d4a549fea06732153559ded5db5cf6dfa3bb099827f2c84. +// +// Solidity: event CreateAccount(address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) ParseCreateAccount(log types.Log) (*BridgeCreateAccount, error) { + event := new(BridgeCreateAccount) + if err := _Bridge.contract.UnpackLog(event, "CreateAccount", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCreateAccountCommitIterator is returned from FilterCreateAccountCommit and is used to iterate over the raw logs and unpacked data for CreateAccountCommit events raised by the Bridge contract. +type BridgeCreateAccountCommitIterator struct { + Event *BridgeCreateAccountCommit // 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 *BridgeCreateAccountCommitIterator) 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(BridgeCreateAccountCommit) + 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(BridgeCreateAccountCommit) + 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 *BridgeCreateAccountCommitIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCreateAccountCommitIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCreateAccountCommit represents a CreateAccountCommit event raised by the Bridge contract. +type BridgeCreateAccountCommit struct { + BridgeKey [32]byte + Creator common.Address + Destination common.Address + Value *big.Int + SignatureReward *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCreateAccountCommit is a free log retrieval operation binding the contract event 0x32ebca0d0dd8fc03a488dcaab22112132af86cbc4c2df086bc7f328d751f5d7e. +// +// Solidity: event CreateAccountCommit(bytes32 indexed bridgeKey, address indexed creator, address indexed destination, uint256 value, uint256 signatureReward) +func (_Bridge *BridgeFilterer) FilterCreateAccountCommit(opts *bind.FilterOpts, bridgeKey [][32]byte, creator []common.Address, destination []common.Address) (*BridgeCreateAccountCommitIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "CreateAccountCommit", bridgeKeyRule, creatorRule, destinationRule) + if err != nil { + return nil, err + } + return &BridgeCreateAccountCommitIterator{contract: _Bridge.contract, event: "CreateAccountCommit", logs: logs, sub: sub}, nil +} + +// WatchCreateAccountCommit is a free log subscription operation binding the contract event 0x32ebca0d0dd8fc03a488dcaab22112132af86cbc4c2df086bc7f328d751f5d7e. +// +// Solidity: event CreateAccountCommit(bytes32 indexed bridgeKey, address indexed creator, address indexed destination, uint256 value, uint256 signatureReward) +func (_Bridge *BridgeFilterer) WatchCreateAccountCommit(opts *bind.WatchOpts, sink chan<- *BridgeCreateAccountCommit, bridgeKey [][32]byte, creator []common.Address, destination []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + var destinationRule []interface{} + for _, destinationItem := range destination { + destinationRule = append(destinationRule, destinationItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "CreateAccountCommit", bridgeKeyRule, creatorRule, destinationRule) + 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(BridgeCreateAccountCommit) + if err := _Bridge.contract.UnpackLog(event, "CreateAccountCommit", 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 +} + +// ParseCreateAccountCommit is a log parse operation binding the contract event 0x32ebca0d0dd8fc03a488dcaab22112132af86cbc4c2df086bc7f328d751f5d7e. +// +// Solidity: event CreateAccountCommit(bytes32 indexed bridgeKey, address indexed creator, address indexed destination, uint256 value, uint256 signatureReward) +func (_Bridge *BridgeFilterer) ParseCreateAccountCommit(log types.Log) (*BridgeCreateAccountCommit, error) { + event := new(BridgeCreateAccountCommit) + if err := _Bridge.contract.UnpackLog(event, "CreateAccountCommit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCreateBridgeIterator is returned from FilterCreateBridge and is used to iterate over the raw logs and unpacked data for CreateBridge events raised by the Bridge contract. +type BridgeCreateBridgeIterator struct { + Event *BridgeCreateBridge // 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 *BridgeCreateBridgeIterator) 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(BridgeCreateBridge) + 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(BridgeCreateBridge) + 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 *BridgeCreateBridgeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCreateBridgeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCreateBridge represents a CreateBridge event raised by the Bridge contract. +type BridgeCreateBridge struct { + BridgeKey [32]byte + LockingChainDoor common.Address + LockingChainIssueIssuer common.Address + LockingChainIssueCurrency string + IssuingChainDoor common.Address + IssuingChainIssueIssuer common.Address + IssuingChainIssueCurrency string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCreateBridge is a free log retrieval operation binding the contract event 0xe8155fae5a2ff8b2ff714dc22bb65489bdf14794bdc7e5802d7ba8e62f0c3ccf. +// +// Solidity: event CreateBridge(bytes32 indexed bridgeKey, address lockingChainDoor, address lockingChainIssueIssuer, string lockingChainIssueCurrency, address issuingChainDoor, address issuingChainIssueIssuer, string issuingChainIssueCurrency) +func (_Bridge *BridgeFilterer) FilterCreateBridge(opts *bind.FilterOpts, bridgeKey [][32]byte) (*BridgeCreateBridgeIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "CreateBridge", bridgeKeyRule) + if err != nil { + return nil, err + } + return &BridgeCreateBridgeIterator{contract: _Bridge.contract, event: "CreateBridge", logs: logs, sub: sub}, nil +} + +// WatchCreateBridge is a free log subscription operation binding the contract event 0xe8155fae5a2ff8b2ff714dc22bb65489bdf14794bdc7e5802d7ba8e62f0c3ccf. +// +// Solidity: event CreateBridge(bytes32 indexed bridgeKey, address lockingChainDoor, address lockingChainIssueIssuer, string lockingChainIssueCurrency, address issuingChainDoor, address issuingChainIssueIssuer, string issuingChainIssueCurrency) +func (_Bridge *BridgeFilterer) WatchCreateBridge(opts *bind.WatchOpts, sink chan<- *BridgeCreateBridge, bridgeKey [][32]byte) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "CreateBridge", bridgeKeyRule) + 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(BridgeCreateBridge) + if err := _Bridge.contract.UnpackLog(event, "CreateBridge", 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 +} + +// ParseCreateBridge is a log parse operation binding the contract event 0xe8155fae5a2ff8b2ff714dc22bb65489bdf14794bdc7e5802d7ba8e62f0c3ccf. +// +// Solidity: event CreateBridge(bytes32 indexed bridgeKey, address lockingChainDoor, address lockingChainIssueIssuer, string lockingChainIssueCurrency, address issuingChainDoor, address issuingChainIssueIssuer, string issuingChainIssueCurrency) +func (_Bridge *BridgeFilterer) ParseCreateBridge(log types.Log) (*BridgeCreateBridge, error) { + event := new(BridgeCreateBridge) + if err := _Bridge.contract.UnpackLog(event, "CreateBridge", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCreateBridgeRequestIterator is returned from FilterCreateBridgeRequest and is used to iterate over the raw logs and unpacked data for CreateBridgeRequest events raised by the Bridge contract. +type BridgeCreateBridgeRequestIterator struct { + Event *BridgeCreateBridgeRequest // 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 *BridgeCreateBridgeRequestIterator) 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(BridgeCreateBridgeRequest) + 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(BridgeCreateBridgeRequest) + 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 *BridgeCreateBridgeRequestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCreateBridgeRequestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCreateBridgeRequest represents a CreateBridgeRequest event raised by the Bridge contract. +type BridgeCreateBridgeRequest struct { + TokenAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCreateBridgeRequest is a free log retrieval operation binding the contract event 0x54942c22b4f7613321d895cad0749836eeb5c8b282c630c4478e07913f814dbc. +// +// Solidity: event CreateBridgeRequest(address tokenAddress) +func (_Bridge *BridgeFilterer) FilterCreateBridgeRequest(opts *bind.FilterOpts) (*BridgeCreateBridgeRequestIterator, error) { + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "CreateBridgeRequest") + if err != nil { + return nil, err + } + return &BridgeCreateBridgeRequestIterator{contract: _Bridge.contract, event: "CreateBridgeRequest", logs: logs, sub: sub}, nil +} + +// WatchCreateBridgeRequest is a free log subscription operation binding the contract event 0x54942c22b4f7613321d895cad0749836eeb5c8b282c630c4478e07913f814dbc. +// +// Solidity: event CreateBridgeRequest(address tokenAddress) +func (_Bridge *BridgeFilterer) WatchCreateBridgeRequest(opts *bind.WatchOpts, sink chan<- *BridgeCreateBridgeRequest) (event.Subscription, error) { + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "CreateBridgeRequest") + 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(BridgeCreateBridgeRequest) + if err := _Bridge.contract.UnpackLog(event, "CreateBridgeRequest", 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 +} + +// ParseCreateBridgeRequest is a log parse operation binding the contract event 0x54942c22b4f7613321d895cad0749836eeb5c8b282c630c4478e07913f814dbc. +// +// Solidity: event CreateBridgeRequest(address tokenAddress) +func (_Bridge *BridgeFilterer) ParseCreateBridgeRequest(log types.Log) (*BridgeCreateBridgeRequest, error) { + event := new(BridgeCreateBridgeRequest) + if err := _Bridge.contract.UnpackLog(event, "CreateBridgeRequest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCreateClaimIterator is returned from FilterCreateClaim and is used to iterate over the raw logs and unpacked data for CreateClaim events raised by the Bridge contract. +type BridgeCreateClaimIterator struct { + Event *BridgeCreateClaim // 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 *BridgeCreateClaimIterator) 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(BridgeCreateClaim) + 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(BridgeCreateClaim) + 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 *BridgeCreateClaimIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCreateClaimIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCreateClaim represents a CreateClaim event raised by the Bridge contract. +type BridgeCreateClaim struct { + BridgeKey [32]byte + ClaimId *big.Int + Creator common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCreateClaim is a free log retrieval operation binding the contract event 0xc7ecca132ed5d1d6c462587819023eee197ef7fb00b399bbfc2ce032587f0c6d. +// +// Solidity: event CreateClaim(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed creator, address sender) +func (_Bridge *BridgeFilterer) FilterCreateClaim(opts *bind.FilterOpts, bridgeKey [][32]byte, claimId []*big.Int, creator []common.Address) (*BridgeCreateClaimIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "CreateClaim", bridgeKeyRule, claimIdRule, creatorRule) + if err != nil { + return nil, err + } + return &BridgeCreateClaimIterator{contract: _Bridge.contract, event: "CreateClaim", logs: logs, sub: sub}, nil +} + +// WatchCreateClaim is a free log subscription operation binding the contract event 0xc7ecca132ed5d1d6c462587819023eee197ef7fb00b399bbfc2ce032587f0c6d. +// +// Solidity: event CreateClaim(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed creator, address sender) +func (_Bridge *BridgeFilterer) WatchCreateClaim(opts *bind.WatchOpts, sink chan<- *BridgeCreateClaim, bridgeKey [][32]byte, claimId []*big.Int, creator []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var creatorRule []interface{} + for _, creatorItem := range creator { + creatorRule = append(creatorRule, creatorItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "CreateClaim", bridgeKeyRule, claimIdRule, creatorRule) + 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(BridgeCreateClaim) + if err := _Bridge.contract.UnpackLog(event, "CreateClaim", 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 +} + +// ParseCreateClaim is a log parse operation binding the contract event 0xc7ecca132ed5d1d6c462587819023eee197ef7fb00b399bbfc2ce032587f0c6d. +// +// Solidity: event CreateClaim(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed creator, address sender) +func (_Bridge *BridgeFilterer) ParseCreateClaim(log types.Log) (*BridgeCreateClaim, error) { + event := new(BridgeCreateClaim) + if err := _Bridge.contract.UnpackLog(event, "CreateClaim", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeCreditIterator is returned from FilterCredit and is used to iterate over the raw logs and unpacked data for Credit events raised by the Bridge contract. +type BridgeCreditIterator struct { + Event *BridgeCredit // 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 *BridgeCreditIterator) 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(BridgeCredit) + 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(BridgeCredit) + 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 *BridgeCreditIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeCreditIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeCredit represents a Credit event raised by the Bridge contract. +type BridgeCredit struct { + BridgeKey [32]byte + ClaimId *big.Int + Receiver common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCredit is a free log retrieval operation binding the contract event 0x0087db26e45ef9d7e62d7966c0bc6310075c3e120cae4af40d1791e1b01f7e71. +// +// Solidity: event Credit(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) FilterCredit(opts *bind.FilterOpts, bridgeKey [][32]byte, claimId []*big.Int, receiver []common.Address) (*BridgeCreditIterator, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Credit", bridgeKeyRule, claimIdRule, receiverRule) + if err != nil { + return nil, err + } + return &BridgeCreditIterator{contract: _Bridge.contract, event: "Credit", logs: logs, sub: sub}, nil +} + +// WatchCredit is a free log subscription operation binding the contract event 0x0087db26e45ef9d7e62d7966c0bc6310075c3e120cae4af40d1791e1b01f7e71. +// +// Solidity: event Credit(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) WatchCredit(opts *bind.WatchOpts, sink chan<- *BridgeCredit, bridgeKey [][32]byte, claimId []*big.Int, receiver []common.Address) (event.Subscription, error) { + + var bridgeKeyRule []interface{} + for _, bridgeKeyItem := range bridgeKey { + bridgeKeyRule = append(bridgeKeyRule, bridgeKeyItem) + } + var claimIdRule []interface{} + for _, claimIdItem := range claimId { + claimIdRule = append(claimIdRule, claimIdItem) + } + var receiverRule []interface{} + for _, receiverItem := range receiver { + receiverRule = append(receiverRule, receiverItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Credit", bridgeKeyRule, claimIdRule, receiverRule) + 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(BridgeCredit) + if err := _Bridge.contract.UnpackLog(event, "Credit", 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 +} + +// ParseCredit is a log parse operation binding the contract event 0x0087db26e45ef9d7e62d7966c0bc6310075c3e120cae4af40d1791e1b01f7e71. +// +// Solidity: event Credit(bytes32 indexed bridgeKey, uint256 indexed claimId, address indexed receiver, uint256 value) +func (_Bridge *BridgeFilterer) ParseCredit(log types.Log) (*BridgeCredit, error) { + event := new(BridgeCredit) + if err := _Bridge.contract.UnpackLog(event, "Credit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Bridge contract. +type BridgeInitializedIterator struct { + Event *BridgeInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *BridgeInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(BridgeInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(BridgeInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *BridgeInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeInitialized represents a Initialized event raised by the Bridge contract. +type BridgeInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Bridge *BridgeFilterer) FilterInitialized(opts *bind.FilterOpts) (*BridgeInitializedIterator, error) { + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &BridgeInitializedIterator{contract: _Bridge.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Bridge *BridgeFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *BridgeInitialized) (event.Subscription, error) { + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BridgeInitialized) + if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_Bridge *BridgeFilterer) ParseInitialized(log types.Log) (*BridgeInitialized, error) { + event := new(BridgeInitialized) + if err := _Bridge.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Bridge contract. +type BridgeOwnershipTransferredIterator struct { + Event *BridgeOwnershipTransferred // 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 *BridgeOwnershipTransferredIterator) 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(BridgeOwnershipTransferred) + 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(BridgeOwnershipTransferred) + 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 *BridgeOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeOwnershipTransferred represents a OwnershipTransferred event raised by the Bridge contract. +type BridgeOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Bridge *BridgeFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*BridgeOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &BridgeOwnershipTransferredIterator{contract: _Bridge.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Bridge *BridgeFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *BridgeOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + 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(BridgeOwnershipTransferred) + if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", 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 +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Bridge *BridgeFilterer) ParseOwnershipTransferred(log types.Log) (*BridgeOwnershipTransferred, error) { + event := new(BridgeOwnershipTransferred) + if err := _Bridge.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Bridge contract. +type BridgePausedIterator struct { + Event *BridgePaused // 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 *BridgePausedIterator) 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(BridgePaused) + 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(BridgePaused) + 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 *BridgePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgePaused represents a Paused event raised by the Bridge contract. +type BridgePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Bridge *BridgeFilterer) FilterPaused(opts *bind.FilterOpts) (*BridgePausedIterator, error) { + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &BridgePausedIterator{contract: _Bridge.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Bridge *BridgeFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *BridgePaused) (event.Subscription, error) { + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Paused") + 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(BridgePaused) + if err := _Bridge.contract.UnpackLog(event, "Paused", 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 +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_Bridge *BridgeFilterer) ParsePaused(log types.Log) (*BridgePaused, error) { + event := new(BridgePaused) + if err := _Bridge.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Bridge contract. +type BridgeUnpausedIterator struct { + Event *BridgeUnpaused // 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 *BridgeUnpausedIterator) 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(BridgeUnpaused) + 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(BridgeUnpaused) + 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 *BridgeUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeUnpaused represents a Unpaused event raised by the Bridge contract. +type BridgeUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Bridge *BridgeFilterer) FilterUnpaused(opts *bind.FilterOpts) (*BridgeUnpausedIterator, error) { + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &BridgeUnpausedIterator{contract: _Bridge.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Bridge *BridgeFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *BridgeUnpaused) (event.Subscription, error) { + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Unpaused") + 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(BridgeUnpaused) + if err := _Bridge.contract.UnpackLog(event, "Unpaused", 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 +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_Bridge *BridgeFilterer) ParseUnpaused(log types.Log) (*BridgeUnpaused, error) { + event := new(BridgeUnpaused) + if err := _Bridge.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// BridgeUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Bridge contract. +type BridgeUpgradedIterator struct { + Event *BridgeUpgraded // 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 *BridgeUpgradedIterator) 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(BridgeUpgraded) + 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(BridgeUpgraded) + 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 *BridgeUpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *BridgeUpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// BridgeUpgraded represents a Upgraded event raised by the Bridge contract. +type BridgeUpgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Bridge *BridgeFilterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*BridgeUpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Bridge.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &BridgeUpgradedIterator{contract: _Bridge.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Bridge *BridgeFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *BridgeUpgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Bridge.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(BridgeUpgraded) + if err := _Bridge.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Bridge *BridgeFilterer) ParseUpgraded(log types.Log) (*BridgeUpgraded, error) { + event := new(BridgeUpgraded) + if err := _Bridge.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/tools/contracts-tester/bridge/bridge.go b/tools/contracts-tester/bridge/bridge.go new file mode 100644 index 0000000..4196bc2 --- /dev/null +++ b/tools/contracts-tester/bridge/bridge.go @@ -0,0 +1,158 @@ +package bridge + +import ( + "context" + "fmt" + "math/big" + "testing" + + "github.com/Peersyst/exrp/cmd/exrpd/cmd" + envTypes "github.com/Peersyst/exrp/tools/contracts-tester/types" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" +) + +const executionRevertedStr = "desc = execution reverted" + +var zeroAddress common.Address = common.HexToAddress("0x0000000000000000000000000000000000000000") +var valueMultiplier = big.NewInt(1000000000000000000) + +type BridgeTestSuite struct { + t *testing.T + client *ethclient.Client + bridge *Bridge + chainId *big.Int + initBlock uint64 + threshold int + claimer envTypes.TestAccountSigner + witnesses []envTypes.TestAccountSigner + safeAddress common.Address + bridgeTests bool + bridgeConfig *XChainTypesBridgeConfig + bridgeParams *XChainTypesBridgeParams + bridgeKey string + claims int + ctx context.Context +} + +func CreateBridgeSuite(t *testing.T) envTypes.ContractTestSuite { + return &BridgeTestSuite{t: t} +} + +func (suite *BridgeTestSuite) SetupEnv(ctx context.Context) error { + // Client + client, err := ethclient.Dial(envTypes.GetNodeUrl()) + if err != nil { + return fmt.Errorf("BRIDGE_TEST: Error creating client") + } + suite.client = client + + // Contract + bridge, err := NewBridge(common.HexToAddress(cmd.BridgeProxyModuleAddress), client) + if err != nil { + return fmt.Errorf("Error instantiating bridge contract: '%+v'", err) + } + suite.bridge = bridge + + // Chain Id + chainId, err := client.ChainID(ctx) + if err != nil { + return fmt.Errorf("Error getting chain id: '%+v'", err) + } + suite.chainId = chainId + + // Init block + block, err := client.BlockNumber(ctx) + if err != nil { + return fmt.Errorf("Error getting chain id: '%+v'", err) + } + suite.initBlock = block + + // Claimer account + claimer := envTypes.GetClaimerAccount(ctx) + suite.claimer, err = envTypes.AddSignerToAccount(claimer, suite.chainId) + if err != nil { + return fmt.Errorf("Error adding signer to account: '%+v'", err) + } + + // Witnesses accounts + witnesses := envTypes.GetWitnesses(ctx) + suite.witnesses = []envTypes.TestAccountSigner{} + for _, witness := range witnesses { + witnessSigner, err := envTypes.AddSignerToAccount(witness, suite.chainId) + if err != nil { + return fmt.Errorf("Error adding signer to account: '%+v'", err) + } + + suite.witnesses = append(suite.witnesses, witnessSigner) + } + + // Constant values + suite.safeAddress = common.HexToAddress(cmd.SafeProxyAddress) + suite.threshold = envTypes.GetSafeThreshold() + suite.ctx = ctx + + // Bridge values + bridgeLckAddress, minCreateAmount, signatureReward := envTypes.GetBridgeValues() + if bridgeLckAddress != nil { + suite.bridgeConfig = &XChainTypesBridgeConfig{ + LockingChainDoor: *bridgeLckAddress, + LockingChainIssue: XChainTypesBridgeChainIssue{ + Issuer: zeroAddress, + Currency: "XRP", + }, + IssuingChainDoor: suite.safeAddress, + IssuingChainIssue: XChainTypesBridgeChainIssue{ + Issuer: zeroAddress, + Currency: "XRP", + }, + } + + suite.bridgeParams = &XChainTypesBridgeParams{ + MinCreateAmount: minCreateAmount, + SignatureReward: signatureReward, + } + + suite.bridgeKey = envTypes.GetBridgeKey() + suite.bridgeTests = true + } else { + suite.bridgeTests = false + } + + suite.claims = 0 + + return nil +} + +func (suite *BridgeTestSuite) RunTests() { + if suite.bridgeTests { + suite.t.Logf("Running bridge tests...") + + suite.runAddClaimAttestationTest() + suite.runAddCreateAccountAttestationTest() + suite.runClaimTest() + suite.runCommitTest() + suite.runCommitWithoutAddressTest() + suite.runCreateAccountCommitTest() + suite.runCreateClaimIdTest() + suite.runGetBridgeClaimTest(*suite.bridgeConfig, big.NewInt(0), zeroAddress, zeroAddress, false) + suite.runGetBridgeConfigTest() + suite.runGetBridgeCreateAccountTest(*suite.bridgeConfig, zeroAddress, big.NewInt(0), false, false) + suite.runGetBridgeKeyTest(*suite.bridgeConfig, suite.bridgeKey) + suite.runGetBridgeParamsTest(*suite.bridgeConfig, suite.bridgeParams.MinCreateAmount, suite.bridgeParams.SignatureReward) + suite.runGetBridgeTokenFailTest(*suite.bridgeConfig) + suite.runGetBridgesPaginatedTest(1) + } else { + suite.runGetBridgesPaginatedTest(0) + } + + suite.runCreateBridgeTest() + suite.runCreateBridgeRequestTest() + suite.runWitnessesTest() + suite.runTokenRegisteredTest("0x1", false) + suite.runOwnerTest() + suite.runPauseTest() + suite.runPausedTest(false) + suite.runSafeTest() + suite.runUnpauseTest() +} diff --git a/tools/contracts-tester/bridge/events.go b/tools/contracts-tester/bridge/events.go new file mode 100644 index 0000000..770c4d9 --- /dev/null +++ b/tools/contracts-tester/bridge/events.go @@ -0,0 +1,196 @@ +package bridge + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +type EventIterator interface { + Next() bool +} + +func getIteratorLength(it EventIterator) int { + eventsFound := 0 + for it.Next() { + eventsFound += 1 + } + + return eventsFound +} + +func (suite *BridgeTestSuite) getFilterOpts() *bind.FilterOpts { + return &bind.FilterOpts{Start: suite.initBlock, Context: suite.ctx} +} + +func (suite *BridgeTestSuite) runAddClaimAttestationEventTest(expectedEvents int) { + events, err := suite.bridge.FilterAddClaimAttestation(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering add claim attestation events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid add claim attestation events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runAddCreateAccountAttestationEventTest(expectedEvents int) { + events, err := suite.bridge.FilterAddCreateAccountAttestation(suite.getFilterOpts(), nil, []common.Address{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering add create account attestation events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid add create account attestation events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runClaimEventTest(expectedEvents int) { + events, err := suite.bridge.FilterClaim(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering claim events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid claim events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCreateAccountEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCreateAccount(suite.getFilterOpts(), []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering create account events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid create account events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCommitEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCommit(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering commit events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid commit events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCommitWithoutAddressEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCommitWithoutAddress(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering commit without address events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid commit without address events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCreateAccountCommitEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCreateAccountCommit(suite.getFilterOpts(), nil, []common.Address{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering create account commit events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid create account commit events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCreateClaimEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCreateClaim(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering create claim events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid create claim events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCreditEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCredit(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering credit events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid credit events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) getLatestCreateClaimEvent() *BridgeCreateClaim { + events, err := suite.bridge.FilterCreateClaim(suite.getFilterOpts(), nil, []*big.Int{}, []common.Address{}) + if err != nil { + suite.t.Errorf("Error filtering create claim events: '%+v'", err) + return nil + } + + var latestEvent *BridgeCreateClaim + for events.Next() { + latestEvent = events.Event + } + + return latestEvent +} + +func (suite *BridgeTestSuite) runCreateBridgeEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCreateBridge(suite.getFilterOpts(), nil) + if err != nil { + suite.t.Errorf("Error filtering create bridge events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid create bridge events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runCreateBridgeRequestEventTest(expectedEvents int) { + events, err := suite.bridge.FilterCreateBridgeRequest(suite.getFilterOpts()) + if err != nil { + suite.t.Errorf("Error filtering create bridge request events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid create bridge request events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runPausedEventTest(expectedEvents int) { + events, err := suite.bridge.FilterPaused(suite.getFilterOpts()) + if err != nil { + suite.t.Errorf("Error filtering paused events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid paused events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} + +func (suite *BridgeTestSuite) runUnpausedEventTest(expectedEvents int) { + events, err := suite.bridge.FilterUnpaused(suite.getFilterOpts()) + if err != nil { + suite.t.Errorf("Error filtering unpaused events: '%+v'", err) + } else { + eventsFound := getIteratorLength(events) + if eventsFound != expectedEvents { + suite.t.Errorf("Invalid unpaused events - expected '%+v' got '%+v'", expectedEvents, eventsFound) + } + } +} diff --git a/tools/contracts-tester/bridge/getters.go b/tools/contracts-tester/bridge/getters.go new file mode 100644 index 0000000..a118fe6 --- /dev/null +++ b/tools/contracts-tester/bridge/getters.go @@ -0,0 +1,200 @@ +package bridge + +import ( + "encoding/hex" + "math/big" + + "github.com/ethereum/go-ethereum/common" +) + +func (suite *BridgeTestSuite) runGetBridgeClaimTest(bridgeCfg XChainTypesBridgeConfig, claimId *big.Int, expCreator, expSender common.Address, expExists bool) { + creator, sender, exists, err := suite.bridge.GetBridgeClaim(suite.claimer.CallOpts, bridgeCfg, claimId) + if err != nil { + suite.t.Errorf("Error getting bridge claim: '%+v'", err) + } else { + if creator.Hex() != expCreator.Hex() { + suite.t.Errorf("Invalid bridge claim creator value - expected '%+v' got '%+v'", expCreator.Hex(), creator.Hex()) + } + if sender.Hex() != expSender.Hex() { + suite.t.Errorf("Invalid bridge claim sender value - expected '%+v' got '%+v'", expSender.Hex(), sender.Hex()) + } + if exists != expExists { + suite.t.Errorf("Invalid bridge claim exists value - expected '%+v' got '%+v'", expExists, exists) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgeConfigTest() { + lckAddr, lckIssAddr, lckIssCurr, issAddr, issIssAddr, issIssCurr, err := suite.bridge.GetBridgeConfig(suite.claimer.CallOpts, *suite.bridgeConfig) + if err != nil { + suite.t.Errorf("Error getting bridge config: '%+v'", err) + } else { + if lckAddr.Hex() != suite.bridgeConfig.LockingChainDoor.Hex() { + suite.t.Errorf("Invalid locking chain door value - expected '%+v' got '%+v'", suite.bridgeConfig.LockingChainDoor.Hex(), lckAddr.Hex()) + } + if lckIssAddr.Hex() != suite.bridgeConfig.LockingChainIssue.Issuer.Hex() { + suite.t.Errorf("Invalid locking chain issue issuer value - expected '%+v' got '%+v'", suite.bridgeConfig.LockingChainIssue.Issuer.Hex(), lckIssAddr.Hex()) + } + if lckIssCurr != suite.bridgeConfig.LockingChainIssue.Currency { + suite.t.Errorf("Invalid locking chain issue currency value - expected '%+v' got '%+v'", suite.bridgeConfig.LockingChainIssue.Currency, lckIssCurr) + } + if issAddr.Hex() != suite.bridgeConfig.IssuingChainDoor.Hex() { + suite.t.Errorf("Invalid issuing chain door value - expected '%+v' got '%+v'", suite.bridgeConfig.IssuingChainDoor.Hex(), issAddr.Hex()) + } + if issIssAddr.Hex() != suite.bridgeConfig.IssuingChainIssue.Issuer.Hex() { + suite.t.Errorf("Invalid issuing chain issue issuer value - expected '%+v' got '%+v'", suite.bridgeConfig.IssuingChainIssue.Issuer.Hex(), issIssAddr.Hex()) + } + if issIssCurr != suite.bridgeConfig.IssuingChainIssue.Currency { + suite.t.Errorf("Invalid issuing chain issue currency value - expected '%+v' got '%+v'", suite.bridgeConfig.IssuingChainIssue.Currency, issIssCurr) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgeCreateAccountTest(bridgeCfg XChainTypesBridgeConfig, address common.Address, expSigReward *big.Int, expIsCreated, expExists bool) { + sigReward, isCreated, exists, err := suite.bridge.GetBridgeCreateAccount(suite.claimer.CallOpts, bridgeCfg, address) + if err != nil { + suite.t.Errorf("Error getting bridge create account: '%+v'", err) + } else { + if sigReward.Cmp(expSigReward) != 0 { + suite.t.Errorf("Invalid bridge create account signature reward value - expected '%+v' got '%+v'", expSigReward, sigReward) + } + if isCreated != expIsCreated { + suite.t.Errorf("Invalid bridge create account isCreated value - expected '%+v' got '%+v'", expIsCreated, isCreated) + } + if exists != expExists { + suite.t.Errorf("Invalid bridge create account exists value - expected '%+v' got '%+v'", expExists, exists) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgeKeyTest(bridgeCfg XChainTypesBridgeConfig, expected string) { + key, err := suite.bridge.GetBridgeKey(suite.claimer.CallOpts, bridgeCfg) + if err != nil { + suite.t.Errorf("Error getting bridge key: '%+v'", err) + } else { + if hex.EncodeToString(key[:]) != expected { + suite.t.Errorf("Invalid bridge key value - expected '%+v' got '%+v'", expected, hex.EncodeToString(key[:])) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgeParamsTest(bridgeCfg XChainTypesBridgeConfig, expMinCreateAmount, expSigReward *big.Int) { + minCreateAmount, signatureReward, err := suite.bridge.GetBridgeParams(suite.claimer.CallOpts, bridgeCfg) + if err != nil { + suite.t.Errorf("Error getting bridge params: '%+v'", err) + } else { + if minCreateAmount.Cmp(expMinCreateAmount) != 0 { + suite.t.Errorf("Invalid bridge min create amount - expected '%+v' got '%+v'", expMinCreateAmount, minCreateAmount) + } + if signatureReward.Cmp(expSigReward) != 0 { + suite.t.Errorf("Invalid bridge signature reward - expected '%+v' got '%+v'", expSigReward, signatureReward) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgeTokenTest(bridgeCfg XChainTypesBridgeConfig, expected common.Address) { + tokenAddress, err := suite.bridge.GetBridgeToken(suite.claimer.CallOpts, bridgeCfg) + if err != nil { + suite.t.Errorf("Error getting bridge token: '%+v'", err) + } else { + if tokenAddress.Hex() != expected.Hex() { + suite.t.Errorf("Invalid bridge token value - expected '%+v' got '%+v'", expected.Hex(), tokenAddress.Hex()) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgeTokenFailTest(bridgeCfg XChainTypesBridgeConfig) { + _, err := suite.bridge.GetBridgeToken(suite.claimer.CallOpts, bridgeCfg) + if err == nil { + suite.t.Errorf("Getting bridge token should be reverted bridge: '%+v'", bridgeCfg) + } else { + if err.Error() != "execution reverted" { + suite.t.Errorf("Invalid bridge token revert value - expected '%+v' got '%+v'", "execution reverted", err.Error()) + } + } +} + +func (suite *BridgeTestSuite) runGetBridgesPaginatedTest(expectedLength int) { + bridgeKeysArrMemBytes, err := suite.bridge.GetBridgesPaginated(suite.claimer.CallOpts, big.NewInt(0)) + if err != nil { + suite.t.Errorf("Error getting bridges paginated: '%+v'", err) + } else { + configsLength := 0 + for _, config := range bridgeKeysArrMemBytes.Configs { + if config.IssuingChainDoor.Hex() != zeroAddress.Hex() { + configsLength += 1 + } + } + if configsLength != expectedLength { + suite.t.Errorf("Invalid bridge configs length value - expected '%+v' got '%+v'", expectedLength, configsLength) + } + + paramsLength := 0 + for _, params := range bridgeKeysArrMemBytes.Params { + if params.SignatureReward.Cmp(big.NewInt(0)) != 0 { + paramsLength += 1 + } + } + if paramsLength != expectedLength { + suite.t.Errorf("Invalid bridge params length value - expected '%+v' got '%+v'", expectedLength, paramsLength) + } + } +} + +func (suite *BridgeTestSuite) runTokenRegisteredTest(tokenAddress string, expectedValue bool) { + isRegistered, err := suite.bridge.IsTokenRegistered(suite.claimer.CallOpts, common.HexToAddress(tokenAddress)) + if err != nil { + suite.t.Errorf("Error getting is token registered: '%+v'", err) + } else if isRegistered != expectedValue { + suite.t.Errorf("Invalid IsTokenRegistered (%+v) value - expected '%+v' got '%+v'", tokenAddress, expectedValue, isRegistered) + } +} + +func (suite *BridgeTestSuite) runWitnessesTest() { + witnesses, err := suite.bridge.GetWitnesses(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error getting witnesses: '%+v'", err) + } else { + if len(witnesses) != len(suite.witnesses) { + suite.t.Errorf("Invalid witnesses length - expected '%+v' got '%+v'", len(suite.witnesses), len(witnesses)) + } + for _, expWitness := range suite.witnesses { + found := false + for _, witness := range witnesses { + if witness.Hex() == expWitness.EvmAddress.Hex() { + found = true + } + } + if !found { + suite.t.Errorf("Witness not found - expected '%+v'", expWitness.EvmAddress.Hex()) + } + } + } +} + +func (suite *BridgeTestSuite) runOwnerTest() { + owner, err := suite.bridge.Owner(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error getting owner: '%+v'", err) + } else if owner.Hex() != suite.safeAddress.Hex() { + suite.t.Errorf("Invalid owner - expected '%+v' got '%+v'", suite.safeAddress.Hex(), owner.Hex()) + } +} + +func (suite *BridgeTestSuite) runPausedTest(expect bool) { + paused, err := suite.bridge.Paused(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error getting paused: '%+v'", err) + } else if paused != expect { + suite.t.Errorf("Invalid paused - expected '%+v' got '%+v'", expect, paused) + } +} + +func (suite *BridgeTestSuite) runSafeTest() { + safe, err := suite.bridge.Safe(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error getting safe: '%+v'", err) + } else if safe.Hex() != suite.safeAddress.Hex() { + suite.t.Errorf("Invalid safe - expected '%+v' got '%+v'", suite.safeAddress.Hex(), safe.Hex()) + } +} diff --git a/tools/contracts-tester/bridge/transact.go b/tools/contracts-tester/bridge/transact.go new file mode 100644 index 0000000..7940846 --- /dev/null +++ b/tools/contracts-tester/bridge/transact.go @@ -0,0 +1,528 @@ +package bridge + +import ( + "math/big" + "strings" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" +) + +func (suite *BridgeTestSuite) runAddClaimAttestationTest() { + sender := common.HexToAddress("0x11") + destination := common.HexToAddress("0x22") + amount := new(big.Int).Mul(big.NewInt(10), valueMultiplier) + + // Create claim to attest + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0, Value: suite.bridgeParams.SignatureReward} + tx, err := suite.bridge.CreateClaimId(&transactOpts, *suite.bridgeConfig, sender) + if err != nil { + suite.t.Errorf("Error creating create claim id transaction (add claim att): '%+v'", err) + return + } + suite.waitForTransaction(tx.Hash()) + suite.claims++ + suite.runCreateClaimEventTest(suite.claims) + event := suite.getLatestCreateClaimEvent() + + // Should revert when not witness + transactOpts.Value = nil + tx, err = suite.bridge.AddClaimAttestation(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, sender, destination) + if err == nil { + suite.t.Errorf("Error creating add claim attestation transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runAddClaimAttestationEventTest(0) + } + + // Should revert when claim does not exist + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.AddClaimAttestation(&transactOpts, *suite.bridgeConfig, big.NewInt(10000), amount, sender, destination) + if err == nil { + suite.t.Errorf("Error creating add claim attestation transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runAddClaimAttestationEventTest(0) + } + + // Should revert when invalid claim sender + tx, err = suite.bridge.AddClaimAttestation(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, event.Creator, destination) + if err == nil { + suite.t.Errorf("Error creating add claim attestation transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runAddClaimAttestationEventTest(0) + } + + // Should work and emit addClaimAttestation event + for i := 0; i < suite.threshold; i += 1 { + transactOpts = bind.TransactOpts{Signer: suite.witnesses[i].Signer, From: suite.witnesses[i].EvmAddress, GasLimit: 0} + + tx, err = suite.bridge.AddClaimAttestation(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, sender, destination) + if err != nil { + suite.t.Errorf("Error creating add claim attestation transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runAddClaimAttestationEventTest(i + 1) + } + } + + // When threshold reached should emit credit event + suite.runCreditEventTest(1) +} + +func (suite *BridgeTestSuite) runAddCreateAccountAttestationTest() { + destination := common.HexToAddress("0x20") + amount := suite.bridgeParams.MinCreateAmount + sigReward := suite.bridgeParams.SignatureReward + + // Should revert when not witness + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.AddCreateAccountAttestation(&transactOpts, *suite.bridgeConfig, destination, amount, sigReward) + if err == nil { + suite.t.Errorf("Error creating add create account attestation transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runAddCreateAccountAttestationEventTest(0) + suite.runGetBridgeCreateAccountTest(*suite.bridgeConfig, destination, big.NewInt(0), false, false) + } + + // Should revert when less than min create amount + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.AddCreateAccountAttestation(&transactOpts, *suite.bridgeConfig, destination, big.NewInt(0), sigReward) + if err == nil { + suite.t.Errorf("Error creating add create account attestation transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runAddCreateAccountAttestationEventTest(0) + suite.runGetBridgeCreateAccountTest(*suite.bridgeConfig, destination, big.NewInt(0), false, false) + } + + // Should work and emit addCreateAccountAttestation event + for i := 0; i < suite.threshold; i += 1 { + transactOpts = bind.TransactOpts{Signer: suite.witnesses[i].Signer, From: suite.witnesses[i].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.AddCreateAccountAttestation(&transactOpts, *suite.bridgeConfig, destination, amount, sigReward) + if err != nil { + suite.t.Errorf("Error creating add create account attestation transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runAddCreateAccountAttestationEventTest(i + 1) + } + } + + // When threshold reached should emit create account event + suite.runCreateAccountEventTest(1) + suite.runAddCreateAccountAttestationEventTest(suite.threshold) + suite.runGetBridgeCreateAccountTest(*suite.bridgeConfig, destination, sigReward, true, true) + + // Should revert when account already created + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.AddCreateAccountAttestation(&transactOpts, *suite.bridgeConfig, destination, amount, sigReward) + if err == nil { + suite.t.Errorf("Error creating add create account attestation transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runAddCreateAccountAttestationEventTest(suite.threshold) + } +} + +func (suite *BridgeTestSuite) runClaimTest() { + sender := common.HexToAddress("0x15") + destination := common.HexToAddress("0x25") + amount := new(big.Int).Mul(big.NewInt(15), valueMultiplier) + + // Create claim to attest + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0, Value: suite.bridgeParams.SignatureReward} + tx, err := suite.bridge.CreateClaimId(&transactOpts, *suite.bridgeConfig, sender) + if err != nil { + suite.t.Errorf("Error creating create claim id transaction (claim): '%+v'", err) + return + } + suite.waitForTransaction(tx.Hash()) + suite.claims++ + suite.runCreateClaimEventTest(suite.claims) + event := suite.getLatestCreateClaimEvent() + + // Should revert when claim does not exist + transactOpts.Value = nil + tx, err = suite.bridge.Claim(&transactOpts, *suite.bridgeConfig, big.NewInt(100000), amount, destination) + if err == nil { + suite.t.Errorf("Error creating claim transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runClaimEventTest(0) + } + + // Should revert when claimer is not creator + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.Claim(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, destination) + if err == nil { + suite.t.Errorf("Error creating claim transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runClaimEventTest(0) + } + + // Attestate claim + for i := 0; i < suite.threshold; i += 1 { + if i == 1 { + // Should revert when there is no consensus + transactOpts = bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err = suite.bridge.Claim(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, destination) + if err == nil { + suite.t.Errorf("Error creating claim transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runClaimEventTest(0) + } + } + + transactOpts = bind.TransactOpts{Signer: suite.witnesses[i].Signer, From: suite.witnesses[i].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.AddClaimAttestation(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, sender, zeroAddress) + if err != nil { + suite.t.Errorf("Error creating add claim attestation transaction (claim): '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + // suite.runAddClaimAttestationEventTest(i + 1) + } + } + + // Should revert when amount is not attested amount + transactOpts = bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err = suite.bridge.Claim(&transactOpts, *suite.bridgeConfig, event.ClaimId, big.NewInt(100), destination) + if err == nil { + suite.t.Errorf("Error creating claim transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runClaimEventTest(0) + } + + // Should work correctly and emit claim event + tx, err = suite.bridge.Claim(&transactOpts, *suite.bridgeConfig, event.ClaimId, amount, destination) + if err != nil { + suite.t.Errorf("Error creating claim transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runClaimEventTest(1) + } +} + +func (suite *BridgeTestSuite) runCommitTest() { + // Should work but no event is created + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.Commit(&transactOpts, *suite.bridgeConfig, common.HexToAddress("0x2"), big.NewInt(0), big.NewInt(0)) + if err != nil { + suite.t.Errorf("Error creating commit transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runCommitEventTest(0) + } + + // Should revert if value is not enough + value := new(big.Int).Mul(big.NewInt(20), valueMultiplier) + amount := new(big.Int).Mul(big.NewInt(25), valueMultiplier) + transactOpts.Value = value + tx, err = suite.bridge.Commit(&transactOpts, *suite.bridgeConfig, common.HexToAddress("0x2"), big.NewInt(1), amount) + if err == nil { + suite.t.Errorf("Error creating commit transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCommitEventTest(0) + } + + // Should work and emit new event + tx, err = suite.bridge.Commit(&transactOpts, *suite.bridgeConfig, common.HexToAddress("0x2"), big.NewInt(2), value) + if err != nil { + suite.t.Errorf("Error creating commit transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runCommitEventTest(1) + } +} + +func (suite *BridgeTestSuite) runCommitWithoutAddressTest() { + // Should work but no event is created + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.CommitWithoutAddress(&transactOpts, *suite.bridgeConfig, big.NewInt(0), big.NewInt(0)) + if err != nil { + suite.t.Errorf("Error creating commit without address transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runCommitWithoutAddressEventTest(0) + } + + // Should revert if value is not enough + value := new(big.Int).Mul(big.NewInt(20), valueMultiplier) + amount := new(big.Int).Mul(big.NewInt(25), valueMultiplier) + transactOpts.Value = value + tx, err = suite.bridge.CommitWithoutAddress(&transactOpts, *suite.bridgeConfig, big.NewInt(1), amount) + if err == nil { + suite.t.Errorf("Error creating commit without address transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCommitWithoutAddressEventTest(0) + } + + // Should work and emit new event + tx, err = suite.bridge.CommitWithoutAddress(&transactOpts, *suite.bridgeConfig, big.NewInt(2), value) + if err != nil { + suite.t.Errorf("Error creating commit without address transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runCommitWithoutAddressEventTest(1) + } +} + +func (suite *BridgeTestSuite) runCreateAccountCommitTest() { + destination := common.HexToAddress("0x1") + amount := suite.bridgeParams.MinCreateAmount + sigReward := suite.bridgeParams.SignatureReward + + // Should revert if signature reward is not enough + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.CreateAccountCommit(&transactOpts, *suite.bridgeConfig, destination, amount, big.NewInt(0)) + if err == nil { + suite.t.Errorf("Error creating create account commit transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateAccountCommitEventTest(0) + } + + // Should revert if amount is not enough + tx, err = suite.bridge.CreateAccountCommit(&transactOpts, *suite.bridgeConfig, destination, big.NewInt(0), sigReward) + if err == nil { + suite.t.Errorf("Error creating create account commit transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateAccountCommitEventTest(0) + } + + // Should revert if sent amount is not enough + tx, err = suite.bridge.CreateAccountCommit(&transactOpts, *suite.bridgeConfig, destination, amount, sigReward) + if err == nil { + suite.t.Errorf("Error creating create account commit transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateAccountCommitEventTest(0) + } + + // Should Work and emit new event + transactOpts.Value = new(big.Int).Add(amount, sigReward) + tx, err = suite.bridge.CreateAccountCommit(&transactOpts, *suite.bridgeConfig, destination, amount, sigReward) + if err != nil { + suite.t.Errorf("Error creating create account commit transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runCreateAccountCommitEventTest(1) + } +} + +func (suite *BridgeTestSuite) runCreateClaimIdTest() { + sender := common.HexToAddress("0x1") + + // Should revert if signature reward is not enough + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.CreateClaimId(&transactOpts, *suite.bridgeConfig, sender) + if err == nil { + suite.t.Errorf("Error creating create claim id transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateClaimEventTest(suite.claims) + } + + // Should Work and emit new event + transactOpts.Value = suite.bridgeParams.SignatureReward + tx, err = suite.bridge.CreateClaimId(&transactOpts, *suite.bridgeConfig, sender) + if err != nil { + suite.t.Errorf("Error creating create claim id transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.claims++ + suite.runCreateClaimEventTest(suite.claims) + event := suite.getLatestCreateClaimEvent() + suite.runGetBridgeClaimTest(*suite.bridgeConfig, event.ClaimId, suite.claimer.EvmAddress, sender, true) + } +} + +func (suite *BridgeTestSuite) runCreateBridgeTest() { + bridgeConfig := XChainTypesBridgeConfig{ + LockingChainDoor: common.HexToAddress("0x100"), + LockingChainIssue: XChainTypesBridgeChainIssue{ + Issuer: common.HexToAddress("0x101"), + Currency: "MET", + }, + IssuingChainDoor: common.HexToAddress("0x102"), + IssuingChainIssue: XChainTypesBridgeChainIssue{ + Issuer: common.HexToAddress("0x103"), + Currency: "MET", + }, + } + sigReward, _ := new(big.Int).SetString("500000000000000000", 10) + bridgeParams := XChainTypesBridgeParams{big.NewInt(0), sigReward} + + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.CreateBridge(&transactOpts, bridgeConfig, bridgeParams) + if err == nil { + suite.t.Errorf("Error creating bridge request transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateBridgeEventTest(0) + } + + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.CreateBridge(&transactOpts, bridgeConfig, bridgeParams) + if err == nil { + suite.t.Errorf("Error creating bridge request transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateBridgeEventTest(0) + } +} + +func (suite *BridgeTestSuite) runCreateBridgeRequestTest() { + // Should revert if insufficient value + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.CreateBridgeRequest(&transactOpts, common.HexToAddress("0x1")) + if err == nil { + suite.t.Errorf("Error creating bridge request transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateBridgeRequestEventTest(0) + } + + // Should get MINCREATEBRIDGEREWARD correctly + minReward, err := suite.bridge.MINCREATEBRIDGEREWARD(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error retrieving MINCREATEBRIDGEREWARD: '%+v'", err) + return + } + + // Should revert if token already exists + transactOpts.Value = minReward + tx, err = suite.bridge.CreateBridgeRequest(&transactOpts, zeroAddress) + if err == nil { + suite.t.Errorf("Error creating bridge request transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runCreateBridgeRequestEventTest(0) + } + + // Works correctly + tx, err = suite.bridge.CreateBridgeRequest(&transactOpts, common.HexToAddress("0x1")) + if err != nil { + suite.t.Errorf("Error creating bridge request transaction: '%+v'", err) + } else { + suite.waitForTransaction(tx.Hash()) + suite.runCreateBridgeRequestEventTest(1) + } +} + +func (suite *BridgeTestSuite) runPauseTest() { + // Should revert caller is not owner + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.Pause(&transactOpts) + if err == nil { + suite.t.Errorf("Error creating pause transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runPausedEventTest(0) + } + + // Should revert caller is not owner + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.Pause(&transactOpts) + if err == nil { + suite.t.Errorf("Error creating pause transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runPausedEventTest(0) + } + suite.runPausedTest(false) +} + +func (suite *BridgeTestSuite) runUnpauseTest() { + // Should revert caller is not owner + transactOpts := bind.TransactOpts{Signer: suite.claimer.Signer, From: suite.claimer.EvmAddress, GasLimit: 0} + tx, err := suite.bridge.Pause(&transactOpts) + if err == nil { + suite.t.Errorf("Error creating unpause transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runUnpausedEventTest(0) + } + + // Should revert caller is not owner + transactOpts = bind.TransactOpts{Signer: suite.witnesses[0].Signer, From: suite.witnesses[0].EvmAddress, GasLimit: 0} + tx, err = suite.bridge.Pause(&transactOpts) + if err == nil { + suite.t.Errorf("Error creating unpause transaction, should be reverted but success: '%+v'", tx) + } else { + if !strings.Contains(err.Error(), executionRevertedStr) { + suite.t.Errorf("Invalid error value - expected to contain '%+v', got '%+v'", executionRevertedStr, err.Error()) + } + suite.runUnpausedEventTest(0) + } + suite.runPausedTest(false) +} + +func (suite *BridgeTestSuite) waitForTransaction(txHash common.Hash) { + var err error + isPending := true + + for isPending { + _, isPending, err = suite.client.TransactionByHash(suite.ctx, txHash) + if err != nil && err.Error() != "not found" { + suite.t.Errorf("Error getting transaction by hash: '%+v'", err) + break + } + + time.Sleep(time.Second) + } +} diff --git a/tools/contracts-tester/contracts_test.go b/tools/contracts-tester/contracts_test.go new file mode 100644 index 0000000..2270dbc --- /dev/null +++ b/tools/contracts-tester/contracts_test.go @@ -0,0 +1,31 @@ +package contracts + +import ( + "context" + "testing" + + "github.com/Peersyst/exrp/tools/contracts-tester/bridge" + "github.com/Peersyst/exrp/tools/contracts-tester/safe" + "github.com/Peersyst/exrp/tools/contracts-tester/types" +) + +func Test_TestContracts(t *testing.T) { + if !types.GetRunTests() { + t.SkipNow() + return + } + + ctx := context.Background() + + t.Logf("Setting up safe tests...") + safeSuite := safe.CreateSafeSuite(t) + safeSuite.SetupEnv(ctx) + t.Logf("Running safe tests...") + safeSuite.RunTests() + + t.Logf("Setting up bridge tests...") + bridgeSuite := bridge.CreateBridgeSuite(t) + bridgeSuite.SetupEnv(ctx) + t.Logf("Running bridge tests...") + bridgeSuite.RunTests() +} diff --git a/tools/contracts-tester/docker-compose.yml b/tools/contracts-tester/docker-compose.yml new file mode 100644 index 0000000..aee3cb4 --- /dev/null +++ b/tools/contracts-tester/docker-compose.yml @@ -0,0 +1,28 @@ +version: '3' + +services: + node: + build: + context: ./../../ + dockerfile: tools/contracts-tester/docker/node.Dockerfile + args: + - WITNESSES=${NODE_WITNESSES} + - THRESHOLD=${SAFE_THRESHOLD} + - BRIDGE=${BRIDGE} + ports: + - "8545:8545" + tester: + build: + context: ./../../ + dockerfile: tools/contracts-tester/docker/test.Dockerfile + environment: + - BRIDGE_RUN_TESTS=true + - NODE_URL=http://node:8545 + - SAFE_THRESHOLD=${SAFE_THRESHOLD} + - CLAIMER_ACCOUNT=${CLAIMER_ACCOUNT} + - TEST_WITNESSES=${TEST_WITNESSES} + - BRIDGE=${BRIDGE} + - BRIDGE_KEY=${BRIDGE_KEY} + command: ['sleep 5s && go test github.com/Peersyst/exrp/tools/contracts-tester -v'] + depends_on: + - node \ No newline at end of file diff --git a/tools/contracts-tester/docker/node.Dockerfile b/tools/contracts-tester/docker/node.Dockerfile new file mode 100644 index 0000000..f22a58d --- /dev/null +++ b/tools/contracts-tester/docker/node.Dockerfile @@ -0,0 +1,27 @@ +FROM golang:1.20 AS base +USER root +RUN apt update && \ + apt-get install -y \ + build-essential \ + ca-certificates \ + curl + +RUN curl https://get.ignite.com/cli@v0.27.2! | bash + +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +ARG WITNESSES=68f727c3cd7aeB5a04acB864B770f5aa193676Bd +ARG THRESHOLD=1 +ARG BRIDGE + +COPY . . + +RUN ignite chain build +RUN ignite chain init --home /.exrpd +RUN exrpd --home /.exrpd add-genesis-contracts ${WITNESSES} ${THRESHOLD} ${BRIDGE} + +ENTRYPOINT ["exrpd"] +CMD ["start", "--home", "/.exrpd"] \ No newline at end of file diff --git a/tools/contracts-tester/docker/test.Dockerfile b/tools/contracts-tester/docker/test.Dockerfile new file mode 100644 index 0000000..6badb6b --- /dev/null +++ b/tools/contracts-tester/docker/test.Dockerfile @@ -0,0 +1,10 @@ +FROM golang:1.20 AS base +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +ENTRYPOINT ["/bin/sh", "-c"] +CMD ["go test github.com/Peersyst/exrp/tools/contracts-tester"] \ No newline at end of file diff --git a/tools/contracts-tester/safe/SafeL2.go b/tools/contracts-tester/safe/SafeL2.go new file mode 100644 index 0000000..1cd6890 --- /dev/null +++ b/tools/contracts-tester/safe/SafeL2.go @@ -0,0 +1,3408 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package safe + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// SafeMetaData contains all meta data concerning the Safe contract. +var SafeMetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AddedOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"approvedHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ApproveHash\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"handler\",\"type\":\"address\"}],\"name\":\"ChangedFallbackHandler\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"guard\",\"type\":\"address\"}],\"name\":\"ChangedGuard\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"}],\"name\":\"ChangedThreshold\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"DisabledModule\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"EnabledModule\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payment\",\"type\":\"uint256\"}],\"name\":\"ExecutionFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ExecutionFromModuleFailure\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"ExecutionFromModuleSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"txHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payment\",\"type\":\"uint256\"}],\"name\":\"ExecutionSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"RemovedOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"}],\"name\":\"SafeModuleTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"addresspayable\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"additionalInfo\",\"type\":\"bytes\"}],\"name\":\"SafeMultiSigTransaction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"SafeReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"initiator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"threshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"fallbackHandler\",\"type\":\"address\"}],\"name\":\"SafeSetup\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"msgHash\",\"type\":\"bytes32\"}],\"name\":\"SignMsg\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"addOwnerWithThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hashToApprove\",\"type\":\"bytes32\"}],\"name\":\"approveHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"approvedHashes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"changeThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"executor\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"requiredSignatures\",\"type\":\"uint256\"}],\"name\":\"checkNSignatures\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"dataHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"checkSignatures\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prevModule\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"disableModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"domainSeparator\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"enableModule\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"addresspayable\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"}],\"name\":\"execTransaction\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"}],\"name\":\"execTransactionFromModule\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"}],\"name\":\"execTransactionFromModuleReturnData\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"returnData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"start\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"}],\"name\":\"getModulesPaginated\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"array\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"next\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwners\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"offset\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"getStorageAt\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"enumEnum.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"safeTxGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"baseGas\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"gasToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"}],\"name\":\"getTransactionHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"module\",\"type\":\"address\"}],\"name\":\"isModuleEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prevOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"removeOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handler\",\"type\":\"address\"}],\"name\":\"setFallbackHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guard\",\"type\":\"address\"}],\"name\":\"setGuard\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"fallbackHandler\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"payment\",\"type\":\"uint256\"},{\"internalType\":\"addresspayable\",\"name\":\"paymentReceiver\",\"type\":\"address\"}],\"name\":\"setup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"signedMessages\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"targetContract\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"calldataPayload\",\"type\":\"bytes\"}],\"name\":\"simulateAndRevert\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"prevOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oldOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"swapOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", +} + +// SafeABI is the input ABI used to generate the binding from. +// Deprecated: Use SafeMetaData.ABI instead. +var SafeABI = SafeMetaData.ABI + +// Safe is an auto generated Go binding around an Ethereum contract. +type Safe struct { + SafeCaller // Read-only binding to the contract + SafeTransactor // Write-only binding to the contract + SafeFilterer // Log filterer for contract events +} + +// SafeCaller is an auto generated read-only Go binding around an Ethereum contract. +type SafeCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SafeTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SafeFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SafeSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SafeSession struct { + Contract *Safe // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SafeCallerSession struct { + Contract *SafeCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SafeTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SafeTransactorSession struct { + Contract *SafeTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SafeRaw is an auto generated low-level Go binding around an Ethereum contract. +type SafeRaw struct { + Contract *Safe // Generic contract binding to access the raw methods on +} + +// SafeCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SafeCallerRaw struct { + Contract *SafeCaller // Generic read-only contract binding to access the raw methods on +} + +// SafeTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SafeTransactorRaw struct { + Contract *SafeTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSafe creates a new instance of Safe, bound to a specific deployed contract. +func NewSafe(address common.Address, backend bind.ContractBackend) (*Safe, error) { + contract, err := bindSafe(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Safe{SafeCaller: SafeCaller{contract: contract}, SafeTransactor: SafeTransactor{contract: contract}, SafeFilterer: SafeFilterer{contract: contract}}, nil +} + +// NewSafeCaller creates a new read-only instance of Safe, bound to a specific deployed contract. +func NewSafeCaller(address common.Address, caller bind.ContractCaller) (*SafeCaller, error) { + contract, err := bindSafe(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SafeCaller{contract: contract}, nil +} + +// NewSafeTransactor creates a new write-only instance of Safe, bound to a specific deployed contract. +func NewSafeTransactor(address common.Address, transactor bind.ContractTransactor) (*SafeTransactor, error) { + contract, err := bindSafe(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SafeTransactor{contract: contract}, nil +} + +// NewSafeFilterer creates a new log filterer instance of Safe, bound to a specific deployed contract. +func NewSafeFilterer(address common.Address, filterer bind.ContractFilterer) (*SafeFilterer, error) { + contract, err := bindSafe(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SafeFilterer{contract: contract}, nil +} + +// bindSafe binds a generic wrapper to an already deployed contract. +func bindSafe(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(SafeABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Safe *SafeRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Safe.Contract.SafeCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Safe *SafeRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Safe.Contract.SafeTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Safe *SafeRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Safe.Contract.SafeTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Safe *SafeCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Safe.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Safe *SafeTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Safe.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Safe *SafeTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Safe.Contract.contract.Transact(opts, method, params...) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(string) +func (_Safe *SafeCaller) VERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(string) +func (_Safe *SafeSession) VERSION() (string, error) { + return _Safe.Contract.VERSION(&_Safe.CallOpts) +} + +// VERSION is a free data retrieval call binding the contract method 0xffa1ad74. +// +// Solidity: function VERSION() view returns(string) +func (_Safe *SafeCallerSession) VERSION() (string, error) { + return _Safe.Contract.VERSION(&_Safe.CallOpts) +} + +// ApprovedHashes is a free data retrieval call binding the contract method 0x7d832974. +// +// Solidity: function approvedHashes(address , bytes32 ) view returns(uint256) +func (_Safe *SafeCaller) ApprovedHashes(opts *bind.CallOpts, arg0 common.Address, arg1 [32]byte) (*big.Int, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "approvedHashes", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ApprovedHashes is a free data retrieval call binding the contract method 0x7d832974. +// +// Solidity: function approvedHashes(address , bytes32 ) view returns(uint256) +func (_Safe *SafeSession) ApprovedHashes(arg0 common.Address, arg1 [32]byte) (*big.Int, error) { + return _Safe.Contract.ApprovedHashes(&_Safe.CallOpts, arg0, arg1) +} + +// ApprovedHashes is a free data retrieval call binding the contract method 0x7d832974. +// +// Solidity: function approvedHashes(address , bytes32 ) view returns(uint256) +func (_Safe *SafeCallerSession) ApprovedHashes(arg0 common.Address, arg1 [32]byte) (*big.Int, error) { + return _Safe.Contract.ApprovedHashes(&_Safe.CallOpts, arg0, arg1) +} + +// CheckNSignatures is a free data retrieval call binding the contract method 0xcd5d1f77. +// +// Solidity: function checkNSignatures(address executor, bytes32 dataHash, bytes , bytes signatures, uint256 requiredSignatures) view returns() +func (_Safe *SafeCaller) CheckNSignatures(opts *bind.CallOpts, executor common.Address, dataHash [32]byte, arg2 []byte, signatures []byte, requiredSignatures *big.Int) error { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "checkNSignatures", executor, dataHash, arg2, signatures, requiredSignatures) + + if err != nil { + return err + } + + return err + +} + +// CheckNSignatures is a free data retrieval call binding the contract method 0xcd5d1f77. +// +// Solidity: function checkNSignatures(address executor, bytes32 dataHash, bytes , bytes signatures, uint256 requiredSignatures) view returns() +func (_Safe *SafeSession) CheckNSignatures(executor common.Address, dataHash [32]byte, arg2 []byte, signatures []byte, requiredSignatures *big.Int) error { + return _Safe.Contract.CheckNSignatures(&_Safe.CallOpts, executor, dataHash, arg2, signatures, requiredSignatures) +} + +// CheckNSignatures is a free data retrieval call binding the contract method 0xcd5d1f77. +// +// Solidity: function checkNSignatures(address executor, bytes32 dataHash, bytes , bytes signatures, uint256 requiredSignatures) view returns() +func (_Safe *SafeCallerSession) CheckNSignatures(executor common.Address, dataHash [32]byte, arg2 []byte, signatures []byte, requiredSignatures *big.Int) error { + return _Safe.Contract.CheckNSignatures(&_Safe.CallOpts, executor, dataHash, arg2, signatures, requiredSignatures) +} + +// CheckSignatures is a free data retrieval call binding the contract method 0x934f3a11. +// +// Solidity: function checkSignatures(bytes32 dataHash, bytes data, bytes signatures) view returns() +func (_Safe *SafeCaller) CheckSignatures(opts *bind.CallOpts, dataHash [32]byte, data []byte, signatures []byte) error { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "checkSignatures", dataHash, data, signatures) + + if err != nil { + return err + } + + return err + +} + +// CheckSignatures is a free data retrieval call binding the contract method 0x934f3a11. +// +// Solidity: function checkSignatures(bytes32 dataHash, bytes data, bytes signatures) view returns() +func (_Safe *SafeSession) CheckSignatures(dataHash [32]byte, data []byte, signatures []byte) error { + return _Safe.Contract.CheckSignatures(&_Safe.CallOpts, dataHash, data, signatures) +} + +// CheckSignatures is a free data retrieval call binding the contract method 0x934f3a11. +// +// Solidity: function checkSignatures(bytes32 dataHash, bytes data, bytes signatures) view returns() +func (_Safe *SafeCallerSession) CheckSignatures(dataHash [32]byte, data []byte, signatures []byte) error { + return _Safe.Contract.CheckSignatures(&_Safe.CallOpts, dataHash, data, signatures) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_Safe *SafeCaller) DomainSeparator(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "domainSeparator") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_Safe *SafeSession) DomainSeparator() ([32]byte, error) { + return _Safe.Contract.DomainSeparator(&_Safe.CallOpts) +} + +// DomainSeparator is a free data retrieval call binding the contract method 0xf698da25. +// +// Solidity: function domainSeparator() view returns(bytes32) +func (_Safe *SafeCallerSession) DomainSeparator() ([32]byte, error) { + return _Safe.Contract.DomainSeparator(&_Safe.CallOpts) +} + +// GetModulesPaginated is a free data retrieval call binding the contract method 0xcc2f8452. +// +// Solidity: function getModulesPaginated(address start, uint256 pageSize) view returns(address[] array, address next) +func (_Safe *SafeCaller) GetModulesPaginated(opts *bind.CallOpts, start common.Address, pageSize *big.Int) (struct { + Array []common.Address + Next common.Address +}, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "getModulesPaginated", start, pageSize) + + outstruct := new(struct { + Array []common.Address + Next common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.Array = *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + outstruct.Next = *abi.ConvertType(out[1], new(common.Address)).(*common.Address) + + return *outstruct, err + +} + +// GetModulesPaginated is a free data retrieval call binding the contract method 0xcc2f8452. +// +// Solidity: function getModulesPaginated(address start, uint256 pageSize) view returns(address[] array, address next) +func (_Safe *SafeSession) GetModulesPaginated(start common.Address, pageSize *big.Int) (struct { + Array []common.Address + Next common.Address +}, error) { + return _Safe.Contract.GetModulesPaginated(&_Safe.CallOpts, start, pageSize) +} + +// GetModulesPaginated is a free data retrieval call binding the contract method 0xcc2f8452. +// +// Solidity: function getModulesPaginated(address start, uint256 pageSize) view returns(address[] array, address next) +func (_Safe *SafeCallerSession) GetModulesPaginated(start common.Address, pageSize *big.Int) (struct { + Array []common.Address + Next common.Address +}, error) { + return _Safe.Contract.GetModulesPaginated(&_Safe.CallOpts, start, pageSize) +} + +// GetOwners is a free data retrieval call binding the contract method 0xa0e67e2b. +// +// Solidity: function getOwners() view returns(address[]) +func (_Safe *SafeCaller) GetOwners(opts *bind.CallOpts) ([]common.Address, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "getOwners") + + if err != nil { + return *new([]common.Address), err + } + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + + return out0, err + +} + +// GetOwners is a free data retrieval call binding the contract method 0xa0e67e2b. +// +// Solidity: function getOwners() view returns(address[]) +func (_Safe *SafeSession) GetOwners() ([]common.Address, error) { + return _Safe.Contract.GetOwners(&_Safe.CallOpts) +} + +// GetOwners is a free data retrieval call binding the contract method 0xa0e67e2b. +// +// Solidity: function getOwners() view returns(address[]) +func (_Safe *SafeCallerSession) GetOwners() ([]common.Address, error) { + return _Safe.Contract.GetOwners(&_Safe.CallOpts) +} + +// GetStorageAt is a free data retrieval call binding the contract method 0x5624b25b. +// +// Solidity: function getStorageAt(uint256 offset, uint256 length) view returns(bytes) +func (_Safe *SafeCaller) GetStorageAt(opts *bind.CallOpts, offset *big.Int, length *big.Int) ([]byte, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "getStorageAt", offset, length) + + if err != nil { + return *new([]byte), err + } + + out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) + + return out0, err + +} + +// GetStorageAt is a free data retrieval call binding the contract method 0x5624b25b. +// +// Solidity: function getStorageAt(uint256 offset, uint256 length) view returns(bytes) +func (_Safe *SafeSession) GetStorageAt(offset *big.Int, length *big.Int) ([]byte, error) { + return _Safe.Contract.GetStorageAt(&_Safe.CallOpts, offset, length) +} + +// GetStorageAt is a free data retrieval call binding the contract method 0x5624b25b. +// +// Solidity: function getStorageAt(uint256 offset, uint256 length) view returns(bytes) +func (_Safe *SafeCallerSession) GetStorageAt(offset *big.Int, length *big.Int) ([]byte, error) { + return _Safe.Contract.GetStorageAt(&_Safe.CallOpts, offset, length) +} + +// GetThreshold is a free data retrieval call binding the contract method 0xe75235b8. +// +// Solidity: function getThreshold() view returns(uint256) +func (_Safe *SafeCaller) GetThreshold(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "getThreshold") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetThreshold is a free data retrieval call binding the contract method 0xe75235b8. +// +// Solidity: function getThreshold() view returns(uint256) +func (_Safe *SafeSession) GetThreshold() (*big.Int, error) { + return _Safe.Contract.GetThreshold(&_Safe.CallOpts) +} + +// GetThreshold is a free data retrieval call binding the contract method 0xe75235b8. +// +// Solidity: function getThreshold() view returns(uint256) +func (_Safe *SafeCallerSession) GetThreshold() (*big.Int, error) { + return _Safe.Contract.GetThreshold(&_Safe.CallOpts) +} + +// GetTransactionHash is a free data retrieval call binding the contract method 0xd8d11f78. +// +// Solidity: function getTransactionHash(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, uint256 _nonce) view returns(bytes32) +func (_Safe *SafeCaller) GetTransactionHash(opts *bind.CallOpts, to common.Address, value *big.Int, data []byte, operation uint8, safeTxGas *big.Int, baseGas *big.Int, gasPrice *big.Int, gasToken common.Address, refundReceiver common.Address, _nonce *big.Int) ([32]byte, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "getTransactionHash", to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetTransactionHash is a free data retrieval call binding the contract method 0xd8d11f78. +// +// Solidity: function getTransactionHash(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, uint256 _nonce) view returns(bytes32) +func (_Safe *SafeSession) GetTransactionHash(to common.Address, value *big.Int, data []byte, operation uint8, safeTxGas *big.Int, baseGas *big.Int, gasPrice *big.Int, gasToken common.Address, refundReceiver common.Address, _nonce *big.Int) ([32]byte, error) { + return _Safe.Contract.GetTransactionHash(&_Safe.CallOpts, to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) +} + +// GetTransactionHash is a free data retrieval call binding the contract method 0xd8d11f78. +// +// Solidity: function getTransactionHash(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, uint256 _nonce) view returns(bytes32) +func (_Safe *SafeCallerSession) GetTransactionHash(to common.Address, value *big.Int, data []byte, operation uint8, safeTxGas *big.Int, baseGas *big.Int, gasPrice *big.Int, gasToken common.Address, refundReceiver common.Address, _nonce *big.Int) ([32]byte, error) { + return _Safe.Contract.GetTransactionHash(&_Safe.CallOpts, to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, _nonce) +} + +// IsModuleEnabled is a free data retrieval call binding the contract method 0x2d9ad53d. +// +// Solidity: function isModuleEnabled(address module) view returns(bool) +func (_Safe *SafeCaller) IsModuleEnabled(opts *bind.CallOpts, module common.Address) (bool, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "isModuleEnabled", module) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsModuleEnabled is a free data retrieval call binding the contract method 0x2d9ad53d. +// +// Solidity: function isModuleEnabled(address module) view returns(bool) +func (_Safe *SafeSession) IsModuleEnabled(module common.Address) (bool, error) { + return _Safe.Contract.IsModuleEnabled(&_Safe.CallOpts, module) +} + +// IsModuleEnabled is a free data retrieval call binding the contract method 0x2d9ad53d. +// +// Solidity: function isModuleEnabled(address module) view returns(bool) +func (_Safe *SafeCallerSession) IsModuleEnabled(module common.Address) (bool, error) { + return _Safe.Contract.IsModuleEnabled(&_Safe.CallOpts, module) +} + +// IsOwner is a free data retrieval call binding the contract method 0x2f54bf6e. +// +// Solidity: function isOwner(address owner) view returns(bool) +func (_Safe *SafeCaller) IsOwner(opts *bind.CallOpts, owner common.Address) (bool, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "isOwner", owner) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsOwner is a free data retrieval call binding the contract method 0x2f54bf6e. +// +// Solidity: function isOwner(address owner) view returns(bool) +func (_Safe *SafeSession) IsOwner(owner common.Address) (bool, error) { + return _Safe.Contract.IsOwner(&_Safe.CallOpts, owner) +} + +// IsOwner is a free data retrieval call binding the contract method 0x2f54bf6e. +// +// Solidity: function isOwner(address owner) view returns(bool) +func (_Safe *SafeCallerSession) IsOwner(owner common.Address) (bool, error) { + return _Safe.Contract.IsOwner(&_Safe.CallOpts, owner) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint256) +func (_Safe *SafeCaller) Nonce(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "nonce") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint256) +func (_Safe *SafeSession) Nonce() (*big.Int, error) { + return _Safe.Contract.Nonce(&_Safe.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint256) +func (_Safe *SafeCallerSession) Nonce() (*big.Int, error) { + return _Safe.Contract.Nonce(&_Safe.CallOpts) +} + +// SignedMessages is a free data retrieval call binding the contract method 0x5ae6bd37. +// +// Solidity: function signedMessages(bytes32 ) view returns(uint256) +func (_Safe *SafeCaller) SignedMessages(opts *bind.CallOpts, arg0 [32]byte) (*big.Int, error) { + var out []interface{} + err := _Safe.contract.Call(opts, &out, "signedMessages", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SignedMessages is a free data retrieval call binding the contract method 0x5ae6bd37. +// +// Solidity: function signedMessages(bytes32 ) view returns(uint256) +func (_Safe *SafeSession) SignedMessages(arg0 [32]byte) (*big.Int, error) { + return _Safe.Contract.SignedMessages(&_Safe.CallOpts, arg0) +} + +// SignedMessages is a free data retrieval call binding the contract method 0x5ae6bd37. +// +// Solidity: function signedMessages(bytes32 ) view returns(uint256) +func (_Safe *SafeCallerSession) SignedMessages(arg0 [32]byte) (*big.Int, error) { + return _Safe.Contract.SignedMessages(&_Safe.CallOpts, arg0) +} + +// AddOwnerWithThreshold is a paid mutator transaction binding the contract method 0x0d582f13. +// +// Solidity: function addOwnerWithThreshold(address owner, uint256 _threshold) returns() +func (_Safe *SafeTransactor) AddOwnerWithThreshold(opts *bind.TransactOpts, owner common.Address, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "addOwnerWithThreshold", owner, _threshold) +} + +// AddOwnerWithThreshold is a paid mutator transaction binding the contract method 0x0d582f13. +// +// Solidity: function addOwnerWithThreshold(address owner, uint256 _threshold) returns() +func (_Safe *SafeSession) AddOwnerWithThreshold(owner common.Address, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.Contract.AddOwnerWithThreshold(&_Safe.TransactOpts, owner, _threshold) +} + +// AddOwnerWithThreshold is a paid mutator transaction binding the contract method 0x0d582f13. +// +// Solidity: function addOwnerWithThreshold(address owner, uint256 _threshold) returns() +func (_Safe *SafeTransactorSession) AddOwnerWithThreshold(owner common.Address, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.Contract.AddOwnerWithThreshold(&_Safe.TransactOpts, owner, _threshold) +} + +// ApproveHash is a paid mutator transaction binding the contract method 0xd4d9bdcd. +// +// Solidity: function approveHash(bytes32 hashToApprove) returns() +func (_Safe *SafeTransactor) ApproveHash(opts *bind.TransactOpts, hashToApprove [32]byte) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "approveHash", hashToApprove) +} + +// ApproveHash is a paid mutator transaction binding the contract method 0xd4d9bdcd. +// +// Solidity: function approveHash(bytes32 hashToApprove) returns() +func (_Safe *SafeSession) ApproveHash(hashToApprove [32]byte) (*types.Transaction, error) { + return _Safe.Contract.ApproveHash(&_Safe.TransactOpts, hashToApprove) +} + +// ApproveHash is a paid mutator transaction binding the contract method 0xd4d9bdcd. +// +// Solidity: function approveHash(bytes32 hashToApprove) returns() +func (_Safe *SafeTransactorSession) ApproveHash(hashToApprove [32]byte) (*types.Transaction, error) { + return _Safe.Contract.ApproveHash(&_Safe.TransactOpts, hashToApprove) +} + +// ChangeThreshold is a paid mutator transaction binding the contract method 0x694e80c3. +// +// Solidity: function changeThreshold(uint256 _threshold) returns() +func (_Safe *SafeTransactor) ChangeThreshold(opts *bind.TransactOpts, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "changeThreshold", _threshold) +} + +// ChangeThreshold is a paid mutator transaction binding the contract method 0x694e80c3. +// +// Solidity: function changeThreshold(uint256 _threshold) returns() +func (_Safe *SafeSession) ChangeThreshold(_threshold *big.Int) (*types.Transaction, error) { + return _Safe.Contract.ChangeThreshold(&_Safe.TransactOpts, _threshold) +} + +// ChangeThreshold is a paid mutator transaction binding the contract method 0x694e80c3. +// +// Solidity: function changeThreshold(uint256 _threshold) returns() +func (_Safe *SafeTransactorSession) ChangeThreshold(_threshold *big.Int) (*types.Transaction, error) { + return _Safe.Contract.ChangeThreshold(&_Safe.TransactOpts, _threshold) +} + +// DisableModule is a paid mutator transaction binding the contract method 0xe009cfde. +// +// Solidity: function disableModule(address prevModule, address module) returns() +func (_Safe *SafeTransactor) DisableModule(opts *bind.TransactOpts, prevModule common.Address, module common.Address) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "disableModule", prevModule, module) +} + +// DisableModule is a paid mutator transaction binding the contract method 0xe009cfde. +// +// Solidity: function disableModule(address prevModule, address module) returns() +func (_Safe *SafeSession) DisableModule(prevModule common.Address, module common.Address) (*types.Transaction, error) { + return _Safe.Contract.DisableModule(&_Safe.TransactOpts, prevModule, module) +} + +// DisableModule is a paid mutator transaction binding the contract method 0xe009cfde. +// +// Solidity: function disableModule(address prevModule, address module) returns() +func (_Safe *SafeTransactorSession) DisableModule(prevModule common.Address, module common.Address) (*types.Transaction, error) { + return _Safe.Contract.DisableModule(&_Safe.TransactOpts, prevModule, module) +} + +// EnableModule is a paid mutator transaction binding the contract method 0x610b5925. +// +// Solidity: function enableModule(address module) returns() +func (_Safe *SafeTransactor) EnableModule(opts *bind.TransactOpts, module common.Address) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "enableModule", module) +} + +// EnableModule is a paid mutator transaction binding the contract method 0x610b5925. +// +// Solidity: function enableModule(address module) returns() +func (_Safe *SafeSession) EnableModule(module common.Address) (*types.Transaction, error) { + return _Safe.Contract.EnableModule(&_Safe.TransactOpts, module) +} + +// EnableModule is a paid mutator transaction binding the contract method 0x610b5925. +// +// Solidity: function enableModule(address module) returns() +func (_Safe *SafeTransactorSession) EnableModule(module common.Address) (*types.Transaction, error) { + return _Safe.Contract.EnableModule(&_Safe.TransactOpts, module) +} + +// ExecTransaction is a paid mutator transaction binding the contract method 0x6a761202. +// +// Solidity: function execTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures) payable returns(bool) +func (_Safe *SafeTransactor) ExecTransaction(opts *bind.TransactOpts, to common.Address, value *big.Int, data []byte, operation uint8, safeTxGas *big.Int, baseGas *big.Int, gasPrice *big.Int, gasToken common.Address, refundReceiver common.Address, signatures []byte) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "execTransaction", to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures) +} + +// ExecTransaction is a paid mutator transaction binding the contract method 0x6a761202. +// +// Solidity: function execTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures) payable returns(bool) +func (_Safe *SafeSession) ExecTransaction(to common.Address, value *big.Int, data []byte, operation uint8, safeTxGas *big.Int, baseGas *big.Int, gasPrice *big.Int, gasToken common.Address, refundReceiver common.Address, signatures []byte) (*types.Transaction, error) { + return _Safe.Contract.ExecTransaction(&_Safe.TransactOpts, to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures) +} + +// ExecTransaction is a paid mutator transaction binding the contract method 0x6a761202. +// +// Solidity: function execTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures) payable returns(bool) +func (_Safe *SafeTransactorSession) ExecTransaction(to common.Address, value *big.Int, data []byte, operation uint8, safeTxGas *big.Int, baseGas *big.Int, gasPrice *big.Int, gasToken common.Address, refundReceiver common.Address, signatures []byte) (*types.Transaction, error) { + return _Safe.Contract.ExecTransaction(&_Safe.TransactOpts, to, value, data, operation, safeTxGas, baseGas, gasPrice, gasToken, refundReceiver, signatures) +} + +// ExecTransactionFromModule is a paid mutator transaction binding the contract method 0x468721a7. +// +// Solidity: function execTransactionFromModule(address to, uint256 value, bytes data, uint8 operation) returns(bool success) +func (_Safe *SafeTransactor) ExecTransactionFromModule(opts *bind.TransactOpts, to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "execTransactionFromModule", to, value, data, operation) +} + +// ExecTransactionFromModule is a paid mutator transaction binding the contract method 0x468721a7. +// +// Solidity: function execTransactionFromModule(address to, uint256 value, bytes data, uint8 operation) returns(bool success) +func (_Safe *SafeSession) ExecTransactionFromModule(to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Safe.Contract.ExecTransactionFromModule(&_Safe.TransactOpts, to, value, data, operation) +} + +// ExecTransactionFromModule is a paid mutator transaction binding the contract method 0x468721a7. +// +// Solidity: function execTransactionFromModule(address to, uint256 value, bytes data, uint8 operation) returns(bool success) +func (_Safe *SafeTransactorSession) ExecTransactionFromModule(to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Safe.Contract.ExecTransactionFromModule(&_Safe.TransactOpts, to, value, data, operation) +} + +// ExecTransactionFromModuleReturnData is a paid mutator transaction binding the contract method 0x5229073f. +// +// Solidity: function execTransactionFromModuleReturnData(address to, uint256 value, bytes data, uint8 operation) returns(bool success, bytes returnData) +func (_Safe *SafeTransactor) ExecTransactionFromModuleReturnData(opts *bind.TransactOpts, to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "execTransactionFromModuleReturnData", to, value, data, operation) +} + +// ExecTransactionFromModuleReturnData is a paid mutator transaction binding the contract method 0x5229073f. +// +// Solidity: function execTransactionFromModuleReturnData(address to, uint256 value, bytes data, uint8 operation) returns(bool success, bytes returnData) +func (_Safe *SafeSession) ExecTransactionFromModuleReturnData(to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Safe.Contract.ExecTransactionFromModuleReturnData(&_Safe.TransactOpts, to, value, data, operation) +} + +// ExecTransactionFromModuleReturnData is a paid mutator transaction binding the contract method 0x5229073f. +// +// Solidity: function execTransactionFromModuleReturnData(address to, uint256 value, bytes data, uint8 operation) returns(bool success, bytes returnData) +func (_Safe *SafeTransactorSession) ExecTransactionFromModuleReturnData(to common.Address, value *big.Int, data []byte, operation uint8) (*types.Transaction, error) { + return _Safe.Contract.ExecTransactionFromModuleReturnData(&_Safe.TransactOpts, to, value, data, operation) +} + +// RemoveOwner is a paid mutator transaction binding the contract method 0xf8dc5dd9. +// +// Solidity: function removeOwner(address prevOwner, address owner, uint256 _threshold) returns() +func (_Safe *SafeTransactor) RemoveOwner(opts *bind.TransactOpts, prevOwner common.Address, owner common.Address, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "removeOwner", prevOwner, owner, _threshold) +} + +// RemoveOwner is a paid mutator transaction binding the contract method 0xf8dc5dd9. +// +// Solidity: function removeOwner(address prevOwner, address owner, uint256 _threshold) returns() +func (_Safe *SafeSession) RemoveOwner(prevOwner common.Address, owner common.Address, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.Contract.RemoveOwner(&_Safe.TransactOpts, prevOwner, owner, _threshold) +} + +// RemoveOwner is a paid mutator transaction binding the contract method 0xf8dc5dd9. +// +// Solidity: function removeOwner(address prevOwner, address owner, uint256 _threshold) returns() +func (_Safe *SafeTransactorSession) RemoveOwner(prevOwner common.Address, owner common.Address, _threshold *big.Int) (*types.Transaction, error) { + return _Safe.Contract.RemoveOwner(&_Safe.TransactOpts, prevOwner, owner, _threshold) +} + +// SetFallbackHandler is a paid mutator transaction binding the contract method 0xf08a0323. +// +// Solidity: function setFallbackHandler(address handler) returns() +func (_Safe *SafeTransactor) SetFallbackHandler(opts *bind.TransactOpts, handler common.Address) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "setFallbackHandler", handler) +} + +// SetFallbackHandler is a paid mutator transaction binding the contract method 0xf08a0323. +// +// Solidity: function setFallbackHandler(address handler) returns() +func (_Safe *SafeSession) SetFallbackHandler(handler common.Address) (*types.Transaction, error) { + return _Safe.Contract.SetFallbackHandler(&_Safe.TransactOpts, handler) +} + +// SetFallbackHandler is a paid mutator transaction binding the contract method 0xf08a0323. +// +// Solidity: function setFallbackHandler(address handler) returns() +func (_Safe *SafeTransactorSession) SetFallbackHandler(handler common.Address) (*types.Transaction, error) { + return _Safe.Contract.SetFallbackHandler(&_Safe.TransactOpts, handler) +} + +// SetGuard is a paid mutator transaction binding the contract method 0xe19a9dd9. +// +// Solidity: function setGuard(address guard) returns() +func (_Safe *SafeTransactor) SetGuard(opts *bind.TransactOpts, guard common.Address) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "setGuard", guard) +} + +// SetGuard is a paid mutator transaction binding the contract method 0xe19a9dd9. +// +// Solidity: function setGuard(address guard) returns() +func (_Safe *SafeSession) SetGuard(guard common.Address) (*types.Transaction, error) { + return _Safe.Contract.SetGuard(&_Safe.TransactOpts, guard) +} + +// SetGuard is a paid mutator transaction binding the contract method 0xe19a9dd9. +// +// Solidity: function setGuard(address guard) returns() +func (_Safe *SafeTransactorSession) SetGuard(guard common.Address) (*types.Transaction, error) { + return _Safe.Contract.SetGuard(&_Safe.TransactOpts, guard) +} + +// Setup is a paid mutator transaction binding the contract method 0xb63e800d. +// +// Solidity: function setup(address[] _owners, uint256 _threshold, address to, bytes data, address fallbackHandler, address paymentToken, uint256 payment, address paymentReceiver) returns() +func (_Safe *SafeTransactor) Setup(opts *bind.TransactOpts, _owners []common.Address, _threshold *big.Int, to common.Address, data []byte, fallbackHandler common.Address, paymentToken common.Address, payment *big.Int, paymentReceiver common.Address) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "setup", _owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver) +} + +// Setup is a paid mutator transaction binding the contract method 0xb63e800d. +// +// Solidity: function setup(address[] _owners, uint256 _threshold, address to, bytes data, address fallbackHandler, address paymentToken, uint256 payment, address paymentReceiver) returns() +func (_Safe *SafeSession) Setup(_owners []common.Address, _threshold *big.Int, to common.Address, data []byte, fallbackHandler common.Address, paymentToken common.Address, payment *big.Int, paymentReceiver common.Address) (*types.Transaction, error) { + return _Safe.Contract.Setup(&_Safe.TransactOpts, _owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver) +} + +// Setup is a paid mutator transaction binding the contract method 0xb63e800d. +// +// Solidity: function setup(address[] _owners, uint256 _threshold, address to, bytes data, address fallbackHandler, address paymentToken, uint256 payment, address paymentReceiver) returns() +func (_Safe *SafeTransactorSession) Setup(_owners []common.Address, _threshold *big.Int, to common.Address, data []byte, fallbackHandler common.Address, paymentToken common.Address, payment *big.Int, paymentReceiver common.Address) (*types.Transaction, error) { + return _Safe.Contract.Setup(&_Safe.TransactOpts, _owners, _threshold, to, data, fallbackHandler, paymentToken, payment, paymentReceiver) +} + +// SimulateAndRevert is a paid mutator transaction binding the contract method 0xb4faba09. +// +// Solidity: function simulateAndRevert(address targetContract, bytes calldataPayload) returns() +func (_Safe *SafeTransactor) SimulateAndRevert(opts *bind.TransactOpts, targetContract common.Address, calldataPayload []byte) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "simulateAndRevert", targetContract, calldataPayload) +} + +// SimulateAndRevert is a paid mutator transaction binding the contract method 0xb4faba09. +// +// Solidity: function simulateAndRevert(address targetContract, bytes calldataPayload) returns() +func (_Safe *SafeSession) SimulateAndRevert(targetContract common.Address, calldataPayload []byte) (*types.Transaction, error) { + return _Safe.Contract.SimulateAndRevert(&_Safe.TransactOpts, targetContract, calldataPayload) +} + +// SimulateAndRevert is a paid mutator transaction binding the contract method 0xb4faba09. +// +// Solidity: function simulateAndRevert(address targetContract, bytes calldataPayload) returns() +func (_Safe *SafeTransactorSession) SimulateAndRevert(targetContract common.Address, calldataPayload []byte) (*types.Transaction, error) { + return _Safe.Contract.SimulateAndRevert(&_Safe.TransactOpts, targetContract, calldataPayload) +} + +// SwapOwner is a paid mutator transaction binding the contract method 0xe318b52b. +// +// Solidity: function swapOwner(address prevOwner, address oldOwner, address newOwner) returns() +func (_Safe *SafeTransactor) SwapOwner(opts *bind.TransactOpts, prevOwner common.Address, oldOwner common.Address, newOwner common.Address) (*types.Transaction, error) { + return _Safe.contract.Transact(opts, "swapOwner", prevOwner, oldOwner, newOwner) +} + +// SwapOwner is a paid mutator transaction binding the contract method 0xe318b52b. +// +// Solidity: function swapOwner(address prevOwner, address oldOwner, address newOwner) returns() +func (_Safe *SafeSession) SwapOwner(prevOwner common.Address, oldOwner common.Address, newOwner common.Address) (*types.Transaction, error) { + return _Safe.Contract.SwapOwner(&_Safe.TransactOpts, prevOwner, oldOwner, newOwner) +} + +// SwapOwner is a paid mutator transaction binding the contract method 0xe318b52b. +// +// Solidity: function swapOwner(address prevOwner, address oldOwner, address newOwner) returns() +func (_Safe *SafeTransactorSession) SwapOwner(prevOwner common.Address, oldOwner common.Address, newOwner common.Address) (*types.Transaction, error) { + return _Safe.Contract.SwapOwner(&_Safe.TransactOpts, prevOwner, oldOwner, newOwner) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() returns() +func (_Safe *SafeTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { + return _Safe.contract.RawTransact(opts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() returns() +func (_Safe *SafeSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Safe.Contract.Fallback(&_Safe.TransactOpts, calldata) +} + +// Fallback is a paid mutator transaction binding the contract fallback function. +// +// Solidity: fallback() returns() +func (_Safe *SafeTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { + return _Safe.Contract.Fallback(&_Safe.TransactOpts, calldata) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Safe *SafeTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Safe.contract.RawTransact(opts, nil) // calldata is disallowed for receive function +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Safe *SafeSession) Receive() (*types.Transaction, error) { + return _Safe.Contract.Receive(&_Safe.TransactOpts) +} + +// Receive is a paid mutator transaction binding the contract receive function. +// +// Solidity: receive() payable returns() +func (_Safe *SafeTransactorSession) Receive() (*types.Transaction, error) { + return _Safe.Contract.Receive(&_Safe.TransactOpts) +} + +// SafeAddedOwnerIterator is returned from FilterAddedOwner and is used to iterate over the raw logs and unpacked data for AddedOwner events raised by the Safe contract. +type SafeAddedOwnerIterator struct { + Event *SafeAddedOwner // 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 *SafeAddedOwnerIterator) 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(SafeAddedOwner) + 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(SafeAddedOwner) + 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 *SafeAddedOwnerIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeAddedOwnerIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeAddedOwner represents a AddedOwner event raised by the Safe contract. +type SafeAddedOwner struct { + Owner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAddedOwner is a free log retrieval operation binding the contract event 0x9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea26. +// +// Solidity: event AddedOwner(address indexed owner) +func (_Safe *SafeFilterer) FilterAddedOwner(opts *bind.FilterOpts, owner []common.Address) (*SafeAddedOwnerIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "AddedOwner", ownerRule) + if err != nil { + return nil, err + } + return &SafeAddedOwnerIterator{contract: _Safe.contract, event: "AddedOwner", logs: logs, sub: sub}, nil +} + +// WatchAddedOwner is a free log subscription operation binding the contract event 0x9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea26. +// +// Solidity: event AddedOwner(address indexed owner) +func (_Safe *SafeFilterer) WatchAddedOwner(opts *bind.WatchOpts, sink chan<- *SafeAddedOwner, owner []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "AddedOwner", ownerRule) + 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(SafeAddedOwner) + if err := _Safe.contract.UnpackLog(event, "AddedOwner", 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 +} + +// ParseAddedOwner is a log parse operation binding the contract event 0x9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea26. +// +// Solidity: event AddedOwner(address indexed owner) +func (_Safe *SafeFilterer) ParseAddedOwner(log types.Log) (*SafeAddedOwner, error) { + event := new(SafeAddedOwner) + if err := _Safe.contract.UnpackLog(event, "AddedOwner", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeApproveHashIterator is returned from FilterApproveHash and is used to iterate over the raw logs and unpacked data for ApproveHash events raised by the Safe contract. +type SafeApproveHashIterator struct { + Event *SafeApproveHash // 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 *SafeApproveHashIterator) 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(SafeApproveHash) + 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(SafeApproveHash) + 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 *SafeApproveHashIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeApproveHashIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeApproveHash represents a ApproveHash event raised by the Safe contract. +type SafeApproveHash struct { + ApprovedHash [32]byte + Owner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproveHash is a free log retrieval operation binding the contract event 0xf2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c. +// +// Solidity: event ApproveHash(bytes32 indexed approvedHash, address indexed owner) +func (_Safe *SafeFilterer) FilterApproveHash(opts *bind.FilterOpts, approvedHash [][32]byte, owner []common.Address) (*SafeApproveHashIterator, error) { + + var approvedHashRule []interface{} + for _, approvedHashItem := range approvedHash { + approvedHashRule = append(approvedHashRule, approvedHashItem) + } + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ApproveHash", approvedHashRule, ownerRule) + if err != nil { + return nil, err + } + return &SafeApproveHashIterator{contract: _Safe.contract, event: "ApproveHash", logs: logs, sub: sub}, nil +} + +// WatchApproveHash is a free log subscription operation binding the contract event 0xf2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c. +// +// Solidity: event ApproveHash(bytes32 indexed approvedHash, address indexed owner) +func (_Safe *SafeFilterer) WatchApproveHash(opts *bind.WatchOpts, sink chan<- *SafeApproveHash, approvedHash [][32]byte, owner []common.Address) (event.Subscription, error) { + + var approvedHashRule []interface{} + for _, approvedHashItem := range approvedHash { + approvedHashRule = append(approvedHashRule, approvedHashItem) + } + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ApproveHash", approvedHashRule, ownerRule) + 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(SafeApproveHash) + if err := _Safe.contract.UnpackLog(event, "ApproveHash", 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 +} + +// ParseApproveHash is a log parse operation binding the contract event 0xf2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c. +// +// Solidity: event ApproveHash(bytes32 indexed approvedHash, address indexed owner) +func (_Safe *SafeFilterer) ParseApproveHash(log types.Log) (*SafeApproveHash, error) { + event := new(SafeApproveHash) + if err := _Safe.contract.UnpackLog(event, "ApproveHash", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeChangedFallbackHandlerIterator is returned from FilterChangedFallbackHandler and is used to iterate over the raw logs and unpacked data for ChangedFallbackHandler events raised by the Safe contract. +type SafeChangedFallbackHandlerIterator struct { + Event *SafeChangedFallbackHandler // 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 *SafeChangedFallbackHandlerIterator) 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(SafeChangedFallbackHandler) + 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(SafeChangedFallbackHandler) + 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 *SafeChangedFallbackHandlerIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeChangedFallbackHandlerIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeChangedFallbackHandler represents a ChangedFallbackHandler event raised by the Safe contract. +type SafeChangedFallbackHandler struct { + Handler common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChangedFallbackHandler is a free log retrieval operation binding the contract event 0x5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b0. +// +// Solidity: event ChangedFallbackHandler(address indexed handler) +func (_Safe *SafeFilterer) FilterChangedFallbackHandler(opts *bind.FilterOpts, handler []common.Address) (*SafeChangedFallbackHandlerIterator, error) { + + var handlerRule []interface{} + for _, handlerItem := range handler { + handlerRule = append(handlerRule, handlerItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ChangedFallbackHandler", handlerRule) + if err != nil { + return nil, err + } + return &SafeChangedFallbackHandlerIterator{contract: _Safe.contract, event: "ChangedFallbackHandler", logs: logs, sub: sub}, nil +} + +// WatchChangedFallbackHandler is a free log subscription operation binding the contract event 0x5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b0. +// +// Solidity: event ChangedFallbackHandler(address indexed handler) +func (_Safe *SafeFilterer) WatchChangedFallbackHandler(opts *bind.WatchOpts, sink chan<- *SafeChangedFallbackHandler, handler []common.Address) (event.Subscription, error) { + + var handlerRule []interface{} + for _, handlerItem := range handler { + handlerRule = append(handlerRule, handlerItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ChangedFallbackHandler", handlerRule) + 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(SafeChangedFallbackHandler) + if err := _Safe.contract.UnpackLog(event, "ChangedFallbackHandler", 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 +} + +// ParseChangedFallbackHandler is a log parse operation binding the contract event 0x5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b0. +// +// Solidity: event ChangedFallbackHandler(address indexed handler) +func (_Safe *SafeFilterer) ParseChangedFallbackHandler(log types.Log) (*SafeChangedFallbackHandler, error) { + event := new(SafeChangedFallbackHandler) + if err := _Safe.contract.UnpackLog(event, "ChangedFallbackHandler", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeChangedGuardIterator is returned from FilterChangedGuard and is used to iterate over the raw logs and unpacked data for ChangedGuard events raised by the Safe contract. +type SafeChangedGuardIterator struct { + Event *SafeChangedGuard // 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 *SafeChangedGuardIterator) 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(SafeChangedGuard) + 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(SafeChangedGuard) + 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 *SafeChangedGuardIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeChangedGuardIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeChangedGuard represents a ChangedGuard event raised by the Safe contract. +type SafeChangedGuard struct { + Guard common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChangedGuard is a free log retrieval operation binding the contract event 0x1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2. +// +// Solidity: event ChangedGuard(address indexed guard) +func (_Safe *SafeFilterer) FilterChangedGuard(opts *bind.FilterOpts, guard []common.Address) (*SafeChangedGuardIterator, error) { + + var guardRule []interface{} + for _, guardItem := range guard { + guardRule = append(guardRule, guardItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ChangedGuard", guardRule) + if err != nil { + return nil, err + } + return &SafeChangedGuardIterator{contract: _Safe.contract, event: "ChangedGuard", logs: logs, sub: sub}, nil +} + +// WatchChangedGuard is a free log subscription operation binding the contract event 0x1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2. +// +// Solidity: event ChangedGuard(address indexed guard) +func (_Safe *SafeFilterer) WatchChangedGuard(opts *bind.WatchOpts, sink chan<- *SafeChangedGuard, guard []common.Address) (event.Subscription, error) { + + var guardRule []interface{} + for _, guardItem := range guard { + guardRule = append(guardRule, guardItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ChangedGuard", guardRule) + 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(SafeChangedGuard) + if err := _Safe.contract.UnpackLog(event, "ChangedGuard", 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 +} + +// ParseChangedGuard is a log parse operation binding the contract event 0x1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa2. +// +// Solidity: event ChangedGuard(address indexed guard) +func (_Safe *SafeFilterer) ParseChangedGuard(log types.Log) (*SafeChangedGuard, error) { + event := new(SafeChangedGuard) + if err := _Safe.contract.UnpackLog(event, "ChangedGuard", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeChangedThresholdIterator is returned from FilterChangedThreshold and is used to iterate over the raw logs and unpacked data for ChangedThreshold events raised by the Safe contract. +type SafeChangedThresholdIterator struct { + Event *SafeChangedThreshold // 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 *SafeChangedThresholdIterator) 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(SafeChangedThreshold) + 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(SafeChangedThreshold) + 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 *SafeChangedThresholdIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeChangedThresholdIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeChangedThreshold represents a ChangedThreshold event raised by the Safe contract. +type SafeChangedThreshold struct { + Threshold *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChangedThreshold is a free log retrieval operation binding the contract event 0x610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c93. +// +// Solidity: event ChangedThreshold(uint256 threshold) +func (_Safe *SafeFilterer) FilterChangedThreshold(opts *bind.FilterOpts) (*SafeChangedThresholdIterator, error) { + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ChangedThreshold") + if err != nil { + return nil, err + } + return &SafeChangedThresholdIterator{contract: _Safe.contract, event: "ChangedThreshold", logs: logs, sub: sub}, nil +} + +// WatchChangedThreshold is a free log subscription operation binding the contract event 0x610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c93. +// +// Solidity: event ChangedThreshold(uint256 threshold) +func (_Safe *SafeFilterer) WatchChangedThreshold(opts *bind.WatchOpts, sink chan<- *SafeChangedThreshold) (event.Subscription, error) { + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ChangedThreshold") + 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(SafeChangedThreshold) + if err := _Safe.contract.UnpackLog(event, "ChangedThreshold", 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 +} + +// ParseChangedThreshold is a log parse operation binding the contract event 0x610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c93. +// +// Solidity: event ChangedThreshold(uint256 threshold) +func (_Safe *SafeFilterer) ParseChangedThreshold(log types.Log) (*SafeChangedThreshold, error) { + event := new(SafeChangedThreshold) + if err := _Safe.contract.UnpackLog(event, "ChangedThreshold", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeDisabledModuleIterator is returned from FilterDisabledModule and is used to iterate over the raw logs and unpacked data for DisabledModule events raised by the Safe contract. +type SafeDisabledModuleIterator struct { + Event *SafeDisabledModule // 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 *SafeDisabledModuleIterator) 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(SafeDisabledModule) + 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(SafeDisabledModule) + 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 *SafeDisabledModuleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeDisabledModuleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeDisabledModule represents a DisabledModule event raised by the Safe contract. +type SafeDisabledModule struct { + Module common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDisabledModule is a free log retrieval operation binding the contract event 0xaab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276. +// +// Solidity: event DisabledModule(address indexed module) +func (_Safe *SafeFilterer) FilterDisabledModule(opts *bind.FilterOpts, module []common.Address) (*SafeDisabledModuleIterator, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "DisabledModule", moduleRule) + if err != nil { + return nil, err + } + return &SafeDisabledModuleIterator{contract: _Safe.contract, event: "DisabledModule", logs: logs, sub: sub}, nil +} + +// WatchDisabledModule is a free log subscription operation binding the contract event 0xaab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276. +// +// Solidity: event DisabledModule(address indexed module) +func (_Safe *SafeFilterer) WatchDisabledModule(opts *bind.WatchOpts, sink chan<- *SafeDisabledModule, module []common.Address) (event.Subscription, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "DisabledModule", moduleRule) + 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(SafeDisabledModule) + if err := _Safe.contract.UnpackLog(event, "DisabledModule", 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 +} + +// ParseDisabledModule is a log parse operation binding the contract event 0xaab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace4054276. +// +// Solidity: event DisabledModule(address indexed module) +func (_Safe *SafeFilterer) ParseDisabledModule(log types.Log) (*SafeDisabledModule, error) { + event := new(SafeDisabledModule) + if err := _Safe.contract.UnpackLog(event, "DisabledModule", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeEnabledModuleIterator is returned from FilterEnabledModule and is used to iterate over the raw logs and unpacked data for EnabledModule events raised by the Safe contract. +type SafeEnabledModuleIterator struct { + Event *SafeEnabledModule // 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 *SafeEnabledModuleIterator) 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(SafeEnabledModule) + 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(SafeEnabledModule) + 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 *SafeEnabledModuleIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeEnabledModuleIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeEnabledModule represents a EnabledModule event raised by the Safe contract. +type SafeEnabledModule struct { + Module common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEnabledModule is a free log retrieval operation binding the contract event 0xecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f8440. +// +// Solidity: event EnabledModule(address indexed module) +func (_Safe *SafeFilterer) FilterEnabledModule(opts *bind.FilterOpts, module []common.Address) (*SafeEnabledModuleIterator, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "EnabledModule", moduleRule) + if err != nil { + return nil, err + } + return &SafeEnabledModuleIterator{contract: _Safe.contract, event: "EnabledModule", logs: logs, sub: sub}, nil +} + +// WatchEnabledModule is a free log subscription operation binding the contract event 0xecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f8440. +// +// Solidity: event EnabledModule(address indexed module) +func (_Safe *SafeFilterer) WatchEnabledModule(opts *bind.WatchOpts, sink chan<- *SafeEnabledModule, module []common.Address) (event.Subscription, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "EnabledModule", moduleRule) + 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(SafeEnabledModule) + if err := _Safe.contract.UnpackLog(event, "EnabledModule", 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 +} + +// ParseEnabledModule is a log parse operation binding the contract event 0xecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f8440. +// +// Solidity: event EnabledModule(address indexed module) +func (_Safe *SafeFilterer) ParseEnabledModule(log types.Log) (*SafeEnabledModule, error) { + event := new(SafeEnabledModule) + if err := _Safe.contract.UnpackLog(event, "EnabledModule", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeExecutionFailureIterator is returned from FilterExecutionFailure and is used to iterate over the raw logs and unpacked data for ExecutionFailure events raised by the Safe contract. +type SafeExecutionFailureIterator struct { + Event *SafeExecutionFailure // 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 *SafeExecutionFailureIterator) 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(SafeExecutionFailure) + 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(SafeExecutionFailure) + 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 *SafeExecutionFailureIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeExecutionFailureIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeExecutionFailure represents a ExecutionFailure event raised by the Safe contract. +type SafeExecutionFailure struct { + TxHash [32]byte + Payment *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutionFailure is a free log retrieval operation binding the contract event 0x23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d23. +// +// Solidity: event ExecutionFailure(bytes32 indexed txHash, uint256 payment) +func (_Safe *SafeFilterer) FilterExecutionFailure(opts *bind.FilterOpts, txHash [][32]byte) (*SafeExecutionFailureIterator, error) { + + var txHashRule []interface{} + for _, txHashItem := range txHash { + txHashRule = append(txHashRule, txHashItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ExecutionFailure", txHashRule) + if err != nil { + return nil, err + } + return &SafeExecutionFailureIterator{contract: _Safe.contract, event: "ExecutionFailure", logs: logs, sub: sub}, nil +} + +// WatchExecutionFailure is a free log subscription operation binding the contract event 0x23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d23. +// +// Solidity: event ExecutionFailure(bytes32 indexed txHash, uint256 payment) +func (_Safe *SafeFilterer) WatchExecutionFailure(opts *bind.WatchOpts, sink chan<- *SafeExecutionFailure, txHash [][32]byte) (event.Subscription, error) { + + var txHashRule []interface{} + for _, txHashItem := range txHash { + txHashRule = append(txHashRule, txHashItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ExecutionFailure", txHashRule) + 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(SafeExecutionFailure) + if err := _Safe.contract.UnpackLog(event, "ExecutionFailure", 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 +} + +// ParseExecutionFailure is a log parse operation binding the contract event 0x23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d23. +// +// Solidity: event ExecutionFailure(bytes32 indexed txHash, uint256 payment) +func (_Safe *SafeFilterer) ParseExecutionFailure(log types.Log) (*SafeExecutionFailure, error) { + event := new(SafeExecutionFailure) + if err := _Safe.contract.UnpackLog(event, "ExecutionFailure", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeExecutionFromModuleFailureIterator is returned from FilterExecutionFromModuleFailure and is used to iterate over the raw logs and unpacked data for ExecutionFromModuleFailure events raised by the Safe contract. +type SafeExecutionFromModuleFailureIterator struct { + Event *SafeExecutionFromModuleFailure // 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 *SafeExecutionFromModuleFailureIterator) 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(SafeExecutionFromModuleFailure) + 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(SafeExecutionFromModuleFailure) + 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 *SafeExecutionFromModuleFailureIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeExecutionFromModuleFailureIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeExecutionFromModuleFailure represents a ExecutionFromModuleFailure event raised by the Safe contract. +type SafeExecutionFromModuleFailure struct { + Module common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutionFromModuleFailure is a free log retrieval operation binding the contract event 0xacd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd375. +// +// Solidity: event ExecutionFromModuleFailure(address indexed module) +func (_Safe *SafeFilterer) FilterExecutionFromModuleFailure(opts *bind.FilterOpts, module []common.Address) (*SafeExecutionFromModuleFailureIterator, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ExecutionFromModuleFailure", moduleRule) + if err != nil { + return nil, err + } + return &SafeExecutionFromModuleFailureIterator{contract: _Safe.contract, event: "ExecutionFromModuleFailure", logs: logs, sub: sub}, nil +} + +// WatchExecutionFromModuleFailure is a free log subscription operation binding the contract event 0xacd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd375. +// +// Solidity: event ExecutionFromModuleFailure(address indexed module) +func (_Safe *SafeFilterer) WatchExecutionFromModuleFailure(opts *bind.WatchOpts, sink chan<- *SafeExecutionFromModuleFailure, module []common.Address) (event.Subscription, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ExecutionFromModuleFailure", moduleRule) + 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(SafeExecutionFromModuleFailure) + if err := _Safe.contract.UnpackLog(event, "ExecutionFromModuleFailure", 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 +} + +// ParseExecutionFromModuleFailure is a log parse operation binding the contract event 0xacd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd375. +// +// Solidity: event ExecutionFromModuleFailure(address indexed module) +func (_Safe *SafeFilterer) ParseExecutionFromModuleFailure(log types.Log) (*SafeExecutionFromModuleFailure, error) { + event := new(SafeExecutionFromModuleFailure) + if err := _Safe.contract.UnpackLog(event, "ExecutionFromModuleFailure", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeExecutionFromModuleSuccessIterator is returned from FilterExecutionFromModuleSuccess and is used to iterate over the raw logs and unpacked data for ExecutionFromModuleSuccess events raised by the Safe contract. +type SafeExecutionFromModuleSuccessIterator struct { + Event *SafeExecutionFromModuleSuccess // 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 *SafeExecutionFromModuleSuccessIterator) 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(SafeExecutionFromModuleSuccess) + 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(SafeExecutionFromModuleSuccess) + 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 *SafeExecutionFromModuleSuccessIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeExecutionFromModuleSuccessIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeExecutionFromModuleSuccess represents a ExecutionFromModuleSuccess event raised by the Safe contract. +type SafeExecutionFromModuleSuccess struct { + Module common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutionFromModuleSuccess is a free log retrieval operation binding the contract event 0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8. +// +// Solidity: event ExecutionFromModuleSuccess(address indexed module) +func (_Safe *SafeFilterer) FilterExecutionFromModuleSuccess(opts *bind.FilterOpts, module []common.Address) (*SafeExecutionFromModuleSuccessIterator, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ExecutionFromModuleSuccess", moduleRule) + if err != nil { + return nil, err + } + return &SafeExecutionFromModuleSuccessIterator{contract: _Safe.contract, event: "ExecutionFromModuleSuccess", logs: logs, sub: sub}, nil +} + +// WatchExecutionFromModuleSuccess is a free log subscription operation binding the contract event 0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8. +// +// Solidity: event ExecutionFromModuleSuccess(address indexed module) +func (_Safe *SafeFilterer) WatchExecutionFromModuleSuccess(opts *bind.WatchOpts, sink chan<- *SafeExecutionFromModuleSuccess, module []common.Address) (event.Subscription, error) { + + var moduleRule []interface{} + for _, moduleItem := range module { + moduleRule = append(moduleRule, moduleItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ExecutionFromModuleSuccess", moduleRule) + 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(SafeExecutionFromModuleSuccess) + if err := _Safe.contract.UnpackLog(event, "ExecutionFromModuleSuccess", 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 +} + +// ParseExecutionFromModuleSuccess is a log parse operation binding the contract event 0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8. +// +// Solidity: event ExecutionFromModuleSuccess(address indexed module) +func (_Safe *SafeFilterer) ParseExecutionFromModuleSuccess(log types.Log) (*SafeExecutionFromModuleSuccess, error) { + event := new(SafeExecutionFromModuleSuccess) + if err := _Safe.contract.UnpackLog(event, "ExecutionFromModuleSuccess", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeExecutionSuccessIterator is returned from FilterExecutionSuccess and is used to iterate over the raw logs and unpacked data for ExecutionSuccess events raised by the Safe contract. +type SafeExecutionSuccessIterator struct { + Event *SafeExecutionSuccess // 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 *SafeExecutionSuccessIterator) 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(SafeExecutionSuccess) + 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(SafeExecutionSuccess) + 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 *SafeExecutionSuccessIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeExecutionSuccessIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeExecutionSuccess represents a ExecutionSuccess event raised by the Safe contract. +type SafeExecutionSuccess struct { + TxHash [32]byte + Payment *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecutionSuccess is a free log retrieval operation binding the contract event 0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e. +// +// Solidity: event ExecutionSuccess(bytes32 indexed txHash, uint256 payment) +func (_Safe *SafeFilterer) FilterExecutionSuccess(opts *bind.FilterOpts, txHash [][32]byte) (*SafeExecutionSuccessIterator, error) { + + var txHashRule []interface{} + for _, txHashItem := range txHash { + txHashRule = append(txHashRule, txHashItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "ExecutionSuccess", txHashRule) + if err != nil { + return nil, err + } + return &SafeExecutionSuccessIterator{contract: _Safe.contract, event: "ExecutionSuccess", logs: logs, sub: sub}, nil +} + +// WatchExecutionSuccess is a free log subscription operation binding the contract event 0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e. +// +// Solidity: event ExecutionSuccess(bytes32 indexed txHash, uint256 payment) +func (_Safe *SafeFilterer) WatchExecutionSuccess(opts *bind.WatchOpts, sink chan<- *SafeExecutionSuccess, txHash [][32]byte) (event.Subscription, error) { + + var txHashRule []interface{} + for _, txHashItem := range txHash { + txHashRule = append(txHashRule, txHashItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "ExecutionSuccess", txHashRule) + 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(SafeExecutionSuccess) + if err := _Safe.contract.UnpackLog(event, "ExecutionSuccess", 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 +} + +// ParseExecutionSuccess is a log parse operation binding the contract event 0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e. +// +// Solidity: event ExecutionSuccess(bytes32 indexed txHash, uint256 payment) +func (_Safe *SafeFilterer) ParseExecutionSuccess(log types.Log) (*SafeExecutionSuccess, error) { + event := new(SafeExecutionSuccess) + if err := _Safe.contract.UnpackLog(event, "ExecutionSuccess", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeRemovedOwnerIterator is returned from FilterRemovedOwner and is used to iterate over the raw logs and unpacked data for RemovedOwner events raised by the Safe contract. +type SafeRemovedOwnerIterator struct { + Event *SafeRemovedOwner // 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 *SafeRemovedOwnerIterator) 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(SafeRemovedOwner) + 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(SafeRemovedOwner) + 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 *SafeRemovedOwnerIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeRemovedOwnerIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeRemovedOwner represents a RemovedOwner event raised by the Safe contract. +type SafeRemovedOwner struct { + Owner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRemovedOwner is a free log retrieval operation binding the contract event 0xf8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf. +// +// Solidity: event RemovedOwner(address indexed owner) +func (_Safe *SafeFilterer) FilterRemovedOwner(opts *bind.FilterOpts, owner []common.Address) (*SafeRemovedOwnerIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "RemovedOwner", ownerRule) + if err != nil { + return nil, err + } + return &SafeRemovedOwnerIterator{contract: _Safe.contract, event: "RemovedOwner", logs: logs, sub: sub}, nil +} + +// WatchRemovedOwner is a free log subscription operation binding the contract event 0xf8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf. +// +// Solidity: event RemovedOwner(address indexed owner) +func (_Safe *SafeFilterer) WatchRemovedOwner(opts *bind.WatchOpts, sink chan<- *SafeRemovedOwner, owner []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "RemovedOwner", ownerRule) + 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(SafeRemovedOwner) + if err := _Safe.contract.UnpackLog(event, "RemovedOwner", 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 +} + +// ParseRemovedOwner is a log parse operation binding the contract event 0xf8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf. +// +// Solidity: event RemovedOwner(address indexed owner) +func (_Safe *SafeFilterer) ParseRemovedOwner(log types.Log) (*SafeRemovedOwner, error) { + event := new(SafeRemovedOwner) + if err := _Safe.contract.UnpackLog(event, "RemovedOwner", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeSafeModuleTransactionIterator is returned from FilterSafeModuleTransaction and is used to iterate over the raw logs and unpacked data for SafeModuleTransaction events raised by the Safe contract. +type SafeSafeModuleTransactionIterator struct { + Event *SafeSafeModuleTransaction // 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 *SafeSafeModuleTransactionIterator) 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(SafeSafeModuleTransaction) + 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(SafeSafeModuleTransaction) + 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 *SafeSafeModuleTransactionIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeSafeModuleTransactionIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeSafeModuleTransaction represents a SafeModuleTransaction event raised by the Safe contract. +type SafeSafeModuleTransaction struct { + Module common.Address + To common.Address + Value *big.Int + Data []byte + Operation uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSafeModuleTransaction is a free log retrieval operation binding the contract event 0xb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e. +// +// Solidity: event SafeModuleTransaction(address module, address to, uint256 value, bytes data, uint8 operation) +func (_Safe *SafeFilterer) FilterSafeModuleTransaction(opts *bind.FilterOpts) (*SafeSafeModuleTransactionIterator, error) { + + logs, sub, err := _Safe.contract.FilterLogs(opts, "SafeModuleTransaction") + if err != nil { + return nil, err + } + return &SafeSafeModuleTransactionIterator{contract: _Safe.contract, event: "SafeModuleTransaction", logs: logs, sub: sub}, nil +} + +// WatchSafeModuleTransaction is a free log subscription operation binding the contract event 0xb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e. +// +// Solidity: event SafeModuleTransaction(address module, address to, uint256 value, bytes data, uint8 operation) +func (_Safe *SafeFilterer) WatchSafeModuleTransaction(opts *bind.WatchOpts, sink chan<- *SafeSafeModuleTransaction) (event.Subscription, error) { + + logs, sub, err := _Safe.contract.WatchLogs(opts, "SafeModuleTransaction") + 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(SafeSafeModuleTransaction) + if err := _Safe.contract.UnpackLog(event, "SafeModuleTransaction", 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 +} + +// ParseSafeModuleTransaction is a log parse operation binding the contract event 0xb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e. +// +// Solidity: event SafeModuleTransaction(address module, address to, uint256 value, bytes data, uint8 operation) +func (_Safe *SafeFilterer) ParseSafeModuleTransaction(log types.Log) (*SafeSafeModuleTransaction, error) { + event := new(SafeSafeModuleTransaction) + if err := _Safe.contract.UnpackLog(event, "SafeModuleTransaction", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeSafeMultiSigTransactionIterator is returned from FilterSafeMultiSigTransaction and is used to iterate over the raw logs and unpacked data for SafeMultiSigTransaction events raised by the Safe contract. +type SafeSafeMultiSigTransactionIterator struct { + Event *SafeSafeMultiSigTransaction // 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 *SafeSafeMultiSigTransactionIterator) 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(SafeSafeMultiSigTransaction) + 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(SafeSafeMultiSigTransaction) + 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 *SafeSafeMultiSigTransactionIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeSafeMultiSigTransactionIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeSafeMultiSigTransaction represents a SafeMultiSigTransaction event raised by the Safe contract. +type SafeSafeMultiSigTransaction struct { + To common.Address + Value *big.Int + Data []byte + Operation uint8 + SafeTxGas *big.Int + BaseGas *big.Int + GasPrice *big.Int + GasToken common.Address + RefundReceiver common.Address + Signatures []byte + AdditionalInfo []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSafeMultiSigTransaction is a free log retrieval operation binding the contract event 0x66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed. +// +// Solidity: event SafeMultiSigTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures, bytes additionalInfo) +func (_Safe *SafeFilterer) FilterSafeMultiSigTransaction(opts *bind.FilterOpts) (*SafeSafeMultiSigTransactionIterator, error) { + + logs, sub, err := _Safe.contract.FilterLogs(opts, "SafeMultiSigTransaction") + if err != nil { + return nil, err + } + return &SafeSafeMultiSigTransactionIterator{contract: _Safe.contract, event: "SafeMultiSigTransaction", logs: logs, sub: sub}, nil +} + +// WatchSafeMultiSigTransaction is a free log subscription operation binding the contract event 0x66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed. +// +// Solidity: event SafeMultiSigTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures, bytes additionalInfo) +func (_Safe *SafeFilterer) WatchSafeMultiSigTransaction(opts *bind.WatchOpts, sink chan<- *SafeSafeMultiSigTransaction) (event.Subscription, error) { + + logs, sub, err := _Safe.contract.WatchLogs(opts, "SafeMultiSigTransaction") + 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(SafeSafeMultiSigTransaction) + if err := _Safe.contract.UnpackLog(event, "SafeMultiSigTransaction", 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 +} + +// ParseSafeMultiSigTransaction is a log parse operation binding the contract event 0x66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed. +// +// Solidity: event SafeMultiSigTransaction(address to, uint256 value, bytes data, uint8 operation, uint256 safeTxGas, uint256 baseGas, uint256 gasPrice, address gasToken, address refundReceiver, bytes signatures, bytes additionalInfo) +func (_Safe *SafeFilterer) ParseSafeMultiSigTransaction(log types.Log) (*SafeSafeMultiSigTransaction, error) { + event := new(SafeSafeMultiSigTransaction) + if err := _Safe.contract.UnpackLog(event, "SafeMultiSigTransaction", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeSafeReceivedIterator is returned from FilterSafeReceived and is used to iterate over the raw logs and unpacked data for SafeReceived events raised by the Safe contract. +type SafeSafeReceivedIterator struct { + Event *SafeSafeReceived // 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 *SafeSafeReceivedIterator) 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(SafeSafeReceived) + 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(SafeSafeReceived) + 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 *SafeSafeReceivedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeSafeReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeSafeReceived represents a SafeReceived event raised by the Safe contract. +type SafeSafeReceived struct { + Sender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSafeReceived is a free log retrieval operation binding the contract event 0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d. +// +// Solidity: event SafeReceived(address indexed sender, uint256 value) +func (_Safe *SafeFilterer) FilterSafeReceived(opts *bind.FilterOpts, sender []common.Address) (*SafeSafeReceivedIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "SafeReceived", senderRule) + if err != nil { + return nil, err + } + return &SafeSafeReceivedIterator{contract: _Safe.contract, event: "SafeReceived", logs: logs, sub: sub}, nil +} + +// WatchSafeReceived is a free log subscription operation binding the contract event 0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d. +// +// Solidity: event SafeReceived(address indexed sender, uint256 value) +func (_Safe *SafeFilterer) WatchSafeReceived(opts *bind.WatchOpts, sink chan<- *SafeSafeReceived, sender []common.Address) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "SafeReceived", senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SafeSafeReceived) + if err := _Safe.contract.UnpackLog(event, "SafeReceived", 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 +} + +// ParseSafeReceived is a log parse operation binding the contract event 0x3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d. +// +// Solidity: event SafeReceived(address indexed sender, uint256 value) +func (_Safe *SafeFilterer) ParseSafeReceived(log types.Log) (*SafeSafeReceived, error) { + event := new(SafeSafeReceived) + if err := _Safe.contract.UnpackLog(event, "SafeReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeSafeSetupIterator is returned from FilterSafeSetup and is used to iterate over the raw logs and unpacked data for SafeSetup events raised by the Safe contract. +type SafeSafeSetupIterator struct { + Event *SafeSafeSetup // 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 *SafeSafeSetupIterator) 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(SafeSafeSetup) + 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(SafeSafeSetup) + 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 *SafeSafeSetupIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeSafeSetupIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeSafeSetup represents a SafeSetup event raised by the Safe contract. +type SafeSafeSetup struct { + Initiator common.Address + Owners []common.Address + Threshold *big.Int + Initializer common.Address + FallbackHandler common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSafeSetup is a free log retrieval operation binding the contract event 0x141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a8. +// +// Solidity: event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler) +func (_Safe *SafeFilterer) FilterSafeSetup(opts *bind.FilterOpts, initiator []common.Address) (*SafeSafeSetupIterator, error) { + + var initiatorRule []interface{} + for _, initiatorItem := range initiator { + initiatorRule = append(initiatorRule, initiatorItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "SafeSetup", initiatorRule) + if err != nil { + return nil, err + } + return &SafeSafeSetupIterator{contract: _Safe.contract, event: "SafeSetup", logs: logs, sub: sub}, nil +} + +// WatchSafeSetup is a free log subscription operation binding the contract event 0x141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a8. +// +// Solidity: event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler) +func (_Safe *SafeFilterer) WatchSafeSetup(opts *bind.WatchOpts, sink chan<- *SafeSafeSetup, initiator []common.Address) (event.Subscription, error) { + + var initiatorRule []interface{} + for _, initiatorItem := range initiator { + initiatorRule = append(initiatorRule, initiatorItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "SafeSetup", initiatorRule) + 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(SafeSafeSetup) + if err := _Safe.contract.UnpackLog(event, "SafeSetup", 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 +} + +// ParseSafeSetup is a log parse operation binding the contract event 0x141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a8. +// +// Solidity: event SafeSetup(address indexed initiator, address[] owners, uint256 threshold, address initializer, address fallbackHandler) +func (_Safe *SafeFilterer) ParseSafeSetup(log types.Log) (*SafeSafeSetup, error) { + event := new(SafeSafeSetup) + if err := _Safe.contract.UnpackLog(event, "SafeSetup", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SafeSignMsgIterator is returned from FilterSignMsg and is used to iterate over the raw logs and unpacked data for SignMsg events raised by the Safe contract. +type SafeSignMsgIterator struct { + Event *SafeSignMsg // 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 *SafeSignMsgIterator) 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(SafeSignMsg) + 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(SafeSignMsg) + 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 *SafeSignMsgIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SafeSignMsgIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SafeSignMsg represents a SignMsg event raised by the Safe contract. +type SafeSignMsg struct { + MsgHash [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSignMsg is a free log retrieval operation binding the contract event 0xe7f4675038f4f6034dfcbbb24c4dc08e4ebf10eb9d257d3d02c0f38d122ac6e4. +// +// Solidity: event SignMsg(bytes32 indexed msgHash) +func (_Safe *SafeFilterer) FilterSignMsg(opts *bind.FilterOpts, msgHash [][32]byte) (*SafeSignMsgIterator, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _Safe.contract.FilterLogs(opts, "SignMsg", msgHashRule) + if err != nil { + return nil, err + } + return &SafeSignMsgIterator{contract: _Safe.contract, event: "SignMsg", logs: logs, sub: sub}, nil +} + +// WatchSignMsg is a free log subscription operation binding the contract event 0xe7f4675038f4f6034dfcbbb24c4dc08e4ebf10eb9d257d3d02c0f38d122ac6e4. +// +// Solidity: event SignMsg(bytes32 indexed msgHash) +func (_Safe *SafeFilterer) WatchSignMsg(opts *bind.WatchOpts, sink chan<- *SafeSignMsg, msgHash [][32]byte) (event.Subscription, error) { + + var msgHashRule []interface{} + for _, msgHashItem := range msgHash { + msgHashRule = append(msgHashRule, msgHashItem) + } + + logs, sub, err := _Safe.contract.WatchLogs(opts, "SignMsg", msgHashRule) + 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(SafeSignMsg) + if err := _Safe.contract.UnpackLog(event, "SignMsg", 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 +} + +// ParseSignMsg is a log parse operation binding the contract event 0xe7f4675038f4f6034dfcbbb24c4dc08e4ebf10eb9d257d3d02c0f38d122ac6e4. +// +// Solidity: event SignMsg(bytes32 indexed msgHash) +func (_Safe *SafeFilterer) ParseSignMsg(log types.Log) (*SafeSignMsg, error) { + event := new(SafeSignMsg) + if err := _Safe.contract.UnpackLog(event, "SignMsg", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/tools/contracts-tester/safe/safe.go b/tools/contracts-tester/safe/safe.go new file mode 100644 index 0000000..4eab72d --- /dev/null +++ b/tools/contracts-tester/safe/safe.go @@ -0,0 +1,106 @@ +package safe + +import ( + "context" + "fmt" + "math/big" + "testing" + + "github.com/Peersyst/exrp/cmd/exrpd/cmd" + "github.com/Peersyst/exrp/tools/contracts-tester/types" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" +) + +type SafeTestSuite struct { + t *testing.T + safe *Safe + threshold int + claimer types.TestAccount + owners []types.TestAccount +} + +func CreateSafeSuite(t *testing.T) types.ContractTestSuite { + return &SafeTestSuite{ + t: t, + } +} + +func (suite *SafeTestSuite) SetupEnv(ctx context.Context) error { + client, err := ethclient.Dial(types.GetNodeUrl()) + if err != nil { + return fmt.Errorf("SAFE_TEST: Error creating client") + } + + safe, err := NewSafe(common.HexToAddress(cmd.SafeProxyAddress), client) + if err != nil { + return fmt.Errorf("Error instantiating safe contract: '%+v'", err) + } + suite.safe = safe + + suite.claimer = types.GetClaimerAccount(ctx) + suite.owners = types.GetWitnesses(ctx) + suite.threshold = types.GetSafeThreshold() + + return nil +} + +func (suite *SafeTestSuite) RunTests() { + suite.runThresholdTest() + suite.runModulesTests() + suite.runOwnersTests() +} + +func (suite *SafeTestSuite) runThresholdTest() { + threshold, err := suite.safe.GetThreshold(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error getting threshold: '%+v'", err) + } else if threshold.Int64() != int64(suite.threshold) { + suite.t.Errorf("Invalid threshold - expected '%+v' got '%+v'", suite.threshold, threshold.Int64()) + } +} + +func (suite *SafeTestSuite) runModulesTests() { + modules, err := suite.safe.GetModulesPaginated(suite.claimer.CallOpts, common.HexToAddress("0x1"), big.NewInt(10)) + if err != nil { + suite.t.Errorf("Error getting modules paginated: '%+v'", err) + } else { + if len(modules.Array) != 1 { + suite.t.Errorf("Invalid safe modules size - expected '%+v' got '%+v'", 1, len(modules.Array)) + } else { + expected := common.HexToAddress(cmd.BridgeProxyModuleAddress).Hex() + if modules.Array[0].Hex() != expected { + suite.t.Errorf("Invalid module address - expected '%+v' got '%+v'", expected, modules.Array[0].Hex()) + } + } + } + + enabled, err := suite.safe.IsModuleEnabled(suite.claimer.CallOpts, common.HexToAddress(cmd.BridgeProxyModuleAddress)) + if err != nil { + suite.t.Errorf("Error getting module enabled: '%+v'", err) + } else if !enabled { + suite.t.Errorf("Invalid module enabled value - expected '%+v' got '%+v'", true, enabled) + } +} + +func (suite *SafeTestSuite) runOwnersTests() { + owners, err := suite.safe.GetOwners(suite.claimer.CallOpts) + if err != nil { + suite.t.Errorf("Error getting owners: '%+v'", err) + } else { + if len(owners) != len(suite.owners) { + suite.t.Errorf("Invalid owners length - expected '%+v' got '%+v'", len(suite.owners), len(owners)) + } + for _, expOwner := range suite.owners { + found := false + for _, owner := range owners { + if owner.Hex() == expOwner.EvmAddress.Hex() { + found = true + } + } + if !found { + suite.t.Errorf("Owner not found - expected '%+v'", expOwner.EvmAddress.Hex()) + } + } + } +} diff --git a/tools/contracts-tester/types/types.go b/tools/contracts-tester/types/types.go new file mode 100644 index 0000000..1bf865a --- /dev/null +++ b/tools/contracts-tester/types/types.go @@ -0,0 +1,154 @@ +package types + +import ( + "context" + "math/big" + "os" + "strconv" + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" +) + +type ContractTestSuite interface { + SetupEnv(ctx context.Context) error + RunTests() +} + +type TestAccount struct { + EvmAddress common.Address + PrivateKey string + CallOpts *bind.CallOpts +} + +type TestAccountSigner struct { + TestAccount + Signer bind.SignerFn +} + +const ( + EnvRunTests = "BRIDGE_RUN_TESTS" + EnvNodeUrl = "NODE_URL" + EnvClaimerAccount = "CLAIMER_ACCOUNT" + EnvWitnesses = "TEST_WITNESSES" + EnvSafeThreshold = "SAFE_THRESHOLD" + EnvBridgeValues = "BRIDGE" + EnvBridgeKey = "BRIDGE_KEY" +) + +const ( + DefaultRunTests = "false" + DefaultNodeUrl = "http://localhost:8545" + DefaultClaimerAccount = "fCD6E97a730C114a6D8fd4684c0CaC15b2F81088:54170bebb7d2dae201dacdcb4b7e506a3d57b07f858877c52dbfdae342ab8a4a" + DefaultWitnesses = "C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f:29b10d36d005d4c540da657081bba9f737e195126f14821f227cb1f5dbd669c8" + DefaultSafeThreshold = "1" +) + +func getEnv(envVar string) string { + return strings.TrimSpace(os.Getenv(envVar)) +} + +func getEnvWithDefault(envVar, defaultValue string) string { + envValue := getEnv(envVar) + if envValue != "" { + return envValue + } + + return defaultValue +} + +func GetRunTests() bool { + value := getEnvWithDefault(EnvRunTests, DefaultRunTests) + return value == "true" +} + +func GetNodeUrl() string { + return getEnvWithDefault(EnvNodeUrl, DefaultNodeUrl) +} + +func GetClaimerAccount(ctx context.Context) TestAccount { + envClaimerAccount := getEnv(EnvClaimerAccount) + claimerInfo := strings.Split(envClaimerAccount, ":") + if len(claimerInfo) != 2 { + claimerInfo = strings.Split(DefaultClaimerAccount, ":") + } + + claimerAddress := common.HexToAddress(claimerInfo[0]) + callOpts := bind.CallOpts{Pending: true, From: claimerAddress, Context: ctx} + + return TestAccount{claimerAddress, claimerInfo[1], &callOpts} +} + +func GetWitnesses(ctx context.Context) []TestAccount { + witnessesStr := getEnvWithDefault(EnvWitnesses, DefaultWitnesses) + witnessesStrs := strings.Split(witnessesStr, ",") + + witnesses := []TestAccount{} + for _, witnessStr := range witnessesStrs { + witnessInfo := strings.Split(witnessStr, ":") + evmAddress := common.HexToAddress(witnessInfo[0]) + privateKey := "" + if len(witnessInfo) > 1 { + privateKey = witnessInfo[1] + } + + callOpts := bind.CallOpts{Pending: true, From: evmAddress, Context: ctx} + witnesses = append(witnesses, TestAccount{evmAddress, privateKey, &callOpts}) + } + + return witnesses +} + +func AddSignerToAccount(account TestAccount, chainId *big.Int) (TestAccountSigner, error) { + ecdsaPrivateKey, err := crypto.HexToECDSA(account.PrivateKey) + if err != nil { + return TestAccountSigner{}, err + } + signer := types.LatestSignerForChainID(chainId) + + testAccountSigner := TestAccountSigner{ + account, + func(address common.Address, transaction *types.Transaction) (*types.Transaction, error) { + return types.SignTx(transaction, signer, ecdsaPrivateKey) + }, + } + + return testAccountSigner, nil +} + +func GetSafeThreshold() int { + thresholdStr := getEnv(EnvSafeThreshold) + threshold, err := strconv.Atoi(thresholdStr) + if err == nil { + return threshold + } + + threshold, _ = strconv.Atoi(DefaultSafeThreshold) + return threshold +} + +func GetBridgeValues() (*common.Address, *big.Int, *big.Int) { + bridgeStr := getEnv(EnvBridgeValues) + if bridgeStr == "" { + return nil, nil, nil + } + + bridgeValues := strings.Split(bridgeStr, ",") + if len(bridgeValues) != 3 { + return nil, nil, nil + } + + address := common.HexToAddress(bridgeValues[0]) + + minCreateAmount, _ := big.NewInt(0).SetString(bridgeValues[1], 10) + sigReward, _ := big.NewInt(0).SetString(bridgeValues[2], 10) + + return &address, minCreateAmount, sigReward +} + +func GetBridgeKey() string { + return getEnv(EnvBridgeKey) +} From 54e87884bcef0184297785673873ca2214902e96 Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Wed, 20 Mar 2024 12:29:00 +0100 Subject: [PATCH 5/7] add git ignore --- .gitignore | 1 + tools/contracts-tester/.env | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index aabf22b..6435ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ release/ .idea/ .vscode/ .DS_Store +tools/contracts-tester/.env .exrpd/ \ No newline at end of file diff --git a/tools/contracts-tester/.env b/tools/contracts-tester/.env index 89a986d..ab6c960 100644 --- a/tools/contracts-tester/.env +++ b/tools/contracts-tester/.env @@ -1,5 +1,5 @@ NODE_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f,aa569354684B5F48ed9a3291a328e704E406506F,68f727c3cd7aeB5a04acB864B770f5aa193676Bd -SAFE_THRESHOLD=2 +SAFE_THRESHOLD=3 BRIDGE=254708b47465919e27da0768caf337cb6a5da50f,25000000000000000000,1000000000000000000 BRIDGE_KEY=e4867441b2cda3c3d770a30327048a9853ba78e2ef908eca8c2a14b0e5443157 TEST_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f:29b10d36d005d4c540da657081bba9f737e195126f14821f227cb1f5dbd669c8,aa569354684B5F48ed9a3291a328e704E406506F:c76db272e2287acec7a554814acfdb2b35769f51cead4cc4f1ff71a7268a5bbb,68f727c3cd7aeB5a04acB864B770f5aa193676Bd:f5ac42fd86cdb55f0ad85f201b5e929188213316787b171bb4626c30dce03a79 From 4d55c5b77814a7abfc670233ac3f5b09afa70bf9 Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Wed, 20 Mar 2024 12:30:28 +0100 Subject: [PATCH 6/7] remove .env --- tools/contracts-tester/.env | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 tools/contracts-tester/.env diff --git a/tools/contracts-tester/.env b/tools/contracts-tester/.env deleted file mode 100644 index ab6c960..0000000 --- a/tools/contracts-tester/.env +++ /dev/null @@ -1,6 +0,0 @@ -NODE_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f,aa569354684B5F48ed9a3291a328e704E406506F,68f727c3cd7aeB5a04acB864B770f5aa193676Bd -SAFE_THRESHOLD=3 -BRIDGE=254708b47465919e27da0768caf337cb6a5da50f,25000000000000000000,1000000000000000000 -BRIDGE_KEY=e4867441b2cda3c3d770a30327048a9853ba78e2ef908eca8c2a14b0e5443157 -TEST_WITNESSES=C255f8ED0Fb0af012c9Dc33D5712FA8f672eE85f:29b10d36d005d4c540da657081bba9f737e195126f14821f227cb1f5dbd669c8,aa569354684B5F48ed9a3291a328e704E406506F:c76db272e2287acec7a554814acfdb2b35769f51cead4cc4f1ff71a7268a5bbb,68f727c3cd7aeB5a04acB864B770f5aa193676Bd:f5ac42fd86cdb55f0ad85f201b5e929188213316787b171bb4626c30dce03a79 -CLAIMER_ACCOUNT=fCD6E97a730C114a6D8fd4684c0CaC15b2F81088:54170bebb7d2dae201dacdcb4b7e506a3d57b07f858877c52dbfdae342ab8a4a From 46f2bd63d714e9f94dc05819ed53c457adb4708d Mon Sep 17 00:00:00 2001 From: Joan Grau Date: Wed, 20 Mar 2024 15:26:54 +0100 Subject: [PATCH 7/7] move bytecodes to new file and check TODO --- cmd/exrpd/cmd/bytecodes.go | 46 +++++++++++++++++ cmd/exrpd/cmd/contracts.go | 94 ++++++++++++++++------------------- cmd/exrpd/cmd/gencontracts.go | 2 +- 3 files changed, 91 insertions(+), 51 deletions(-) create mode 100644 cmd/exrpd/cmd/bytecodes.go diff --git a/cmd/exrpd/cmd/bytecodes.go b/cmd/exrpd/cmd/bytecodes.go new file mode 100644 index 0000000..845859d --- /dev/null +++ b/cmd/exrpd/cmd/bytecodes.go @@ -0,0 +1,46 @@ +package cmd + +const ( + deployerContractName = "DeployerContract" + deployerContractAddress = "4e59b44847b379578588920cA78FbF26c0B4956C" + deployerContractBytecode = "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3" + simulateTxAccessorName = "SimulateTxAccessor" + simulateTxAccessorAddress = "59AD6735bCd8152B84860Cb256dD9e96b85F69Da" + simulateTxAccessorBytecode = "608060405234801561001057600080fd5b506004361061002b5760003560e01c80631c5fb21114610030575b600080fd5b6100de6004803603608081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561008d57600080fd5b82018360208201111561009f57600080fd5b803590602001918460018302840111640100000000831117156100c157600080fd5b9091929391929390803560ff169060200190929190505050610169565b60405180848152602001831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561012c578082015181840152602081019050610111565b50505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008060607f00000000000000000000000059ad6735bcd8152b84860cb256dd9e96b85f69da73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610213576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806102e46039913960400191505060405180910390fd5b60005a9050610269898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050885a610297565b92505a8103935060405160203d0181016040523d81523d6000602083013e8092505050955095509592505050565b60006001808111156102a557fe5b8360018111156102b157fe5b14156102ca576000808551602087018986f490506102da565b600080855160208701888a87f190505b9594505050505056fe53696d756c61746554784163636573736f722073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca2646970667358221220405c212754c23731ee9658f3175dafa74dea363d2619aad9d5576f5a9d4982f764736f6c63430007060033" + GnosisSafeProxyFactoryName = "GnosisSafeProxyFactory" + GnosisSafeProxyFactoryAddress = "a6B71E26C5e0845f74c812102Ca7114b6a896AB2" + GnosisSafeProxyFactoryBytecode = "608060405234801561001057600080fd5b50600436106100625760003560e01c80631688f0b9146100675780632500510e1461017657806353e5d9351461024357806361b69abd146102c6578063addacc0f146103cb578063d18af54d1461044e575b600080fd5b61014a6004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156100ba57600080fd5b8201836020820111156100cc57600080fd5b803590602001918460018302840111640100000000831117156100ee57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919050505061057d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102176004803603606081101561018c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156101c957600080fd5b8201836020820111156101db57600080fd5b803590602001918460018302840111640100000000831117156101fd57600080fd5b909192939192939080359060200190929190505050610624565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61024b610751565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028b578082015181840152602081019050610270565b50505050905090810190601f1680156102b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61039f600480360360408110156102dc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561031957600080fd5b82018360208201111561032b57600080fd5b8035906020019184600183028401116401000000008311171561034d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061077c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103d3610861565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104135780820151818401526020810190506103f8565b50505050905090810190601f1680156104405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105516004803603608081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104a157600080fd5b8201836020820111156104b357600080fd5b803590602001918460018302840111640100000000831117156104d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061088c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600061058a848484610a3b565b90506000835111156105b25760008060008551602087016000865af114156105b157600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358185604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a19392505050565b60006106758585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a3b565b905080604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107165780820151818401526020810190506106fb565b50505050905090810190601f1680156107435780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60606040518060200161076390610bde565b6020820181038252601f19601f82011660405250905090565b60008260405161078b90610bde565b808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f0801580156107c7573d6000803e3d6000fd5b5090506000825111156107f05760008060008451602086016000865af114156107ef57600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358184604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a192915050565b60606040518060200161087390610beb565b6020820181038252601f19601f82011660405250905090565b6000808383604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060001c90506108e786868361057d565b9150600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610a32578273ffffffffffffffffffffffffffffffffffffffff16631e52b518838888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156109ca5780820151818401526020810190506109af565b50505050905090810190601f1680156109f75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015610a1957600080fd5b505af1158015610a2d573d6000803e3d6000fd5b505050505b50949350505050565b6000808380519060200120836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050600060405180602001610a8890610bde565b6020820181038252601f19601f820116604052508673ffffffffffffffffffffffffffffffffffffffff166040516020018083805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040516020818303038152906040529050818151826020016000f59250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f437265617465322063616c6c206661696c65640000000000000000000000000081525060200191505060405180910390fd5b50509392505050565b6101e680610bf883390190565b60ab80610dde8339019056fe608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033a26469706673582212200c75fe2196b9f752c82794253f2ebce0d821afef5997e1d5a35ec316ce592f6664736f6c63430007060033" + defaultCallbackHandlerName = "DefaultCallbackHandler" + defaultCallbackHandlerAddress = "1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd" + defaultCallbackHandlerBytecode = "608060405234801561001057600080fd5b506004361061007c5760003560e01c8063a3f4df7e1161005b578063a3f4df7e14610312578063bc197c8114610395578063f23a6e611461052b578063ffa1ad741461062b5761007c565b806223de291461008157806301ffc9a7146101b9578063150b7a021461021c575b600080fd5b6101b7600480360360c081101561009757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561011e57600080fd5b82018360208201111561013057600080fd5b8035906020019184600183028401116401000000008311171561015257600080fd5b90919293919293908035906020019064010000000081111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460018302840111640100000000831117156101a757600080fd5b90919293919293905050506106ae565b005b610204600480360360208110156101cf57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106b8565b60405180821515815260200191505060405180910390f35b6102dd6004803603608081101561023257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561029957600080fd5b8201836020820111156102ab57600080fd5b803590602001918460018302840111640100000000831117156102cd57600080fd5b90919293919293905050506107f2565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61031a610807565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035a57808201518184015260208101905061033f565b50505050905090810190601f1680156103875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104f6600480360360a08110156103ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561040857600080fd5b82018360208201111561041a57600080fd5b8035906020019184602083028401116401000000008311171561043c57600080fd5b90919293919293908035906020019064010000000081111561045d57600080fd5b82018360208201111561046f57600080fd5b8035906020019184602083028401116401000000008311171561049157600080fd5b9091929391929390803590602001906401000000008111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460018302840111640100000000831117156104e657600080fd5b9091929391929390505050610840565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6105f6600480360360a081101561054157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105b257600080fd5b8201836020820111156105c457600080fd5b803590602001918460018302840111640100000000831117156105e657600080fd5b9091929391929390505050610858565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61063361086e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610673578082015181840152602081019050610658565b50505050905090810190601f1680156106a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b5050505050505050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061078357507f150b7a02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107eb57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600063150b7a0260e01b905095945050505050565b6040518060400160405280601881526020017f44656661756c742043616c6c6261636b2048616e646c6572000000000000000081525081565b600063bc197c8160e01b905098975050505050505050565b600063f23a6e6160e01b90509695505050505050565b6040518060400160405280600581526020017f312e302e300000000000000000000000000000000000000000000000000000008152508156fea26469706673582212200bbabd2b02039e0c6d17ac82e70232971fd892df99a0509daa50ef3d6edad0bc64736f6c63430007060033" + fallbackHandlerName = "CompatibilityFallbackHandler" + fallbackHandlerAddress = "f48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4" + fallbackHandlerBytecode = "608060405234801561001057600080fd5b50600436106100ce5760003560e01c80636ac247841161008c578063bc197c8111610066578063bc197c81146107bb578063bd61951d14610951578063f23a6e6114610a63578063ffa1ad7414610b63576100ce565b80636ac24784146105ea578063a3f4df7e146106d9578063b2494df31461075c576100ce565b806223de29146100d357806301ffc9a71461020b5780630a1028c41461026e578063150b7a021461033d5780631626ba7e1461043357806320c13b0b146104e9575b600080fd5b610209600480360360c08110156100e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b9091929391929390803590602001906401000000008111156101c557600080fd5b8201836020820111156101d757600080fd5b803590602001918460018302840111640100000000831117156101f957600080fd5b9091929391929390505050610be6565b005b6102566004803603602081101561022157600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610bf0565b60405180821515815260200191505060405180910390f35b6103276004803603602081101561028457600080fd5b81019080803590602001906401000000008111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460018302840111640100000000831117156102d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610d2a565b6040518082815260200191505060405180910390f35b6103fe6004803603608081101561035357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156103ba57600080fd5b8201836020820111156103cc57600080fd5b803590602001918460018302840111640100000000831117156103ee57600080fd5b9091929391929390505050610d3d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104b46004803603604081101561044957600080fd5b81019080803590602001909291908035906020019064010000000081111561047057600080fd5b82018360208201111561048257600080fd5b803590602001918460018302840111640100000000831117156104a457600080fd5b9091929391929390505050610d52565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6105b5600480360360408110156104ff57600080fd5b810190808035906020019064010000000081111561051c57600080fd5b82018360208201111561052e57600080fd5b8035906020019184600183028401116401000000008311171561055057600080fd5b90919293919293908035906020019064010000000081111561057157600080fd5b82018360208201111561058357600080fd5b803590602001918460018302840111640100000000831117156105a557600080fd5b9091929391929390505050610f0a565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6106c36004803603604081101561060057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561063d57600080fd5b82018360208201111561064f57600080fd5b8035906020019184600183028401116401000000008311171561067157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061115b565b6040518082815260200191505060405180910390f35b6106e16112cd565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610721578082015181840152602081019050610706565b50505050905090810190601f16801561074e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610764611306565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107a757808201518184015260208101905061078c565b505050509050019250505060405180910390f35b61091c600480360360a08110156107d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561082e57600080fd5b82018360208201111561084057600080fd5b8035906020019184602083028401116401000000008311171561086257600080fd5b90919293919293908035906020019064010000000081111561088357600080fd5b82018360208201111561089557600080fd5b803590602001918460208302840111640100000000831117156108b757600080fd5b9091929391929390803590602001906401000000008111156108d857600080fd5b8201836020820111156108ea57600080fd5b8035906020019184600183028401116401000000008311171561090c57600080fd5b909192939192939050505061146d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6109e86004803603604081101561096757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156109a457600080fd5b8201836020820111156109b657600080fd5b803590602001918460018302840111640100000000831117156109d857600080fd5b9091929391929390505050611485565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a28578082015181840152602081019050610a0d565b50505050905090810190601f168015610a555780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b2e600480360360a0811015610a7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610aea57600080fd5b820183602082011115610afc57600080fd5b80359060200191846001830284011164010000000083111715610b1e57600080fd5b90919293919293905050506114ef565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b6b611505565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610bab578082015181840152602081019050610b90565b50505050905090810190601f168015610bd85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b5050505050505050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610cbb57507f150b7a02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610d2357507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000610d36338361115b565b9050919050565b600063150b7a0260e01b905095945050505050565b60008033905060008173ffffffffffffffffffffffffffffffffffffffff166320c13b0b876040516020018082815260200191505060405160208183030381529060405287876040518463ffffffff1660e01b8152600401808060200180602001838103835286818151815260200191508051906020019080838360005b83811015610deb578082015181840152602081019050610dd0565b50505050905090810190601f168015610e185780820380516001836020036101000a031916815260200191505b508381038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610e6357600080fd5b505afa158015610e77573d6000803e3d6000fd5b505050506040513d6020811015610e8d57600080fd5b810190808051906020019092919050505090506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610ef657600060e01b610eff565b631626ba7e60e01b5b925050509392505050565b6000803390506000610f608288888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061115b565b905060008585905014156110755760008273ffffffffffffffffffffffffffffffffffffffff16635ae6bd37836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fc157600080fd5b505afa158015610fd5573d6000803e3d6000fd5b505050506040513d6020811015610feb57600080fd5b81019080805190602001909291905050501415611070576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f48617368206e6f7420617070726f76656400000000000000000000000000000081525060200191505060405180910390fd5b611147565b8173ffffffffffffffffffffffffffffffffffffffff1663934f3a1182898989896040518663ffffffff1660e01b81526004018086815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060006040518083038186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050505b6320c13b0b60e01b92505050949350505050565b6000807f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca60001b83805190602001206040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050601960f81b600160f81b8573ffffffffffffffffffffffffffffffffffffffff1663f698da256040518163ffffffff1660e01b815260040160206040518083038186803b15801561120957600080fd5b505afa15801561121d573d6000803e3d6000fd5b505050506040513d602081101561123357600080fd5b81019080805190602001909291905050508360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040528051906020012091505092915050565b6040518060400160405280601881526020017f44656661756c742043616c6c6261636b2048616e646c6572000000000000000081525081565b6060600033905060008173ffffffffffffffffffffffffffffffffffffffff1663cc2f84526001600a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060408110156113be57600080fd5b81019080805160405193929190846401000000008211156113de57600080fd5b838201915060208201858111156113f457600080fd5b825186602082028301116401000000008211171561141157600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561144857808201518184015260208101905061142d565b5050505090500160405260200180519060200190929190505050509050809250505090565b600063bc197c8160e01b905098975050505050505050565b60606040517fb4faba09000000000000000000000000000000000000000000000000000000008152600436036004808301376020600036836000335af15060203d036040519250808301604052806020843e6000516114e657825160208401fd5b50509392505050565b600063f23a6e6160e01b90509695505050505050565b6040518060400160405280600581526020017f312e302e300000000000000000000000000000000000000000000000000000008152508156fea26469706673582212204251d58f2a197439239faafa82818b7696d25bb75655794a81cc773a0e39ed2b64736f6c63430007060033" + createCallName = "CreateCall" + createCallAddress = "7cbB62EaA69F79e6873cD1ecB2392971036cFAa4" + createCallBytecode = "608060405234801561001057600080fd5b50600436106100365760003560e01c80634847be6f1461003b5780634c8c9ea114610134575b600080fd5b6101086004803603606081101561005157600080fd5b81019080803590602001909291908035906020019064010000000081111561007857600080fd5b82018360208201111561008a57600080fd5b803590602001918460018302840111640100000000831117156100ac57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050610223565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f76004803603604081101561014a57600080fd5b81019080803590602001909291908035906020019064010000000081111561017157600080fd5b82018360208201111561018357600080fd5b803590602001918460018302840111640100000000831117156101a557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610327565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008183518460200186f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436f756c64206e6f74206465706c6f7920636f6e74726163740000000000000081525060200191505060405180910390fd5b7f4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b51181604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a19392505050565b600081516020830184f09050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436f756c64206e6f74206465706c6f7920636f6e74726163740000000000000081525060200191505060405180910390fd5b7f4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b51181604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a19291505056fea26469706673582212203aa87bc5f141a4ee0319caa1412f294b7a71e2ffc270a0cc5e506a8b320df24464736f6c63430007060033" + multiSendName = "MultiSend" + multiSendAddress = "A238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761" + multiSendBytecode = "60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b6100dc6004803603602081101561003957600080fd5b810190808035906020019064010000000081111561005657600080fd5b82018360208201111561006857600080fd5b8035906020019184600183028401116401000000008311171561008a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506100de565b005b7f000000000000000000000000a238cbeb142c10ef7ad8442c6d1f9e89e07e776173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610183576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806102106030913960400191505060405180910390fd5b805160205b8181101561020a578083015160f81c6001820184015160601c6015830185015160358401860151605585018701600085600081146101cd57600181146101dd576101e8565b6000808585888a5af191506101e8565b6000808585895af491505b5060008114156101f757600080fd5b8260550187019650505050505050610188565b50505056fe4d756c746953656e642073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca26469706673582212205c784303626eec02b71940b551976170b500a8a36cc5adcbeb2c19751a76d05464736f6c63430007060033" + multiSendCallOnlyName = "MultiSendCallOnly" + multiSendCallOnlyAddress = "40A2aCCbd92BCA938b02010E17A5b8929b49130D" + multiSendCallOnlyBytecode = "60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b6100dc6004803603602081101561003957600080fd5b810190808035906020019064010000000081111561005657600080fd5b82018360208201111561006857600080fd5b8035906020019184600183028401116401000000008311171561008a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506100de565b005b805160205b8181101561015f578083015160f81c6001820184015160601c60158301850151603584018601516055850187016000856000811461012857600181146101385761013d565b6000808585888a5af1915061013d565b600080fd5b50600081141561014c57600080fd5b82605501870196505050505050506100e3565b50505056fea264697066735822122035246402746c96964495cae5b36461fd44dfb89f8e6cf6f6b8d60c0aa89f414864736f6c63430007060033" + gnosisSafeL2Name = "GnosisSafeL2" + gnosisSafeL2Address = "3E5c63644E683549055b9Be8653de26E0B4CD36E" + gnosisSafeL2Bytecode = "6080604052600436106101dc5760003560e01c8063affed0e011610102578063e19a9dd911610095578063f08a032311610064578063f08a032314611647578063f698da2514611698578063f8dc5dd9146116c3578063ffa1ad741461173e57610231565b8063e19a9dd91461139b578063e318b52b146113ec578063e75235b81461147d578063e86637db146114a857610231565b8063cc2f8452116100d1578063cc2f8452146110e8578063d4d9bdcd146111b5578063d8d11f78146111f0578063e009cfde1461132a57610231565b8063affed0e014610d94578063b4faba0914610dbf578063b63e800d14610ea7578063c4ca3a9c1461101757610231565b80635624b25b1161017a5780636a761202116101495780636a761202146109945780637d83297414610b50578063934f3a1114610bbf578063a0e67e2b14610d2857610231565b80635624b25b146107fb5780635ae6bd37146108b9578063610b592514610908578063694e80c31461095957610231565b80632f54bf6e116101b65780632f54bf6e146104d35780633408e4701461053a578063468721a7146105655780635229073f1461067a57610231565b80630d582f131461029e57806312fb68e0146102f95780632d9ad53d1461046c57610231565b36610231573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d346040518082815260200191505060405180910390a2005b34801561023d57600080fd5b5060007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061027257600080f35b36600080373360601b365260008060143601600080855af13d6000803e80610299573d6000fd5b3d6000f35b3480156102aa57600080fd5b506102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117ce565b005b34801561030557600080fd5b5061046a6004803603608081101561031c57600080fd5b81019080803590602001909291908035906020019064010000000081111561034357600080fd5b82018360208201111561035557600080fd5b8035906020019184600183028401116401000000008311171561037757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103da57600080fd5b8201836020820111156103ec57600080fd5b8035906020019184600183028401116401000000008311171561040e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611bbe565b005b34801561047857600080fd5b506104bb6004803603602081101561048f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612440565b60405180821515815260200191505060405180910390f35b3480156104df57600080fd5b50610522600480360360208110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612512565b60405180821515815260200191505060405180910390f35b34801561054657600080fd5b5061054f6125e4565b6040518082815260200191505060405180910390f35b34801561057157600080fd5b506106626004803603608081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105cf57600080fd5b8201836020820111156105e157600080fd5b8035906020019184600183028401116401000000008311171561060357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506125f1565b60405180821515815260200191505060405180910390f35b34801561068657600080fd5b506107776004803603608081101561069d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156106e457600080fd5b8201836020820111156106f657600080fd5b8035906020019184600183028401116401000000008311171561071857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506126fc565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bf5780820151818401526020810190506107a4565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561080757600080fd5b5061083e6004803603604081101561081e57600080fd5b810190808035906020019092919080359060200190929190505050612732565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561087e578082015181840152602081019050610863565b50505050905090810190601f1680156108ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108c557600080fd5b506108f2600480360360208110156108dc57600080fd5b81019080803590602001909291905050506127b9565b6040518082815260200191505060405180910390f35b34801561091457600080fd5b506109576004803603602081101561092b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127d1565b005b34801561096557600080fd5b506109926004803603602081101561097c57600080fd5b8101908080359060200190929190505050612b63565b005b610b3860048036036101408110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109f257600080fd5b820183602082011115610a0457600080fd5b80359060200191846001830284011164010000000083111715610a2657600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610ab257600080fd5b820183602082011115610ac457600080fd5b80359060200191846001830284011164010000000083111715610ae657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612c9d565b60405180821515815260200191505060405180910390f35b348015610b5c57600080fd5b50610ba960048036036040811015610b7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612edc565b6040518082815260200191505060405180910390f35b348015610bcb57600080fd5b50610d2660048036036060811015610be257600080fd5b810190808035906020019092919080359060200190640100000000811115610c0957600080fd5b820183602082011115610c1b57600080fd5b80359060200191846001830284011164010000000083111715610c3d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610ca057600080fd5b820183602082011115610cb257600080fd5b80359060200191846001830284011164010000000083111715610cd457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612f01565b005b348015610d3457600080fd5b50610d3d612f90565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d80578082015181840152602081019050610d65565b505050509050019250505060405180910390f35b348015610da057600080fd5b50610da9613139565b6040518082815260200191505060405180910390f35b348015610dcb57600080fd5b50610ea560048036036040811015610de257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610e1f57600080fd5b820183602082011115610e3157600080fd5b80359060200191846001830284011164010000000083111715610e5357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061313f565b005b348015610eb357600080fd5b506110156004803603610100811015610ecb57600080fd5b8101908080359060200190640100000000811115610ee857600080fd5b820183602082011115610efa57600080fd5b80359060200191846020830284011164010000000083111715610f1c57600080fd5b909192939192939080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610f6757600080fd5b820183602082011115610f7957600080fd5b80359060200191846001830284011164010000000083111715610f9b57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613161565b005b34801561102357600080fd5b506110d26004803603608081101561103a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561108157600080fd5b82018360208201111561109357600080fd5b803590602001918460018302840111640100000000831117156110b557600080fd5b9091929391929390803560ff16906020019092919050505061331f565b6040518082815260200191505060405180910390f35b3480156110f457600080fd5b506111416004803603604081101561110b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613447565b60405180806020018373ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156111a0578082015181840152602081019050611185565b50505050905001935050505060405180910390f35b3480156111c157600080fd5b506111ee600480360360208110156111d857600080fd5b8101908080359060200190929190505050613639565b005b3480156111fc57600080fd5b50611314600480360361014081101561121457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561125b57600080fd5b82018360208201111561126d57600080fd5b8035906020019184600183028401116401000000008311171561128f57600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506137d8565b6040518082815260200191505060405180910390f35b34801561133657600080fd5b506113996004803603604081101561134d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613805565b005b3480156113a757600080fd5b506113ea600480360360208110156113be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b96565b005b3480156113f857600080fd5b5061147b6004803603606081101561140f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613c1a565b005b34801561148957600080fd5b5061149261428c565b6040518082815260200191505060405180910390f35b3480156114b457600080fd5b506115cc60048036036101408110156114cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561151357600080fd5b82018360208201111561152557600080fd5b8035906020019184600183028401116401000000008311171561154757600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614296565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561160c5780820151818401526020810190506115f1565b50505050905090810190601f1680156116395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561165357600080fd5b506116966004803603602081101561166a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061443e565b005b3480156116a457600080fd5b506116ad61449f565b6040518082815260200191505060405180910390f35b3480156116cf57600080fd5b5061173c600480360360608110156116e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061451d565b005b34801561174a57600080fd5b50611753614950565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611793578082015181840152602081019050611778565b50505050905090810190601f1680156117c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6117d6614989565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156118405750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561187857503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b6118ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600081548092919060010191905055507f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2682604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a18060045414611bba57611bb981612b63565b5b5050565b611bd2604182614a2c90919063ffffffff16565b82511015611c48576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808060008060005b8681101561243457611c648882614a66565b80945081955082965050505060008460ff16141561206d578260001c9450611c96604188614a2c90919063ffffffff16565b8260001c1015611d0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8751611d2760208460001c614a9590919063ffffffff16565b1115611d9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006020838a01015190508851611dd182611dc360208760001c614a9590919063ffffffff16565b614a9590919063ffffffff16565b1115611e45576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60606020848b010190506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b8d846040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611ee7578082015181840152602081019050611ecc565b50505050905090810190601f168015611f145780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611f4d578082015181840152602081019050611f32565b50505050905090810190601f168015611f7a5780820380516001836020036101000a031916815260200191505b5094505050505060206040518083038186803b158015611f9957600080fd5b505afa158015611fad573d6000803e3d6000fd5b505050506040513d6020811015611fc357600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612066576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b50506122b2565b60018460ff161415612181578260001c94508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061210a57506000600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c81526020019081526020016000205414155b61217c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6122b1565b601e8460ff1611156122495760018a60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012060048603858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612238573d6000803e3d6000fd5b5050506020604051035194506122b0565b60018a85858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156122a3573d6000803e3d6000fd5b5050506020604051035194505b5b5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161180156123795750600073ffffffffffffffffffffffffffffffffffffffff16600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156123b25750600173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b612424576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323600000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8495508080600101915050611c52565b50505050505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600173ffffffffffffffffffffffffffffffffffffffff161415801561250b5750600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156125dd5750600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000804690508091505090565b60007fb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e3386868686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183600181111561266b57fe5b8152602001828103825284818151815260200191508051906020019080838360005b838110156126a857808201518184015260208101905061268d565b50505050905090810190601f1680156126d55780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a16126f285858585614ab4565b9050949350505050565b6000606061270c868686866125f1565b915060405160203d0181016040523d81523d6000602083013e8091505094509492505050565b606060006020830267ffffffffffffffff8111801561275057600080fd5b506040519080825280601f01601f1916602001820160405280156127835781602001600182028036833780820191505090505b50905060005b838110156127ae57808501548060208302602085010152508080600101915050612789565b508091505092915050565b60076020528060005260406000206000915090505481565b6127d9614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156128435750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6128b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146129b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b612b6b614989565b600354811115612be3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001811015612c5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b806004819055507f610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c936004546040518082815260200191505060405180910390a150565b6000606060055433600454604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405160208183030381529060405290507f66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed8d8d8d8d8d8d8d8d8d8d8d8c604051808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001806020018a6001811115612d5057fe5b81526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200184810384528e8e82818152602001925080828437600081840152601f19601f820116905080830192505050848103835286818151815260200191508051906020019080838360005b83811015612e0a578082015181840152602081019050612def565b50505050905090810190601f168015612e375780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b83811015612e70578082015181840152602081019050612e55565b50505050905090810190601f168015612e9d5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390a1612eca8d8d8d8d8d8d8d8d8d8d8d614c9a565b9150509b9a5050505050505050505050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000600454905060008111612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b612f8a84848484611bbe565b50505050565b6060600060035467ffffffffffffffff81118015612fad57600080fd5b50604051908082528060200260200182016040528015612fdc5781602001602082028036833780820191505090505b50905060008060026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613130578083838151811061308757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508180600101925050613046565b82935050505090565b60055481565b600080825160208401855af4806000523d6020523d600060403e60403d016000fd5b6131ac8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050896151d7565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146131ea576131e9846156d7565b5b6132388787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050615706565b60008211156132525761325082600060018685615941565b505b3373ffffffffffffffffffffffffffffffffffffffff167f141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a88b8b8b8b8960405180806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281038252878782818152602001925060200280828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a250505050505050505050565b6000805a9050613376878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050865a615b47565b61337f57600080fd5b60005a8203905080604051602001808281526020019150506040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561340c5780820151818401526020810190506133f1565b50505050905090810190601f1680156134395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b606060008267ffffffffffffffff8111801561346257600080fd5b506040519080825280602002602001820160405280156134915781602001602082028036833780820191505090505b509150600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156135645750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561356f57508482105b1561362a578084838151811061358157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081806001019250506134fa565b80925081845250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561373b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330333000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16817ff2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c60405160405180910390a350565b60006137ed8c8c8c8c8c8c8c8c8c8c8c614296565b8051906020012090509b9a5050505050505050505050565b61380d614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156138775750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6138e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146139e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace405427681604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b613b9e614989565b60007f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b90508181557f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa282604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b613c22614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015613c8c5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015613cc457503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613d36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015613ea15750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b613f13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614013576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a17f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2681604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b6000600454905090565b606060007fbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d860001b8d8d8d8d60405180838380828437808301925050509250505060405180910390208c8c8c8c8c8c8c604051602001808c81526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a815260200189815260200188600181111561432757fe5b81526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019b505050505050505050505050604051602081830303815290604052805190602001209050601960f81b600160f81b6143b361449f565b8360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040529150509b9a5050505050505050505050565b614446614989565b61444f816156d7565b7f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b6144cd6125e4565b30604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405160208183030381529060405280519060200120905090565b614525614989565b8060016003540310156145a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561460a5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61467c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461477c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360008154809291906001900391905055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1806004541461494b5761494a81612b63565b5b505050565b6040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614a2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330333100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b565b600080831415614a3f5760009050614a60565b6000828402905082848281614a5057fe5b0414614a5b57600080fd5b809150505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b600080828401905083811015614aaa57600080fd5b8091505092915050565b6000600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015614b7f5750600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b614bf1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614bfe858585855a615b47565b90508015614c4e573373ffffffffffffffffffffffffffffffffffffffff167f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb860405160405180910390a2614c92565b3373ffffffffffffffffffffffffffffffffffffffff167facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd37560405160405180910390a25b949350505050565b6000806000614cb48e8e8e8e8e8e8e8e8e8e600554614296565b905060056000815480929190600101919050555080805190602001209150614cdd828286612f01565b506000614ce8615b93565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614614ece578073ffffffffffffffffffffffffffffffffffffffff166375f0bb528f8f8f8f8f8f8f8f8f8f8f336040518d63ffffffff1660e01b8152600401808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001806020018a6001811115614d8b57fe5b81526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018473ffffffffffffffffffffffffffffffffffffffff16815260200183810383528d8d82818152602001925080828437600081840152601f19601f820116905080830192505050838103825285818151815260200191508051906020019080838360005b83811015614e5d578082015181840152602081019050614e42565b50505050905090810190601f168015614e8a5780820380516001836020036101000a031916815260200191505b509e505050505050505050505050505050600060405180830381600087803b158015614eb557600080fd5b505af1158015614ec9573d6000803e3d6000fd5b505050505b6101f4614ef56109c48b01603f60408d0281614ee657fe5b04615bc490919063ffffffff16565b015a1015614f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005a9050614fd48f8f8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e60008d14614fc9578e614fcf565b6109c45a035b615b47565b9350614fe95a82615bde90919063ffffffff16565b90508380614ff8575060008a14155b80615004575060008814155b615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808911156150905761508d828b8b8b8b615941565b90505b84156150da577f442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e8482604051808381526020018281526020019250505060405180910390a161511a565b7f23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d238482604051808381526020018281526020019250505060405180910390a15b5050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146151c6578073ffffffffffffffffffffffffffffffffffffffff16639327136883856040518363ffffffff1660e01b815260040180838152602001821515815260200192505050600060405180830381600087803b1580156151ad57600080fd5b505af11580156151c1573d6000803e3d6000fd5b505050505b50509b9a5050505050505050505050565b60006004541461524f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b81518111156152c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600181101561533d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006001905060005b835181101561564357600084828151811061535d57fe5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156153d15750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561540957503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561544157508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6154b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146155b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550809250508080600101915050615346565b506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550825160038190555081600481905550505050565b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b90508181555050565b600073ffffffffffffffffffffffffffffffffffffffff1660016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614615808576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001806000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461593d576158ca8260008360015a615b47565b61593c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b5050565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461597e5782615980565b325b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415615a98576159ea3a86106159c7573a6159c9565b855b6159dc888a614a9590919063ffffffff16565b614a2c90919063ffffffff16565b91508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050615a93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b615b3d565b615abd85615aaf888a614a9590919063ffffffff16565b614a2c90919063ffffffff16565b9150615aca848284615bfe565b615b3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b5095945050505050565b6000600180811115615b5557fe5b836001811115615b6157fe5b1415615b7a576000808551602087018986f49050615b8a565b600080855160208701888a87f190505b95945050505050565b6000807f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b9050805491505090565b600081831015615bd45781615bd6565b825b905092915050565b600082821115615bed57600080fd5b600082840390508091505092915050565b60008063a9059cbb8484604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050602060008251602084016000896127105a03f13d60008114615ca55760208114615cad5760009350615cb8565b819350615cb8565b600051158215171593505b505050939250505056fea2646970667358221220047fac33099ca576d1c4f1ac6a8abdb0396e42ad6a397d2cb2f4dc1624cc0c5b64736f6c63430007060033" + safeProxyName = "SafeProxyImplementation" + SafeProxyAddress = "b5f762798a53d543a014caf8b297cff8f2f937e8" + safeProxyBytecode = "608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033" + UtilsName = "Utils" + UtilsAddress = "8a05Be8B6099C65E7c403EA8e0f5Fc6Fda720627" + UtilsBytecode = "738a05be8b6099c65e7c403ea8e0f5fc6fda72062730146080604052600436106100405760003560e01c806346bdca9a146100455780638df02a601461006c575b600080fd5b610058610053366004610187565b61007f565b604051901515815260200160405180910390f35b61005861007a36600461020f565b6100c6565b600083821480156100bd5750828260405161009b929190610293565b604051809103902085856040516100b3929190610293565b6040518091039020145b95945050505050565b600082815b8181101561013057836001600160a01b03168686838181106100ef576100ef6102a3565b905060200201602081019061010491906102b9565b6001600160a01b0316141561011e57600192505050610137565b80610128816102d4565b9150506100cb565b5060009150505b9392505050565b60008083601f84011261015057600080fd5b50813567ffffffffffffffff81111561016857600080fd5b60208301915083602082850101111561018057600080fd5b9250929050565b6000806000806040858703121561019d57600080fd5b843567ffffffffffffffff808211156101b557600080fd5b6101c18883890161013e565b909650945060208701359150808211156101da57600080fd5b506101e78782880161013e565b95989497509550505050565b80356001600160a01b038116811461020a57600080fd5b919050565b60008060006040848603121561022457600080fd5b833567ffffffffffffffff8082111561023c57600080fd5b818601915086601f83011261025057600080fd5b81358181111561025f57600080fd5b8760208260051b850101111561027457600080fd5b60209283019550935061028a91860190506101f3565b90509250925092565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156102cb57600080fd5b610137826101f3565b60006000198214156102f657634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220cce1793b7833e7c749695098636a76d7628a86eeda4248710025afd945c8f25f64736f6c634300080c0033" + XChainUtilsName = "XChainUtils" + XChainUtilsAddress = "5A2819Ffba212CeD4F48188090031dd197293af6" + XChainUtilsBytecode = "735a2819ffba212ced4f48188090031dd197293af630146080604052600436106200008b5760003560e01c80631fefdd741462000090578063561f3ce914620000a957806358f4986114620000da5780636a8d3078146200010257806392d253bd1462000119578063c3f2420c1462000130578063d9de78c6146200016e578063df4bc1891462000185575b600080fd5b620000a7620000a136600462001849565b620001ad565b005b620000c0620000ba366004620018ea565b620009a0565b604051620000d19392919062001986565b60405180910390f35b620000f1620000eb36600462001849565b62000c55565b6040519015158152602001620000d1565b620000f16200011336600462001849565b62000d3c565b620000f16200012a36600462001849565b62000d4f565b8180156200013d57600080fd5b50620001556200014f366004620019b2565b62000d65565b6040516001600160a01b039091168152602001620000d1565b620000f16200017f36600462001849565b62000eec565b6200019c6200019636600462001a66565b62000efa565b604051620000d19392919062001ad6565b815160408301516001600160a01b038381169281168314929116148180620001d25750805b620002555760405162461bcd60e51b815260206004820152604260248201527f496e76616c69642062726964676520636f6e6669673a2042726964676520697360448201527f206e6f74206c6f636b696e67436861696e206e6f722069737375696e6743686160648201526134b760f11b608482015260a4015b60405180910390fd5b602080850151015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000295919060040162001b5c565b602060405180830381865af4158015620002b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002d9919062001b96565b15620005f4576020840151516001600160a01b031615620003935760405162461bcd60e51b815260206004820152606160248201527f496e76616c69642062726964676520636f6e6669673a204e6174697665206c6f60448201527f636b696e6720627269646765206d7573742068617665206c6f636b696e67436860648201527f61696e49737375652e6973737565722073657420746f206164647265737328306084820152602960f81b60a482015260c4016200024c565b60608401516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a91620003d4919060040162001b5c565b602060405180830381865af4158015620003f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000418919062001b96565b15620005b4576060840151516001600160a01b031615620004d25760405162461bcd60e51b815260206004820152606160248201527f496e76616c69642062726964676520636f6e6669673a204e617469766520697360448201527f7375696e6720627269646765206d75737420686176652069737375696e67436860648201527f61696e49737375652e6973737565722073657420746f206164647265737328306084820152602960f81b60a482015260c4016200024c565b83604001516001600160a01b031673b5f762798a53d543a014caf8b297cff8f2f937e86001600160a01b031614620005ae5760405162461bcd60e51b815260206004820152606c60248201527f496e76616c69642062726964676520636f6e6669673a204e617469766520697360448201527f7375696e672062726964676520646f6f72206163636f756e74206d757374206260648201527f652030784235663736323739384135336435343361303134434166386232393760848201526b0868c8c708c648c72666eca760a31b60a482015260c4016200024c565b6200099a565b8360600151600001516001600160a01b031684604001516001600160a01b031614620005ae5760405162461bcd60e51b81526004016200024c9062001bb6565b83516020850151516001600160a01b03908116911614156200069f5760405162461bcd60e51b815260206004820152605760248201527f496e76616c69642062726964676520636f6e6669673a206c6f636b696e67436860448201527f61696e49737375652e697373756572206d75737420626520646966666572656e6064820152763a103a3430b7103637b1b5b4b733a1b430b4b72237b7b960491b608482015260a4016200024c565b60608401516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a91620006e0919060040162001b5c565b602060405180830381865af4158015620006fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000724919062001b96565b15620007b65760405162461bcd60e51b815260206004820152605460248201527f496e76616c69642062726964676520636f6e6669673a2049737375696e67206360448201527f6861696e2069737375652063616e2774206265204e6174697665206966206c6f60648201527331b5b4b7339031b430b4b71034b9902a37b5b2b760611b608482015260a4016200024c565b8360600151600001516001600160a01b031684604001516001600160a01b031614620007f65760405162461bcd60e51b81526004016200024c9062001bb6565b81156200099a57738a05be8b6099c65e7c403ea8e0f5fc6fda7206276346bdca9a8560200151600001516001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200085e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000888919081019062001c39565b8660200151602001516040518363ffffffff1660e01b8152600401620008b092919062001caf565b602060405180830381865af4158015620008ce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f4919062001b96565b620005ae5760405162461bcd60e51b815260206004820152606360248201527f496e76616c69642062726964676520636f6e6669673a20546f6b656e2062726960448201527f646765206c6f636b696e67436861696e49737375652e63757272656e6379206d60648201527f757374206265207468652073616d65206173207468652045524332302073796d608482015262189bdb60ea1b60a482015260c4016200024c565b50505050565b6000806060838280805b8381101562000acd576000808c60010160008c8c86818110620009d157620009d162001cd8565b9050602002016020810190620009e8919062001cee565b6001600160a01b0316815260208101919091526040016000205490508062000a1257505062000ab8565b60005b8681101562000aa45760008e60010160008e8e8581811062000a3b5762000a3b62001cd8565b905060200201602081019062000a52919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000205490508281141562000a8e578362000a8a8162001d22565b9450505b508062000a9b8162001d22565b91505062000a15565b508382111562000ab5578193508094505b50505b8062000ac48162001d22565b915050620009aa565b5088811015801562000adf5750600082115b1562000c2f576000816001600160401b0381111562000b025762000b026200163d565b60405190808252806020026020018201604052801562000b2c578160200160208202803683370190505b5090506000805b8581101562000c1b5760008d60010160008d8d8581811062000b595762000b5962001cd8565b905060200201602081019062000b70919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000205490508581141562000c05578b8b8381811062000bb15762000bb162001cd8565b905060200201602081019062000bc8919062001cee565b84848151811062000bdd5762000bdd62001cd8565b6001600160a01b03909216602092830291909101909101528262000c018162001d22565b9350505b508062000c128162001d22565b91505062000b33565b5060019750929550935062000c4b92505050565b6040805160008082526020820190925281909550955095505050505b9450945094915050565b600062000c63838362000d3c565b1562000cf557602080840151015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000ca9919060040162001b5c565b602060405180830381865af415801562000cc7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ced919062001b96565b905062000d36565b60608301516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000ca9919060040162001b5c565b92915050565b90516001600160a01b0390811691161490565b600062000d5d838362000c55565b159392505050565b600062000d738484620001ad565b62000d7f848462000d4f565b1562000ec15781511562000da657604051630ff40f9b60e21b815260040160405180910390fd5b62000db2848462000d3c565b1562000dc5575060208301515162000ee5565b600062000de38560200151600001516001600160a01b0316620013ec565b85606001516020015160405160200162000dff92919062001d40565b604051602081830303815290604052905060008186606001516020015160405162000e2a906200162f565b62000e3792919062001caf565b604051809103906000f08015801562000e54573d6000803e3d6000fd5b5060405163f2fde38b60e01b81526001600160a01b0387811660048301529192509082169063f2fde38b90602401600060405180830381600087803b15801562000e9d57600080fd5b505af115801562000eb2573d6000803e3d6000fd5b50505050809250505062000ee5565b815162000ee157604051630ff40f9b60e21b815260040160405180910390fd5b5060005b9392505050565b600062000d5d838362000d3c565b6003850154600090819060609060ff1662000f285760405163022af77760e11b815260040160405180910390fd5b8460008080805b84811015620012125760008d60020160008d8d8581811062000f555762000f5562001cd8565b905060200201602081019062000f6c919062001cee565b6001600160a01b0316815260208101919091526040016000206001015462000f955750620011fd565b60005b8681101562001144578e60020160008e8e8681811062000fbc5762000fbc62001cd8565b905060200201602081019062000fd3919062001cee565b6001600160a01b03166001600160a01b03168152602001908152602001600020600101548f60020160008f8f8581811062001012576200101262001cd8565b905060200201602081019062001029919062001cee565b6001600160a01b03166001600160a01b03168152602001908152602001600020600101541480156200111957508e60020160008e8e8481811062001071576200107162001cd8565b905060200201602081019062001088919062001cee565b6001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b03166001600160a01b03168f60020160008f8f87818110620010e357620010e362001cd8565b9050602002016020810190620010fa919062001cee565b6001600160a01b03908116825260208201929092526040016000205416145b156200112f57816200112b8162001d22565b9250505b806200113b8162001d22565b91505062000f98565b5083811115620011fb578093508d60020160008d8d858181106200116c576200116c62001cd8565b905060200201602081019062001183919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015494508d60020160008d8d85818110620011c457620011c462001cd8565b9050602002016020810190620011db919062001cee565b6001600160a01b0390811682526020820192909252604001600020541692505b505b80620012098162001d22565b91505062000f2f565b506000826001600160401b038111156200123057620012306200163d565b6040519080825280602002602001820160405280156200125a578160200160208202803683370190505b5090508880156200126a57508b83105b156200128457600097508796509450620013e19350505050565b8b83108062001291575083155b15620012b05760405163f0b0305760e01b815260040160405180910390fd5b6000805b86811015620013d35760008f60020160008f8f85818110620012da57620012da62001cd8565b9050602002016020810190620012f1919062001cee565b6001600160a01b0390811682526020808301939093526040918201600020825180840190935280549091168252600101549181018290529150871480156200134e5750846001600160a01b031681600001516001600160a01b0316145b15620013bd578d8d8381811062001369576200136962001cd8565b905060200201602081019062001380919062001cee565b84848151811062001395576200139562001cd8565b6001600160a01b039092166020928302919091019091015282620013b98162001d22565b9350505b5080620013ca8162001d22565b915050620012b4565b509197509295509193505050505b955095509592505050565b606062000d3682620013fe8462001407565b60010162001476565b600080608083901c15620014205760809290921c916010015b604083901c15620014365760409290921c916008015b602083901c156200144c5760209290921c916004015b601083901c15620014625760109290921c916002015b600883901c1562000d365760010192915050565b606060006200148783600262001d96565b6200149490600262001db8565b6001600160401b03811115620014ae57620014ae6200163d565b6040519080825280601f01601f191660200182016040528015620014d9576020820181803683370190505b509050600360fc1b81600081518110620014f757620014f762001cd8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062001529576200152962001cd8565b60200101906001600160f81b031916908160001a90535060006200154f84600262001d96565b6200155c90600162001db8565b90505b6001811115620015de576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062001594576200159462001cd8565b1a60f81b828281518110620015ad57620015ad62001cd8565b60200101906001600160f81b031916908160001a90535060049490941c93620015d68162001dd3565b90506200155f565b50831562000ee55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200024c565b610f738062001dee83390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200167e576200167e6200163d565b604052919050565b80356001600160a01b03811681146200169e57600080fd5b919050565b60006001600160401b03821115620016bf57620016bf6200163d565b50601f01601f191660200190565b600060408284031215620016e057600080fd5b604051604081016001600160401b0382821081831117156200170657620017066200163d565b81604052829350620017188562001686565b83526020915081850135818111156200173057600080fd5b85019050601f810186136200174457600080fd5b80356200175b6200175582620016a3565b62001653565b81815287848385010111156200177057600080fd5b818484018583013760008483830101528084860152505050505092915050565b600060808284031215620017a357600080fd5b604051608081016001600160401b038282108183111715620017c957620017c96200163d565b81604052829350620017db8562001686565b83526020850135915080821115620017f257600080fd5b6200180086838701620016cd565b6020840152620018136040860162001686565b604084015260608501359150808211156200182d57600080fd5b506200183c85828601620016cd565b6060830152505092915050565b600080604083850312156200185d57600080fd5b82356001600160401b038111156200187457600080fd5b620018828582860162001790565b925050620018936020840162001686565b90509250929050565b60008083601f840112620018af57600080fd5b5081356001600160401b03811115620018c757600080fd5b6020830191508360208260051b8501011115620018e357600080fd5b9250929050565b600080600080606085870312156200190157600080fd5b843593506020850135925060408501356001600160401b038111156200192657600080fd5b62001934878288016200189c565b95989497509550505050565b600081518084526020808501945080840160005b838110156200197b5781516001600160a01b03168752958201959082019060010162001954565b509495945050505050565b8315158152826020820152606060408201526000620019a9606083018462001940565b95945050505050565b60008060008385036080811215620019c957600080fd5b84356001600160401b0380821115620019e157600080fd5b620019ef8883890162001790565b9550620019ff6020880162001686565b94506040603f198401121562001a1457600080fd5b6040519250604083019150828210818311171562001a365762001a366200163d565b50604090815285013581526060909401356020850152509093909250565b801515811462001a6357600080fd5b50565b60008060008060006080868803121562001a7f57600080fd5b853594506020860135935060408601356001600160401b0381111562001aa457600080fd5b62001ab2888289016200189c565b909450925050606086013562001ac88162001a54565b809150509295509295909350565b60018060a01b0384168152826020820152606060408201526000620019a9606083018462001940565b60005b8381101562001b1c57818101518382015260200162001b02565b838111156200099a5750506000910152565b6000815180845262001b4881602086016020860162001aff565b601f01601f19169290920160200192915050565b60408152600062001b71604083018462001b2e565b8281036020840152600381526205852560ec1b60208201526040810191505092915050565b60006020828403121562001ba957600080fd5b815162000ee58162001a54565b6020808252605e908201527f496e76616c69642062726964676520636f6e6669673a20546f6b656e2062726960408201527f6467652069737375696e67436861696e446f6f72206d7573742062652065717560608201527f616c20746f2069737375696e67436861696e49737375652e6973737565720000608082015260a00190565b60006020828403121562001c4c57600080fd5b81516001600160401b0381111562001c6357600080fd5b8201601f8101841362001c7557600080fd5b805162001c866200175582620016a3565b81815285602083850101111562001c9c57600080fd5b620019a982602083016020860162001aff565b60408152600062001cc4604083018562001b2e565b8281036020840152620019a9818562001b2e565b634e487b7160e01b600052603260045260246000fd5b60006020828403121562001d0157600080fd5b62000ee58262001686565b634e487b7160e01b600052601160045260246000fd5b600060001982141562001d395762001d3962001d0c565b5060010190565b670213934b233b2b2160c51b81526000835162001d6581600885016020880162001aff565b6201016960ed1b600891840191820152835162001d8a81600b84016020880162001aff565b01600b01949350505050565b600081600019048311821515161562001db35762001db362001d0c565b500290565b6000821982111562001dce5762001dce62001d0c565b500190565b60008162001de55762001de562001d0c565b50600019019056fe60806040523480156200001157600080fd5b5060405162000f7338038062000f73833981016040819052620000349162000251565b8151829082906200004d906003906020850190620000de565b50805162000063906004906020840190620000de565b505050620000806200007a6200008860201b60201c565b6200008c565b5050620002f8565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000ec90620002bb565b90600052602060002090601f0160209004810192826200011057600085556200015b565b82601f106200012b57805160ff19168380011785556200015b565b828001600101855582156200015b579182015b828111156200015b5782518255916020019190600101906200013e565b50620001699291506200016d565b5090565b5b808211156200016957600081556001016200016e565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001ac57600080fd5b81516001600160401b0380821115620001c957620001c962000184565b604051601f8301601f19908116603f01168101908282118183101715620001f457620001f462000184565b816040528381526020925086838588010111156200021157600080fd5b600091505b8382101562000235578582018301518183018401529082019062000216565b83821115620002475760008385830101525b9695505050505050565b600080604083850312156200026557600080fd5b82516001600160401b03808211156200027d57600080fd5b6200028b868387016200019a565b93506020850151915080821115620002a257600080fd5b50620002b1858286016200019a565b9150509250929050565b600181811c90821680620002d057607f821691505b60208210811415620002f257634e487b7160e01b600052602260045260246000fd5b50919050565b610c6b80620003086000396000f3fe608060405234801561001057600080fd5b50600436106100eb5760003560e01c806370a082311161009257806370a08231146101a0578063715018a6146101c957806379cc6790146101d15780638da5cb5b146101e457806395d89b41146101ff578063a457c2d714610207578063a9059cbb1461021a578063dd62ed3e1461022d578063f2fde38b1461024057600080fd5b806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013157806323b872dd14610143578063313ce56714610156578063395093511461016557806340c10f191461017857806342966c681461018d575b600080fd5b6100f8610253565b6040516101059190610a6f565b60405180910390f35b61012161011c366004610ae0565b6102e5565b6040519015158152602001610105565b6002545b604051908152602001610105565b610121610151366004610b0a565b6102fd565b60405160128152602001610105565b610121610173366004610ae0565b610321565b61018b610186366004610ae0565b610343565b005b61018b61019b366004610b46565b610359565b6101356101ae366004610b5f565b6001600160a01b031660009081526020819052604090205490565b61018b610366565b61018b6101df366004610ae0565b61037a565b6005546040516001600160a01b039091168152602001610105565b6100f861038f565b610121610215366004610ae0565b61039e565b610121610228366004610ae0565b61041e565b61013561023b366004610b81565b61042c565b61018b61024e366004610b5f565b610457565b60606003805461026290610bb4565b80601f016020809104026020016040519081016040528092919081815260200182805461028e90610bb4565b80156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b5050505050905090565b6000336102f38185856104cd565b5060019392505050565b60003361030b8582856105f2565b61031685858561066c565b506001949350505050565b6000336102f3818585610334838361042c565b61033e9190610bef565b6104cd565b61034b6107fe565b6103558282610858565b5050565b6103633382610905565b50565b61036e6107fe565b6103786000610a1d565b565b6103858233836105f2565b6103558282610905565b60606004805461026290610bb4565b600033816103ac828661042c565b9050838110156104115760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61031682868684036104cd565b6000336102f381858561066c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61045f6107fe565b6001600160a01b0381166104c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610408565b61036381610a1d565b6001600160a01b03831661052f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610408565b6001600160a01b0382166105905760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610408565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006105fe848461042c565b9050600019811461066657818110156106595760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610408565b61066684848484036104cd565b50505050565b6001600160a01b0383166106d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610408565b6001600160a01b0382166107325760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610408565b6001600160a01b038316600090815260208190526040902054818110156107aa5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610408565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610c16833981519152910160405180910390a3610666565b6005546001600160a01b031633146103785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610408565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610408565b80600260008282546108c09190610bef565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610c16833981519152910160405180910390a35050565b6001600160a01b0382166109655760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610408565b6001600160a01b038216600090815260208190526040902054818110156109d95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610408565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610c1683398151915291016105e5565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208083528351808285015260005b81811015610a9c57858101830151858201604001528201610a80565b81811115610aae576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610adb57600080fd5b919050565b60008060408385031215610af357600080fd5b610afc83610ac4565b946020939093013593505050565b600080600060608486031215610b1f57600080fd5b610b2884610ac4565b9250610b3660208501610ac4565b9150604084013590509250925092565b600060208284031215610b5857600080fd5b5035919050565b600060208284031215610b7157600080fd5b610b7a82610ac4565b9392505050565b60008060408385031215610b9457600080fd5b610b9d83610ac4565b9150610bab60208401610ac4565b90509250929050565b600181811c90821680610bc857607f821691505b60208210811415610be957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610c1057634e487b7160e01b600052601160045260246000fd5b50019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a9df4775bb669b37e3d342f691e9d59ab438b4f2c907cfca0a73c86668ea940464736f6c634300080c0033a264697066735822122081a519022e5ce81af97e22f33353dc46323da2c244cb16b47443a05aec94909d64736f6c634300080c0033" + bridgeDoorMultiTokenName = "BridgeDoorMultiToken" + bridgeDoorMultiTokenAddress = "f35225d1d59e77ee66012f5bf4c41675a3d2ec7b" + bridgeDoorMultiTokenBytecode = "6080604052600436106101b25760003560e01c80635bafd0c1116100ed5780638da5cb5b116100905780638da5cb5b146104b957806395fa18dd146104d757806396d195bd146104f7578063a6c0873b14610519578063c45ddbc214610539578063c4d66de814610581578063d794559a146105a1578063e684ab76146105be578063f2fde38b146105de57600080fd5b80635bafd0c1146103dc5780635c975abb146103fc578063715018a61461041457806372e0376f1461042957806375f1d5041461045e5780638436c642146104715780638456cb59146104915780638d5cd5bd146104a657600080fd5b80633659cfe6116101555780633659cfe6146103095780633f2702e4146103295780633f4ba83a1461033c5780634072c3b3146103515780634a07d673146103665780634f1ef28614610386578063519454471461039957806352d1902d146103b957600080fd5b80630b2c50d2146101be57806310231036146101f9578063192dd3cc1461020e57806326aa101f1461022e5780632a983d3a1461025e5780632ca4cb531461028b5780632d92de741461029e57806334525b1b146102db57600080fd5b366101b957005b600080fd5b3480156101ca57600080fd5b506101de6101d9366004613779565b6105fe565b6040516101f096959493929190613805565b60405180910390f35b61020c61020736600461385f565b61077b565b005b34801561021a57600080fd5b5061020c61022936600461387c565b610883565b34801561023a57600080fd5b5061024e61024936600461385f565b610a02565b60405190151581526020016101f0565b34801561026a57600080fd5b5060fd5461027e906001600160a01b031681565b6040516101f091906138f3565b61020c610299366004613907565b610a87565b3480156102aa57600080fd5b506102be6102b9366004613954565b610b55565b6040805193845291151560208401521515908201526060016101f0565b3480156102e757600080fd5b506102fb6102f63660046139a5565b610b88565b6040516101f0929190613a34565b34801561031557600080fd5b5061020c61032436600461385f565b610ee2565b61020c610337366004613af1565b610fb4565b34801561034857600080fd5b5061020c611078565b34801561035d57600080fd5b5061020c611092565b34801561037257600080fd5b5061020c610381366004613b4f565b6110c9565b61020c610394366004613bdf565b6111d2565b3480156103a557600080fd5b5061024e6103b4366004613c2e565b611288565b3480156103c557600080fd5b506103ce6112db565b6040519081526020016101f0565b3480156103e857600080fd5b506103ce6103f7366004613779565b611389565b34801561040857600080fd5b5060c95460ff1661024e565b34801561042057600080fd5b5061020c6113d9565b34801561043557600080fd5b50610449610444366004613779565b6113eb565b604080519283526020830191909152016101f0565b61020c61046c366004613af1565b61140f565b34801561047d57600080fd5b5061020c61048c366004613c9d565b6114da565b34801561049d57600080fd5b5061020c6115e1565b6103ce6104b4366004613954565b6115f9565b3480156104c557600080fd5b506097546001600160a01b031661027e565b3480156104e357600080fd5b5061020c6104f2366004613af1565b6116f6565b34801561050357600080fd5b5061050c611824565b6040516101f09190613cf4565b34801561052557600080fd5b5061027e610534366004613779565b61189b565b34801561054557600080fd5b50610559610554366004613d41565b6118e8565b604080516001600160a01b0394851681529390921660208401521515908201526060016101f0565b34801561058d57600080fd5b5061020c61059c36600461385f565b611923565b3480156105ad57600080fd5b506103ce68015af1d78b58c4000081565b3480156105ca57600080fd5b5061020c6105d936600461385f565b611ad6565b3480156105ea57600080fd5b5061020c6105f936600461385f565b611b2d565b60008060606000806060600061061388611ba3565b60038101546004820154600683015460078401546005850180549596506001600160a01b0394851695938516949093928116929116906008870190849061065990613d85565b80601f016020809104026020016040519081016040528092919081815260200182805461068590613d85565b80156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b505050505093508080546106e590613d85565b80601f016020809104026020016040519081016040528092919081815260200182805461071190613d85565b801561075e5780601f106107335761010080835404028352916020019161075e565b820191906000526020600020905b81548152906001019060200180831161074157829003601f168201915b505050505090509650965096509650965096505091939550919395565b610783611bee565b7f54942c22b4f7613321d895cad0749836eeb5c8b282c630c4478e07913f814dbc816040516107b291906138f3565b60405180910390a168015af1d78b58c400003410156107e457604051636bbdb6db60e11b815260040160405180910390fd5b6107ed81610a02565b1561080b57604051633ea7ffd960e11b815260040160405180910390fd5b60fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610858576040519150601f19603f3d011682016040523d82523d6000602084013e61085d565b606091505b505090508061087f57604051638a48aa1f60e01b815260040160405180910390fd5b5050565b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906108b39033906004016138f3565b602060405180830381865afa1580156108d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190613dd5565b61091157604051631ce32a2360e31b815260040160405180910390fd5b610919611bee565b60006109258686611c34565b600381015490915060ff1661094d5760405163022af77760e11b815260040160405180910390fd5b60018101546001600160a01b0384811691161461097d57604051636edaef2f60e11b815260040160405180910390fd5b336000818152600283016020526040902080546001600160a01b0319166001600160a01b038516178155600101859055856109b788611389565b7f750bc14bd61ac34397f57970e1a0fd14fd27247cc77aa2b3c304e2e973c52a4087866040516109e8929190613df0565b60405180910390a46109fa8686611c56565b505050505050565b60fc54600090815b81811015610a7d57836001600160a01b031660fb600060fc8481548110610a3357610a33613e07565b600091825260208083209091015483528201929092526040019020600901546001600160a01b03161415610a6b575060019392505050565b80610a7581613e33565b915050610a0a565b5060009392505050565b610a8f611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f4986191610ad59187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015610af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b169190613dd5565b15610b2b57610b26838383611c97565b505050565b3415610b4a576040516311c36b7360e11b815260040160405180910390fd5b610b26838383611d78565b600080600080610b658686611f5b565b805460029091015490945060ff8082169450610100909104169150509250925092565b60fc5460408051600a808252610160820190925260609283929182816020015b610bb0613482565b815260200190600190039081610ba8579050509350816001600160401b03811115610bdd57610bdd61357d565b604051908082528060200260200182016040528015610c2257816020015b6040805180820190915260008082526020820152815260200190600190039081610bfb5790505b5092506000610c318387613ed0565b9050805b610c3f8483613eef565b81108015610c4c57508281105b15610ed95760fb600060fc8381548110610c6857610c68613e07565b60009182526020808320909101548352828101939093526040918201902081516080810183526003820180546001600160a01b039081168352845180860190955260048401805490911685526005909301805492959194868301949093909284019190610cd490613d85565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0090613d85565b8015610d4d5780601f10610d2257610100808354040283529160200191610d4d565b820191906000526020600020905b815481529060010190602001808311610d3057829003601f168201915b50505091909252505050815260038201546001600160a01b0390811660208084019190915260408051808201825260048601805490941681526005860180549290950194909392840191610da090613d85565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcc90613d85565b8015610e195780601f10610dee57610100808354040283529160200191610e19565b820191906000526020600020905b815481529060010190602001808311610dfc57829003601f168201915b5050509190925250505090525086610e318484613f07565b81518110610e4157610e41613e07565b602002602001018190525060fb600060fc8381548110610e6357610e63613e07565b9060005260206000200154815260200190815260200160002060010160405180604001604052908160008201548152602001600182015481525050858383610eab9190613f07565b81518110610ebb57610ebb613e07565b60200260200101819052508080610ed190613e33565b915050610c35565b50505050915091565b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b161415610f345760405162461bcd60e51b8152600401610f2b90613f1e565b60405180910390fd5b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b0316610f66611f8b565b6001600160a01b031614610f8c5760405162461bcd60e51b8152600401610f2b90613f6a565b610f9581611fa7565b60408051600080825260208201909252610fb191839190611faf565b50565b610fbc611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f49861916110029188916001600160a01b0390911690600401613ea6565b602060405180830381865af415801561101f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110439190613dd5565b15611059576110548484848461211a565b611072565b604051631cc6a69960e11b815260040160405180910390fd5b50505050565b61108061225f565b6110886122b9565b611090612302565b565b600054610100900460ff166110b95760405162461bcd60e51b8152600401610f2b90613fb6565b6110c161234e565b61109061237d565b6110d161225f565b6110d9611bee565b6110e282611389565b82516020808501518051908201516040808801516060890151805195015191517fe8155fae5a2ff8b2ff714dc22bb65489bdf14794bdc7e5802d7ba8e62f0c3ccf9661113396909594939091613805565b60405180910390a260fd546040516330fc908360e21b8152600091735a2819ffba212ced4f48188090031dd197293af69163c3f2420c916111849187916001600160a01b0316908790600401614001565b602060405180830381865af41580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c5919061403c565b9050610b268383836123ac565b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b16141561121b5760405162461bcd60e51b8152600401610f2b90613f1e565b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b031661124d611f8b565b6001600160a01b0316146112735760405162461bcd60e51b8152600401610f2b90613f6a565b61127c82611fa7565b61087f82826001611faf565b600061129261225f565b60001960018360018111156112a9576112a9614059565b14156112c2576000808551602087018985f491506112d2565b600080855160208701888a86f191505b50949350505050565b6000306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b16146113765760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c6044820152771b1959081d1a1c9bdd59da0819195b1959d85d1958d85b1b60421b6064820152608401610f2b565b5060008051602061438183398151915290565b8051602080830151805190820151604080860151606087015180519086015192516000976113bc97909695949101613805565b604051602081830303815290604052805190602001209050919050565b6113e161225f565b6110906000612531565b60008060006113f984611ba3565b6001810154600290910154909590945092505050565b611417611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f498619161145d9188916001600160a01b0390911690600401613ea6565b602060405180830381865af415801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e9190613dd5565b156114af5761105484848484612583565b34156114ce576040516311c36b7360e11b815260040160405180910390fd5b6110728484848461266a565b6114e2611bee565b600080606060006114f38888611c34565b600381015490915060ff1661151b5760405163022af77760e11b815260040160405180910390fd5b80546001600160a01b0316331461154557604051632a118c8960e01b815260040160405180910390fd5b61155188886000612850565b919550935091508583146115785760405163162908e360e11b815260040160405180910390fd5b33876115838a611389565b7f436897f58db529a6e27c5b7aa31967d35b9b81540e4c797b9322c1740441bf5489896040516115b4929190613df0565b60405180910390a46001600160a01b0384166115d7576115d7888887898661297d565b5050505050505050565b6115e961225f565b6115f1611bee565b6110906129e2565b6000611603611bee565b600061160e846113eb565b915050803414611631576040516311c36b7360e11b815260040160405180910390fd5b600061163e853386612a1f565b9050338161164b87611389565b7fc7ecca132ed5d1d6c462587819023eee197ef7fb00b399bbfc2ce032587f0c6d8760405161167a91906138f3565b60405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d80600081146116cf576040519150601f19603f3d011682016040523d82523d6000602084013e6116d4565b606091505b50509050806112d257604051638a48aa1f60e01b815260040160405180910390fd5b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906117269033906004016138f3565b602060405180830381865afa158015611743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117679190613dd5565b61178457604051631ce32a2360e31b815260040160405180910390fd5b61178c611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f49861916117d29188916001600160a01b0390911690600401613ea6565b602060405180830381865af41580156117ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118139190613dd5565b156110595761105484848484612a94565b60fd546040805163a0e67e2b60e01b815290516060926001600160a01b03169163a0e67e2b9160048083019260009291908290030181865afa15801561186e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261189691908101906140f7565b905090565b6000806118a783611ba3565b60098101549091506001600160a01b03166118d55760405163258b5e0560e21b815260040160405180910390fd5b600901546001600160a01b031692915050565b6000806000806118f88686611c34565b805460018201546003909201546001600160a01b0391821696509116935060ff169150509250925092565b600054610100900460ff16158080156119435750600054600160ff909116105b8061195d5750303b15801561195d575060005460ff166001145b6119c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f2b565b6000805460ff1916600117905580156119e3576000805461ff0019166101001790555b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b161415611a2c5760405162461bcd60e51b8152600401610f2b90613f1e565b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b0316611a5e611f8b565b6001600160a01b031614611a845760405162461bcd60e51b8152600401610f2b90613f6a565b611a8d82611ad6565b801561087f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600054610100900460ff16611afd5760405162461bcd60e51b8152600401610f2b90613fb6565b611b05612d49565b611b0d611092565b60fd80546001600160a01b0319166001600160a01b038316179055610fb1815b611b3561225f565b6001600160a01b038116611b9a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f2b565b610fb181612531565b60008060fb6000611bb385611389565b81526020810191909152604001600020805490915060ff16611be8576040516331f0d02960e11b815260040160405180910390fd5b92915050565b60c95460ff16156110905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f2b565b600080611c4084611ba3565b6000938452600b01602052505060409020919050565b6000806060611c6785856001612850565b919450925090506001600160a01b038316611c83575050505050565b611c90858585858561297d565b5050505050565b611c9f611bee565b3415610b265780341015611cc6576040516311c36b7360e11b815260040160405180910390fd5b3382611cd185611389565b6040518481527f32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa19060200160405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611d51576040519150601f19603f3d011682016040523d82523d6000602084013e611d56565b606091505b505090508061107257604051638a48aa1f60e01b815260040160405180910390fd5b611d80611bee565b3382611d8b85611389565b6040518481527f32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa19060200160405180910390a460fd54604051630d51a60f60e31b8152735a2819ffba212ced4f48188090031dd197293af691636a8d307891611e049187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015611e21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e459190613dd5565b15611eee576000611e558461189b565b60fd546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92611e8b92339290911690879060040161412b565b6020604051808303816000875af1158015611eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ece9190613dd5565b90508061107257604051638a48aa1f60e01b815260040160405180910390fd5b611ef78361189b565b6001600160a01b03166379cc679033836040518363ffffffff1660e01b8152600401611f2492919061414f565b600060405180830381600087803b158015611f3e57600080fd5b505af1158015611f52573d6000803e3d6000fd5b50505050505050565b600080611f6784611ba3565b6001600160a01b0384166000908152600c9091016020526040902091505092915050565b600080516020614381833981519152546001600160a01b031690565b610fb161225f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611fe257610b2683612d70565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561203c575060408051601f3d908101601f1916820190925261203991810190614168565b60015b61209f5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610f2b565b600080516020614381833981519152811461210e5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610f2b565b50610b26838383612e0c565b612122611bee565b60008061212e866113eb565b915091508083101561215357604051636bbdb6db60e11b815260040160405180910390fd5b8184101561217457604051632ca2f52b60e11b815260040160405180910390fd5b61217e8484613eef565b34101561219e576040516311c36b7360e11b815260040160405180910390fd5b6001600160a01b038516336121b288611389565b60408051888152602081018890527f32ebca0d0dd8fc03a488dcaab22112132af86cbc4c2df086bc7f328d751f5d7e910160405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612238576040519150601f19603f3d011682016040523d82523d6000602084013e61223d565b606091505b5050905080611f5257604051638a48aa1f60e01b815260040160405180910390fd5b6097546001600160a01b031633146110905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f2b565b60c95460ff166110905760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f2b565b61230a6122b9565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161234491906138f3565b60405180910390a1565b600054610100900460ff166123755760405162461bcd60e51b8152600401610f2b90613fb6565b611090612e31565b600054610100900460ff166123a45760405162461bcd60e51b8152600401610f2b90613fb6565b611090612e64565b60006123b784611389565b600081815260fb6020526040902080549192509060ff16156123eb5760405162b84eb160e51b815260040160405180910390fd5b600082815260fb602090815260409091208054600160ff199091168117825586519082015585820151600282015586516003820180546001600160a01b03199081166001600160a01b0393841617825589850151805160048601805490931694169390931781558285015180518b969395929361246d936005019201906134e4565b50505060408201516003820180546001600160a01b03199081166001600160a01b039384161790915560608401518051600485018054909316931692909217815560208083015180516124c692600587019201906134e4565b505050600084815260fb6020526040812060090180546001600160a01b0319166001600160a01b039790971696909617909555505060fc80546001810182559352507f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c0909101555050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61258b611bee565b341561107257803410156125b2576040516311c36b7360e11b815260040160405180910390fd5b33826125bd86611389565b7f290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a1184876040516125ee929190613df0565b60405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612643576040519150601f19603f3d011682016040523d82523d6000602084013e612648565b606091505b5050905080611c9057604051638a48aa1f60e01b815260040160405180910390fd5b612672611bee565b338261267d86611389565b7f290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a1184876040516126ae929190613df0565b60405180910390a460fd54604051630d51a60f60e31b8152735a2819ffba212ced4f48188090031dd197293af691636a8d3078916126fc9188916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015612719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273d9190613dd5565b156127ec57600061274d8561189b565b60fd546040516323b872dd60e01b81526001600160a01b03928316926323b872dd9261278392339290911690879060040161412b565b6020604051808303816000875af11580156127a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c69190613dd5565b9050806127e657604051638a48aa1f60e01b815260040160405180910390fd5b50611072565b6127f58461189b565b6001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040161282292919061414f565b600060405180830381600087803b15801561283c57600080fd5b505af11580156115d7573d6000803e3d6000fd5b600080606060006128618787611c34565b9050600061286d611824565b9050600080735a2819ffba212ced4f48188090031dd197293af663df4bc1898560fd60009054906101000a90046001600160a01b03166001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129049190614168565b868c6040518563ffffffff1660e01b815260040161292594939291906141ba565b600060405180830381865af4158015612942573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261296a91908101906141ec565b919c909b50909950975050505050505050565b6129878585612e94565b826001600160a01b03168461299b87611389565b6040518581527e87db26e45ef9d7e62d7966c0bc6310075c3e120cae4af40d1791e1b01f7e719060200160405180910390a46129d8858484612ee3565b611c908582612f85565b6129ea611bee565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123373390565b600080612a2b85611ba3565b90506000612a3886612fe5565b6000818152600b93909301602052604090922080546001600160a01b03199081166001600160a01b03978816178255600180830180549092169690971695909517909455506003909201805460ff191690931790925592915050565b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e90612ac49033906004016138f3565b602060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190613dd5565b612b2257604051631ce32a2360e31b815260040160405180910390fd5b612b2a611bee565b6000612b35856113eb565b50905080831015612b5957604051632ca2f52b60e11b815260040160405180910390fd5b6000612b658686611f5b565b6002810154909150610100900460ff16612b8457612b84868685613010565b6000612b908787611f5b565b600281015490915060ff1615612bb95760405163e242fbdf60e01b815260040160405180910390fd5b33600081815260018301602052604090208690556001600160a01b03871690612be189611389565b6040518881527f64f8fc141a8c2d310942bbc5236041fa0a0c6c39a9fb295be5c959224382815e9060200160405180910390a46060600080735a2819ffba212ced4f48188090031dd197293af663561f3ce98560fd60009054906101000a90046001600160a01b03166001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cab9190614168565b612cb3611824565b6040518463ffffffff1660e01b8152600401612cd193929190614245565b600060405180830381865af4158015612cee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d169190810190614264565b9450925090508015612d3d5760028401805460ff19166001179055612d3d8a8a848661304f565b50505050505050505050565b600054610100900460ff166110905760405162461bcd60e51b8152600401610f2b90613fb6565b6001600160a01b0381163b612ddd5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610f2b565b60008051602061438183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612e15836130a6565b600082511180612e225750805b15610b265761107283836130e6565b600054610100900460ff16612e585760405162461bcd60e51b8152600401610f2b90613fb6565b60c9805460ff19169055565b600054610100900460ff16612e8b5760405162461bcd60e51b8152600401610f2b90613fb6565b61109033612531565b600060fb6000612ea385611389565b8152602001908152602001600020600b01600083815260200190815260200160002060030160006101000a81548160ff0219169083151502179055505050565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f4986191612f299187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015612f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6a9190613dd5565b15612f7a57610b2683838361310b565b610b26838383613115565b6000612f90836113eb565b835190925090506000612fa382846142a4565b905060005b828110156109fa57612fd3858281518110612fc557612fc5613e07565b6020026020010151836132ca565b80612fdd81613e33565b915050612fa8565b600080612ff183611ba3565b905061300381600a0180546001019055565b600a8101545b9392505050565b600061301b84611ba3565b6001600160a01b039093166000908152600c909301602052506040909120908155600201805461ffff191661010017905550565b826001600160a01b03167f85841522199c696c3d4a549fea06732153559ded5db5cf6dfa3bb099827f2c848360405161308a91815260200190565b60405180910390a261309c83836132ca565b6110728482612f85565b6130af81612d70565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061300983836040518060600160405280602781526020016143a160279139613362565b610b2682826132ca565b60fd54604051630d51a60f60e31b8152606091735a2819ffba212ced4f48188090031dd197293af691636a8d30789161315c9188916001600160a01b031690600401613ea6565b602060405180830381865af4158015613179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319d9190613dd5565b156131e65782826040516024016131b592919061414f565b60408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b1790529050613226565b82826040516024016131f992919061414f565b60408051601f198184030181529190526020810180516001600160e01b03166340c10f1960e01b17905290505b60fd546000906001600160a01b031663468721a76132438761189b565b60008560006040518563ffffffff1660e01b815260040161326794939291906142e8565b6020604051808303816000875af1158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa9190613dd5565b905080611c9057604051638a48aa1f60e01b815260040160405180910390fd5b60fd5460405163468721a760e01b81526000916001600160a01b03169063468721a7906132ff9086908690869060040161431e565b6020604051808303816000875af115801561331e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133429190613dd5565b905080610b2657604051638a48aa1f60e01b815260040160405180910390fd5b6060600080856001600160a01b03168560405161337f9190614351565b600060405180830381855af49150503d80600081146133ba576040519150601f19603f3d011682016040523d82523d6000602084013e6133bf565b606091505b50915091506133d0868383876133da565b9695505050505050565b6060831561344657825161343f576001600160a01b0385163b61343f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f2b565b5081613450565b6134508383613458565b949350505050565b8151156134685781518083602001fd5b8060405162461bcd60e51b8152600401610f2b919061436d565b604051806080016040528060006001600160a01b031681526020016134b860408051808201909152600081526060602082015290565b8152600060208201526040016134df60408051808201909152600081526060602082015290565b905290565b8280546134f090613d85565b90600052602060002090601f0160209004810192826135125760008555613558565b82601f1061352b57805160ff1916838001178555613558565b82800160010185558215613558579182015b8281111561355857825182559160200191906001019061353d565b50613564929150613568565b5090565b5b808211156135645760008155600101613569565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156135b5576135b561357d565b60405290565b604051601f8201601f191681016001600160401b03811182821017156135e3576135e361357d565b604052919050565b6001600160a01b0381168114610fb157600080fd5b60006001600160401b038311156136195761361961357d565b61362c601f8401601f19166020016135bb565b905082815283838301111561364057600080fd5b828260208301376000602084830101529392505050565b60006040828403121561366957600080fd5b613671613593565b9050813561367e816135eb565b815260208201356001600160401b0381111561369957600080fd5b8201601f810184136136aa57600080fd5b6136b984823560208401613600565b60208301525092915050565b6000608082840312156136d757600080fd5b604051608081016001600160401b0382821081831117156136fa576136fa61357d565b816040528293508435915061370e826135eb565b9082526020840135908082111561372457600080fd5b61373086838701613657565b602084015260408501359150613745826135eb565b816040840152606085013591508082111561375f57600080fd5b5061376c85828601613657565b6060830152505092915050565b60006020828403121561378b57600080fd5b81356001600160401b038111156137a157600080fd5b613450848285016136c5565b60005b838110156137c85781810151838201526020016137b0565b838111156110725750506000910152565b600081518084526137f18160208601602086016137ad565b601f01601f19169290920160200192915050565b600060018060a01b038089168352808816602084015260c0604084015261382f60c08401886137d9565b8187166060850152818616608085015283810360a085015261385181866137d9565b9a9950505050505050505050565b60006020828403121561387157600080fd5b8135613009816135eb565b600080600080600060a0868803121561389457600080fd5b85356001600160401b038111156138aa57600080fd5b6138b6888289016136c5565b955050602086013593506040860135925060608601356138d5816135eb565b915060808601356138e5816135eb565b809150509295509295909350565b6001600160a01b0391909116815260200190565b60008060006060848603121561391c57600080fd5b83356001600160401b0381111561393257600080fd5b61393e868287016136c5565b9660208601359650604090950135949350505050565b6000806040838503121561396757600080fd5b82356001600160401b0381111561397d57600080fd5b613989858286016136c5565b925050602083013561399a816135eb565b809150509250929050565b6000602082840312156139b757600080fd5b5035919050565b60018060a01b038151168252600060208201516040602085015261345060408501826137d9565b600081518084526020808501945080840160005b83811015613a2957613a1687835180518252602090810151910152565b60409690960195908201906001016139f9565b509495945050505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b84811015613ad157898403605f19018652815180516001600160a01b0390811686528482015160808688018190529190613a99838901826139be565b848d0151909216888d015250918901518683038a880152919050613abd81836139be565b978501979550505090820190600101613a5d565b505087820390880152613ae481896139e5565b9998505050505050505050565b60008060008060808587031215613b0757600080fd5b84356001600160401b03811115613b1d57600080fd5b613b29878288016136c5565b9450506020850135613b3a816135eb565b93969395505050506040820135916060013590565b6000808284036060811215613b6357600080fd5b83356001600160401b03811115613b7957600080fd5b613b85868287016136c5565b9350506040601f1982011215613b9a57600080fd5b50613ba3613593565b6020840135815260408401356020820152809150509250929050565b600082601f830112613bd057600080fd5b61300983833560208501613600565b60008060408385031215613bf257600080fd5b8235613bfd816135eb565b915060208301356001600160401b03811115613c1857600080fd5b613c2485828601613bbf565b9150509250929050565b60008060008060808587031215613c4457600080fd5b8435613c4f816135eb565b93506020850135925060408501356001600160401b03811115613c7157600080fd5b613c7d87828801613bbf565b925050606085013560028110613c9257600080fd5b939692955090935050565b60008060008060808587031215613cb357600080fd5b84356001600160401b03811115613cc957600080fd5b613cd5878288016136c5565b94505060208501359250604085013591506060850135613c92816135eb565b6020808252825182820181905260009190848201906040850190845b81811015613d355783516001600160a01b031683529284019291840191600101613d10565b50909695505050505050565b60008060408385031215613d5457600080fd5b82356001600160401b03811115613d6a57600080fd5b613d76858286016136c5565b95602094909401359450505050565b600181811c90821680613d9957607f821691505b60208210811415613dba57634e487b7160e01b600052602260045260246000fd5b50919050565b80518015158114613dd057600080fd5b919050565b600060208284031215613de757600080fd5b61300982613dc0565b9182526001600160a01b0316602082015260400190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613e4757613e47613e1d565b5060010190565b600060018060a01b03808351168452602083015160806020860152613e7660808601826139be565b9050816040850151166040860152606084015191508481036060860152613e9d81836139be565b95945050505050565b604081526000613eb96040830185613e4e565b905060018060a01b03831660208301529392505050565b6000816000190483118215151615613eea57613eea613e1d565b500290565b60008219821115613f0257613f02613e1d565b500190565b600082821015613f1957613f19613e1d565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6080815260006140146080830186613e4e565b6001600160a01b03851660208401529050613450604083018480518252602090810151910152565b60006020828403121561404e57600080fd5b8151613009816135eb565b634e487b7160e01b600052602160045260246000fd5b600082601f83011261408057600080fd5b815160206001600160401b0382111561409b5761409b61357d565b8160051b6140aa8282016135bb565b92835284810182019282810190878511156140c457600080fd5b83870192505b848310156140ec5782516140dd816135eb565b825291830191908301906140ca565b979650505050505050565b60006020828403121561410957600080fd5b81516001600160401b0381111561411f57600080fd5b6134508482850161406f565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561417a57600080fd5b5051919050565b600081518084526020808501945080840160005b83811015613a295781516001600160a01b031687529582019590820190600101614195565b8481528360208201526080604082015260006141d96080830185614181565b9050821515606083015295945050505050565b60008060006060848603121561420157600080fd5b835161420c816135eb565b6020850151604086015191945092506001600160401b0381111561422f57600080fd5b61423b8682870161406f565b9150509250925092565b838152826020820152606060408201526000613e9d6060830184614181565b60008060006060848603121561427957600080fd5b61428284613dc0565b92506020840151915060408401516001600160401b0381111561422f57600080fd5b6000826142c157634e487b7160e01b600052601260045260246000fd5b500490565b600281106142e457634e487b7160e01b600052602160045260246000fd5b9052565b60018060a01b038516815283602082015260806040820152600061430f60808301856137d9565b9050613e9d60608301846142c6565b6001600160a01b03841681526020810183905260806040820181905260009082015260a0810161345060608301846142c6565b600082516143638184602087016137ad565b9190910192915050565b60208152600061300960208301846137d956fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122015fb8364cec436767d9aa40830bdb81e639b63ea6b2797ecd5863642975f7ba364736f6c634300080c0033" + BridgeProxyModuleName = "ProxyBridgeDoorMultiToken" + BridgeProxyModuleAddress = "a025DD2C018c159489a85d288a1b420a07C43f87" + BridgeProxyModuleBytecode = "60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ff8e6f2d761d58b3bd984933269e01a7ff1f70a460b808056daa4cff1ee8ab6964736f6c63430008090033" +) diff --git a/cmd/exrpd/cmd/contracts.go b/cmd/exrpd/cmd/contracts.go index be0211e..6582e29 100644 --- a/cmd/exrpd/cmd/contracts.go +++ b/cmd/exrpd/cmd/contracts.go @@ -12,14 +12,8 @@ import ( ) const ( - witnessInitCoins = "10000000000000000000000" + "token" - safeInitCoins = "10000000000000000000000000000000000" + "token" - safeContractName = "SafeProxyImplementation" - SafeProxyAddress = "b5f762798a53d543a014caf8b297cff8f2f937e8" - fallbackHandlerAddress = "f48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4" - safeMasterAddress = "3E5c63644E683549055b9Be8653de26E0B4CD36E" - BridgeProxyModuleAddress = "a025DD2C018c159489a85d288a1b420a07C43f87" - bridgeDoorAddress = "f35225d1d59e77ee66012f5bf4c41675a3d2ec7b" + witnessInitCoins = "10000000000000000000000" + "token" + safeInitCoins = "10000000000000000000000000000000000" + "token" ) type GenesisContract struct { @@ -40,7 +34,7 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit safeStorage := evmtypes.Storage{ evmtypes.State{ Key: "0x" + padZeroes("0"), - Value: "0x" + padZeroes(safeMasterAddress), + Value: "0x" + padZeroes(gnosisSafeL2Address), }, } modulesStorage, err := buildSentinel([]string{BridgeProxyModuleAddress}, padZeroes("1")) @@ -81,7 +75,7 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit }, evmtypes.State{ Key: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", - Value: "0x" + padZeroes(bridgeDoorAddress), + Value: "0x" + padZeroes(bridgeDoorMultiTokenAddress), }, } @@ -171,49 +165,49 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit } return append([]GenesisContract{}, GenesisContract{ - name: "DeployerContract", - address: "4e59b44847b379578588920cA78FbF26c0B4956C", - bytecode: "7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3", + name: deployerContractName, + address: deployerContractAddress, + bytecode: deployerContractBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "SimulateTxAccessor", - address: "59AD6735bCd8152B84860Cb256dD9e96b85F69Da", - bytecode: "608060405234801561001057600080fd5b506004361061002b5760003560e01c80631c5fb21114610030575b600080fd5b6100de6004803603608081101561004657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561008d57600080fd5b82018360208201111561009f57600080fd5b803590602001918460018302840111640100000000831117156100c157600080fd5b9091929391929390803560ff169060200190929190505050610169565b60405180848152602001831515815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561012c578082015181840152602081019050610111565b50505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b60008060607f00000000000000000000000059ad6735bcd8152b84860cb256dd9e96b85f69da73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610213576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806102e46039913960400191505060405180910390fd5b60005a9050610269898989898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050885a610297565b92505a8103935060405160203d0181016040523d81523d6000602083013e8092505050955095509592505050565b60006001808111156102a557fe5b8360018111156102b157fe5b14156102ca576000808551602087018986f490506102da565b600080855160208701888a87f190505b9594505050505056fe53696d756c61746554784163636573736f722073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca2646970667358221220405c212754c23731ee9658f3175dafa74dea363d2619aad9d5576f5a9d4982f764736f6c63430007060033", + name: simulateTxAccessorName, + address: simulateTxAccessorAddress, + bytecode: simulateTxAccessorBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "GnosisSafeProxyFactory", - address: "a6B71E26C5e0845f74c812102Ca7114b6a896AB2", - bytecode: "608060405234801561001057600080fd5b50600436106100625760003560e01c80631688f0b9146100675780632500510e1461017657806353e5d9351461024357806361b69abd146102c6578063addacc0f146103cb578063d18af54d1461044e575b600080fd5b61014a6004803603606081101561007d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156100ba57600080fd5b8201836020820111156100cc57600080fd5b803590602001918460018302840111640100000000831117156100ee57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919050505061057d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102176004803603606081101561018c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156101c957600080fd5b8201836020820111156101db57600080fd5b803590602001918460018302840111640100000000831117156101fd57600080fd5b909192939192939080359060200190929190505050610624565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61024b610751565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028b578082015181840152602081019050610270565b50505050905090810190601f1680156102b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61039f600480360360408110156102dc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561031957600080fd5b82018360208201111561032b57600080fd5b8035906020019184600183028401116401000000008311171561034d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061077c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103d3610861565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104135780820151818401526020810190506103f8565b50505050905090810190601f1680156104405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6105516004803603608081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156104a157600080fd5b8201836020820111156104b357600080fd5b803590602001918460018302840111640100000000831117156104d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061088c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600061058a848484610a3b565b90506000835111156105b25760008060008551602087016000865af114156105b157600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358185604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a19392505050565b60006106758585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505084610a3b565b905080604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107165780820151818401526020810190506106fb565b50505050905090810190601f1680156107435780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b60606040518060200161076390610bde565b6020820181038252601f19601f82011660405250905090565b60008260405161078b90610bde565b808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051809103906000f0801580156107c7573d6000803e3d6000fd5b5090506000825111156107f05760008060008451602086016000865af114156107ef57600080fd5b5b7f4f51faf6c4561ff95f067657e43439f0f856d97c04d9ec9070a6199ad418e2358184604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a192915050565b60606040518060200161087390610beb565b6020820181038252601f19601f82011660405250905090565b6000808383604051602001808381526020018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401925050506040516020818303038152906040528051906020012060001c90506108e786868361057d565b9150600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610a32578273ffffffffffffffffffffffffffffffffffffffff16631e52b518838888886040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff16815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156109ca5780820151818401526020810190506109af565b50505050905090810190601f1680156109f75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015610a1957600080fd5b505af1158015610a2d573d6000803e3d6000fd5b505050505b50949350505050565b6000808380519060200120836040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050600060405180602001610a8890610bde565b6020820181038252601f19601f820116604052508673ffffffffffffffffffffffffffffffffffffffff166040516020018083805190602001908083835b60208310610ae95780518252602082019150602081019050602083039250610ac6565b6001836020036101000a038019825116818451168082178552505050505050905001828152602001925050506040516020818303038152906040529050818151826020016000f59250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f437265617465322063616c6c206661696c65640000000000000000000000000081525060200191505060405180910390fd5b50509392505050565b6101e680610bf883390190565b60ab80610dde8339019056fe608060405234801561001057600080fd5b506040516101e63803806101e68339818101604052602081101561003357600080fd5b8101908080519060200190929190505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156100ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806101c46022913960400191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060ab806101196000396000f3fe608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033496e76616c69642073696e676c65746f6e20616464726573732070726f7669646564608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033a26469706673582212200c75fe2196b9f752c82794253f2ebce0d821afef5997e1d5a35ec316ce592f6664736f6c63430007060033", + name: GnosisSafeProxyFactoryName, + address: GnosisSafeProxyFactoryAddress, + bytecode: GnosisSafeProxyFactoryBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "DefaultCallbackHandler", - address: "1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd", - bytecode: "608060405234801561001057600080fd5b506004361061007c5760003560e01c8063a3f4df7e1161005b578063a3f4df7e14610312578063bc197c8114610395578063f23a6e611461052b578063ffa1ad741461062b5761007c565b806223de291461008157806301ffc9a7146101b9578063150b7a021461021c575b600080fd5b6101b7600480360360c081101561009757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561011e57600080fd5b82018360208201111561013057600080fd5b8035906020019184600183028401116401000000008311171561015257600080fd5b90919293919293908035906020019064010000000081111561017357600080fd5b82018360208201111561018557600080fd5b803590602001918460018302840111640100000000831117156101a757600080fd5b90919293919293905050506106ae565b005b610204600480360360208110156101cf57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106b8565b60405180821515815260200191505060405180910390f35b6102dd6004803603608081101561023257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561029957600080fd5b8201836020820111156102ab57600080fd5b803590602001918460018302840111640100000000831117156102cd57600080fd5b90919293919293905050506107f2565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61031a610807565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561035a57808201518184015260208101905061033f565b50505050905090810190601f1680156103875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104f6600480360360a08110156103ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561040857600080fd5b82018360208201111561041a57600080fd5b8035906020019184602083028401116401000000008311171561043c57600080fd5b90919293919293908035906020019064010000000081111561045d57600080fd5b82018360208201111561046f57600080fd5b8035906020019184602083028401116401000000008311171561049157600080fd5b9091929391929390803590602001906401000000008111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460018302840111640100000000831117156104e657600080fd5b9091929391929390505050610840565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6105f6600480360360a081101561054157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105b257600080fd5b8201836020820111156105c457600080fd5b803590602001918460018302840111640100000000831117156105e657600080fd5b9091929391929390505050610858565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61063361086e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610673578082015181840152602081019050610658565b50505050905090810190601f1680156106a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b5050505050505050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061078357507f150b7a02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107eb57507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600063150b7a0260e01b905095945050505050565b6040518060400160405280601881526020017f44656661756c742043616c6c6261636b2048616e646c6572000000000000000081525081565b600063bc197c8160e01b905098975050505050505050565b600063f23a6e6160e01b90509695505050505050565b6040518060400160405280600581526020017f312e302e300000000000000000000000000000000000000000000000000000008152508156fea26469706673582212200bbabd2b02039e0c6d17ac82e70232971fd892df99a0509daa50ef3d6edad0bc64736f6c63430007060033", + name: defaultCallbackHandlerName, + address: defaultCallbackHandlerAddress, + bytecode: defaultCallbackHandlerBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "CompatibilityFallbackHandler", + name: fallbackHandlerName, address: fallbackHandlerAddress, - bytecode: "608060405234801561001057600080fd5b50600436106100ce5760003560e01c80636ac247841161008c578063bc197c8111610066578063bc197c81146107bb578063bd61951d14610951578063f23a6e6114610a63578063ffa1ad7414610b63576100ce565b80636ac24784146105ea578063a3f4df7e146106d9578063b2494df31461075c576100ce565b806223de29146100d357806301ffc9a71461020b5780630a1028c41461026e578063150b7a021461033d5780631626ba7e1461043357806320c13b0b146104e9575b600080fd5b610209600480360360c08110156100e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561017057600080fd5b82018360208201111561018257600080fd5b803590602001918460018302840111640100000000831117156101a457600080fd5b9091929391929390803590602001906401000000008111156101c557600080fd5b8201836020820111156101d757600080fd5b803590602001918460018302840111640100000000831117156101f957600080fd5b9091929391929390505050610be6565b005b6102566004803603602081101561022157600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610bf0565b60405180821515815260200191505060405180910390f35b6103276004803603602081101561028457600080fd5b81019080803590602001906401000000008111156102a157600080fd5b8201836020820111156102b357600080fd5b803590602001918460018302840111640100000000831117156102d557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610d2a565b6040518082815260200191505060405180910390f35b6103fe6004803603608081101561035357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156103ba57600080fd5b8201836020820111156103cc57600080fd5b803590602001918460018302840111640100000000831117156103ee57600080fd5b9091929391929390505050610d3d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104b46004803603604081101561044957600080fd5b81019080803590602001909291908035906020019064010000000081111561047057600080fd5b82018360208201111561048257600080fd5b803590602001918460018302840111640100000000831117156104a457600080fd5b9091929391929390505050610d52565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6105b5600480360360408110156104ff57600080fd5b810190808035906020019064010000000081111561051c57600080fd5b82018360208201111561052e57600080fd5b8035906020019184600183028401116401000000008311171561055057600080fd5b90919293919293908035906020019064010000000081111561057157600080fd5b82018360208201111561058357600080fd5b803590602001918460018302840111640100000000831117156105a557600080fd5b9091929391929390505050610f0a565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6106c36004803603604081101561060057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561063d57600080fd5b82018360208201111561064f57600080fd5b8035906020019184600183028401116401000000008311171561067157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061115b565b6040518082815260200191505060405180910390f35b6106e16112cd565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610721578082015181840152602081019050610706565b50505050905090810190601f16801561074e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610764611306565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107a757808201518184015260208101905061078c565b505050509050019250505060405180910390f35b61091c600480360360a08110156107d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561082e57600080fd5b82018360208201111561084057600080fd5b8035906020019184602083028401116401000000008311171561086257600080fd5b90919293919293908035906020019064010000000081111561088357600080fd5b82018360208201111561089557600080fd5b803590602001918460208302840111640100000000831117156108b757600080fd5b9091929391929390803590602001906401000000008111156108d857600080fd5b8201836020820111156108ea57600080fd5b8035906020019184600183028401116401000000008311171561090c57600080fd5b909192939192939050505061146d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6109e86004803603604081101561096757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156109a457600080fd5b8201836020820111156109b657600080fd5b803590602001918460018302840111640100000000831117156109d857600080fd5b9091929391929390505050611485565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a28578082015181840152602081019050610a0d565b50505050905090810190601f168015610a555780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b2e600480360360a0811015610a7957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610aea57600080fd5b820183602082011115610afc57600080fd5b80359060200191846001830284011164010000000083111715610b1e57600080fd5b90919293919293905050506114ef565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b6b611505565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610bab578082015181840152602081019050610b90565b50505050905090810190601f168015610bd85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b5050505050505050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610cbb57507f150b7a02000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610d2357507f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b6000610d36338361115b565b9050919050565b600063150b7a0260e01b905095945050505050565b60008033905060008173ffffffffffffffffffffffffffffffffffffffff166320c13b0b876040516020018082815260200191505060405160208183030381529060405287876040518463ffffffff1660e01b8152600401808060200180602001838103835286818151815260200191508051906020019080838360005b83811015610deb578082015181840152602081019050610dd0565b50505050905090810190601f168015610e185780820380516001836020036101000a031916815260200191505b508381038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610e6357600080fd5b505afa158015610e77573d6000803e3d6000fd5b505050506040513d6020811015610e8d57600080fd5b810190808051906020019092919050505090506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614610ef657600060e01b610eff565b631626ba7e60e01b5b925050509392505050565b6000803390506000610f608288888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061115b565b905060008585905014156110755760008273ffffffffffffffffffffffffffffffffffffffff16635ae6bd37836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fc157600080fd5b505afa158015610fd5573d6000803e3d6000fd5b505050506040513d6020811015610feb57600080fd5b81019080805190602001909291905050501415611070576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f48617368206e6f7420617070726f76656400000000000000000000000000000081525060200191505060405180910390fd5b611147565b8173ffffffffffffffffffffffffffffffffffffffff1663934f3a1182898989896040518663ffffffff1660e01b81526004018086815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060006040518083038186803b15801561112e57600080fd5b505afa158015611142573d6000803e3d6000fd5b505050505b6320c13b0b60e01b92505050949350505050565b6000807f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca60001b83805190602001206040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050601960f81b600160f81b8573ffffffffffffffffffffffffffffffffffffffff1663f698da256040518163ffffffff1660e01b815260040160206040518083038186803b15801561120957600080fd5b505afa15801561121d573d6000803e3d6000fd5b505050506040513d602081101561123357600080fd5b81019080805190602001909291905050508360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040528051906020012091505092915050565b6040518060400160405280601881526020017f44656661756c742043616c6c6261636b2048616e646c6572000000000000000081525081565b6060600033905060008173ffffffffffffffffffffffffffffffffffffffff1663cc2f84526001600a6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060006040518083038186803b15801561138057600080fd5b505afa158015611394573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060408110156113be57600080fd5b81019080805160405193929190846401000000008211156113de57600080fd5b838201915060208201858111156113f457600080fd5b825186602082028301116401000000008211171561141157600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561144857808201518184015260208101905061142d565b5050505090500160405260200180519060200190929190505050509050809250505090565b600063bc197c8160e01b905098975050505050505050565b60606040517fb4faba09000000000000000000000000000000000000000000000000000000008152600436036004808301376020600036836000335af15060203d036040519250808301604052806020843e6000516114e657825160208401fd5b50509392505050565b600063f23a6e6160e01b90509695505050505050565b6040518060400160405280600581526020017f312e302e300000000000000000000000000000000000000000000000000000008152508156fea26469706673582212204251d58f2a197439239faafa82818b7696d25bb75655794a81cc773a0e39ed2b64736f6c63430007060033", + bytecode: fallbackHandlerBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "CreateCall", - address: "7cbB62EaA69F79e6873cD1ecB2392971036cFAa4", - bytecode: "608060405234801561001057600080fd5b50600436106100365760003560e01c80634847be6f1461003b5780634c8c9ea114610134575b600080fd5b6101086004803603606081101561005157600080fd5b81019080803590602001909291908035906020019064010000000081111561007857600080fd5b82018360208201111561008a57600080fd5b803590602001918460018302840111640100000000831117156100ac57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050610223565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101f76004803603604081101561014a57600080fd5b81019080803590602001909291908035906020019064010000000081111561017157600080fd5b82018360208201111561018357600080fd5b803590602001918460018302840111640100000000831117156101a557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610327565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008183518460200186f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156102d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436f756c64206e6f74206465706c6f7920636f6e74726163740000000000000081525060200191505060405180910390fd5b7f4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b51181604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a19392505050565b600081516020830184f09050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156103d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f436f756c64206e6f74206465706c6f7920636f6e74726163740000000000000081525060200191505060405180910390fd5b7f4db17dd5e4732fb6da34a148104a592783ca119a1e7bb8829eba6cbadef0b51181604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a19291505056fea26469706673582212203aa87bc5f141a4ee0319caa1412f294b7a71e2ffc270a0cc5e506a8b320df24464736f6c63430007060033", + name: createCallName, + address: createCallAddress, + bytecode: createCallBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "MultiSend", - address: "A238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761", - bytecode: "60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b6100dc6004803603602081101561003957600080fd5b810190808035906020019064010000000081111561005657600080fd5b82018360208201111561006857600080fd5b8035906020019184600183028401116401000000008311171561008a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506100de565b005b7f000000000000000000000000a238cbeb142c10ef7ad8442c6d1f9e89e07e776173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161415610183576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806102106030913960400191505060405180910390fd5b805160205b8181101561020a578083015160f81c6001820184015160601c6015830185015160358401860151605585018701600085600081146101cd57600181146101dd576101e8565b6000808585888a5af191506101e8565b6000808585895af491505b5060008114156101f757600080fd5b8260550187019650505050505050610188565b50505056fe4d756c746953656e642073686f756c64206f6e6c792062652063616c6c6564207669612064656c656761746563616c6ca26469706673582212205c784303626eec02b71940b551976170b500a8a36cc5adcbeb2c19751a76d05464736f6c63430007060033", + name: multiSendName, + address: multiSendAddress, + bytecode: multiSendBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "MultiSendCallOnly", - address: "40A2aCCbd92BCA938b02010E17A5b8929b49130D", - bytecode: "60806040526004361061001e5760003560e01c80638d80ff0a14610023575b600080fd5b6100dc6004803603602081101561003957600080fd5b810190808035906020019064010000000081111561005657600080fd5b82018360208201111561006857600080fd5b8035906020019184600183028401116401000000008311171561008a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506100de565b005b805160205b8181101561015f578083015160f81c6001820184015160601c60158301850151603584018601516055850187016000856000811461012857600181146101385761013d565b6000808585888a5af1915061013d565b600080fd5b50600081141561014c57600080fd5b82605501870196505050505050506100e3565b50505056fea264697066735822122035246402746c96964495cae5b36461fd44dfb89f8e6cf6f6b8d60c0aa89f414864736f6c63430007060033", + name: multiSendCallOnlyName, + address: multiSendCallOnlyAddress, + bytecode: multiSendCallOnlyBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "GnosisSafeL2", - address: safeMasterAddress, - bytecode: "6080604052600436106101dc5760003560e01c8063affed0e011610102578063e19a9dd911610095578063f08a032311610064578063f08a032314611647578063f698da2514611698578063f8dc5dd9146116c3578063ffa1ad741461173e57610231565b8063e19a9dd91461139b578063e318b52b146113ec578063e75235b81461147d578063e86637db146114a857610231565b8063cc2f8452116100d1578063cc2f8452146110e8578063d4d9bdcd146111b5578063d8d11f78146111f0578063e009cfde1461132a57610231565b8063affed0e014610d94578063b4faba0914610dbf578063b63e800d14610ea7578063c4ca3a9c1461101757610231565b80635624b25b1161017a5780636a761202116101495780636a761202146109945780637d83297414610b50578063934f3a1114610bbf578063a0e67e2b14610d2857610231565b80635624b25b146107fb5780635ae6bd37146108b9578063610b592514610908578063694e80c31461095957610231565b80632f54bf6e116101b65780632f54bf6e146104d35780633408e4701461053a578063468721a7146105655780635229073f1461067a57610231565b80630d582f131461029e57806312fb68e0146102f95780632d9ad53d1461046c57610231565b36610231573373ffffffffffffffffffffffffffffffffffffffff167f3d0ce9bfc3ed7d6862dbb28b2dea94561fe714a1b4d019aa8af39730d1ad7c3d346040518082815260200191505060405180910390a2005b34801561023d57600080fd5b5060007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b905080548061027257600080f35b36600080373360601b365260008060143601600080855af13d6000803e80610299573d6000fd5b3d6000f35b3480156102aa57600080fd5b506102f7600480360360408110156102c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506117ce565b005b34801561030557600080fd5b5061046a6004803603608081101561031c57600080fd5b81019080803590602001909291908035906020019064010000000081111561034357600080fd5b82018360208201111561035557600080fd5b8035906020019184600183028401116401000000008311171561037757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156103da57600080fd5b8201836020820111156103ec57600080fd5b8035906020019184600183028401116401000000008311171561040e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611bbe565b005b34801561047857600080fd5b506104bb6004803603602081101561048f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612440565b60405180821515815260200191505060405180910390f35b3480156104df57600080fd5b50610522600480360360208110156104f657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612512565b60405180821515815260200191505060405180910390f35b34801561054657600080fd5b5061054f6125e4565b6040518082815260200191505060405180910390f35b34801561057157600080fd5b506106626004803603608081101561058857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105cf57600080fd5b8201836020820111156105e157600080fd5b8035906020019184600183028401116401000000008311171561060357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506125f1565b60405180821515815260200191505060405180910390f35b34801561068657600080fd5b506107776004803603608081101561069d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156106e457600080fd5b8201836020820111156106f657600080fd5b8035906020019184600183028401116401000000008311171561071857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803560ff1690602001909291905050506126fc565b60405180831515815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bf5780820151818401526020810190506107a4565b50505050905090810190601f1680156107ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561080757600080fd5b5061083e6004803603604081101561081e57600080fd5b810190808035906020019092919080359060200190929190505050612732565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561087e578082015181840152602081019050610863565b50505050905090810190601f1680156108ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108c557600080fd5b506108f2600480360360208110156108dc57600080fd5b81019080803590602001909291905050506127b9565b6040518082815260200191505060405180910390f35b34801561091457600080fd5b506109576004803603602081101561092b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506127d1565b005b34801561096557600080fd5b506109926004803603602081101561097c57600080fd5b8101908080359060200190929190505050612b63565b005b610b3860048036036101408110156109ab57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109f257600080fd5b820183602082011115610a0457600080fd5b80359060200191846001830284011164010000000083111715610a2657600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610ab257600080fd5b820183602082011115610ac457600080fd5b80359060200191846001830284011164010000000083111715610ae657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612c9d565b60405180821515815260200191505060405180910390f35b348015610b5c57600080fd5b50610ba960048036036040811015610b7357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612edc565b6040518082815260200191505060405180910390f35b348015610bcb57600080fd5b50610d2660048036036060811015610be257600080fd5b810190808035906020019092919080359060200190640100000000811115610c0957600080fd5b820183602082011115610c1b57600080fd5b80359060200191846001830284011164010000000083111715610c3d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190640100000000811115610ca057600080fd5b820183602082011115610cb257600080fd5b80359060200191846001830284011164010000000083111715610cd457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050612f01565b005b348015610d3457600080fd5b50610d3d612f90565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015610d80578082015181840152602081019050610d65565b505050509050019250505060405180910390f35b348015610da057600080fd5b50610da9613139565b6040518082815260200191505060405180910390f35b348015610dcb57600080fd5b50610ea560048036036040811015610de257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610e1f57600080fd5b820183602082011115610e3157600080fd5b80359060200191846001830284011164010000000083111715610e5357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061313f565b005b348015610eb357600080fd5b506110156004803603610100811015610ecb57600080fd5b8101908080359060200190640100000000811115610ee857600080fd5b820183602082011115610efa57600080fd5b80359060200191846020830284011164010000000083111715610f1c57600080fd5b909192939192939080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115610f6757600080fd5b820183602082011115610f7957600080fd5b80359060200191846001830284011164010000000083111715610f9b57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613161565b005b34801561102357600080fd5b506110d26004803603608081101561103a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561108157600080fd5b82018360208201111561109357600080fd5b803590602001918460018302840111640100000000831117156110b557600080fd5b9091929391929390803560ff16906020019092919050505061331f565b6040518082815260200191505060405180910390f35b3480156110f457600080fd5b506111416004803603604081101561110b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613447565b60405180806020018373ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019060200280838360005b838110156111a0578082015181840152602081019050611185565b50505050905001935050505060405180910390f35b3480156111c157600080fd5b506111ee600480360360208110156111d857600080fd5b8101908080359060200190929190505050613639565b005b3480156111fc57600080fd5b50611314600480360361014081101561121457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561125b57600080fd5b82018360208201111561126d57600080fd5b8035906020019184600183028401116401000000008311171561128f57600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506137d8565b6040518082815260200191505060405180910390f35b34801561133657600080fd5b506113996004803603604081101561134d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613805565b005b3480156113a757600080fd5b506113ea600480360360208110156113be57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613b96565b005b3480156113f857600080fd5b5061147b6004803603606081101561140f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613c1a565b005b34801561148957600080fd5b5061149261428c565b6040518082815260200191505060405180910390f35b3480156114b457600080fd5b506115cc60048036036101408110156114cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561151357600080fd5b82018360208201111561152557600080fd5b8035906020019184600183028401116401000000008311171561154757600080fd5b9091929391929390803560ff169060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050614296565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561160c5780820151818401526020810190506115f1565b50505050905090810190601f1680156116395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561165357600080fd5b506116966004803603602081101561166a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061443e565b005b3480156116a457600080fd5b506116ad61449f565b6040518082815260200191505060405180910390f35b3480156116cf57600080fd5b5061173c600480360360608110156116e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061451d565b005b34801561174a57600080fd5b50611753614950565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611793578082015181840152602081019050611778565b50505050905090810190601f1680156117c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6117d6614989565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156118405750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561187857503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b6118ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506003600081548092919060010191905055507f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2682604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a18060045414611bba57611bb981612b63565b5b5050565b611bd2604182614a2c90919063ffffffff16565b82511015611c48576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808060008060005b8681101561243457611c648882614a66565b80945081955082965050505060008460ff16141561206d578260001c9450611c96604188614a2c90919063ffffffff16565b8260001c1015611d0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8751611d2760208460001c614a9590919063ffffffff16565b1115611d9b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006020838a01015190508851611dd182611dc360208760001c614a9590919063ffffffff16565b614a9590919063ffffffff16565b1115611e45576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60606020848b010190506320c13b0b60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168773ffffffffffffffffffffffffffffffffffffffff166320c13b0b8d846040518363ffffffff1660e01b8152600401808060200180602001838103835285818151815260200191508051906020019080838360005b83811015611ee7578082015181840152602081019050611ecc565b50505050905090810190601f168015611f145780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015611f4d578082015181840152602081019050611f32565b50505050905090810190601f168015611f7a5780820380516001836020036101000a031916815260200191505b5094505050505060206040518083038186803b158015611f9957600080fd5b505afa158015611fad573d6000803e3d6000fd5b505050506040513d6020811015611fc357600080fd5b81019080805190602001909291905050507bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612066576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b50506122b2565b60018460ff161415612181578260001c94508473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061210a57506000600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c81526020019081526020016000205414155b61217c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6122b1565b601e8460ff1611156122495760018a60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012060048603858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612238573d6000803e3d6000fd5b5050506020604051035194506122b0565b60018a85858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156122a3573d6000803e3d6000fd5b5050506020604051035194505b5b5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161180156123795750600073ffffffffffffffffffffffffffffffffffffffff16600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b80156123b25750600173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b612424576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330323600000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8495508080600101915050611c52565b50505050505050505050565b60008173ffffffffffffffffffffffffffffffffffffffff16600173ffffffffffffffffffffffffffffffffffffffff161415801561250b5750600073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156125dd5750600073ffffffffffffffffffffffffffffffffffffffff16600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b9050919050565b6000804690508091505090565b60007fb648d3644f584ed1c2232d53c46d87e693586486ad0d1175f8656013110b714e3386868686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200183600181111561266b57fe5b8152602001828103825284818151815260200191508051906020019080838360005b838110156126a857808201518184015260208101905061268d565b50505050905090810190601f1680156126d55780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a16126f285858585614ab4565b9050949350505050565b6000606061270c868686866125f1565b915060405160203d0181016040523d81523d6000602083013e8091505094509492505050565b606060006020830267ffffffffffffffff8111801561275057600080fd5b506040519080825280601f01601f1916602001820160405280156127835781602001600182028036833780820191505090505b50905060005b838110156127ae57808501548060208302602085010152508080600101915050612789565b508091505092915050565b60076020528060005260406000206000915090505481565b6127d9614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156128435750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6128b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146129b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fecdf3a3effea5783a3c4c2140e677577666428d44ed9d474a0b3a4c9943f844081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b612b6b614989565b600354811115612be3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001811015612c5a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b806004819055507f610f7ff2b304ae8903c3de74c60c6ab1f7d6226b3f52c5161905bb5ad4039c936004546040518082815260200191505060405180910390a150565b6000606060055433600454604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405160208183030381529060405290507f66753cd2356569ee081232e3be8909b950e0a76c1f8460c3a5e3c2be32b11bed8d8d8d8d8d8d8d8d8d8d8d8c604051808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001806020018a6001811115612d5057fe5b81526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200184810384528e8e82818152602001925080828437600081840152601f19601f820116905080830192505050848103835286818151815260200191508051906020019080838360005b83811015612e0a578082015181840152602081019050612def565b50505050905090810190601f168015612e375780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b83811015612e70578082015181840152602081019050612e55565b50505050905090810190601f168015612e9d5780820380516001836020036101000a031916815260200191505b509f5050505050505050505050505050505060405180910390a1612eca8d8d8d8d8d8d8d8d8d8d8d614c9a565b9150509b9a5050505050505050505050565b6008602052816000526040600020602052806000526040600020600091509150505481565b6000600454905060008111612f7e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b612f8a84848484611bbe565b50505050565b6060600060035467ffffffffffffffff81118015612fad57600080fd5b50604051908082528060200260200182016040528015612fdc5781602001602082028036833780820191505090505b50905060008060026000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613130578083838151811061308757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508180600101925050613046565b82935050505090565b60055481565b600080825160208401855af4806000523d6020523d600060403e60403d016000fd5b6131ac8a8a80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050896151d7565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146131ea576131e9846156d7565b5b6132388787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050615706565b60008211156132525761325082600060018685615941565b505b3373ffffffffffffffffffffffffffffffffffffffff167f141df868a6331af528e38c83b7aa03edc19be66e37ae67f9285bf4f8e3c6a1a88b8b8b8b8960405180806020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281038252878782818152602001925060200280828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a250505050505050505050565b6000805a9050613376878787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050865a615b47565b61337f57600080fd5b60005a8203905080604051602001808281526020019150506040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561340c5780820151818401526020810190506133f1565b50505050905090810190601f1680156134395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b606060008267ffffffffffffffff8111801561346257600080fd5b506040519080825280602002602001820160405280156134915781602001602082028036833780820191505090505b509150600080600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156135645750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561356f57508482105b1561362a578084838151811061358157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081806001019250506134fa565b80925081845250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561373b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330333000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16817ff2a0eb156472d1440255b0d7c1e19cc07115d1051fe605b0dce69acfec884d9c60405160405180910390a350565b60006137ed8c8c8c8c8c8c8c8c8c8c8c614296565b8051906020012090509b9a5050505050505050505050565b61380d614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156138775750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b6138e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146139e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507faab4fa2b463f581b2b32cb3b7e3b704b9ce37cc209b5fb4d77e593ace405427681604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b613b9e614989565b60007f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b90508181557f1151116914515bc0891ff9047a6cb32cf902546f83066499bcf8ba33d2353fa282604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b613c22614989565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614158015613c8c5750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015613cc457503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b613d36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613e37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015613ea15750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b613f13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614614013576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a17f9465fa0c962cc76958e6373a993326400c1c94f8be2fe3a952adfa7f60b2ea2681604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b6000600454905090565b606060007fbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d860001b8d8d8d8d60405180838380828437808301925050509250505060405180910390208c8c8c8c8c8c8c604051602001808c81526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a815260200189815260200188600181111561432757fe5b81526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019b505050505050505050505050604051602081830303815290604052805190602001209050601960f81b600160f81b6143b361449f565b8360405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152600101847effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018381526020018281526020019450505050506040516020818303038152906040529150509b9a5050505050505050505050565b614446614989565b61444f816156d7565b7f5ac6c46c93c8d0e53714ba3b53db3e7c046da994313d7ed0d192028bc7c228b081604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860001b6144cd6125e4565b30604051602001808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405160208183030381529060405280519060200120905090565b614525614989565b8060016003540310156145a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415801561460a5750600173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b61467c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461477c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303500000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600360008154809291906001900391905055507ff8d49fc529812e9a7c5c50e69c20f0dccc0db8fa95c98bc58cc9a4f1c1299eaf82604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1806004541461494b5761494a81612b63565b5b505050565b6040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614614a2a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330333100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b565b600080831415614a3f5760009050614a60565b6000828402905082848281614a5057fe5b0414614a5b57600080fd5b809150505b92915050565b60008060008360410260208101860151925060408101860151915060ff60418201870151169350509250925092565b600080828401905083811015614aaa57600080fd5b8091505092915050565b6000600173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015614b7f5750600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b614bf1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b614bfe858585855a615b47565b90508015614c4e573373ffffffffffffffffffffffffffffffffffffffff167f6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb860405160405180910390a2614c92565b3373ffffffffffffffffffffffffffffffffffffffff167facd2c8702804128fdb0db2bb49f6d127dd0181c13fd45dbfe16de0930e2bd37560405160405180910390a25b949350505050565b6000806000614cb48e8e8e8e8e8e8e8e8e8e600554614296565b905060056000815480929190600101919050555080805190602001209150614cdd828286612f01565b506000614ce8615b93565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614614ece578073ffffffffffffffffffffffffffffffffffffffff166375f0bb528f8f8f8f8f8f8f8f8f8f8f336040518d63ffffffff1660e01b8152600401808d73ffffffffffffffffffffffffffffffffffffffff1681526020018c8152602001806020018a6001811115614d8b57fe5b81526020018981526020018881526020018781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018473ffffffffffffffffffffffffffffffffffffffff16815260200183810383528d8d82818152602001925080828437600081840152601f19601f820116905080830192505050838103825285818151815260200191508051906020019080838360005b83811015614e5d578082015181840152602081019050614e42565b50505050905090810190601f168015614e8a5780820380516001836020036101000a031916815260200191505b509e505050505050505050505050505050600060405180830381600087803b158015614eb557600080fd5b505af1158015614ec9573d6000803e3d6000fd5b505050505b6101f4614ef56109c48b01603f60408d0281614ee657fe5b04615bc490919063ffffffff16565b015a1015614f6b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005a9050614fd48f8f8f8f8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508e60008d14614fc9578e614fcf565b6109c45a035b615b47565b9350614fe95a82615bde90919063ffffffff16565b90508380614ff8575060008a14155b80615004575060008814155b615076576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000808911156150905761508d828b8b8b8b615941565b90505b84156150da577f442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e8482604051808381526020018281526020019250505060405180910390a161511a565b7f23428b18acfb3ea64b08dc0c1d296ea9c09702c09083ca5272e64d115b687d238482604051808381526020018281526020019250505060405180910390a15b5050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146151c6578073ffffffffffffffffffffffffffffffffffffffff16639327136883856040518363ffffffff1660e01b815260040180838152602001821515815260200192505050600060405180830381600087803b1580156151ad57600080fd5b505af11580156151c1573d6000803e3d6000fd5b505050505b50509b9a5050505050505050505050565b60006004541461524f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b81518111156152c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600181101561533d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006001905060005b835181101561564357600084828151811061535d57fe5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156153d15750600173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561540957503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b801561544157508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b6154b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303300000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146155b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475332303400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550809250508080600101915050615346565b506001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550825160038190555081600481905550505050565b60007f6c9a6c4a39284e37ed1cf53d337577d14212a4870fb976a4366c693b939918d560001b90508181555050565b600073ffffffffffffffffffffffffffffffffffffffff1660016000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614615808576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475331303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001806000600173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461593d576158ca8260008360015a615b47565b61593c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330303000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b5050565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461597e5782615980565b325b9050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415615a98576159ea3a86106159c7573a6159c9565b855b6159dc888a614a9590919063ffffffff16565b614a2c90919063ffffffff16565b91508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050615a93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313100000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b615b3d565b615abd85615aaf888a614a9590919063ffffffff16565b614a2c90919063ffffffff16565b9150615aca848284615bfe565b615b3c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f475330313200000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b5b5095945050505050565b6000600180811115615b5557fe5b836001811115615b6157fe5b1415615b7a576000808551602087018986f49050615b8a565b600080855160208701888a87f190505b95945050505050565b6000807f4a204f620c8c5ccdca3fd54d003badd85ba500436a431f0cbda4f558c93c34c860001b9050805491505090565b600081831015615bd45781615bd6565b825b905092915050565b600082821115615bed57600080fd5b600082840390508091505092915050565b60008063a9059cbb8484604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050602060008251602084016000896127105a03f13d60008114615ca55760208114615cad5760009350615cb8565b819350615cb8565b600051158215171593505b505050939250505056fea2646970667358221220047fac33099ca576d1c4f1ac6a8abdb0396e42ad6a397d2cb2f4dc1624cc0c5b64736f6c63430007060033", + name: gnosisSafeL2Name, + address: gnosisSafeL2Address, + bytecode: gnosisSafeL2Bytecode, memory: evmtypes.Storage{ evmtypes.State{ Key: "0x0000000000000000000000000000000000000000000000000000000000000004", @@ -221,24 +215,24 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit }, }, }, GenesisContract{ - name: safeContractName, + name: safeProxyName, address: SafeProxyAddress, - bytecode: "608060405273ffffffffffffffffffffffffffffffffffffffff600054167fa619486e0000000000000000000000000000000000000000000000000000000060003514156050578060005260206000f35b3660008037600080366000845af43d6000803e60008114156070573d6000fd5b3d6000f3fea2646970667358221220d1429297349653a4918076d650332de1a1068c5f3e07c5c82360c277770b955264736f6c63430007060033", + bytecode: safeProxyBytecode, memory: safeStorage, }, GenesisContract{ - name: "Utils", - address: "8a05Be8B6099C65E7c403EA8e0f5Fc6Fda720627", - bytecode: "738a05be8b6099c65e7c403ea8e0f5fc6fda72062730146080604052600436106100405760003560e01c806346bdca9a146100455780638df02a601461006c575b600080fd5b610058610053366004610187565b61007f565b604051901515815260200160405180910390f35b61005861007a36600461020f565b6100c6565b600083821480156100bd5750828260405161009b929190610293565b604051809103902085856040516100b3929190610293565b6040518091039020145b95945050505050565b600082815b8181101561013057836001600160a01b03168686838181106100ef576100ef6102a3565b905060200201602081019061010491906102b9565b6001600160a01b0316141561011e57600192505050610137565b80610128816102d4565b9150506100cb565b5060009150505b9392505050565b60008083601f84011261015057600080fd5b50813567ffffffffffffffff81111561016857600080fd5b60208301915083602082850101111561018057600080fd5b9250929050565b6000806000806040858703121561019d57600080fd5b843567ffffffffffffffff808211156101b557600080fd5b6101c18883890161013e565b909650945060208701359150808211156101da57600080fd5b506101e78782880161013e565b95989497509550505050565b80356001600160a01b038116811461020a57600080fd5b919050565b60008060006040848603121561022457600080fd5b833567ffffffffffffffff8082111561023c57600080fd5b818601915086601f83011261025057600080fd5b81358181111561025f57600080fd5b8760208260051b850101111561027457600080fd5b60209283019550935061028a91860190506101f3565b90509250925092565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156102cb57600080fd5b610137826101f3565b60006000198214156102f657634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220cce1793b7833e7c749695098636a76d7628a86eeda4248710025afd945c8f25f64736f6c634300080c0033", + name: UtilsName, + address: UtilsAddress, + bytecode: UtilsBytecode, memory: evmtypes.Storage{}, }, GenesisContract{ - name: "XChainUtils", - address: "5A2819Ffba212CeD4F48188090031dd197293af6", - bytecode: "735a2819ffba212ced4f48188090031dd197293af630146080604052600436106200008b5760003560e01c80631fefdd741462000090578063561f3ce914620000a957806358f4986114620000da5780636a8d3078146200010257806392d253bd1462000119578063c3f2420c1462000130578063d9de78c6146200016e578063df4bc1891462000185575b600080fd5b620000a7620000a136600462001849565b620001ad565b005b620000c0620000ba366004620018ea565b620009a0565b604051620000d19392919062001986565b60405180910390f35b620000f1620000eb36600462001849565b62000c55565b6040519015158152602001620000d1565b620000f16200011336600462001849565b62000d3c565b620000f16200012a36600462001849565b62000d4f565b8180156200013d57600080fd5b50620001556200014f366004620019b2565b62000d65565b6040516001600160a01b039091168152602001620000d1565b620000f16200017f36600462001849565b62000eec565b6200019c6200019636600462001a66565b62000efa565b604051620000d19392919062001ad6565b815160408301516001600160a01b038381169281168314929116148180620001d25750805b620002555760405162461bcd60e51b815260206004820152604260248201527f496e76616c69642062726964676520636f6e6669673a2042726964676520697360448201527f206e6f74206c6f636b696e67436861696e206e6f722069737375696e6743686160648201526134b760f11b608482015260a4015b60405180910390fd5b602080850151015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000295919060040162001b5c565b602060405180830381865af4158015620002b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002d9919062001b96565b15620005f4576020840151516001600160a01b031615620003935760405162461bcd60e51b815260206004820152606160248201527f496e76616c69642062726964676520636f6e6669673a204e6174697665206c6f60448201527f636b696e6720627269646765206d7573742068617665206c6f636b696e67436860648201527f61696e49737375652e6973737565722073657420746f206164647265737328306084820152602960f81b60a482015260c4016200024c565b60608401516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a91620003d4919060040162001b5c565b602060405180830381865af4158015620003f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000418919062001b96565b15620005b4576060840151516001600160a01b031615620004d25760405162461bcd60e51b815260206004820152606160248201527f496e76616c69642062726964676520636f6e6669673a204e617469766520697360448201527f7375696e6720627269646765206d75737420686176652069737375696e67436860648201527f61696e49737375652e6973737565722073657420746f206164647265737328306084820152602960f81b60a482015260c4016200024c565b83604001516001600160a01b031673b5f762798a53d543a014caf8b297cff8f2f937e86001600160a01b031614620005ae5760405162461bcd60e51b815260206004820152606c60248201527f496e76616c69642062726964676520636f6e6669673a204e617469766520697360448201527f7375696e672062726964676520646f6f72206163636f756e74206d757374206260648201527f652030784235663736323739384135336435343361303134434166386232393760848201526b0868c8c708c648c72666eca760a31b60a482015260c4016200024c565b6200099a565b8360600151600001516001600160a01b031684604001516001600160a01b031614620005ae5760405162461bcd60e51b81526004016200024c9062001bb6565b83516020850151516001600160a01b03908116911614156200069f5760405162461bcd60e51b815260206004820152605760248201527f496e76616c69642062726964676520636f6e6669673a206c6f636b696e67436860448201527f61696e49737375652e697373756572206d75737420626520646966666572656e6064820152763a103a3430b7103637b1b5b4b733a1b430b4b72237b7b960491b608482015260a4016200024c565b60608401516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a91620006e0919060040162001b5c565b602060405180830381865af4158015620006fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000724919062001b96565b15620007b65760405162461bcd60e51b815260206004820152605460248201527f496e76616c69642062726964676520636f6e6669673a2049737375696e67206360448201527f6861696e2069737375652063616e2774206265204e6174697665206966206c6f60648201527331b5b4b7339031b430b4b71034b9902a37b5b2b760611b608482015260a4016200024c565b8360600151600001516001600160a01b031684604001516001600160a01b031614620007f65760405162461bcd60e51b81526004016200024c9062001bb6565b81156200099a57738a05be8b6099c65e7c403ea8e0f5fc6fda7206276346bdca9a8560200151600001516001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200085e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262000888919081019062001c39565b8660200151602001516040518363ffffffff1660e01b8152600401620008b092919062001caf565b602060405180830381865af4158015620008ce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f4919062001b96565b620005ae5760405162461bcd60e51b815260206004820152606360248201527f496e76616c69642062726964676520636f6e6669673a20546f6b656e2062726960448201527f646765206c6f636b696e67436861696e49737375652e63757272656e6379206d60648201527f757374206265207468652073616d65206173207468652045524332302073796d608482015262189bdb60ea1b60a482015260c4016200024c565b50505050565b6000806060838280805b8381101562000acd576000808c60010160008c8c86818110620009d157620009d162001cd8565b9050602002016020810190620009e8919062001cee565b6001600160a01b0316815260208101919091526040016000205490508062000a1257505062000ab8565b60005b8681101562000aa45760008e60010160008e8e8581811062000a3b5762000a3b62001cd8565b905060200201602081019062000a52919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000205490508281141562000a8e578362000a8a8162001d22565b9450505b508062000a9b8162001d22565b91505062000a15565b508382111562000ab5578193508094505b50505b8062000ac48162001d22565b915050620009aa565b5088811015801562000adf5750600082115b1562000c2f576000816001600160401b0381111562000b025762000b026200163d565b60405190808252806020026020018201604052801562000b2c578160200160208202803683370190505b5090506000805b8581101562000c1b5760008d60010160008d8d8581811062000b595762000b5962001cd8565b905060200201602081019062000b70919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000205490508581141562000c05578b8b8381811062000bb15762000bb162001cd8565b905060200201602081019062000bc8919062001cee565b84848151811062000bdd5762000bdd62001cd8565b6001600160a01b03909216602092830291909101909101528262000c018162001d22565b9350505b508062000c128162001d22565b91505062000b33565b5060019750929550935062000c4b92505050565b6040805160008082526020820190925281909550955095505050505b9450945094915050565b600062000c63838362000d3c565b1562000cf557602080840151015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000ca9919060040162001b5c565b602060405180830381865af415801562000cc7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ced919062001b96565b905062000d36565b60608301516020015160405163235ee54d60e11b8152738a05be8b6099c65e7c403ea8e0f5fc6fda720627916346bdca9a9162000ca9919060040162001b5c565b92915050565b90516001600160a01b0390811691161490565b600062000d5d838362000c55565b159392505050565b600062000d738484620001ad565b62000d7f848462000d4f565b1562000ec15781511562000da657604051630ff40f9b60e21b815260040160405180910390fd5b62000db2848462000d3c565b1562000dc5575060208301515162000ee5565b600062000de38560200151600001516001600160a01b0316620013ec565b85606001516020015160405160200162000dff92919062001d40565b604051602081830303815290604052905060008186606001516020015160405162000e2a906200162f565b62000e3792919062001caf565b604051809103906000f08015801562000e54573d6000803e3d6000fd5b5060405163f2fde38b60e01b81526001600160a01b0387811660048301529192509082169063f2fde38b90602401600060405180830381600087803b15801562000e9d57600080fd5b505af115801562000eb2573d6000803e3d6000fd5b50505050809250505062000ee5565b815162000ee157604051630ff40f9b60e21b815260040160405180910390fd5b5060005b9392505050565b600062000d5d838362000d3c565b6003850154600090819060609060ff1662000f285760405163022af77760e11b815260040160405180910390fd5b8460008080805b84811015620012125760008d60020160008d8d8581811062000f555762000f5562001cd8565b905060200201602081019062000f6c919062001cee565b6001600160a01b0316815260208101919091526040016000206001015462000f955750620011fd565b60005b8681101562001144578e60020160008e8e8681811062000fbc5762000fbc62001cd8565b905060200201602081019062000fd3919062001cee565b6001600160a01b03166001600160a01b03168152602001908152602001600020600101548f60020160008f8f8581811062001012576200101262001cd8565b905060200201602081019062001029919062001cee565b6001600160a01b03166001600160a01b03168152602001908152602001600020600101541480156200111957508e60020160008e8e8481811062001071576200107162001cd8565b905060200201602081019062001088919062001cee565b6001600160a01b03166001600160a01b0316815260200190815260200160002060000160009054906101000a90046001600160a01b03166001600160a01b03168f60020160008f8f87818110620010e357620010e362001cd8565b9050602002016020810190620010fa919062001cee565b6001600160a01b03908116825260208201929092526040016000205416145b156200112f57816200112b8162001d22565b9250505b806200113b8162001d22565b91505062000f98565b5083811115620011fb578093508d60020160008d8d858181106200116c576200116c62001cd8565b905060200201602081019062001183919062001cee565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015494508d60020160008d8d85818110620011c457620011c462001cd8565b9050602002016020810190620011db919062001cee565b6001600160a01b0390811682526020820192909252604001600020541692505b505b80620012098162001d22565b91505062000f2f565b506000826001600160401b038111156200123057620012306200163d565b6040519080825280602002602001820160405280156200125a578160200160208202803683370190505b5090508880156200126a57508b83105b156200128457600097508796509450620013e19350505050565b8b83108062001291575083155b15620012b05760405163f0b0305760e01b815260040160405180910390fd5b6000805b86811015620013d35760008f60020160008f8f85818110620012da57620012da62001cd8565b9050602002016020810190620012f1919062001cee565b6001600160a01b0390811682526020808301939093526040918201600020825180840190935280549091168252600101549181018290529150871480156200134e5750846001600160a01b031681600001516001600160a01b0316145b15620013bd578d8d8381811062001369576200136962001cd8565b905060200201602081019062001380919062001cee565b84848151811062001395576200139562001cd8565b6001600160a01b039092166020928302919091019091015282620013b98162001d22565b9350505b5080620013ca8162001d22565b915050620012b4565b509197509295509193505050505b955095509592505050565b606062000d3682620013fe8462001407565b60010162001476565b600080608083901c15620014205760809290921c916010015b604083901c15620014365760409290921c916008015b602083901c156200144c5760209290921c916004015b601083901c15620014625760109290921c916002015b600883901c1562000d365760010192915050565b606060006200148783600262001d96565b6200149490600262001db8565b6001600160401b03811115620014ae57620014ae6200163d565b6040519080825280601f01601f191660200182016040528015620014d9576020820181803683370190505b509050600360fc1b81600081518110620014f757620014f762001cd8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062001529576200152962001cd8565b60200101906001600160f81b031916908160001a90535060006200154f84600262001d96565b6200155c90600162001db8565b90505b6001811115620015de576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062001594576200159462001cd8565b1a60f81b828281518110620015ad57620015ad62001cd8565b60200101906001600160f81b031916908160001a90535060049490941c93620015d68162001dd3565b90506200155f565b50831562000ee55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016200024c565b610f738062001dee83390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200167e576200167e6200163d565b604052919050565b80356001600160a01b03811681146200169e57600080fd5b919050565b60006001600160401b03821115620016bf57620016bf6200163d565b50601f01601f191660200190565b600060408284031215620016e057600080fd5b604051604081016001600160401b0382821081831117156200170657620017066200163d565b81604052829350620017188562001686565b83526020915081850135818111156200173057600080fd5b85019050601f810186136200174457600080fd5b80356200175b6200175582620016a3565b62001653565b81815287848385010111156200177057600080fd5b818484018583013760008483830101528084860152505050505092915050565b600060808284031215620017a357600080fd5b604051608081016001600160401b038282108183111715620017c957620017c96200163d565b81604052829350620017db8562001686565b83526020850135915080821115620017f257600080fd5b6200180086838701620016cd565b6020840152620018136040860162001686565b604084015260608501359150808211156200182d57600080fd5b506200183c85828601620016cd565b6060830152505092915050565b600080604083850312156200185d57600080fd5b82356001600160401b038111156200187457600080fd5b620018828582860162001790565b925050620018936020840162001686565b90509250929050565b60008083601f840112620018af57600080fd5b5081356001600160401b03811115620018c757600080fd5b6020830191508360208260051b8501011115620018e357600080fd5b9250929050565b600080600080606085870312156200190157600080fd5b843593506020850135925060408501356001600160401b038111156200192657600080fd5b62001934878288016200189c565b95989497509550505050565b600081518084526020808501945080840160005b838110156200197b5781516001600160a01b03168752958201959082019060010162001954565b509495945050505050565b8315158152826020820152606060408201526000620019a9606083018462001940565b95945050505050565b60008060008385036080811215620019c957600080fd5b84356001600160401b0380821115620019e157600080fd5b620019ef8883890162001790565b9550620019ff6020880162001686565b94506040603f198401121562001a1457600080fd5b6040519250604083019150828210818311171562001a365762001a366200163d565b50604090815285013581526060909401356020850152509093909250565b801515811462001a6357600080fd5b50565b60008060008060006080868803121562001a7f57600080fd5b853594506020860135935060408601356001600160401b0381111562001aa457600080fd5b62001ab2888289016200189c565b909450925050606086013562001ac88162001a54565b809150509295509295909350565b60018060a01b0384168152826020820152606060408201526000620019a9606083018462001940565b60005b8381101562001b1c57818101518382015260200162001b02565b838111156200099a5750506000910152565b6000815180845262001b4881602086016020860162001aff565b601f01601f19169290920160200192915050565b60408152600062001b71604083018462001b2e565b8281036020840152600381526205852560ec1b60208201526040810191505092915050565b60006020828403121562001ba957600080fd5b815162000ee58162001a54565b6020808252605e908201527f496e76616c69642062726964676520636f6e6669673a20546f6b656e2062726960408201527f6467652069737375696e67436861696e446f6f72206d7573742062652065717560608201527f616c20746f2069737375696e67436861696e49737375652e6973737565720000608082015260a00190565b60006020828403121562001c4c57600080fd5b81516001600160401b0381111562001c6357600080fd5b8201601f8101841362001c7557600080fd5b805162001c866200175582620016a3565b81815285602083850101111562001c9c57600080fd5b620019a982602083016020860162001aff565b60408152600062001cc4604083018562001b2e565b8281036020840152620019a9818562001b2e565b634e487b7160e01b600052603260045260246000fd5b60006020828403121562001d0157600080fd5b62000ee58262001686565b634e487b7160e01b600052601160045260246000fd5b600060001982141562001d395762001d3962001d0c565b5060010190565b670213934b233b2b2160c51b81526000835162001d6581600885016020880162001aff565b6201016960ed1b600891840191820152835162001d8a81600b84016020880162001aff565b01600b01949350505050565b600081600019048311821515161562001db35762001db362001d0c565b500290565b6000821982111562001dce5762001dce62001d0c565b500190565b60008162001de55762001de562001d0c565b50600019019056fe60806040523480156200001157600080fd5b5060405162000f7338038062000f73833981016040819052620000349162000251565b8151829082906200004d906003906020850190620000de565b50805162000063906004906020840190620000de565b505050620000806200007a6200008860201b60201c565b6200008c565b5050620002f8565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000ec90620002bb565b90600052602060002090601f0160209004810192826200011057600085556200015b565b82601f106200012b57805160ff19168380011785556200015b565b828001600101855582156200015b579182015b828111156200015b5782518255916020019190600101906200013e565b50620001699291506200016d565b5090565b5b808211156200016957600081556001016200016e565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620001ac57600080fd5b81516001600160401b0380821115620001c957620001c962000184565b604051601f8301601f19908116603f01168101908282118183101715620001f457620001f462000184565b816040528381526020925086838588010111156200021157600080fd5b600091505b8382101562000235578582018301518183018401529082019062000216565b83821115620002475760008385830101525b9695505050505050565b600080604083850312156200026557600080fd5b82516001600160401b03808211156200027d57600080fd5b6200028b868387016200019a565b93506020850151915080821115620002a257600080fd5b50620002b1858286016200019a565b9150509250929050565b600181811c90821680620002d057607f821691505b60208210811415620002f257634e487b7160e01b600052602260045260246000fd5b50919050565b610c6b80620003086000396000f3fe608060405234801561001057600080fd5b50600436106100eb5760003560e01c806370a082311161009257806370a08231146101a0578063715018a6146101c957806379cc6790146101d15780638da5cb5b146101e457806395d89b41146101ff578063a457c2d714610207578063a9059cbb1461021a578063dd62ed3e1461022d578063f2fde38b1461024057600080fd5b806306fdde03146100f0578063095ea7b31461010e57806318160ddd1461013157806323b872dd14610143578063313ce56714610156578063395093511461016557806340c10f191461017857806342966c681461018d575b600080fd5b6100f8610253565b6040516101059190610a6f565b60405180910390f35b61012161011c366004610ae0565b6102e5565b6040519015158152602001610105565b6002545b604051908152602001610105565b610121610151366004610b0a565b6102fd565b60405160128152602001610105565b610121610173366004610ae0565b610321565b61018b610186366004610ae0565b610343565b005b61018b61019b366004610b46565b610359565b6101356101ae366004610b5f565b6001600160a01b031660009081526020819052604090205490565b61018b610366565b61018b6101df366004610ae0565b61037a565b6005546040516001600160a01b039091168152602001610105565b6100f861038f565b610121610215366004610ae0565b61039e565b610121610228366004610ae0565b61041e565b61013561023b366004610b81565b61042c565b61018b61024e366004610b5f565b610457565b60606003805461026290610bb4565b80601f016020809104026020016040519081016040528092919081815260200182805461028e90610bb4565b80156102db5780601f106102b0576101008083540402835291602001916102db565b820191906000526020600020905b8154815290600101906020018083116102be57829003601f168201915b5050505050905090565b6000336102f38185856104cd565b5060019392505050565b60003361030b8582856105f2565b61031685858561066c565b506001949350505050565b6000336102f3818585610334838361042c565b61033e9190610bef565b6104cd565b61034b6107fe565b6103558282610858565b5050565b6103633382610905565b50565b61036e6107fe565b6103786000610a1d565b565b6103858233836105f2565b6103558282610905565b60606004805461026290610bb4565b600033816103ac828661042c565b9050838110156104115760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61031682868684036104cd565b6000336102f381858561066c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61045f6107fe565b6001600160a01b0381166104c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610408565b61036381610a1d565b6001600160a01b03831661052f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610408565b6001600160a01b0382166105905760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610408565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006105fe848461042c565b9050600019811461066657818110156106595760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610408565b61066684848484036104cd565b50505050565b6001600160a01b0383166106d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610408565b6001600160a01b0382166107325760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610408565b6001600160a01b038316600090815260208190526040902054818110156107aa5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610408565b6001600160a01b0384811660008181526020818152604080832087870390559387168083529184902080548701905592518581529092600080516020610c16833981519152910160405180910390a3610666565b6005546001600160a01b031633146103785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610408565b6001600160a01b0382166108ae5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610408565b80600260008282546108c09190610bef565b90915550506001600160a01b03821660008181526020818152604080832080548601905551848152600080516020610c16833981519152910160405180910390a35050565b6001600160a01b0382166109655760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610408565b6001600160a01b038216600090815260208190526040902054818110156109d95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610408565b6001600160a01b038316600081815260208181526040808320868603905560028054879003905551858152919291600080516020610c1683398151915291016105e5565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600060208083528351808285015260005b81811015610a9c57858101830151858201604001528201610a80565b81811115610aae576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610adb57600080fd5b919050565b60008060408385031215610af357600080fd5b610afc83610ac4565b946020939093013593505050565b600080600060608486031215610b1f57600080fd5b610b2884610ac4565b9250610b3660208501610ac4565b9150604084013590509250925092565b600060208284031215610b5857600080fd5b5035919050565b600060208284031215610b7157600080fd5b610b7a82610ac4565b9392505050565b60008060408385031215610b9457600080fd5b610b9d83610ac4565b9150610bab60208401610ac4565b90509250929050565b600181811c90821680610bc857607f821691505b60208210811415610be957634e487b7160e01b600052602260045260246000fd5b50919050565b60008219821115610c1057634e487b7160e01b600052601160045260246000fd5b50019056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a9df4775bb669b37e3d342f691e9d59ab438b4f2c907cfca0a73c86668ea940464736f6c634300080c0033a264697066735822122081a519022e5ce81af97e22f33353dc46323da2c244cb16b47443a05aec94909d64736f6c634300080c0033", - memory: evmtypes.Storage{}, // TODO: set library storage + name: XChainUtilsName, + address: XChainUtilsAddress, + bytecode: XChainUtilsBytecode, + memory: evmtypes.Storage{}, }, GenesisContract{ - name: "BridgeDoorMultiToken", - address: bridgeDoorAddress, - bytecode: "6080604052600436106101b25760003560e01c80635bafd0c1116100ed5780638da5cb5b116100905780638da5cb5b146104b957806395fa18dd146104d757806396d195bd146104f7578063a6c0873b14610519578063c45ddbc214610539578063c4d66de814610581578063d794559a146105a1578063e684ab76146105be578063f2fde38b146105de57600080fd5b80635bafd0c1146103dc5780635c975abb146103fc578063715018a61461041457806372e0376f1461042957806375f1d5041461045e5780638436c642146104715780638456cb59146104915780638d5cd5bd146104a657600080fd5b80633659cfe6116101555780633659cfe6146103095780633f2702e4146103295780633f4ba83a1461033c5780634072c3b3146103515780634a07d673146103665780634f1ef28614610386578063519454471461039957806352d1902d146103b957600080fd5b80630b2c50d2146101be57806310231036146101f9578063192dd3cc1461020e57806326aa101f1461022e5780632a983d3a1461025e5780632ca4cb531461028b5780632d92de741461029e57806334525b1b146102db57600080fd5b366101b957005b600080fd5b3480156101ca57600080fd5b506101de6101d9366004613779565b6105fe565b6040516101f096959493929190613805565b60405180910390f35b61020c61020736600461385f565b61077b565b005b34801561021a57600080fd5b5061020c61022936600461387c565b610883565b34801561023a57600080fd5b5061024e61024936600461385f565b610a02565b60405190151581526020016101f0565b34801561026a57600080fd5b5060fd5461027e906001600160a01b031681565b6040516101f091906138f3565b61020c610299366004613907565b610a87565b3480156102aa57600080fd5b506102be6102b9366004613954565b610b55565b6040805193845291151560208401521515908201526060016101f0565b3480156102e757600080fd5b506102fb6102f63660046139a5565b610b88565b6040516101f0929190613a34565b34801561031557600080fd5b5061020c61032436600461385f565b610ee2565b61020c610337366004613af1565b610fb4565b34801561034857600080fd5b5061020c611078565b34801561035d57600080fd5b5061020c611092565b34801561037257600080fd5b5061020c610381366004613b4f565b6110c9565b61020c610394366004613bdf565b6111d2565b3480156103a557600080fd5b5061024e6103b4366004613c2e565b611288565b3480156103c557600080fd5b506103ce6112db565b6040519081526020016101f0565b3480156103e857600080fd5b506103ce6103f7366004613779565b611389565b34801561040857600080fd5b5060c95460ff1661024e565b34801561042057600080fd5b5061020c6113d9565b34801561043557600080fd5b50610449610444366004613779565b6113eb565b604080519283526020830191909152016101f0565b61020c61046c366004613af1565b61140f565b34801561047d57600080fd5b5061020c61048c366004613c9d565b6114da565b34801561049d57600080fd5b5061020c6115e1565b6103ce6104b4366004613954565b6115f9565b3480156104c557600080fd5b506097546001600160a01b031661027e565b3480156104e357600080fd5b5061020c6104f2366004613af1565b6116f6565b34801561050357600080fd5b5061050c611824565b6040516101f09190613cf4565b34801561052557600080fd5b5061027e610534366004613779565b61189b565b34801561054557600080fd5b50610559610554366004613d41565b6118e8565b604080516001600160a01b0394851681529390921660208401521515908201526060016101f0565b34801561058d57600080fd5b5061020c61059c36600461385f565b611923565b3480156105ad57600080fd5b506103ce68015af1d78b58c4000081565b3480156105ca57600080fd5b5061020c6105d936600461385f565b611ad6565b3480156105ea57600080fd5b5061020c6105f936600461385f565b611b2d565b60008060606000806060600061061388611ba3565b60038101546004820154600683015460078401546005850180549596506001600160a01b0394851695938516949093928116929116906008870190849061065990613d85565b80601f016020809104026020016040519081016040528092919081815260200182805461068590613d85565b80156106d25780601f106106a7576101008083540402835291602001916106d2565b820191906000526020600020905b8154815290600101906020018083116106b557829003601f168201915b505050505093508080546106e590613d85565b80601f016020809104026020016040519081016040528092919081815260200182805461071190613d85565b801561075e5780601f106107335761010080835404028352916020019161075e565b820191906000526020600020905b81548152906001019060200180831161074157829003601f168201915b505050505090509650965096509650965096505091939550919395565b610783611bee565b7f54942c22b4f7613321d895cad0749836eeb5c8b282c630c4478e07913f814dbc816040516107b291906138f3565b60405180910390a168015af1d78b58c400003410156107e457604051636bbdb6db60e11b815260040160405180910390fd5b6107ed81610a02565b1561080b57604051633ea7ffd960e11b815260040160405180910390fd5b60fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610858576040519150601f19603f3d011682016040523d82523d6000602084013e61085d565b606091505b505090508061087f57604051638a48aa1f60e01b815260040160405180910390fd5b5050565b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906108b39033906004016138f3565b602060405180830381865afa1580156108d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190613dd5565b61091157604051631ce32a2360e31b815260040160405180910390fd5b610919611bee565b60006109258686611c34565b600381015490915060ff1661094d5760405163022af77760e11b815260040160405180910390fd5b60018101546001600160a01b0384811691161461097d57604051636edaef2f60e11b815260040160405180910390fd5b336000818152600283016020526040902080546001600160a01b0319166001600160a01b038516178155600101859055856109b788611389565b7f750bc14bd61ac34397f57970e1a0fd14fd27247cc77aa2b3c304e2e973c52a4087866040516109e8929190613df0565b60405180910390a46109fa8686611c56565b505050505050565b60fc54600090815b81811015610a7d57836001600160a01b031660fb600060fc8481548110610a3357610a33613e07565b600091825260208083209091015483528201929092526040019020600901546001600160a01b03161415610a6b575060019392505050565b80610a7581613e33565b915050610a0a565b5060009392505050565b610a8f611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f4986191610ad59187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015610af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b169190613dd5565b15610b2b57610b26838383611c97565b505050565b3415610b4a576040516311c36b7360e11b815260040160405180910390fd5b610b26838383611d78565b600080600080610b658686611f5b565b805460029091015490945060ff8082169450610100909104169150509250925092565b60fc5460408051600a808252610160820190925260609283929182816020015b610bb0613482565b815260200190600190039081610ba8579050509350816001600160401b03811115610bdd57610bdd61357d565b604051908082528060200260200182016040528015610c2257816020015b6040805180820190915260008082526020820152815260200190600190039081610bfb5790505b5092506000610c318387613ed0565b9050805b610c3f8483613eef565b81108015610c4c57508281105b15610ed95760fb600060fc8381548110610c6857610c68613e07565b60009182526020808320909101548352828101939093526040918201902081516080810183526003820180546001600160a01b039081168352845180860190955260048401805490911685526005909301805492959194868301949093909284019190610cd490613d85565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0090613d85565b8015610d4d5780601f10610d2257610100808354040283529160200191610d4d565b820191906000526020600020905b815481529060010190602001808311610d3057829003601f168201915b50505091909252505050815260038201546001600160a01b0390811660208084019190915260408051808201825260048601805490941681526005860180549290950194909392840191610da090613d85565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcc90613d85565b8015610e195780601f10610dee57610100808354040283529160200191610e19565b820191906000526020600020905b815481529060010190602001808311610dfc57829003601f168201915b5050509190925250505090525086610e318484613f07565b81518110610e4157610e41613e07565b602002602001018190525060fb600060fc8381548110610e6357610e63613e07565b9060005260206000200154815260200190815260200160002060010160405180604001604052908160008201548152602001600182015481525050858383610eab9190613f07565b81518110610ebb57610ebb613e07565b60200260200101819052508080610ed190613e33565b915050610c35565b50505050915091565b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b161415610f345760405162461bcd60e51b8152600401610f2b90613f1e565b60405180910390fd5b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b0316610f66611f8b565b6001600160a01b031614610f8c5760405162461bcd60e51b8152600401610f2b90613f6a565b610f9581611fa7565b60408051600080825260208201909252610fb191839190611faf565b50565b610fbc611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f49861916110029188916001600160a01b0390911690600401613ea6565b602060405180830381865af415801561101f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110439190613dd5565b15611059576110548484848461211a565b611072565b604051631cc6a69960e11b815260040160405180910390fd5b50505050565b61108061225f565b6110886122b9565b611090612302565b565b600054610100900460ff166110b95760405162461bcd60e51b8152600401610f2b90613fb6565b6110c161234e565b61109061237d565b6110d161225f565b6110d9611bee565b6110e282611389565b82516020808501518051908201516040808801516060890151805195015191517fe8155fae5a2ff8b2ff714dc22bb65489bdf14794bdc7e5802d7ba8e62f0c3ccf9661113396909594939091613805565b60405180910390a260fd546040516330fc908360e21b8152600091735a2819ffba212ced4f48188090031dd197293af69163c3f2420c916111849187916001600160a01b0316908790600401614001565b602060405180830381865af41580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c5919061403c565b9050610b268383836123ac565b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b16141561121b5760405162461bcd60e51b8152600401610f2b90613f1e565b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b031661124d611f8b565b6001600160a01b0316146112735760405162461bcd60e51b8152600401610f2b90613f6a565b61127c82611fa7565b61087f82826001611faf565b600061129261225f565b60001960018360018111156112a9576112a9614059565b14156112c2576000808551602087018985f491506112d2565b600080855160208701888a86f191505b50949350505050565b6000306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b16146113765760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c6044820152771b1959081d1a1c9bdd59da0819195b1959d85d1958d85b1b60421b6064820152608401610f2b565b5060008051602061438183398151915290565b8051602080830151805190820151604080860151606087015180519086015192516000976113bc97909695949101613805565b604051602081830303815290604052805190602001209050919050565b6113e161225f565b6110906000612531565b60008060006113f984611ba3565b6001810154600290910154909590945092505050565b611417611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f498619161145d9188916001600160a01b0390911690600401613ea6565b602060405180830381865af415801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e9190613dd5565b156114af5761105484848484612583565b34156114ce576040516311c36b7360e11b815260040160405180910390fd5b6110728484848461266a565b6114e2611bee565b600080606060006114f38888611c34565b600381015490915060ff1661151b5760405163022af77760e11b815260040160405180910390fd5b80546001600160a01b0316331461154557604051632a118c8960e01b815260040160405180910390fd5b61155188886000612850565b919550935091508583146115785760405163162908e360e11b815260040160405180910390fd5b33876115838a611389565b7f436897f58db529a6e27c5b7aa31967d35b9b81540e4c797b9322c1740441bf5489896040516115b4929190613df0565b60405180910390a46001600160a01b0384166115d7576115d7888887898661297d565b5050505050505050565b6115e961225f565b6115f1611bee565b6110906129e2565b6000611603611bee565b600061160e846113eb565b915050803414611631576040516311c36b7360e11b815260040160405180910390fd5b600061163e853386612a1f565b9050338161164b87611389565b7fc7ecca132ed5d1d6c462587819023eee197ef7fb00b399bbfc2ce032587f0c6d8760405161167a91906138f3565b60405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d80600081146116cf576040519150601f19603f3d011682016040523d82523d6000602084013e6116d4565b606091505b50509050806112d257604051638a48aa1f60e01b815260040160405180910390fd5b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906117269033906004016138f3565b602060405180830381865afa158015611743573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117679190613dd5565b61178457604051631ce32a2360e31b815260040160405180910390fd5b61178c611bee565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f49861916117d29188916001600160a01b0390911690600401613ea6565b602060405180830381865af41580156117ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118139190613dd5565b156110595761105484848484612a94565b60fd546040805163a0e67e2b60e01b815290516060926001600160a01b03169163a0e67e2b9160048083019260009291908290030181865afa15801561186e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261189691908101906140f7565b905090565b6000806118a783611ba3565b60098101549091506001600160a01b03166118d55760405163258b5e0560e21b815260040160405180910390fd5b600901546001600160a01b031692915050565b6000806000806118f88686611c34565b805460018201546003909201546001600160a01b0391821696509116935060ff169150509250925092565b600054610100900460ff16158080156119435750600054600160ff909116105b8061195d5750303b15801561195d575060005460ff166001145b6119c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610f2b565b6000805460ff1916600117905580156119e3576000805461ff0019166101001790555b306001600160a01b037f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b161415611a2c5760405162461bcd60e51b8152600401610f2b90613f1e565b7f000000000000000000000000f35225d1d59e77ee66012f5bf4c41675a3d2ec7b6001600160a01b0316611a5e611f8b565b6001600160a01b031614611a845760405162461bcd60e51b8152600401610f2b90613f6a565b611a8d82611ad6565b801561087f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b600054610100900460ff16611afd5760405162461bcd60e51b8152600401610f2b90613fb6565b611b05612d49565b611b0d611092565b60fd80546001600160a01b0319166001600160a01b038316179055610fb1815b611b3561225f565b6001600160a01b038116611b9a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f2b565b610fb181612531565b60008060fb6000611bb385611389565b81526020810191909152604001600020805490915060ff16611be8576040516331f0d02960e11b815260040160405180910390fd5b92915050565b60c95460ff16156110905760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610f2b565b600080611c4084611ba3565b6000938452600b01602052505060409020919050565b6000806060611c6785856001612850565b919450925090506001600160a01b038316611c83575050505050565b611c90858585858561297d565b5050505050565b611c9f611bee565b3415610b265780341015611cc6576040516311c36b7360e11b815260040160405180910390fd5b3382611cd185611389565b6040518481527f32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa19060200160405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114611d51576040519150601f19603f3d011682016040523d82523d6000602084013e611d56565b606091505b505090508061107257604051638a48aa1f60e01b815260040160405180910390fd5b611d80611bee565b3382611d8b85611389565b6040518481527f32783b18313608dabbcd9856301a7fa07369fd1c09a56fbef10659aa5f699fa19060200160405180910390a460fd54604051630d51a60f60e31b8152735a2819ffba212ced4f48188090031dd197293af691636a8d307891611e049187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015611e21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e459190613dd5565b15611eee576000611e558461189b565b60fd546040516323b872dd60e01b81526001600160a01b03928316926323b872dd92611e8b92339290911690879060040161412b565b6020604051808303816000875af1158015611eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ece9190613dd5565b90508061107257604051638a48aa1f60e01b815260040160405180910390fd5b611ef78361189b565b6001600160a01b03166379cc679033836040518363ffffffff1660e01b8152600401611f2492919061414f565b600060405180830381600087803b158015611f3e57600080fd5b505af1158015611f52573d6000803e3d6000fd5b50505050505050565b600080611f6784611ba3565b6001600160a01b0384166000908152600c9091016020526040902091505092915050565b600080516020614381833981519152546001600160a01b031690565b610fb161225f565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611fe257610b2683612d70565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561203c575060408051601f3d908101601f1916820190925261203991810190614168565b60015b61209f5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610f2b565b600080516020614381833981519152811461210e5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610f2b565b50610b26838383612e0c565b612122611bee565b60008061212e866113eb565b915091508083101561215357604051636bbdb6db60e11b815260040160405180910390fd5b8184101561217457604051632ca2f52b60e11b815260040160405180910390fd5b61217e8484613eef565b34101561219e576040516311c36b7360e11b815260040160405180910390fd5b6001600160a01b038516336121b288611389565b60408051888152602081018890527f32ebca0d0dd8fc03a488dcaab22112132af86cbc4c2df086bc7f328d751f5d7e910160405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612238576040519150601f19603f3d011682016040523d82523d6000602084013e61223d565b606091505b5050905080611f5257604051638a48aa1f60e01b815260040160405180910390fd5b6097546001600160a01b031633146110905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f2b565b60c95460ff166110905760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610f2b565b61230a6122b9565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161234491906138f3565b60405180910390a1565b600054610100900460ff166123755760405162461bcd60e51b8152600401610f2b90613fb6565b611090612e31565b600054610100900460ff166123a45760405162461bcd60e51b8152600401610f2b90613fb6565b611090612e64565b60006123b784611389565b600081815260fb6020526040902080549192509060ff16156123eb5760405162b84eb160e51b815260040160405180910390fd5b600082815260fb602090815260409091208054600160ff199091168117825586519082015585820151600282015586516003820180546001600160a01b03199081166001600160a01b0393841617825589850151805160048601805490931694169390931781558285015180518b969395929361246d936005019201906134e4565b50505060408201516003820180546001600160a01b03199081166001600160a01b039384161790915560608401518051600485018054909316931692909217815560208083015180516124c692600587019201906134e4565b505050600084815260fb6020526040812060090180546001600160a01b0319166001600160a01b039790971696909617909555505060fc80546001810182559352507f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c0909101555050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61258b611bee565b341561107257803410156125b2576040516311c36b7360e11b815260040160405180910390fd5b33826125bd86611389565b7f290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a1184876040516125ee929190613df0565b60405180910390a460fd546040516000916001600160a01b03169034908381818185875af1925050503d8060008114612643576040519150601f19603f3d011682016040523d82523d6000602084013e612648565b606091505b5050905080611c9057604051638a48aa1f60e01b815260040160405180910390fd5b612672611bee565b338261267d86611389565b7f290bb2c4e47aea59589d24c5b64f7033109290d4636d646112f2d4b442b32a1184876040516126ae929190613df0565b60405180910390a460fd54604051630d51a60f60e31b8152735a2819ffba212ced4f48188090031dd197293af691636a8d3078916126fc9188916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015612719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273d9190613dd5565b156127ec57600061274d8561189b565b60fd546040516323b872dd60e01b81526001600160a01b03928316926323b872dd9261278392339290911690879060040161412b565b6020604051808303816000875af11580156127a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c69190613dd5565b9050806127e657604051638a48aa1f60e01b815260040160405180910390fd5b50611072565b6127f58461189b565b6001600160a01b03166379cc679033836040518363ffffffff1660e01b815260040161282292919061414f565b600060405180830381600087803b15801561283c57600080fd5b505af11580156115d7573d6000803e3d6000fd5b600080606060006128618787611c34565b9050600061286d611824565b9050600080735a2819ffba212ced4f48188090031dd197293af663df4bc1898560fd60009054906101000a90046001600160a01b03166001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156128e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129049190614168565b868c6040518563ffffffff1660e01b815260040161292594939291906141ba565b600060405180830381865af4158015612942573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261296a91908101906141ec565b919c909b50909950975050505050505050565b6129878585612e94565b826001600160a01b03168461299b87611389565b6040518581527e87db26e45ef9d7e62d7966c0bc6310075c3e120cae4af40d1791e1b01f7e719060200160405180910390a46129d8858484612ee3565b611c908582612f85565b6129ea611bee565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123373390565b600080612a2b85611ba3565b90506000612a3886612fe5565b6000818152600b93909301602052604090922080546001600160a01b03199081166001600160a01b03978816178255600180830180549092169690971695909517909455506003909201805460ff191690931790925592915050565b60fd546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e90612ac49033906004016138f3565b602060405180830381865afa158015612ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b059190613dd5565b612b2257604051631ce32a2360e31b815260040160405180910390fd5b612b2a611bee565b6000612b35856113eb565b50905080831015612b5957604051632ca2f52b60e11b815260040160405180910390fd5b6000612b658686611f5b565b6002810154909150610100900460ff16612b8457612b84868685613010565b6000612b908787611f5b565b600281015490915060ff1615612bb95760405163e242fbdf60e01b815260040160405180910390fd5b33600081815260018301602052604090208690556001600160a01b03871690612be189611389565b6040518881527f64f8fc141a8c2d310942bbc5236041fa0a0c6c39a9fb295be5c959224382815e9060200160405180910390a46060600080735a2819ffba212ced4f48188090031dd197293af663561f3ce98560fd60009054906101000a90046001600160a01b03166001600160a01b031663e75235b86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cab9190614168565b612cb3611824565b6040518463ffffffff1660e01b8152600401612cd193929190614245565b600060405180830381865af4158015612cee573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612d169190810190614264565b9450925090508015612d3d5760028401805460ff19166001179055612d3d8a8a848661304f565b50505050505050505050565b600054610100900460ff166110905760405162461bcd60e51b8152600401610f2b90613fb6565b6001600160a01b0381163b612ddd5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610f2b565b60008051602061438183398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612e15836130a6565b600082511180612e225750805b15610b265761107283836130e6565b600054610100900460ff16612e585760405162461bcd60e51b8152600401610f2b90613fb6565b60c9805460ff19169055565b600054610100900460ff16612e8b5760405162461bcd60e51b8152600401610f2b90613fb6565b61109033612531565b600060fb6000612ea385611389565b8152602001908152602001600020600b01600083815260200190815260200160002060030160006101000a81548160ff0219169083151502179055505050565b60fd546040516358f4986160e01b8152735a2819ffba212ced4f48188090031dd197293af6916358f4986191612f299187916001600160a01b0390911690600401613ea6565b602060405180830381865af4158015612f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f6a9190613dd5565b15612f7a57610b2683838361310b565b610b26838383613115565b6000612f90836113eb565b835190925090506000612fa382846142a4565b905060005b828110156109fa57612fd3858281518110612fc557612fc5613e07565b6020026020010151836132ca565b80612fdd81613e33565b915050612fa8565b600080612ff183611ba3565b905061300381600a0180546001019055565b600a8101545b9392505050565b600061301b84611ba3565b6001600160a01b039093166000908152600c909301602052506040909120908155600201805461ffff191661010017905550565b826001600160a01b03167f85841522199c696c3d4a549fea06732153559ded5db5cf6dfa3bb099827f2c848360405161308a91815260200190565b60405180910390a261309c83836132ca565b6110728482612f85565b6130af81612d70565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b606061300983836040518060600160405280602781526020016143a160279139613362565b610b2682826132ca565b60fd54604051630d51a60f60e31b8152606091735a2819ffba212ced4f48188090031dd197293af691636a8d30789161315c9188916001600160a01b031690600401613ea6565b602060405180830381865af4158015613179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061319d9190613dd5565b156131e65782826040516024016131b592919061414f565b60408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b1790529050613226565b82826040516024016131f992919061414f565b60408051601f198184030181529190526020810180516001600160e01b03166340c10f1960e01b17905290505b60fd546000906001600160a01b031663468721a76132438761189b565b60008560006040518563ffffffff1660e01b815260040161326794939291906142e8565b6020604051808303816000875af1158015613286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132aa9190613dd5565b905080611c9057604051638a48aa1f60e01b815260040160405180910390fd5b60fd5460405163468721a760e01b81526000916001600160a01b03169063468721a7906132ff9086908690869060040161431e565b6020604051808303816000875af115801561331e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133429190613dd5565b905080610b2657604051638a48aa1f60e01b815260040160405180910390fd5b6060600080856001600160a01b03168560405161337f9190614351565b600060405180830381855af49150503d80600081146133ba576040519150601f19603f3d011682016040523d82523d6000602084013e6133bf565b606091505b50915091506133d0868383876133da565b9695505050505050565b6060831561344657825161343f576001600160a01b0385163b61343f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f2b565b5081613450565b6134508383613458565b949350505050565b8151156134685781518083602001fd5b8060405162461bcd60e51b8152600401610f2b919061436d565b604051806080016040528060006001600160a01b031681526020016134b860408051808201909152600081526060602082015290565b8152600060208201526040016134df60408051808201909152600081526060602082015290565b905290565b8280546134f090613d85565b90600052602060002090601f0160209004810192826135125760008555613558565b82601f1061352b57805160ff1916838001178555613558565b82800160010185558215613558579182015b8281111561355857825182559160200191906001019061353d565b50613564929150613568565b5090565b5b808211156135645760008155600101613569565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156135b5576135b561357d565b60405290565b604051601f8201601f191681016001600160401b03811182821017156135e3576135e361357d565b604052919050565b6001600160a01b0381168114610fb157600080fd5b60006001600160401b038311156136195761361961357d565b61362c601f8401601f19166020016135bb565b905082815283838301111561364057600080fd5b828260208301376000602084830101529392505050565b60006040828403121561366957600080fd5b613671613593565b9050813561367e816135eb565b815260208201356001600160401b0381111561369957600080fd5b8201601f810184136136aa57600080fd5b6136b984823560208401613600565b60208301525092915050565b6000608082840312156136d757600080fd5b604051608081016001600160401b0382821081831117156136fa576136fa61357d565b816040528293508435915061370e826135eb565b9082526020840135908082111561372457600080fd5b61373086838701613657565b602084015260408501359150613745826135eb565b816040840152606085013591508082111561375f57600080fd5b5061376c85828601613657565b6060830152505092915050565b60006020828403121561378b57600080fd5b81356001600160401b038111156137a157600080fd5b613450848285016136c5565b60005b838110156137c85781810151838201526020016137b0565b838111156110725750506000910152565b600081518084526137f18160208601602086016137ad565b601f01601f19169290920160200192915050565b600060018060a01b038089168352808816602084015260c0604084015261382f60c08401886137d9565b8187166060850152818616608085015283810360a085015261385181866137d9565b9a9950505050505050505050565b60006020828403121561387157600080fd5b8135613009816135eb565b600080600080600060a0868803121561389457600080fd5b85356001600160401b038111156138aa57600080fd5b6138b6888289016136c5565b955050602086013593506040860135925060608601356138d5816135eb565b915060808601356138e5816135eb565b809150509295509295909350565b6001600160a01b0391909116815260200190565b60008060006060848603121561391c57600080fd5b83356001600160401b0381111561393257600080fd5b61393e868287016136c5565b9660208601359650604090950135949350505050565b6000806040838503121561396757600080fd5b82356001600160401b0381111561397d57600080fd5b613989858286016136c5565b925050602083013561399a816135eb565b809150509250929050565b6000602082840312156139b757600080fd5b5035919050565b60018060a01b038151168252600060208201516040602085015261345060408501826137d9565b600081518084526020808501945080840160005b83811015613a2957613a1687835180518252602090810151910152565b60409690960195908201906001016139f9565b509495945050505050565b60006040808301818452808651808352606092508286019150828160051b8701016020808a0160005b84811015613ad157898403605f19018652815180516001600160a01b0390811686528482015160808688018190529190613a99838901826139be565b848d0151909216888d015250918901518683038a880152919050613abd81836139be565b978501979550505090820190600101613a5d565b505087820390880152613ae481896139e5565b9998505050505050505050565b60008060008060808587031215613b0757600080fd5b84356001600160401b03811115613b1d57600080fd5b613b29878288016136c5565b9450506020850135613b3a816135eb565b93969395505050506040820135916060013590565b6000808284036060811215613b6357600080fd5b83356001600160401b03811115613b7957600080fd5b613b85868287016136c5565b9350506040601f1982011215613b9a57600080fd5b50613ba3613593565b6020840135815260408401356020820152809150509250929050565b600082601f830112613bd057600080fd5b61300983833560208501613600565b60008060408385031215613bf257600080fd5b8235613bfd816135eb565b915060208301356001600160401b03811115613c1857600080fd5b613c2485828601613bbf565b9150509250929050565b60008060008060808587031215613c4457600080fd5b8435613c4f816135eb565b93506020850135925060408501356001600160401b03811115613c7157600080fd5b613c7d87828801613bbf565b925050606085013560028110613c9257600080fd5b939692955090935050565b60008060008060808587031215613cb357600080fd5b84356001600160401b03811115613cc957600080fd5b613cd5878288016136c5565b94505060208501359250604085013591506060850135613c92816135eb565b6020808252825182820181905260009190848201906040850190845b81811015613d355783516001600160a01b031683529284019291840191600101613d10565b50909695505050505050565b60008060408385031215613d5457600080fd5b82356001600160401b03811115613d6a57600080fd5b613d76858286016136c5565b95602094909401359450505050565b600181811c90821680613d9957607f821691505b60208210811415613dba57634e487b7160e01b600052602260045260246000fd5b50919050565b80518015158114613dd057600080fd5b919050565b600060208284031215613de757600080fd5b61300982613dc0565b9182526001600160a01b0316602082015260400190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613e4757613e47613e1d565b5060010190565b600060018060a01b03808351168452602083015160806020860152613e7660808601826139be565b9050816040850151166040860152606084015191508481036060860152613e9d81836139be565b95945050505050565b604081526000613eb96040830185613e4e565b905060018060a01b03831660208301529392505050565b6000816000190483118215151615613eea57613eea613e1d565b500290565b60008219821115613f0257613f02613e1d565b500190565b600082821015613f1957613f19613e1d565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6080815260006140146080830186613e4e565b6001600160a01b03851660208401529050613450604083018480518252602090810151910152565b60006020828403121561404e57600080fd5b8151613009816135eb565b634e487b7160e01b600052602160045260246000fd5b600082601f83011261408057600080fd5b815160206001600160401b0382111561409b5761409b61357d565b8160051b6140aa8282016135bb565b92835284810182019282810190878511156140c457600080fd5b83870192505b848310156140ec5782516140dd816135eb565b825291830191908301906140ca565b979650505050505050565b60006020828403121561410957600080fd5b81516001600160401b0381111561411f57600080fd5b6134508482850161406f565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b60006020828403121561417a57600080fd5b5051919050565b600081518084526020808501945080840160005b83811015613a295781516001600160a01b031687529582019590820190600101614195565b8481528360208201526080604082015260006141d96080830185614181565b9050821515606083015295945050505050565b60008060006060848603121561420157600080fd5b835161420c816135eb565b6020850151604086015191945092506001600160401b0381111561422f57600080fd5b61423b8682870161406f565b9150509250925092565b838152826020820152606060408201526000613e9d6060830184614181565b60008060006060848603121561427957600080fd5b61428284613dc0565b92506020840151915060408401516001600160401b0381111561422f57600080fd5b6000826142c157634e487b7160e01b600052601260045260246000fd5b500490565b600281106142e457634e487b7160e01b600052602160045260246000fd5b9052565b60018060a01b038516815283602082015260806040820152600061430f60808301856137d9565b9050613e9d60608301846142c6565b6001600160a01b03841681526020810183905260806040820181905260009082015260a0810161345060608301846142c6565b600082516143638184602087016137ad565b9190910192915050565b60208152600061300960208301846137d956fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122015fb8364cec436767d9aa40830bdb81e639b63ea6b2797ecd5863642975f7ba364736f6c634300080c0033", + name: bridgeDoorMultiTokenName, + address: bridgeDoorMultiTokenAddress, + bytecode: bridgeDoorMultiTokenBytecode, memory: evmtypes.Storage{ evmtypes.State{ Key: "0x" + padZeroes("0"), @@ -246,9 +240,9 @@ func getGenesisContracts(witnesses []string, threshold int64, bridge *BridgeInit }, }, }, GenesisContract{ - name: "ProxyBridgeDoorMultiToken", + name: BridgeProxyModuleName, address: BridgeProxyModuleAddress, - bytecode: "60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e8383604051806060016040528060278152602001610268602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e09190610218565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101ac5782516101a5576001600160a01b0385163b6101a55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b6565b6101b683836101be565b949350505050565b8151156101ce5781518083602001fd5b8060405162461bcd60e51b815260040161019c9190610234565b60005b838110156102035781810151838201526020016101eb565b83811115610212576000848401525b50505050565b6000825161022a8184602087016101e8565b9190910192915050565b60208152600082518060208401526102538160408501602087016101e8565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220ff8e6f2d761d58b3bd984933269e01a7ff1f70a460b808056daa4cff1ee8ab6964736f6c63430008090033", + bytecode: BridgeProxyModuleBytecode, memory: bridgeProxyStorage, }), nil } diff --git a/cmd/exrpd/cmd/gencontracts.go b/cmd/exrpd/cmd/gencontracts.go index 544c1bf..7502538 100644 --- a/cmd/exrpd/cmd/gencontracts.go +++ b/cmd/exrpd/cmd/gencontracts.go @@ -93,7 +93,7 @@ func AddGenesisContractsCmd(defaultNodeHome string) *cobra.Command { return fmt.Errorf("failed to validate new genesis account: %w", err) } - if contract.name == safeContractName { + if contract.name == safeProxyName { coins, err := sdk.ParseCoinsNormalized(safeInitCoins) if err != nil { return fmt.Errorf("failed to parse coins: %w", err)