From cf420de20b93ecd5d8513f48fe333b3f5ccf508b Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Wed, 4 Dec 2024 18:12:32 +0200 Subject: [PATCH] Changed the queueMessage function. --- contracts/generated/EthereumBridge/EthereumBridge.go | 2 +- contracts/generated/ObscuroBridge/ObscuroBridge.go | 2 +- contracts/src/bridge/L1/ObscuroBridge.sol | 3 ++- contracts/src/bridge/L2/EthereumBridge.sol | 2 +- .../src/messaging/messenger/CrossChainEnabledObscuro.sol | 5 +++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/contracts/generated/EthereumBridge/EthereumBridge.go b/contracts/generated/EthereumBridge/EthereumBridge.go index b6d8fe96b0..29789ec2cc 100644 --- a/contracts/generated/EthereumBridge/EthereumBridge.go +++ b/contracts/generated/EthereumBridge/EthereumBridge.go @@ -32,7 +32,7 @@ var ( // EthereumBridgeMetaData contains all meta data concerning the EthereumBridge contract. var EthereumBridgeMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"remoteAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"localAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"CreatedWrappedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messengerAddress\",\"type\":\"address\"}],\"name\":\"configure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"wrappedToken\",\"type\":\"address\"}],\"name\":\"hasTokenMapping\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messenger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"remoteBridge\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"localToRemoteToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"crossChainAddress\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"onCreateTokenCommand\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"receiveAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"remoteToLocalToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"wrappedTokens\",\"outputs\":[{\"internalType\":\"contractWrappedERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x60806040526001805463ffffffff60a01b19169055348015601f57600080fd5b5061284c8061002f6000396000f3fe6080604052600436106100b45760003560e01c806383bece4d116100695780639e405b711161004e5780639e405b711461021b578063a381c8e214610251578063d5c6b50414610264576100da565b806383bece4d146101b35780639813c7b2146101d3576100da565b8063458ffd631161009a578063458ffd6314610153578063485cc9551461017357806375cb267214610193576100da565b80628d48e3146100f25780631888d7121461013e576100da565b366100da5760405162461bcd60e51b81526004016100d190610c14565b60405180910390fd5b60405162461bcd60e51b81526004016100d190610c5e565b3480156100fe57600080fd5b5061012861010d366004610ca1565b6004602052600090815260409020546001600160a01b031681565b6040516101359190610cd6565b60405180910390f35b61015161014c366004610ca1565b6102a7565b005b34801561015f57600080fd5b5061015161016e366004610d36565b610349565b34801561017f57600080fd5b5061015161018e366004610dc3565b6104a3565b34801561019f57600080fd5b506101516101ae366004610ca1565b61060e565b3480156101bf57600080fd5b506101516101ce366004610e0c565b6106e9565b3480156101df57600080fd5b5061020e6101ee366004610ca1565b6001600160a01b0390811660009081526002602052604090205416151590565b6040516101359190610e5d565b34801561022757600080fd5b50610128610236366004610ca1565b6003602052600090815260409020546001600160a01b031681565b61015161025f366004610e0c565b61081e565b34801561027057600080fd5b5061029a61027f366004610ca1565b6002602052600090815260409020546001600160a01b031681565b6040516101359190610e8a565b600034116102c75760405162461bcd60e51b81526004016100d190610eca565b6001546040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063346633fb9034906103149085908390600401610ee0565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b505050505050565b6005546000546001600160a01b039182169116331461037a5760405162461bcd60e51b81526004016100d190610f53565b806001600160a01b031661038c6109ba565b6001600160a01b0316146103b25760405162461bcd60e51b81526004016100d190610fbb565b6000858585856040516103c490610bad565b6103d19493929190610ff7565b604051809103906000f0801580156103ed573d6000803e3d6000fd5b506001600160a01b038082166000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90610491908a9084908b908b908b908b90611028565b60405180910390a15050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156104ee5750825b905060008267ffffffffffffffff16600114801561050b5750303b155b905081158015610519575080155b15610550576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561058457845468ff00000000000000001916680100000000000000001785555b61058d8761060e565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038816179055831561060557845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906105fc90600190611092565b60405180910390a15b50505050505050565b610616610a37565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604080517fa1a227fa000000000000000000000000000000000000000000000000000000008152905163a1a227fa916004808201926020929091908290030181865afa158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b991906110ab565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6005546000546001600160a01b039182169116331461071a5760405162461bcd60e51b81526004016100d190610f53565b806001600160a01b031661072c6109ba565b6001600160a01b0316146107525760405162461bcd60e51b81526004016100d190610fbb565b6001600160a01b0380851660009081526004602090815260408083205484168084526002909252909120549091168061079d5760405162461bcd60e51b81526004016100d190611122565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063979005ad906107e49087908990600401610ee0565b600060405180830381600087803b1580156107fe57600080fd5b505af1158015610812573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166108555760405162461bcd60e51b81526004016100d190611164565b6001600160a01b03808416600090815260026020526040908190205490517f1dd319cb0000000000000000000000000000000000000000000000000000000081529116908190631dd319cb906108b19033908790600401610ee0565b600060405180830381600087803b1580156108cb57600080fd5b505af11580156108df573d6000803e3d6000fd5b5050506001600160a01b038086166000908152600360205260408082205490519193507f83bece4d00000000000000000000000000000000000000000000000000000000926109379291169087908790602401611174565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506109b3906001600160a01b03168260008080610aa0565b5050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3291906110ab565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610a9e576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610ad69190611243565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa91349174010000000000000000000000000000000000000000900463ffffffff16906014610b2a83611283565b91906101000a81548163ffffffff021916908363ffffffff1602179055508785876040518663ffffffff1660e01b8152600401610b6a94939291906112bb565b60206040518083038185885af1158015610b88573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610605919061131b565b6114dc8061133b83390190565b60238152602081017f436f6e747261637420646f6573206e6f7420737570706f72742072656365697681527f6528290000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101610c2481610bba565b92915050565b601d8152602081017f66616c6c6261636b2829206d6574686f6420756e737570706f72746564000000815290505b60200190565b60208082528101610c2481610c2a565b60006001600160a01b038216610c24565b610c8881610c6e565b8114610c9357600080fd5b50565b8035610c2481610c7f565b600060208284031215610cb657610cb6600080fd5b610cc08383610c96565b9392505050565b610cd081610c6e565b82525050565b60208101610c248284610cc7565b60008083601f840112610cf957610cf9600080fd5b50813567ffffffffffffffff811115610d1457610d14600080fd5b602083019150836001820283011115610d2f57610d2f600080fd5b9250929050565b600080600080600060608688031215610d5157610d51600080fd5b610d5b8787610c96565b9450602086013567ffffffffffffffff811115610d7a57610d7a600080fd5b610d8688828901610ce4565b9450945050604086013567ffffffffffffffff811115610da857610da8600080fd5b610db488828901610ce4565b92509250509295509295909350565b60008060408385031215610dd957610dd9600080fd5b610de38484610c96565b9150610df28460208501610c96565b90509250929050565b80610c88565b8035610c2481610dfb565b600080600060608486031215610e2457610e24600080fd5b610e2e8585610c96565b9250610e3d8560208601610e01565b9150610e4c8560408601610c96565b90509250925092565b801515610cd0565b60208101610c248284610e55565b6000610c2482610c6e565b6000610c2482610e6b565b610cd081610e76565b60208101610c248284610e81565b600d8152602081017f4e6f7468696e672073656e742e0000000000000000000000000000000000000081529050610c58565b60208082528101610c2481610e98565b80610cd0565b60408101610eee8285610cc7565b610cc06020830184610eda565b60308152602081017f436f6e74726163742063616c6c6572206973206e6f742074686520726567697381527f7465726564206d657373656e676572210000000000000000000000000000000060208201529050610c0e565b60208082528101610c2481610efb565b60318152602081017f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2081527f696e636f72726563742073656e6465722100000000000000000000000000000060208201529050610c0e565b60208082528101610c2481610f63565b82818337506000910152565b818352602083019250610feb828483610fcb565b50601f01601f19160190565b60408082528101611009818688610fd7565b9050818103602083015261101e818486610fd7565b9695505050505050565b608081016110368289610cc7565b6110436020830188610cc7565b8181036040830152611056818688610fd7565b9050818103606083015261106b818486610fd7565b98975050505050505050565b600067ffffffffffffffff8216610c24565b610cd081611077565b60208101610c248284611089565b8051610c2481610c7f565b6000602082840312156110c0576110c0600080fd5b610cc083836110a0565b602b8152602081017f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726181527f7070656420746f6b656e2100000000000000000000000000000000000000000060208201529050610c0e565b60208082528101610c24816110ca565b60158152602081017f4e6f206d617070696e6720666f7220746f6b656e2e000000000000000000000081529050610c58565b60208082528101610c2481611132565b606081016111828286610cc7565b61118f6020830185610eda565b61119c6040830184610cc7565b949350505050565b60005b838110156111bf5781810151838201526020016111a7565b50506000910152565b60006111d2825190565b8084526020840193506111e98185602086016111a4565b601f01601f19169290920192915050565b8051600090606084019061120e8582610cc7565b506020830151848203602086015261122682826111c8565b915050604083015161123b6040860182610eda565b509392505050565b60208082528101610cc081846111fa565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff16600063fffffffe19820161129f5761129f611254565b5060010190565b63ffffffff8116610cd0565b60ff8116610cd0565b608081016112c982876112a6565b6112d660208301866112a6565b81810360408301526112e881856111c8565b90506112f760608301846112b2565b95945050505050565b67ffffffffffffffff8116610c88565b8051610c2481611300565b60006020828403121561133057611330600080fd5b610cc0838361131056fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f317905534801561003657600080fd5b506040516114dc3803806114dc83398101604081905261005591610276565b81818181600361006583826103ce565b50600461007282826103ce565b50505050506100a77fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336100af60201b60201c565b50505061048d565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff166101555760008381526007602090815260408083206001600160a01b03861684529091529020805460ff1916600117905561010d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610159565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681016001600160401b038111828210171561019a5761019a61015f565b6040525050565b60006101ac60405190565b90506101b88282610175565b919050565b60006001600160401b038211156101d6576101d661015f565b601f19601f83011660200192915050565b60005b838110156102025781810151838201526020016101ea565b50506000910152565b600061021e610219846101bd565b6101a1565b905082815283838301111561023557610235600080fd5b6102438360208301846101e7565b9392505050565b600082601f83011261025e5761025e600080fd5b815161026e84826020860161020b565b949350505050565b6000806040838503121561028c5761028c600080fd5b82516001600160401b038111156102a5576102a5600080fd5b6102b18582860161024a565b602085015190935090506001600160401b038111156102d2576102d2600080fd5b6102de8582860161024a565b9150509250929050565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061031257607f821691505b602082108103610324576103246102e8565b50919050565b60006101596103368381565b90565b6103428361032a565b815460001960089490940293841b1916921b91909117905550565b600061036a818484610339565b505050565b8181101561038a5761038260008261035d565b60010161036f565b5050565b601f82111561036a576000818152602090206020601f850104810160208510156103b55750805b6103c76020601f86010483018261036f565b5050505050565b81516001600160401b038111156103e7576103e761015f565b6103f182546102fe565b6103fc82828561038e565b506020601f82116001811461043157600083156104195750848201515b600019600885021c19811660028502178555506103c7565b600084815260208120601f198516915b828110156104615787850151825560209485019460019092019101610441565b508482101561047e5783870151600019601f87166008021c191681555b50505050600202600101905550565b6110408061049c6000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806336568abe116100cd578063979005ad11610081578063a9059cbb11610066578063a9059cbb146102ce578063d547741f146102e1578063dd62ed3e146102f457600080fd5b8063979005ad146102b3578063a217fddf146102c657600080fd5b806375b238fc116100b257806375b238fc1461024b57806391d148541461027257806395d89b41146102ab57600080fd5b806336568abe1461022557806370a082311461023857600080fd5b80631dd319cb11610124578063248a9ca311610109578063248a9ca3146101e05780632f2ff15d14610203578063313ce5671461021657600080fd5b80631dd319cb146101b857806323b872dd146101cd57600080fd5b806301ffc9a71461015657806306fdde031461017f578063095ea7b31461019457806318160ddd146101a7575b600080fd5b610169610164366004610c49565b610307565b6040516101769190610c72565b60405180910390f35b6101876103a0565b6040516101769190610cd6565b6101696101a2366004610d1d565b610432565b6002545b6040516101769190610d5b565b6101cb6101c6366004610d1d565b61044a565b005b6101696101db366004610d69565b6104b4565b6101ab6101ee366004610db2565b60009081526007602052604090206001015490565b6101cb610211366004610dd1565b6104da565b60126040516101769190610e09565b6101cb610233366004610dd1565b610505565b6101ab610246366004610e17565b610551565b6101ab7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b610169610280366004610dd1565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101876105c7565b6101cb6102c1366004610d1d565b6105d6565b6101ab600081565b6101696102dc366004610d1d565b61060a565b6101cb6102ef366004610dd1565b610618565b6101ab610302366004610e36565b61063d565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061039a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103af90610e6c565b80601f01602080910402602001604051908101604052809291908181526020018280546103db90610e6c565b80156104285780601f106103fd57610100808354040283529160200191610428565b820191906000526020600020905b81548152906001019060200180831161040b57829003601f168201915b5050505050905090565b6000336104408185856106f8565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561047481610705565b8161047e84610551565b10156104a55760405162461bcd60e51b815260040161049c90610ecc565b60405180910390fd5b6104af8383610712565b505050565b6000336104c285828561074c565b6104cd8585856107b2565b60019150505b9392505050565b6000828152600760205260409020600101546104f581610705565b6104ff8383610811565b50505050565b6001600160a01b0381163314610547576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104af82826108bf565b60006001600160a01b0382163203610581576001600160a01b03821660009081526020819052604090205461039a565b6001600160a01b03821633036105af576001600160a01b03821660009081526020819052604090205461039a565b60405162461bcd60e51b815260040161049c90610f0e565b6060600480546103af90610e6c565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561060081610705565b6104af8383610946565b6000336104408185856107b2565b60008281526007602052604090206001015461063381610705565b6104ff83836108bf565b6000326001600160a01b038416148061065e5750326001600160a01b038316145b15610691576001600160a01b038084166000908152600160209081526040808320938616835292905220545b905061039a565b336001600160a01b03841614806106b05750336001600160a01b038316145b156106e0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461068a565b60405162461bcd60e51b815260040161049c90610f1e565b6104af838383600161097c565b61070f8133610a81565b50565b6001600160a01b03821661073c576000604051634b637e8f60e11b815260040161049c9190610f88565b61074882600083610ae1565b5050565b6000610758848461063d565b905060001981146104ff57818110156107a3578281836040517ffb8f41b200000000000000000000000000000000000000000000000000000000815260040161049c93929190610f96565b6104ff8484848403600061097c565b6001600160a01b0383166107dc576000604051634b637e8f60e11b815260040161049c9190610f88565b6001600160a01b03821661080657600060405163ec442f0560e01b815260040161049c9190610f88565b6104af838383610ae1565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff166108b75760008381526007602090815260408083206001600160a01b03861684529091529020805460ff1916600117905561086f3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161039a565b50600061039a565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff16156108b75760008381526007602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161039a565b6001600160a01b03821661097057600060405163ec442f0560e01b815260040161049c9190610f88565b61074860008383610ae1565b6001600160a01b0384166109bf5760006040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161049c9190610f88565b6001600160a01b038316610a025760006040517f94280d6200000000000000000000000000000000000000000000000000000000815260040161049c9190610f88565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156104ff57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a739190610d5b565b60405180910390a350505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166107485780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161049c929190610fc6565b6001600160a01b038316610b0c578060026000828254610b019190610ff7565b90915550610b849050565b6001600160a01b03831660009081526020819052604090205481811015610b65578381836040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161049c93929190610f96565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610ba057600280548290039055610bbf565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610c029190610d5b565b60405180910390a3505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081165b811461070f57600080fd5b803561039a81610c0f565b600060208284031215610c5e57610c5e600080fd5b6104d38383610c3e565b8015155b82525050565b6020810161039a8284610c68565b60005b83811015610c9b578181015183820152602001610c83565b50506000910152565b6000610cae825190565b808452602084019350610cc5818560208601610c80565b601f01601f19169290920192915050565b602080825281016104d38184610ca4565b60006001600160a01b03821661039a565b610c3381610ce7565b803561039a81610cf8565b80610c33565b803561039a81610d0c565b60008060408385031215610d3357610d33600080fd5b610d3d8484610d01565b9150610d4c8460208501610d12565b90509250929050565b80610c6c565b6020810161039a8284610d55565b600080600060608486031215610d8157610d81600080fd5b610d8b8585610d01565b9250610d9a8560208601610d01565b9150610da98560408601610d12565b90509250925092565b600060208284031215610dc757610dc7600080fd5b6104d38383610d12565b60008060408385031215610de757610de7600080fd5b610df18484610d12565b9150610d4c8460208501610d01565b60ff8116610c6c565b6020810161039a8284610e00565b600060208284031215610e2c57610e2c600080fd5b6104d38383610d01565b60008060408385031215610e4c57610e4c600080fd5b610df18484610d01565b634e487b7160e01b600052602260045260246000fd5b600281046001821680610e8057607f821691505b602082108103610e9257610e92610e56565b50919050565b60158152602081017f496e73756666696369656e742062616c616e63652e0000000000000000000000815290505b60200190565b6020808252810161039a81610e98565b601f8152602081017f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650081529050610ec6565b6020808252810161039a81610edc565b6020808252810161039a81602181527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360208201527f6500000000000000000000000000000000000000000000000000000000000000604082015260600190565b610c6c81610ce7565b6020810161039a8284610f7f565b60608101610fa48286610f7f565b610fb16020830185610d55565b610fbe6040830184610d55565b949350505050565b60408101610fd48285610f7f565b6104d36020830184610d55565b634e487b7160e01b600052601160045260246000fd5b8082018082111561039a5761039a610fe156fea2646970667358221220c7199b3ba419978fd56f66d77e752344d9012ad608ca77ab3db04c58eb0ad63664736f6c634300081c0033a26469706673582212208a0569c77ec5b0fcde4b1673076bdb764bd39e86b5b7f9d296851f17cec4dc5964736f6c634300081c0033", + Bin: "0x60806040526001805463ffffffff60a01b19169055348015601f57600080fd5b506128578061002f6000396000f3fe6080604052600436106100b45760003560e01c806383bece4d116100695780639e405b711161004e5780639e405b711461021b578063a381c8e214610251578063d5c6b50414610264576100da565b806383bece4d146101b35780639813c7b2146101d3576100da565b8063458ffd631161009a578063458ffd6314610153578063485cc9551461017357806375cb267214610193576100da565b80628d48e3146100f25780631888d7121461013e576100da565b366100da5760405162461bcd60e51b81526004016100d190610c1f565b60405180910390fd5b60405162461bcd60e51b81526004016100d190610c69565b3480156100fe57600080fd5b5061012861010d366004610cac565b6004602052600090815260409020546001600160a01b031681565b6040516101359190610ce1565b60405180910390f35b61015161014c366004610cac565b6102a7565b005b34801561015f57600080fd5b5061015161016e366004610d41565b610349565b34801561017f57600080fd5b5061015161018e366004610dce565b6104a3565b34801561019f57600080fd5b506101516101ae366004610cac565b61060e565b3480156101bf57600080fd5b506101516101ce366004610e17565b6106e9565b3480156101df57600080fd5b5061020e6101ee366004610cac565b6001600160a01b0390811660009081526002602052604090205416151590565b6040516101359190610e68565b34801561022757600080fd5b50610128610236366004610cac565b6003602052600090815260409020546001600160a01b031681565b61015161025f366004610e17565b61081e565b34801561027057600080fd5b5061029a61027f366004610cac565b6002602052600090815260409020546001600160a01b031681565b6040516101359190610e95565b600034116102c75760405162461bcd60e51b81526004016100d190610ed5565b6001546040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063346633fb9034906103149085908390600401610eeb565b6000604051808303818588803b15801561032d57600080fd5b505af1158015610341573d6000803e3d6000fd5b505050505050565b6005546000546001600160a01b039182169116331461037a5760405162461bcd60e51b81526004016100d190610f5e565b806001600160a01b031661038c6109bb565b6001600160a01b0316146103b25760405162461bcd60e51b81526004016100d190610fc6565b6000858585856040516103c490610bb8565b6103d19493929190611002565b604051809103906000f0801580156103ed573d6000803e3d6000fd5b506001600160a01b038082166000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca90610491908a9084908b908b908b908b90611033565b60405180910390a15050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156104ee5750825b905060008267ffffffffffffffff16600114801561050b5750303b155b905081158015610519575080155b15610550576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561058457845468ff00000000000000001916680100000000000000001785555b61058d8761060e565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038816179055831561060557845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2906105fc9060019061109d565b60405180910390a15b50505050505050565b610616610a38565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604080517fa1a227fa000000000000000000000000000000000000000000000000000000008152905163a1a227fa916004808201926020929091908290030181865afa158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b991906110b6565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6005546000546001600160a01b039182169116331461071a5760405162461bcd60e51b81526004016100d190610f5e565b806001600160a01b031661072c6109bb565b6001600160a01b0316146107525760405162461bcd60e51b81526004016100d190610fc6565b6001600160a01b0380851660009081526004602090815260408083205484168084526002909252909120549091168061079d5760405162461bcd60e51b81526004016100d19061112d565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063979005ad906107e49087908990600401610eeb565b600060405180830381600087803b1580156107fe57600080fd5b505af1158015610812573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b03808416600090815260026020526040902054166108555760405162461bcd60e51b81526004016100d19061116f565b6001600160a01b03808416600090815260026020526040908190205490517f1dd319cb0000000000000000000000000000000000000000000000000000000081529116908190631dd319cb906108b19033908790600401610eeb565b600060405180830381600087803b1580156108cb57600080fd5b505af11580156108df573d6000803e3d6000fd5b5050506001600160a01b038086166000908152600360205260408082205490519193507f83bece4d0000000000000000000000000000000000000000000000000000000092610937929116908790879060240161117f565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526005549091506109b4906001600160a01b0316826000808034610aa1565b5050505050565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3391906110b6565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610a9f576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60006040518060600160405280886001600160a01b0316815260200187815260200185815250604051602001610ad7919061124e565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa91859174010000000000000000000000000000000000000000900463ffffffff16906014610b2b8361128e565b91906101000a81548163ffffffff021916908363ffffffff1602179055508885886040518663ffffffff1660e01b8152600401610b6b94939291906112c6565b60206040518083038185885af1158015610b89573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610bae9190611326565b5050505050505050565b6114dc8061134683390190565b60238152602081017f436f6e747261637420646f6573206e6f7420737570706f72742072656365697681527f6528290000000000000000000000000000000000000000000000000000000000602082015290505b60400190565b60208082528101610c2f81610bc5565b92915050565b601d8152602081017f66616c6c6261636b2829206d6574686f6420756e737570706f72746564000000815290505b60200190565b60208082528101610c2f81610c35565b60006001600160a01b038216610c2f565b610c9381610c79565b8114610c9e57600080fd5b50565b8035610c2f81610c8a565b600060208284031215610cc157610cc1600080fd5b610ccb8383610ca1565b9392505050565b610cdb81610c79565b82525050565b60208101610c2f8284610cd2565b60008083601f840112610d0457610d04600080fd5b50813567ffffffffffffffff811115610d1f57610d1f600080fd5b602083019150836001820283011115610d3a57610d3a600080fd5b9250929050565b600080600080600060608688031215610d5c57610d5c600080fd5b610d668787610ca1565b9450602086013567ffffffffffffffff811115610d8557610d85600080fd5b610d9188828901610cef565b9450945050604086013567ffffffffffffffff811115610db357610db3600080fd5b610dbf88828901610cef565b92509250509295509295909350565b60008060408385031215610de457610de4600080fd5b610dee8484610ca1565b9150610dfd8460208501610ca1565b90509250929050565b80610c93565b8035610c2f81610e06565b600080600060608486031215610e2f57610e2f600080fd5b610e398585610ca1565b9250610e488560208601610e0c565b9150610e578560408601610ca1565b90509250925092565b801515610cdb565b60208101610c2f8284610e60565b6000610c2f82610c79565b6000610c2f82610e76565b610cdb81610e81565b60208101610c2f8284610e8c565b600d8152602081017f4e6f7468696e672073656e742e0000000000000000000000000000000000000081529050610c63565b60208082528101610c2f81610ea3565b80610cdb565b60408101610ef98285610cd2565b610ccb6020830184610ee5565b60308152602081017f436f6e74726163742063616c6c6572206973206e6f742074686520726567697381527f7465726564206d657373656e676572210000000000000000000000000000000060208201529050610c19565b60208082528101610c2f81610f06565b60318152602081017f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2081527f696e636f72726563742073656e6465722100000000000000000000000000000060208201529050610c19565b60208082528101610c2f81610f6e565b82818337506000910152565b818352602083019250610ff6828483610fd6565b50601f01601f19160190565b60408082528101611014818688610fe2565b90508181036020830152611029818486610fe2565b9695505050505050565b608081016110418289610cd2565b61104e6020830188610cd2565b8181036040830152611061818688610fe2565b90508181036060830152611076818486610fe2565b98975050505050505050565b600067ffffffffffffffff8216610c2f565b610cdb81611082565b60208101610c2f8284611094565b8051610c2f81610c8a565b6000602082840312156110cb576110cb600080fd5b610ccb83836110ab565b602b8152602081017f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726181527f7070656420746f6b656e2100000000000000000000000000000000000000000060208201529050610c19565b60208082528101610c2f816110d5565b60158152602081017f4e6f206d617070696e6720666f7220746f6b656e2e000000000000000000000081529050610c63565b60208082528101610c2f8161113d565b6060810161118d8286610cd2565b61119a6020830185610ee5565b6111a76040830184610cd2565b949350505050565b60005b838110156111ca5781810151838201526020016111b2565b50506000910152565b60006111dd825190565b8084526020840193506111f48185602086016111af565b601f01601f19169290920192915050565b805160009060608401906112198582610cd2565b506020830151848203602086015261123182826111d3565b91505060408301516112466040860182610ee5565b509392505050565b60208082528101610ccb8184611205565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff16600063fffffffe1982016112aa576112aa61125f565b5060010190565b63ffffffff8116610cdb565b60ff8116610cdb565b608081016112d482876112b1565b6112e160208301866112b1565b81810360408301526112f381856111d3565b905061130260608301846112bd565b95945050505050565b67ffffffffffffffff8116610c93565b8051610c2f8161130b565b60006020828403121561133b5761133b600080fd5b610ccb838361131b56fe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f317905534801561003657600080fd5b506040516114dc3803806114dc83398101604081905261005591610276565b81818181600361006583826103ce565b50600461007282826103ce565b50505050506100a77fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336100af60201b60201c565b50505061048d565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff166101555760008381526007602090815260408083206001600160a01b03861684529091529020805460ff1916600117905561010d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610159565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681016001600160401b038111828210171561019a5761019a61015f565b6040525050565b60006101ac60405190565b90506101b88282610175565b919050565b60006001600160401b038211156101d6576101d661015f565b601f19601f83011660200192915050565b60005b838110156102025781810151838201526020016101ea565b50506000910152565b600061021e610219846101bd565b6101a1565b905082815283838301111561023557610235600080fd5b6102438360208301846101e7565b9392505050565b600082601f83011261025e5761025e600080fd5b815161026e84826020860161020b565b949350505050565b6000806040838503121561028c5761028c600080fd5b82516001600160401b038111156102a5576102a5600080fd5b6102b18582860161024a565b602085015190935090506001600160401b038111156102d2576102d2600080fd5b6102de8582860161024a565b9150509250929050565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061031257607f821691505b602082108103610324576103246102e8565b50919050565b60006101596103368381565b90565b6103428361032a565b815460001960089490940293841b1916921b91909117905550565b600061036a818484610339565b505050565b8181101561038a5761038260008261035d565b60010161036f565b5050565b601f82111561036a576000818152602090206020601f850104810160208510156103b55750805b6103c76020601f86010483018261036f565b5050505050565b81516001600160401b038111156103e7576103e761015f565b6103f182546102fe565b6103fc82828561038e565b506020601f82116001811461043157600083156104195750848201515b600019600885021c19811660028502178555506103c7565b600084815260208120601f198516915b828110156104615787850151825560209485019460019092019101610441565b508482101561047e5783870151600019601f87166008021c191681555b50505050600202600101905550565b6110408061049c6000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806336568abe116100cd578063979005ad11610081578063a9059cbb11610066578063a9059cbb146102ce578063d547741f146102e1578063dd62ed3e146102f457600080fd5b8063979005ad146102b3578063a217fddf146102c657600080fd5b806375b238fc116100b257806375b238fc1461024b57806391d148541461027257806395d89b41146102ab57600080fd5b806336568abe1461022557806370a082311461023857600080fd5b80631dd319cb11610124578063248a9ca311610109578063248a9ca3146101e05780632f2ff15d14610203578063313ce5671461021657600080fd5b80631dd319cb146101b857806323b872dd146101cd57600080fd5b806301ffc9a71461015657806306fdde031461017f578063095ea7b31461019457806318160ddd146101a7575b600080fd5b610169610164366004610c49565b610307565b6040516101769190610c72565b60405180910390f35b6101876103a0565b6040516101769190610cd6565b6101696101a2366004610d1d565b610432565b6002545b6040516101769190610d5b565b6101cb6101c6366004610d1d565b61044a565b005b6101696101db366004610d69565b6104b4565b6101ab6101ee366004610db2565b60009081526007602052604090206001015490565b6101cb610211366004610dd1565b6104da565b60126040516101769190610e09565b6101cb610233366004610dd1565b610505565b6101ab610246366004610e17565b610551565b6101ab7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b610169610280366004610dd1565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6101876105c7565b6101cb6102c1366004610d1d565b6105d6565b6101ab600081565b6101696102dc366004610d1d565b61060a565b6101cb6102ef366004610dd1565b610618565b6101ab610302366004610e36565b61063d565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061039a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103af90610e6c565b80601f01602080910402602001604051908101604052809291908181526020018280546103db90610e6c565b80156104285780601f106103fd57610100808354040283529160200191610428565b820191906000526020600020905b81548152906001019060200180831161040b57829003601f168201915b5050505050905090565b6000336104408185856106f8565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561047481610705565b8161047e84610551565b10156104a55760405162461bcd60e51b815260040161049c90610ecc565b60405180910390fd5b6104af8383610712565b505050565b6000336104c285828561074c565b6104cd8585856107b2565b60019150505b9392505050565b6000828152600760205260409020600101546104f581610705565b6104ff8383610811565b50505050565b6001600160a01b0381163314610547576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104af82826108bf565b60006001600160a01b0382163203610581576001600160a01b03821660009081526020819052604090205461039a565b6001600160a01b03821633036105af576001600160a01b03821660009081526020819052604090205461039a565b60405162461bcd60e51b815260040161049c90610f0e565b6060600480546103af90610e6c565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561060081610705565b6104af8383610946565b6000336104408185856107b2565b60008281526007602052604090206001015461063381610705565b6104ff83836108bf565b6000326001600160a01b038416148061065e5750326001600160a01b038316145b15610691576001600160a01b038084166000908152600160209081526040808320938616835292905220545b905061039a565b336001600160a01b03841614806106b05750336001600160a01b038316145b156106e0576001600160a01b0380841660009081526001602090815260408083209386168352929052205461068a565b60405162461bcd60e51b815260040161049c90610f1e565b6104af838383600161097c565b61070f8133610a81565b50565b6001600160a01b03821661073c576000604051634b637e8f60e11b815260040161049c9190610f88565b61074882600083610ae1565b5050565b6000610758848461063d565b905060001981146104ff57818110156107a3578281836040517ffb8f41b200000000000000000000000000000000000000000000000000000000815260040161049c93929190610f96565b6104ff8484848403600061097c565b6001600160a01b0383166107dc576000604051634b637e8f60e11b815260040161049c9190610f88565b6001600160a01b03821661080657600060405163ec442f0560e01b815260040161049c9190610f88565b6104af838383610ae1565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff166108b75760008381526007602090815260408083206001600160a01b03861684529091529020805460ff1916600117905561086f3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161039a565b50600061039a565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff16156108b75760008381526007602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161039a565b6001600160a01b03821661097057600060405163ec442f0560e01b815260040161049c9190610f88565b61074860008383610ae1565b6001600160a01b0384166109bf5760006040517fe602df0500000000000000000000000000000000000000000000000000000000815260040161049c9190610f88565b6001600160a01b038316610a025760006040517f94280d6200000000000000000000000000000000000000000000000000000000815260040161049c9190610f88565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156104ff57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a739190610d5b565b60405180910390a350505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166107485780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161049c929190610fc6565b6001600160a01b038316610b0c578060026000828254610b019190610ff7565b90915550610b849050565b6001600160a01b03831660009081526020819052604090205481811015610b65578381836040517fe450d38c00000000000000000000000000000000000000000000000000000000815260040161049c93929190610f96565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610ba057600280548290039055610bbf565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610c029190610d5b565b60405180910390a3505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081165b811461070f57600080fd5b803561039a81610c0f565b600060208284031215610c5e57610c5e600080fd5b6104d38383610c3e565b8015155b82525050565b6020810161039a8284610c68565b60005b83811015610c9b578181015183820152602001610c83565b50506000910152565b6000610cae825190565b808452602084019350610cc5818560208601610c80565b601f01601f19169290920192915050565b602080825281016104d38184610ca4565b60006001600160a01b03821661039a565b610c3381610ce7565b803561039a81610cf8565b80610c33565b803561039a81610d0c565b60008060408385031215610d3357610d33600080fd5b610d3d8484610d01565b9150610d4c8460208501610d12565b90509250929050565b80610c6c565b6020810161039a8284610d55565b600080600060608486031215610d8157610d81600080fd5b610d8b8585610d01565b9250610d9a8560208601610d01565b9150610da98560408601610d12565b90509250925092565b600060208284031215610dc757610dc7600080fd5b6104d38383610d12565b60008060408385031215610de757610de7600080fd5b610df18484610d12565b9150610d4c8460208501610d01565b60ff8116610c6c565b6020810161039a8284610e00565b600060208284031215610e2c57610e2c600080fd5b6104d38383610d01565b60008060408385031215610e4c57610e4c600080fd5b610df18484610d01565b634e487b7160e01b600052602260045260246000fd5b600281046001821680610e8057607f821691505b602082108103610e9257610e92610e56565b50919050565b60158152602081017f496e73756666696369656e742062616c616e63652e0000000000000000000000815290505b60200190565b6020808252810161039a81610e98565b601f8152602081017f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650081529050610ec6565b6020808252810161039a81610edc565b6020808252810161039a81602181527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360208201527f6500000000000000000000000000000000000000000000000000000000000000604082015260600190565b610c6c81610ce7565b6020810161039a8284610f7f565b60608101610fa48286610f7f565b610fb16020830185610d55565b610fbe6040830184610d55565b949350505050565b60408101610fd48285610f7f565b6104d36020830184610d55565b634e487b7160e01b600052601160045260246000fd5b8082018082111561039a5761039a610fe156fea2646970667358221220c7199b3ba419978fd56f66d77e752344d9012ad608ca77ab3db04c58eb0ad63664736f6c634300081c0033a2646970667358221220930b3746d4760c211a167a698d3d56b9c4a1707b14f75e9b8a8debf6fc1bbbc964736f6c634300081c0033", } // EthereumBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/generated/ObscuroBridge/ObscuroBridge.go b/contracts/generated/ObscuroBridge/ObscuroBridge.go index 3fd24eb155..ed6e25f073 100644 --- a/contracts/generated/ObscuroBridge/ObscuroBridge.go +++ b/contracts/generated/ObscuroBridge/ObscuroBridge.go @@ -32,7 +32,7 @@ var ( // ObscuroBridgeMetaData contains all meta data concerning the ObscuroBridge contract. var ObscuroBridgeMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[],\"name\":\"AccessControlBadConfirmation\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"neededRole\",\"type\":\"bytes32\"}],\"name\":\"AccessControlUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"AddressInsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"SafeERC20FailedOperation\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ERC20_TOKEN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NATIVE_TOKEN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messengerAddress\",\"type\":\"address\"}],\"name\":\"configure\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"messenger\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"promoteToAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"receiveAssets\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"removeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"callerConfirmation\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendERC20\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"sendNative\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"bridge\",\"type\":\"address\"}],\"name\":\"setRemoteBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"}],\"name\":\"whitelistToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60806040526001805463ffffffff60a01b19169055348015601f57600080fd5b50611adc8061002f6000396000f3fe6080604052600436106101445760003560e01c806375b238fc116100c0578063a217fddf11610074578063c4d66de811610059578063c4d66de8146103a7578063d547741f146103c7578063e4c3ebc7146103e757600080fd5b8063a217fddf1461037f578063a381c8e21461039457600080fd5b806383bece4d116100a557806383bece4d146102f957806391d148541461031957806393b374421461035f57600080fd5b806375b238fc146102a557806375cb2672146102d957600080fd5b80632f2ff15d11610117578063498d82ab116100fc578063498d82ab146102315780635d872970146102515780635fa7b5841461028557600080fd5b80632f2ff15d146101f157806336568abe1461021157600080fd5b806301ffc9a71461014957806316ce81491461017f5780631888d712146101a1578063248a9ca3146101b4575b600080fd5b34801561015557600080fd5b506101696101643660046112c0565b61041b565b60405161017691906112e9565b60405180910390f35b34801561018b57600080fd5b5061019f61019a36600461131c565b610484565b005b61019f6101af36600461131c565b6104de565b3480156101c057600080fd5b506101e46101cf36600461134c565b60009081526002602052604090206001015490565b6040516101769190611371565b3480156101fd57600080fd5b5061019f61020c36600461137f565b610589565b34801561021d57600080fd5b5061019f61022c36600461137f565b6105b4565b34801561023d57600080fd5b5061019f61024c366004611409565b610605565b34801561025d57600080fd5b506101e47f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561029157600080fd5b5061019f6102a036600461131c565b6106d7565b3480156102b157600080fd5b506101e47fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102e557600080fd5b5061019f6102f436600461131c565b61072b565b34801561030557600080fd5b5061019f610314366004611496565b610806565b34801561032557600080fd5b5061016961033436600461137f565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561036b57600080fd5b5061019f61037a36600461131c565b610920565b34801561038b57600080fd5b506101e4600081565b61019f6103a2366004611496565b610974565b3480156103b357600080fd5b5061019f6103c236600461131c565b610a63565b3480156103d357600080fd5b5061019f6103e236600461137f565b610bfb565b3480156103f357600080fd5b506101e47fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061047e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104ae81610c20565b506003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600034116105075760405162461bcd60e51b81526004016104fe90611513565b60405180910390fd5b6001546040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063346633fb903490610554908590839060040161152c565b6000604051808303818588803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b505050505050565b6000828152600260205260409020600101546105a481610c20565b6105ae8383610c2d565b50505050565b6001600160a01b03811633146105f6576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106008282610cdb565b505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561062f81610c20565b6106597f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610c2d565b50600063458ffd6360e01b878787878760405160240161067d959493929190611573565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106ce906001600160a01b03168260015b600080610d62565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561070181610c20565b6106007f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610cdb565b610733610e6f565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604080517fa1a227fa000000000000000000000000000000000000000000000000000000008152905163a1a227fa916004808201926020929091908290030181865afa1580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d691906115bf565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6003546000546001600160a01b03918216911633146108375760405162461bcd60e51b81526004016104fe90611638565b806001600160a01b0316610849610ed8565b6001600160a01b03161461086f5760405162461bcd60e51b81526004016104fe906116a0565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108bf576108ba848484610f55565b6105ae565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610908576108ba82610f60565b60405162461bcd60e51b81526004016104fe90611708565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561094a81610c20565b6106007fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610c2d565b600082116109945760405162461bcd60e51b81526004016104fe9061174a565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff166109eb5760405162461bcd60e51b81526004016104fe9061175a565b6109f783333085610fd2565b60006383bece4d60e01b848484604051602401610a16939291906117e1565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105ae906001600160a01b03168260006106c6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015610aae5750825b905060008267ffffffffffffffff166001148015610acb5750303b155b905081158015610ad9575080155b15610b10576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610b4457845468ff00000000000000001916680100000000000000001785555b610b4d8661072b565b610b777fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533610c2d565b50610ba37fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad21105786000610c2d565b50831561058157845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290610beb9060019061182c565b60405180910390a1505050505050565b600082815260026020526040902060010154610c1681610c20565b6105ae8383610cdb565b610c2a813361102c565b50565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff16610cd35760008381526002602090815260408083206001600160a01b03861684529091529020805460ff19166001179055610c8b3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161047e565b50600061047e565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff1615610cd35760008381526002602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161047e565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610d9891906118d9565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa91349174010000000000000000000000000000000000000000900463ffffffff16906014610dec83611919565b91906101000a81548163ffffffff021916908363ffffffff1602179055508785876040518663ffffffff1660e01b8152600401610e2c9493929190611951565b60206040518083038185885af1158015610e4a573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106ce91906119b1565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610ed6576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5091906115bf565b905090565b61060083828461108c565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610fa8576040519150601f19603f3d011682016040523d82523d6000602084013e610fad565b606091505b5050905080610fce5760405162461bcd60e51b81526004016104fe90611a02565b5050565b6105ae84856001600160a01b03166323b872dd868686604051602401610ffa93929190611a12565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506110b2565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16610fce5780826040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526004016104fe92919061152c565b61060083846001600160a01b031663a9059cbb8585604051602401610ffa92919061152c565b60006110c76001600160a01b03841683611125565b905080516000141580156110ec5750808060200190518101906110ea9190611a4d565b155b1561060057826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016104fe9190611a6c565b60606111338383600061113a565b9392505050565b60608147101561117857306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016104fe9190611a6c565b600080856001600160a01b031684866040516111949190611a9c565b60006040518083038185875af1925050503d80600081146111d1576040519150601f19603f3d011682016040523d82523d6000602084013e6111d6565b606091505b50915091506111e68683836111f0565b9695505050505050565b606082611205576112008261125c565b611133565b815115801561121c57506001600160a01b0384163b155b1561125557836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016104fe9190611a6c565b5080611133565b80511561126c5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160e01b031981165b8114610c2a57600080fd5b803561047e8161129e565b6000602082840312156112d5576112d5600080fd5b61113383836112b5565b8015155b82525050565b6020810161047e82846112df565b60006001600160a01b03821661047e565b6112aa816112f7565b803561047e81611308565b60006020828403121561133157611331600080fd5b6111338383611311565b806112aa565b803561047e8161133b565b60006020828403121561136157611361600080fd5b6111338383611341565b806112e3565b6020810161047e828461136b565b6000806040838503121561139557611395600080fd5b61139f8484611341565b91506113ae8460208501611311565b90509250929050565b60008083601f8401126113cc576113cc600080fd5b50813567ffffffffffffffff8111156113e7576113e7600080fd5b60208301915083600182028301111561140257611402600080fd5b9250929050565b60008060008060006060868803121561142457611424600080fd5b61142e8787611311565b9450602086013567ffffffffffffffff81111561144d5761144d600080fd5b611459888289016113b7565b9450945050604086013567ffffffffffffffff81111561147b5761147b600080fd5b611487888289016113b7565b92509250509295509295909350565b6000806000606084860312156114ae576114ae600080fd5b6114b88585611311565b92506114c78560208601611341565b91506114d68560408601611311565b90509250925092565b600f8152602081017f456d707479207472616e736665722e0000000000000000000000000000000000815290505b60200190565b6020808252810161047e816114df565b6112e3816112f7565b6040810161153a8285611523565b611133602083018461136b565b82818337506000910152565b818352602083019250611567828483611547565b50601f01601f19160190565b606081016115818288611523565b8181036020830152611594818688611553565b905081810360408301526115a9818486611553565b979650505050505050565b805161047e81611308565b6000602082840312156115d4576115d4600080fd5b61113383836115b4565b60308152602081017f436f6e74726163742063616c6c6572206973206e6f742074686520726567697381527f7465726564206d657373656e6765722100000000000000000000000000000000602082015290505b60400190565b6020808252810161047e816115de565b60318152602081017f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2081527f696e636f72726563742073656e6465722100000000000000000000000000000060208201529050611632565b6020808252810161047e81611648565b60258152602081017f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206181527f737365742e00000000000000000000000000000000000000000000000000000060208201529050611632565b6020808252810161047e816116b0565b601a8152602081017f417474656d7074696e6720656d707479207472616e736665722e0000000000008152905061150d565b6020808252810161047e81611718565b6020808252810161047e81604e81527f54686973206164647265737320686173206e6f74206265656e20676976656e2060208201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60408201527f742077686974656c69737465642e000000000000000000000000000000000000606082015260800190565b606081016117ef8286611523565b6117fc602083018561136b565b6118096040830184611523565b949350505050565b600067ffffffffffffffff821661047e565b6112e381611811565b6020810161047e8284611823565b60005b8381101561185557818101518382015260200161183d565b50506000910152565b6000611868825190565b80845260208401935061187f81856020860161183a565b601f01601f19169290920192915050565b805160009060608401906118a48582611523565b50602083015184820360208601526118bc828261185e565b91505060408301516118d1604086018261136b565b509392505050565b602080825281016111338184611890565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff16600063fffffffe198201611935576119356118ea565b5060010190565b63ffffffff81166112e3565b60ff81166112e3565b6080810161195f828761193c565b61196c602083018661193c565b818103604083015261197e818561185e565b905061198d6060830184611948565b95945050505050565b67ffffffffffffffff81166112aa565b805161047e81611996565b6000602082840312156119c6576119c6600080fd5b61113383836119a6565b60148152602081017f4661696c656420746f2073656e642045746865720000000000000000000000008152905061150d565b6020808252810161047e816119d0565b60608101611a208286611523565b611a2d6020830185611523565b611809604083018461136b565b8015156112aa565b805161047e81611a3a565b600060208284031215611a6257611a62600080fd5b6111338383611a42565b6020810161047e8284611523565b6000611a84825190565b611a9281856020860161183a565b9290920192915050565b61047e8183611a7a56fea264697066735822122043f380152e610ecd164d67529af020f07a61a6291b1d7decda00ebbb4055e62564736f6c634300081c0033", + Bin: "0x60806040526001805463ffffffff60a01b19169055348015601f57600080fd5b50611ae88061002f6000396000f3fe6080604052600436106101445760003560e01c806375b238fc116100c0578063a217fddf11610074578063c4d66de811610059578063c4d66de8146103a7578063d547741f146103c7578063e4c3ebc7146103e757600080fd5b8063a217fddf1461037f578063a381c8e21461039457600080fd5b806383bece4d116100a557806383bece4d146102f957806391d148541461031957806393b374421461035f57600080fd5b806375b238fc146102a557806375cb2672146102d957600080fd5b80632f2ff15d11610117578063498d82ab116100fc578063498d82ab146102315780635d872970146102515780635fa7b5841461028557600080fd5b80632f2ff15d146101f157806336568abe1461021157600080fd5b806301ffc9a71461014957806316ce81491461017f5780631888d712146101a1578063248a9ca3146101b4575b600080fd5b34801561015557600080fd5b506101696101643660046112cc565b61041b565b60405161017691906112f5565b60405180910390f35b34801561018b57600080fd5b5061019f61019a366004611328565b610484565b005b61019f6101af366004611328565b6104de565b3480156101c057600080fd5b506101e46101cf366004611358565b60009081526002602052604090206001015490565b604051610176919061137d565b3480156101fd57600080fd5b5061019f61020c36600461138b565b610589565b34801561021d57600080fd5b5061019f61022c36600461138b565b6105b4565b34801561023d57600080fd5b5061019f61024c366004611415565b610605565b34801561025d57600080fd5b506101e47f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561029157600080fd5b5061019f6102a0366004611328565b6106d9565b3480156102b157600080fd5b506101e47fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102e557600080fd5b5061019f6102f4366004611328565b61072d565b34801561030557600080fd5b5061019f6103143660046114a2565b610808565b34801561032557600080fd5b5061016961033436600461138b565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561036b57600080fd5b5061019f61037a366004611328565b610922565b34801561038b57600080fd5b506101e4600081565b61019f6103a23660046114a2565b610976565b3480156103b357600080fd5b5061019f6103c2366004611328565b610a65565b3480156103d357600080fd5b5061019f6103e236600461138b565b610bfd565b3480156103f357600080fd5b506101e47fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061047e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104ae81610c22565b506003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600034116105075760405162461bcd60e51b81526004016104fe9061151f565b60405180910390fd5b6001546040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063346633fb9034906105549085908390600401611538565b6000604051808303818588803b15801561056d57600080fd5b505af1158015610581573d6000803e3d6000fd5b505050505050565b6000828152600260205260409020600101546105a481610c22565b6105ae8383610c2f565b50505050565b6001600160a01b03811633146105f6576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106008282610cdd565b505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561062f81610c22565b6106597f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610c2f565b50600063458ffd6360e01b878787878760405160240161067d95949392919061157f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506106d0906001600160a01b03168260015b6000806000610d64565b50505050505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561070381610c22565b6106007f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83610cdd565b610735610e7b565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604080517fa1a227fa000000000000000000000000000000000000000000000000000000008152905163a1a227fa916004808201926020929091908290030181865afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d891906115cb565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6003546000546001600160a01b03918216911633146108395760405162461bcd60e51b81526004016104fe90611644565b806001600160a01b031661084b610ee4565b6001600160a01b0316146108715760405162461bcd60e51b81526004016104fe906116ac565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156108c1576108bc848484610f61565b6105ae565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff161561090a576108bc82610f6c565b60405162461bcd60e51b81526004016104fe90611714565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561094c81610c22565b6106007fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610c2f565b600082116109965760405162461bcd60e51b81526004016104fe90611756565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff166109ed5760405162461bcd60e51b81526004016104fe90611766565b6109f983333085610fde565b60006383bece4d60e01b848484604051602401610a18939291906117ed565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526003549091506105ae906001600160a01b03168260006106c6565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015610ab05750825b905060008267ffffffffffffffff166001148015610acd5750303b155b905081158015610adb575080155b15610b12576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610b4657845468ff00000000000000001916680100000000000000001785555b610b4f8661072d565b610b797fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533610c2f565b50610ba57fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad21105786000610c2f565b50831561058157845468ff0000000000000000191685556040517fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290610bed90600190611838565b60405180910390a1505050505050565b600082815260026020526040902060010154610c1881610c22565b6105ae8383610cdd565b610c2c8133611038565b50565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff16610cd55760008381526002602090815260408083206001600160a01b03861684529091529020805460ff19166001179055610c8d3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161047e565b50600061047e565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff1615610cd55760008381526002602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161047e565b60006040518060600160405280886001600160a01b0316815260200187815260200185815250604051602001610d9a91906118e5565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa91859174010000000000000000000000000000000000000000900463ffffffff16906014610dee83611925565b91906101000a81548163ffffffff021916908363ffffffff1602179055508885886040518663ffffffff1660e01b8152600401610e2e949392919061195d565b60206040518083038185885af1158015610e4c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610e7191906119bd565b5050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610ee2576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5c91906115cb565b905090565b610600838284611098565b6040516000906001600160a01b038316908281818181865af19150503d8060008114610fb4576040519150601f19603f3d011682016040523d82523d6000602084013e610fb9565b606091505b5050905080610fda5760405162461bcd60e51b81526004016104fe90611a0e565b5050565b6105ae84856001600160a01b03166323b872dd86868660405160240161100693929190611a1e565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506110be565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16610fda5780826040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526004016104fe929190611538565b61060083846001600160a01b031663a9059cbb8585604051602401611006929190611538565b60006110d36001600160a01b03841683611131565b905080516000141580156110f85750808060200190518101906110f69190611a59565b155b1561060057826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016104fe9190611a78565b606061113f83836000611146565b9392505050565b60608147101561118457306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016104fe9190611a78565b600080856001600160a01b031684866040516111a09190611aa8565b60006040518083038185875af1925050503d80600081146111dd576040519150601f19603f3d011682016040523d82523d6000602084013e6111e2565b606091505b50915091506111f28683836111fc565b9695505050505050565b6060826112115761120c82611268565b61113f565b815115801561122857506001600160a01b0384163b155b1561126157836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016104fe9190611a78565b508061113f565b8051156112785780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160e01b031981165b8114610c2c57600080fd5b803561047e816112aa565b6000602082840312156112e1576112e1600080fd5b61113f83836112c1565b8015155b82525050565b6020810161047e82846112eb565b60006001600160a01b03821661047e565b6112b681611303565b803561047e81611314565b60006020828403121561133d5761133d600080fd5b61113f838361131d565b806112b6565b803561047e81611347565b60006020828403121561136d5761136d600080fd5b61113f838361134d565b806112ef565b6020810161047e8284611377565b600080604083850312156113a1576113a1600080fd5b6113ab848461134d565b91506113ba846020850161131d565b90509250929050565b60008083601f8401126113d8576113d8600080fd5b50813567ffffffffffffffff8111156113f3576113f3600080fd5b60208301915083600182028301111561140e5761140e600080fd5b9250929050565b60008060008060006060868803121561143057611430600080fd5b61143a878761131d565b9450602086013567ffffffffffffffff81111561145957611459600080fd5b611465888289016113c3565b9450945050604086013567ffffffffffffffff81111561148757611487600080fd5b611493888289016113c3565b92509250509295509295909350565b6000806000606084860312156114ba576114ba600080fd5b6114c4858561131d565b92506114d3856020860161134d565b91506114e2856040860161131d565b90509250925092565b600f8152602081017f456d707479207472616e736665722e0000000000000000000000000000000000815290505b60200190565b6020808252810161047e816114eb565b6112ef81611303565b60408101611546828561152f565b61113f6020830184611377565b82818337506000910152565b818352602083019250611573828483611553565b50601f01601f19160190565b6060810161158d828861152f565b81810360208301526115a081868861155f565b905081810360408301526115b581848661155f565b979650505050505050565b805161047e81611314565b6000602082840312156115e0576115e0600080fd5b61113f83836115c0565b60308152602081017f436f6e74726163742063616c6c6572206973206e6f742074686520726567697381527f7465726564206d657373656e6765722100000000000000000000000000000000602082015290505b60400190565b6020808252810161047e816115ea565b60318152602081017f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2081527f696e636f72726563742073656e646572210000000000000000000000000000006020820152905061163e565b6020808252810161047e81611654565b60258152602081017f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206181527f737365742e0000000000000000000000000000000000000000000000000000006020820152905061163e565b6020808252810161047e816116bc565b601a8152602081017f417474656d7074696e6720656d707479207472616e736665722e00000000000081529050611519565b6020808252810161047e81611724565b6020808252810161047e81604e81527f54686973206164647265737320686173206e6f74206265656e20676976656e2060208201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60408201527f742077686974656c69737465642e000000000000000000000000000000000000606082015260800190565b606081016117fb828661152f565b6118086020830185611377565b611815604083018461152f565b949350505050565b600067ffffffffffffffff821661047e565b6112ef8161181d565b6020810161047e828461182f565b60005b83811015611861578181015183820152602001611849565b50506000910152565b6000611874825190565b80845260208401935061188b818560208601611846565b601f01601f19169290920192915050565b805160009060608401906118b0858261152f565b50602083015184820360208601526118c8828261186a565b91505060408301516118dd6040860182611377565b509392505050565b6020808252810161113f818461189c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff16600063fffffffe198201611941576119416118f6565b5060010190565b63ffffffff81166112ef565b60ff81166112ef565b6080810161196b8287611948565b6119786020830186611948565b818103604083015261198a818561186a565b90506119996060830184611954565b95945050505050565b67ffffffffffffffff81166112b6565b805161047e816119a2565b6000602082840312156119d2576119d2600080fd5b61113f83836119b2565b60148152602081017f4661696c656420746f2073656e6420457468657200000000000000000000000081529050611519565b6020808252810161047e816119dc565b60608101611a2c828661152f565b611a39602083018561152f565b6118156040830184611377565b8015156112b6565b805161047e81611a46565b600060208284031215611a6e57611a6e600080fd5b61113f8383611a4e565b6020810161047e828461152f565b6000611a90825190565b611a9e818560208601611846565b9290920192915050565b61047e8183611a8656fea2646970667358221220208cc96396d6438cff3df1c3667ddaf815e3a7f29c3da8285737b433effbb21c64736f6c634300081c0033", } // ObscuroBridgeABI is the input ABI used to generate the binding from. diff --git a/contracts/src/bridge/L1/ObscuroBridge.sol b/contracts/src/bridge/L1/ObscuroBridge.sol index 2427f20277..67e6fc0725 100644 --- a/contracts/src/bridge/L1/ObscuroBridge.sol +++ b/contracts/src/bridge/L1/ObscuroBridge.sol @@ -59,6 +59,7 @@ contract ObscuroBridge is data, uint32(Topics.MANAGEMENT), 0, + 0, 0 ); } @@ -106,7 +107,7 @@ contract ObscuroBridge is amount, receiver ); - queueMessage(remoteBridgeAddress, data, uint32(Topics.TRANSFER), 0, 0); + queueMessage(remoteBridgeAddress, data, uint32(Topics.TRANSFER), 0, 0, 0); } function receiveAssets( diff --git a/contracts/src/bridge/L2/EthereumBridge.sol b/contracts/src/bridge/L2/EthereumBridge.sol index ad459f5507..e2de05cc3f 100644 --- a/contracts/src/bridge/L2/EthereumBridge.sol +++ b/contracts/src/bridge/L2/EthereumBridge.sol @@ -77,7 +77,7 @@ contract EthereumBridge is amount, receiver ); - queueMessage(remoteBridgeAddress, data, uint32(Topics.TRANSFER), 0, 0); + queueMessage(remoteBridgeAddress, data, uint32(Topics.TRANSFER), 0, 0, msg.value); } function receiveAssets( diff --git a/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol b/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol index 0204673086..7cb354da5d 100644 --- a/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol +++ b/contracts/src/messaging/messenger/CrossChainEnabledObscuro.sol @@ -63,11 +63,12 @@ abstract contract CrossChainEnabledObscuro is Initializable { bytes memory message, uint32 topic, uint256 gas, - uint8 consistencyLevel + uint8 consistencyLevel, + uint256 value ) internal { bytes memory payload = abi.encode( ICrossChainMessenger.CrossChainCall(target, message, gas) ); - messageBus.publishMessage{value: msg.value}(nonce++, topic, payload, consistencyLevel); + messageBus.publishMessage{value: value}(nonce++, topic, payload, consistencyLevel); } }