diff --git a/mm-bot/.env.example b/mm-bot/.env.example index b88cab55..7b4fcb66 100644 --- a/mm-bot/.env.example +++ b/mm-bot/.env.example @@ -17,4 +17,4 @@ POSTGRES_PASSWORD= POSTGRES_DB= LOGGING_LEVEL= LOGGING_DIR= -WITHDRAWER= \ No newline at end of file +PAYMENT_CLAIMER= diff --git a/mm-bot/README.md b/mm-bot/README.md index 89727d95..36efe2ba 100644 --- a/mm-bot/README.md +++ b/mm-bot/README.md @@ -52,7 +52,7 @@ The following environment variables are used: POSTGRES_DB= LOGGING_LEVEL= LOGGING_DIR= - WITHDRAWER= + PAYMENT_CLAIMER= There is a example file called `.env.example` in the root of the project. diff --git a/mm-bot/abi/PaymentRegistry.json b/mm-bot/abi/PaymentRegistry.json deleted file mode 100644 index a3c55d49..00000000 --- a/mm-bot/abi/PaymentRegistry.json +++ /dev/null @@ -1,6215 +0,0 @@ -{ - "abi": [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMMAddress", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOwner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "snMessaging", - "type": "address", - "internalType": "address" - }, - { - "name": "snEscrowAddress", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "snEscrowWithdrawSelector", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "marketMaker", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setEscrowAddress", - "inputs": [ - { - "name": "snEscrowAddress", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setEscrowWithdrawSelector", - "inputs": [ - { - "name": "snEscrowWithdrawSelector", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMMAddress", - "inputs": [ - { - "name": "newMMAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transfer", - "inputs": [ - { - "name": "orderId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "destAddress", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transfers", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "destAddress", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isUsed", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "withdraw", - "inputs": [ - { - "name": "orderId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "destAddress", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ModifiedEscrowAddress", - "inputs": [ - { - "name": "newEscrowAddress", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ModifiedEscrowWithdrawSelector", - "inputs": [ - { - "name": "newEscrowWithdrawSelector", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "orderId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "srcAddress", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "transferInfo", - "type": "tuple", - "indexed": false, - "internalType": "struct PaymentRegistry.TransferInfo", - "components": [ - { - "name": "destAddress", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isUsed", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } - ], - "bytecode": { - "object": "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100725760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d15780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b60805161136a6100fd60003960008181610bb601528181610bdf0152610d25015261136a6000f3fe6080604052600436106100e85760003560e01c806390dd26271161008a578063a713961111610059578063a713961114610263578063ad3cb1cc14610283578063bd7fece8146102c1578063f2fde38b146102df57600080fd5b806390dd2627146101fd5780639a63d92d146102105780639e3d87cd14610230578063a41fe49f1461025057600080fd5b806352d1902d116100c657806352d1902d14610183578063715018a6146101a6578063893d20e8146101bb5780638da5cb5b146101e857600080fd5b80633c64f04b146100ed5780633e95784a1461014e5780634f1ef28614610170575b600080fd5b3480156100f957600080fd5b5061012c610108366004611016565b60006020819052908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060015b60405180910390f35b34801561015a57600080fd5b5061016e610169366004611016565b6102ff565b005b61016e61017e366004611061565b610343565b34801561018f57600080fd5b50610198610362565b604051908152602001610145565b3480156101b257600080fd5b5061016e61037f565b3480156101c757600080fd5b506101d0610393565b6040516001600160a01b039091168152602001610145565b3480156101f457600080fd5b506101d06103a2565b61016e61020b366004611123565b6103d0565b34801561021c57600080fd5b5061016e61022b366004611016565b610727565b34801561023c57600080fd5b5061016e61024b36600461114f565b610764565b61016e61025e366004611123565b6108b9565b34801561026f57600080fd5b5061016e61027e366004611195565b610b11565b34801561028f57600080fd5b506102b4604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161014591906111d4565b3480156102cd57600080fd5b506001546001600160a01b03166101d0565b3480156102eb57600080fd5b5061016e6102fa366004611195565b610b3b565b610307610b79565b60048190556040518181527f3229ec4fa8cd4c21f0ff3e83b104a37d201dc2d5dcb9a3e199641e7cd2379bdc906020015b60405180910390a150565b61034b610bab565b61035482610c50565b61035e8282610c58565b5050565b600061036c610d1a565b5060008051602061131583398151915290565b610387610b79565b6103916000610d63565b565b600061039d6103a2565b905090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6103d86103a2565b6001600160a01b0316336001600160a01b0316148061040157506001546001600160a01b031633145b6104265760405162461bcd60e51b815260040161041d90611207565b60405180910390fd5b816000036104765760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642064657374696e6174696f6e20616464726573732e00000000604482015260640161041d565b600081116104d75760405162461bcd60e51b815260206004820152602860248201527f496e76616c696420616d6f756e742c2073686f756c6420626520686967686572604482015267103a3430b710181760c11b606482015260840161041d565b8034146105365760405162461bcd60e51b815260206004820152602760248201527f496e76616c696420616d6f756e742c2073686f756c64206d61746368206d7367604482015266173b30b63ab29760c91b606482015260840161041d565b60408051602081018590529081018390526060810182905260009060800160408051601f19818403018152918152815160209283012060008181529283905291206002015490915060ff16156105ce5760405162461bcd60e51b815260206004820152601b60248201527f5472616e7366657220616c72656164792070726f6365737365642e0000000000604482015260640161041d565b604080516060810182528481526020808201858152600183850181815260008781529384905285842094518555915190840155516002909201805460ff19169215159290921790915590516001600160a01b0385169034908381818185875af1925050503d806000811461065e576040519150601f19603f3d011682016040523d82523d6000602084013e610663565b606091505b50509050806106a75760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161041d565b847fb2511a43843fb5ad643d84c36214ea6ac6368d0ba2f4714f59c2c36124e87e27336000808681526020019081526020016000206040516107189291906001600160a01b0392909216825280546020830152600181015460408301526002015460ff161515606082015260800190565b60405180910390a25050505050565b61072f610b79565b60038190556040518181527f037d258885f813f6f9a1239ba1e37c7619b400cdab6899abeacd56c24ed7471b90602001610338565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156107aa5750825b905060008267ffffffffffffffff1660011480156107c75750303b155b9050811580156107d5575080155b156107f35760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561081d57845460ff60401b1916600160401b1785555b61082633610dd4565b61082e610de5565b600280546001600160a01b03808c166001600160a01b03199283161790925560038a90556004899055600180549289169290911691909117905583156108ae57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6108c16103a2565b6001600160a01b0316336001600160a01b031614806108ea57506001546001600160a01b031633145b6109065760405162461bcd60e51b815260040161041d90611207565b60408051602081018590529081018390526060810182905260009060800160408051601f198184030181529181528151602092830120600081815292839052912060028101549192509060ff16151560011461099a5760405162461bcd60e51b81526020600482015260136024820152722a3930b739b332b9103737ba103337bab7321760691b604482015260640161041d565b60408051600580825260c082019092526000916020820160a080368337019050509050856001600160801b0316816000815181106109da576109da61124e565b602002602001018181525050608086901c6001600160801b031681600181518110610a0757610a0761124e565b602002602001018181525050816000015481600281518110610a2b57610a2b61124e565b602002602001018181525050836001600160801b031681600381518110610a5457610a5461124e565b602002602001018181525050608084901c6001600160801b031681600481518110610a8157610a8161124e565b602090810291909101015260025460035460048054604051633e3aa6c560e01b81526001600160a01b0390941693633e3aa6c5933493610ac5939192889101611264565b604080518083038185885af1158015610ae2573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b0791906112bb565b5050505050505050565b610b19610b79565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610b43610b79565b6001600160a01b038116610b6d57604051631e4fbdf760e01b81526000600482015260240161041d565b610b7681610d63565b50565b33610b826103a2565b6001600160a01b0316146103915760405163118cdaa760e01b815233600482015260240161041d565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610c3257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c26600080516020611315833981519152546001600160a01b031690565b6001600160a01b031614155b156103915760405163703e46dd60e11b815260040160405180910390fd5b610b76610b79565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610cb2575060408051601f3d908101601f19168201909252610caf918101906112df565b60015b610cda57604051634c9c8ce360e01b81526001600160a01b038316600482015260240161041d565b6000805160206113158339815191528114610d0b57604051632a87526960e21b81526004810182905260240161041d565b610d158383610ded565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103915760405163703e46dd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b610ddc610e43565b610b7681610e8c565b610391610e43565b610df682610e94565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e3b57610d158282610ef9565b61035e610f6f565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661039157604051631afcd79f60e31b815260040160405180910390fd5b610b43610e43565b806001600160a01b03163b600003610eca57604051634c9c8ce360e01b81526001600160a01b038216600482015260240161041d565b60008051602061131583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610f1691906112f8565b600060405180830381855af49150503d8060008114610f51576040519150601f19603f3d011682016040523d82523d6000602084013e610f56565b606091505b5091509150610f66858383610f8e565b95945050505050565b34156103915760405163b398979f60e01b815260040160405180910390fd5b606082610fa357610f9e82610fed565b610fe6565b8151158015610fba57506001600160a01b0384163b155b15610fe357604051639996b31560e01b81526001600160a01b038516600482015260240161041d565b50805b9392505050565b805115610ffd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561102857600080fd5b5035919050565b80356001600160a01b038116811461104657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561107457600080fd5b61107d8361102f565b9150602083013567ffffffffffffffff8082111561109a57600080fd5b818501915085601f8301126110ae57600080fd5b8135818111156110c0576110c061104b565b604051601f8201601f19908116603f011681019083821181831017156110e8576110e861104b565b8160405282815288602084870101111561110157600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006060848603121561113857600080fd5b505081359360208301359350604090920135919050565b6000806000806080858703121561116557600080fd5b61116e8561102f565b9350602085013592506040850135915061118a6060860161102f565b905092959194509250565b6000602082840312156111a757600080fd5b610fe68261102f565b60005b838110156111cb5781810151838201526020016111b3565b50506000910152565b60208152600082518060208401526111f38160408501602087016111b0565b601f01601f19169190910160400192915050565b60208082526027908201527f4f6e6c79204f776e6572206f72204d4d2063616e2063616c6c207468697320666040820152663ab731ba34b7b760c91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006060820185835260208560208501526060604085015281855180845260808601915060208701935060005b818110156112ad57845183529383019391830191600101611291565b509098975050505050505050565b600080604083850312156112ce57600080fd5b505080516020909101519092909150565b6000602082840312156112f157600080fd5b5051919050565b6000825161130a8184602087016111b0565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201c7559646f4868dc095c288d46fb4b6904b90a3365f9532dfc5da2b638a7eca664736f6c63430008180033", - "sourceMap": "434:3801:37:-:0;;;1171:4:23;1128:48;;1075:53:37;;;;;;;;;-1:-1:-1;1099:22:37;:20;:22::i;:::-;434:3801;;7711:422:22;8870:21;7900:15;;;;;;;7896:76;;;7938:23;;-1:-1:-1;;;7938:23:22;;;;;;;;;;;7896:76;7985:14;;-1:-1:-1;;;;;7985:14:22;;;:34;7981:146;;8035:33;;-1:-1:-1;;;;;;8035:33:22;-1:-1:-1;;;;;8035:33:22;;;;;8087:29;;158:50:40;;;8087:29:22;;146:2:40;131:18;8087:29:22;;;;;;;7981:146;7760:373;7711:422::o;14:200:40:-;434:3801:37;;;;;;;;;;;;;;;;;;;;;;", - "linkReferences": {} - }, - "deployedBytecode": { - "object": "0x6080604052600436106100e85760003560e01c806390dd26271161008a578063a713961111610059578063a713961114610263578063ad3cb1cc14610283578063bd7fece8146102c1578063f2fde38b146102df57600080fd5b806390dd2627146101fd5780639a63d92d146102105780639e3d87cd14610230578063a41fe49f1461025057600080fd5b806352d1902d116100c657806352d1902d14610183578063715018a6146101a6578063893d20e8146101bb5780638da5cb5b146101e857600080fd5b80633c64f04b146100ed5780633e95784a1461014e5780634f1ef28614610170575b600080fd5b3480156100f957600080fd5b5061012c610108366004611016565b60006020819052908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060015b60405180910390f35b34801561015a57600080fd5b5061016e610169366004611016565b6102ff565b005b61016e61017e366004611061565b610343565b34801561018f57600080fd5b50610198610362565b604051908152602001610145565b3480156101b257600080fd5b5061016e61037f565b3480156101c757600080fd5b506101d0610393565b6040516001600160a01b039091168152602001610145565b3480156101f457600080fd5b506101d06103a2565b61016e61020b366004611123565b6103d0565b34801561021c57600080fd5b5061016e61022b366004611016565b610727565b34801561023c57600080fd5b5061016e61024b36600461114f565b610764565b61016e61025e366004611123565b6108b9565b34801561026f57600080fd5b5061016e61027e366004611195565b610b11565b34801561028f57600080fd5b506102b4604051806040016040528060058152602001640352e302e360dc1b81525081565b60405161014591906111d4565b3480156102cd57600080fd5b506001546001600160a01b03166101d0565b3480156102eb57600080fd5b5061016e6102fa366004611195565b610b3b565b610307610b79565b60048190556040518181527f3229ec4fa8cd4c21f0ff3e83b104a37d201dc2d5dcb9a3e199641e7cd2379bdc906020015b60405180910390a150565b61034b610bab565b61035482610c50565b61035e8282610c58565b5050565b600061036c610d1a565b5060008051602061131583398151915290565b610387610b79565b6103916000610d63565b565b600061039d6103a2565b905090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6103d86103a2565b6001600160a01b0316336001600160a01b0316148061040157506001546001600160a01b031633145b6104265760405162461bcd60e51b815260040161041d90611207565b60405180910390fd5b816000036104765760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642064657374696e6174696f6e20616464726573732e00000000604482015260640161041d565b600081116104d75760405162461bcd60e51b815260206004820152602860248201527f496e76616c696420616d6f756e742c2073686f756c6420626520686967686572604482015267103a3430b710181760c11b606482015260840161041d565b8034146105365760405162461bcd60e51b815260206004820152602760248201527f496e76616c696420616d6f756e742c2073686f756c64206d61746368206d7367604482015266173b30b63ab29760c91b606482015260840161041d565b60408051602081018590529081018390526060810182905260009060800160408051601f19818403018152918152815160209283012060008181529283905291206002015490915060ff16156105ce5760405162461bcd60e51b815260206004820152601b60248201527f5472616e7366657220616c72656164792070726f6365737365642e0000000000604482015260640161041d565b604080516060810182528481526020808201858152600183850181815260008781529384905285842094518555915190840155516002909201805460ff19169215159290921790915590516001600160a01b0385169034908381818185875af1925050503d806000811461065e576040519150601f19603f3d011682016040523d82523d6000602084013e610663565b606091505b50509050806106a75760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015260640161041d565b847fb2511a43843fb5ad643d84c36214ea6ac6368d0ba2f4714f59c2c36124e87e27336000808681526020019081526020016000206040516107189291906001600160a01b0392909216825280546020830152600181015460408301526002015460ff161515606082015260800190565b60405180910390a25050505050565b61072f610b79565b60038190556040518181527f037d258885f813f6f9a1239ba1e37c7619b400cdab6899abeacd56c24ed7471b90602001610338565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156107aa5750825b905060008267ffffffffffffffff1660011480156107c75750303b155b9050811580156107d5575080155b156107f35760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561081d57845460ff60401b1916600160401b1785555b61082633610dd4565b61082e610de5565b600280546001600160a01b03808c166001600160a01b03199283161790925560038a90556004899055600180549289169290911691909117905583156108ae57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050565b6108c16103a2565b6001600160a01b0316336001600160a01b031614806108ea57506001546001600160a01b031633145b6109065760405162461bcd60e51b815260040161041d90611207565b60408051602081018590529081018390526060810182905260009060800160408051601f198184030181529181528151602092830120600081815292839052912060028101549192509060ff16151560011461099a5760405162461bcd60e51b81526020600482015260136024820152722a3930b739b332b9103737ba103337bab7321760691b604482015260640161041d565b60408051600580825260c082019092526000916020820160a080368337019050509050856001600160801b0316816000815181106109da576109da61124e565b602002602001018181525050608086901c6001600160801b031681600181518110610a0757610a0761124e565b602002602001018181525050816000015481600281518110610a2b57610a2b61124e565b602002602001018181525050836001600160801b031681600381518110610a5457610a5461124e565b602002602001018181525050608084901c6001600160801b031681600481518110610a8157610a8161124e565b602090810291909101015260025460035460048054604051633e3aa6c560e01b81526001600160a01b0390941693633e3aa6c5933493610ac5939192889101611264565b604080518083038185885af1158015610ae2573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b0791906112bb565b5050505050505050565b610b19610b79565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b610b43610b79565b6001600160a01b038116610b6d57604051631e4fbdf760e01b81526000600482015260240161041d565b610b7681610d63565b50565b33610b826103a2565b6001600160a01b0316146103915760405163118cdaa760e01b815233600482015260240161041d565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480610c3257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610c26600080516020611315833981519152546001600160a01b031690565b6001600160a01b031614155b156103915760405163703e46dd60e11b815260040160405180910390fd5b610b76610b79565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610cb2575060408051601f3d908101601f19168201909252610caf918101906112df565b60015b610cda57604051634c9c8ce360e01b81526001600160a01b038316600482015260240161041d565b6000805160206113158339815191528114610d0b57604051632a87526960e21b81526004810182905260240161041d565b610d158383610ded565b505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103915760405163703e46dd60e11b815260040160405180910390fd5b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b610ddc610e43565b610b7681610e8c565b610391610e43565b610df682610e94565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a2805115610e3b57610d158282610ef9565b61035e610f6f565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661039157604051631afcd79f60e31b815260040160405180910390fd5b610b43610e43565b806001600160a01b03163b600003610eca57604051634c9c8ce360e01b81526001600160a01b038216600482015260240161041d565b60008051602061131583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b031684604051610f1691906112f8565b600060405180830381855af49150503d8060008114610f51576040519150601f19603f3d011682016040523d82523d6000602084013e610f56565b606091505b5091509150610f66858383610f8e565b95945050505050565b34156103915760405163b398979f60e01b815260040160405180910390fd5b606082610fa357610f9e82610fed565b610fe6565b8151158015610fba57506001600160a01b0384163b155b15610fe357604051639996b31560e01b81526001600160a01b038516600482015260240161041d565b50805b9392505050565b805115610ffd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561102857600080fd5b5035919050565b80356001600160a01b038116811461104657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561107457600080fd5b61107d8361102f565b9150602083013567ffffffffffffffff8082111561109a57600080fd5b818501915085601f8301126110ae57600080fd5b8135818111156110c0576110c061104b565b604051601f8201601f19908116603f011681019083821181831017156110e8576110e861104b565b8160405282815288602084870101111561110157600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60008060006060848603121561113857600080fd5b505081359360208301359350604090920135919050565b6000806000806080858703121561116557600080fd5b61116e8561102f565b9350602085013592506040850135915061118a6060860161102f565b905092959194509250565b6000602082840312156111a757600080fd5b610fe68261102f565b60005b838110156111cb5781810151838201526020016111b3565b50506000910152565b60208152600082518060208401526111f38160408501602087016111b0565b601f01601f19169190910160400192915050565b60208082526027908201527f4f6e6c79204f776e6572206f72204d4d2063616e2063616c6c207468697320666040820152663ab731ba34b7b760c91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b60006060820185835260208560208501526060604085015281855180845260808601915060208701935060005b818110156112ad57845183529383019391830191600101611291565b509098975050505050505050565b600080604083850312156112ce57600080fd5b505080516020909101519092909150565b6000602082840312156112f157600080fd5b5051919050565b6000825161130a8184602087016111b0565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca26469706673582212201c7559646f4868dc095c288d46fb4b6904b90a3365f9532dfc5da2b638a7eca664736f6c63430008180033", - "sourceMap": "434:3801:37:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;855:49;;;;;;;;;;-1:-1:-1;855:49:37;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;395:25:40;;;451:2;436:18;;429:34;;;;506:14;499:22;479:18;;;472:50;383:2;368:18;855:49:37;;;;;;;;3432:228;;;;;;;;;;-1:-1:-1;3432:228:37;;;;;:::i;:::-;;:::i;:::-;;4161:214:23;;;;;;:::i;:::-;;:::i;3708:134::-;;;;;;;;;;;;;:::i;:::-;;;2174:25:40;;;2162:2;2147:18;3708:134:23;2028:177:40;3155:101:21;;;;;;;;;;;;;:::i;3900:83:37:-;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;2374:32:40;;;2356:51;;2344:2;2329:18;3900:83:37;2210:203:40;2441:144:21;;;;;;;;;;;;;:::i;1653:800:37:-;;;;;;:::i;:::-;;:::i;3244:182::-;;;;;;;;;;-1:-1:-1;3244:182:37;;;;;:::i;:::-;;:::i;1196:450::-;;;;;;;;;;-1:-1:-1;1196:450:37;;;;;:::i;:::-;;:::i;2459:779::-;;;;;;:::i;:::-;;:::i;3787:107::-;;;;;;;;;;-1:-1:-1;3787:107:37;;;;;:::i;:::-;;:::i;1819:58:23:-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1819:58:23;;;;;;;;;;;;:::i;3689:92:37:-;;;;;;;;;;-1:-1:-1;3762:12:37;;-1:-1:-1;;;;;3762:12:37;3689:92;;3405:215:21;;;;;;;;;;-1:-1:-1;3405:215:21;;;;;:::i;:::-;;:::i;3432:228:37:-;2334:13:21;:11;:13::i;:::-;3530:25:37::1;:52:::0;;;3597:56:::1;::::0;2174:25:40;;;3597:56:37::1;::::0;2162:2:40;2147:18;3597:56:37::1;;;;;;;;3432:228:::0;:::o;4161:214:23:-;2655:13;:11;:13::i;:::-;4276:36:::1;4294:17;4276;:36::i;:::-;4322:46;4344:17;4363:4;4322:21;:46::i;:::-;4161:214:::0;;:::o;3708:134::-;3777:7;2926:20;:18;:20::i;:::-;-1:-1:-1;;;;;;;;;;;;3708:134:23;:::o;3155:101:21:-;2334:13;:11;:13::i;:::-;3219:30:::1;3246:1;3219:18;:30::i;:::-;3155:101::o:0;3900:83:37:-;3943:7;3969;:5;:7::i;:::-;3962:14;;3900:83;:::o;2441:144:21:-;1313:22;2570:8;-1:-1:-1;;;;;2570:8:21;;2441:144::o;1653:800:37:-;4044:7;:5;:7::i;:::-;-1:-1:-1;;;;;4030:21:37;:10;-1:-1:-1;;;;;4030:21:37;;:51;;;-1:-1:-1;4069:12:37;;-1:-1:-1;;;;;4069:12:37;4055:10;:26;4030:51;4022:103;;;;-1:-1:-1;;;4022:103:37;;;;;;;:::i;:::-;;;;;;;;;1774:11:::1;1789:1;1774:16:::0;1766:57:::1;;;::::0;-1:-1:-1;;;1766:57:37;;4780:2:40;1766:57:37::1;::::0;::::1;4762:21:40::0;4819:2;4799:18;;;4792:30;4858;4838:18;;;4831:58;4906:18;;1766:57:37::1;4578:352:40::0;1766:57:37::1;1850:1;1841:6;:10;1833:63;;;::::0;-1:-1:-1;;;1833:63:37;;5137:2:40;1833:63:37::1;::::0;::::1;5119:21:40::0;5176:2;5156:18;;;5149:30;5215:34;5195:18;;;5188:62;-1:-1:-1;;;5266:18:40;;;5259:38;5314:19;;1833:63:37::1;4935:404:40::0;1833:63:37::1;1927:6;1914:9;:19;1906:71;;;::::0;-1:-1:-1;;;1906:71:37;;5546:2:40;1906:71:37::1;::::0;::::1;5528:21:40::0;5585:2;5565:18;;;5558:30;5624:34;5604:18;;;5597:62;-1:-1:-1;;;5675:18:40;;;5668:37;5722:19;;1906:71:37::1;5344:403:40::0;1906:71:37::1;2014:46;::::0;;::::1;::::0;::::1;5937:19:40::0;;;5972:12;;;5965:28;;;6009:12;;;6002:28;;;1988:13:37::1;::::0;6046:12:40;;2014:46:37::1;::::0;;-1:-1:-1;;2014:46:37;;::::1;::::0;;;;;;2004:57;;2014:46:::1;2004:57:::0;;::::1;::::0;2079:9:::1;:16:::0;;;;;;;;;:23:::1;;::::0;2004:57;;-1:-1:-1;2079:23:37::1;;:32;2071:72;;;::::0;-1:-1:-1;;;2071:72:37;;6271:2:40;2071:72:37::1;::::0;::::1;6253:21:40::0;6310:2;6290:18;;;6283:30;6349:29;6329:18;;;6322:57;6396:18;;2071:72:37::1;6069:351:40::0;2071:72:37::1;2173:70;::::0;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;2237:4:::1;2173:70:::0;;;;;;-1:-1:-1;2154:16:37;;;;;;;;;;:89;;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;2154:89:37::1;::::0;::::1;;::::0;;;::::1;::::0;;;2272:65;;-1:-1:-1;;;;;2272:43:37;::::1;::::0;2323:9:::1;::::0;-1:-1:-1;2272:65:37;-1:-1:-1;2272:65:37;2323:9;2272:43;:65:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2254:83;;;2356:7;2348:36;;;::::0;-1:-1:-1;;;2348:36:37;;6837:2:40;2348:36:37::1;::::0;::::1;6819:21:40::0;6876:2;6856:18;;;6849:30;-1:-1:-1;;;6895:18:40;;;6888:46;6951:18;;2348:36:37::1;6635:340:40::0;2348:36:37::1;2408:7;2399:47;2417:10;2429:9;:16:::0;2439:5:::1;2429:16;;;;;;;;;;;2399:47;;;;;;-1:-1:-1::0;;;;;7232:32:40;;;;7214:51;;7301:13;;7296:2;7281:18;;7274:41;7261:1;7357:17;;7351:24;7346:2;7331:18;;7324:52;7448:4;7436:17;7430:24;7456:4;7426:35;7419:43;7412:51;7407:2;7392:18;;7385:79;7201:3;7186:19;;6980:490;2399:47:37::1;;;;;;;;1756:697;;1653:800:::0;;;:::o;3244:182::-;2334:13:21;:11;:13::i;:::-;3324:16:37::1;:34:::0;;;3373:38:::1;::::0;2174:25:40;;;3373:38:37::1;::::0;2162:2:40;2147:18;3373:38:37::1;2028:177:40::0;1196:450:37;8870:21:22;4302:15;;-1:-1:-1;;;4302:15:22;;;;4301:16;;4348:14;;4158:30;4726:16;;:34;;;;;4746:14;4726:34;4706:54;;4770:17;4790:11;:16;;4805:1;4790:16;:50;;;;-1:-1:-1;4818:4:22;4810:25;:30;4790:50;4770:70;;4856:12;4855:13;:30;;;;;4873:12;4872:13;4855:30;4851:91;;;4908:23;;-1:-1:-1;;;4908:23:22;;;;;;;;;;;4851:91;4951:18;;-1:-1:-1;;4951:18:22;4968:1;4951:18;;;4979:67;;;;5013:22;;-1:-1:-1;;;;5013:22:22;-1:-1:-1;;;5013:22:22;;;4979:67;1380:26:37::1;1395:10;1380:14;:26::i;:::-;1416:24;:22;:24::i;:::-;1451:12;:46:::0;;-1:-1:-1;;;;;1451:46:37;;::::1;-1:-1:-1::0;;;;;;1451:46:37;;::::1;;::::0;;;1507:16:::1;:34:::0;;;1551:25:::1;:52:::0;;;1451:46;1613:26;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;5066:101:22;;;;5100:23;;-1:-1:-1;;;;5100:23:22;;;5142:14;;-1:-1:-1;7628:50:40;;5142:14:22;;7616:2:40;7601:18;5142:14:22;;;;;;;5066:101;4092:1081;;;;;1196:450:37;;;;:::o;2459:779::-;4044:7;:5;:7::i;:::-;-1:-1:-1;;;;;4030:21:37;:10;-1:-1:-1;;;;;4030:21:37;;:51;;;-1:-1:-1;4069:12:37;;-1:-1:-1;;;;;4069:12:37;4055:10;:26;4030:51;4022:103;;;;-1:-1:-1;;;4022:103:37;;;;;;;:::i;:::-;2598:46:::1;::::0;;::::1;::::0;::::1;5937:19:40::0;;;5972:12;;;5965:28;;;6009:12;;;6002:28;;;2572:13:37::1;::::0;6046:12:40;;2598:46:37::1;::::0;;-1:-1:-1;;2598:46:37;;::::1;::::0;;;;;;2588:57;;2598:46:::1;2588:57:::0;;::::1;::::0;2655:33:::1;2691:16:::0;;;;;;;;;2725:19:::1;::::0;::::1;::::0;2588:57;;-1:-1:-1;2691:16:37;2725:19:::1;;:27;;:19:::0;:27:::1;2717:59;;;::::0;-1:-1:-1;;;2717:59:37;;7891:2:40;2717:59:37::1;::::0;::::1;7873:21:40::0;7930:2;7910:18;;;7903:30;-1:-1:-1;;;7949:18:40;;;7942:49;8008:18;;2717:59:37::1;7689:343:40::0;2717:59:37::1;2814:16;::::0;;2828:1:::1;2814:16:::0;;;;;::::1;::::0;;;2787:24:::1;::::0;2814:16:::1;::::0;::::1;::::0;;::::1;::::0;::::1;;::::0;-1:-1:-1;2814:16:37::1;2787:43;;2861:7;-1:-1:-1::0;;;;;2840:29:37::1;:7;2848:1;2840:10;;;;;;;;:::i;:::-;;;;;;:29;;;::::0;::::1;2918:3;2907:7;:14;;-1:-1:-1::0;;;;;2886:36:37::1;:7;2894:1;2886:10;;;;;;;;:::i;:::-;;;;;;:36;;;::::0;::::1;2953:12;:24;;;2940:7;2948:1;2940:10;;;;;;;;:::i;:::-;;;;;;:37;;;::::0;::::1;3008:6;-1:-1:-1::0;;;;;2987:28:37::1;:7;2995:1;2987:10;;;;;;;;:::i;:::-;;;;;;:28;;;::::0;::::1;3063:3;3053:6;:13;;-1:-1:-1::0;;;;;3032:35:37::1;:7;3040:1;3032:10;;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;:35;3094:12:::1;::::0;3154:16:::1;::::0;3184:25:::1;::::0;;3094:137:::1;::::0;-1:-1:-1;;;3094:137:37;;-1:-1:-1;;;;;3094:12:37;;::::1;::::0;:28:::1;::::0;3130:9:::1;::::0;3094:137:::1;::::0;3154:16;;3223:7;;3094:137:::1;;:::i;:::-;;::::0;::::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;2562:676;;;2459:779:::0;;;:::o;3787:107::-;2334:13:21;:11;:13::i;:::-;3860:12:37::1;:27:::0;;-1:-1:-1;;;;;;3860:27:37::1;-1:-1:-1::0;;;;;3860:27:37;;;::::1;::::0;;;::::1;::::0;;3787:107::o;3405:215:21:-;2334:13;:11;:13::i;:::-;-1:-1:-1;;;;;3489:22:21;::::1;3485:91;;3534:31;::::0;-1:-1:-1;;;3534:31:21;;3562:1:::1;3534:31;::::0;::::1;2356:51:40::0;2329:18;;3534:31:21::1;2210:203:40::0;3485:91:21::1;3585:28;3604:8;3585:18;:28::i;:::-;3405:215:::0;:::o;2658:162::-;966:10:24;2717:7:21;:5;:7::i;:::-;-1:-1:-1;;;;;2717:23:21;;2713:101;;2763:40;;-1:-1:-1;;;2763:40:21;;966:10:24;2763:40:21;;;2356:51:40;2329:18;;2763:40:21;2210:203:40;4603:312:23;4683:4;-1:-1:-1;;;;;4692:6:23;4675:23;;;:120;;;4789:6;-1:-1:-1;;;;;4753:42:23;:32;-1:-1:-1;;;;;;;;;;;2036:53:27;-1:-1:-1;;;;;2036:53:27;;1958:138;4753:32:23;-1:-1:-1;;;;;4753:42:23;;;4675:120;4658:251;;;4869:29;;-1:-1:-1;;;4869:29:23;;;;;;;;;;;4149:84:37;2334:13:21;:11;:13::i;6057:538:23:-;6174:17;-1:-1:-1;;;;;6156:50:23;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6156:52:23;;;;;;;;-1:-1:-1;;6156:52:23;;;;;;;;;;;;:::i;:::-;;;6152:437;;6518:60;;-1:-1:-1;;;6518:60:23;;-1:-1:-1;;;;;2374:32:40;;6518:60:23;;;2356:51:40;2329:18;;6518:60:23;2210:203:40;6152:437:23;-1:-1:-1;;;;;;;;;;;6250:40:23;;6246:120;;6317:34;;-1:-1:-1;;;6317:34:23;;;;;2174:25:40;;;2147:18;;6317:34:23;2028:177:40;6246:120:23;6379:54;6409:17;6428:4;6379:29;:54::i;:::-;6209:235;6057:538;;:::o;5032:213::-;5106:4;-1:-1:-1;;;;;5115:6:23;5098:23;;5094:145;;5199:29;;-1:-1:-1;;;5199:29:23;;;;;;;;;;;3774:248:21;1313:22;3923:8;;-1:-1:-1;;;;;;3941:19:21;;-1:-1:-1;;;;;3941:19:21;;;;;;;;3975:40;;3923:8;;;;;3975:40;;3847:24;;3975:40;3837:185;;3774:248;:::o;1847:127::-;6931:20:22;:18;:20::i;:::-;1929:38:21::1;1954:12;1929:24;:38::i;2970:67:23:-:0;6931:20:22;:18;:20::i;2781:335:27:-;2872:37;2891:17;2872:18;:37::i;:::-;2924:27;;-1:-1:-1;;;;;2924:27:27;;;;;;;;2966:11;;:15;2962:148;;2997:53;3026:17;3045:4;2997:28;:53::i;2962:148::-;3081:18;:16;:18::i;7084:141:22:-;8870:21;8560:40;-1:-1:-1;;;8560:40:22;;;;7146:73;;7191:17;;-1:-1:-1;;;7191:17:22;;;;;;;;;;;1980:235:21;6931:20:22;:18;:20::i;2188:281:27:-;2265:17;-1:-1:-1;;;;;2265:29:27;;2298:1;2265:34;2261:119;;2322:47;;-1:-1:-1;;;2322:47:27;;-1:-1:-1;;;;;2374:32:40;;2322:47:27;;;2356:51:40;2329:18;;2322:47:27;2210:203:40;2261:119:27;-1:-1:-1;;;;;;;;;;;2389:73:27;;-1:-1:-1;;;;;;2389:73:27;-1:-1:-1;;;;;2389:73:27;;;;;;;;;;2188:281::o;4106:253:31:-;4189:12;4214;4228:23;4255:6;-1:-1:-1;;;;;4255:19:31;4275:4;4255:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4213:67;;;;4297:55;4324:6;4332:7;4341:10;4297:26;:55::i;:::-;4290:62;4106:253;-1:-1:-1;;;;;4106:253:31:o;6603:122:27:-;6653:9;:13;6649:70;;6689:19;;-1:-1:-1;;;6689:19:27;;;;;;;;;;;4625:582:31;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;;;;;;5071:18:31;;;:23;5045:49;5041:119;;;5121:24;;-1:-1:-1;;;5121:24:31;;-1:-1:-1;;;;;2374:32:40;;5121:24:31;;;2356:51:40;2329:18;;5121:24:31;2210:203:40;5041:119:31;-1:-1:-1;5180:10:31;4793:408;4625:582;;;;;:::o;5743:516::-;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;-1:-1:-1;;;6225:17:31;;;;;;;;;;;14:180:40;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:40;;14:180;-1:-1:-1;14:180:40:o;718:173::-;786:20;;-1:-1:-1;;;;;835:31:40;;825:42;;815:70;;881:1;878;871:12;815:70;718:173;;;:::o;896:127::-;957:10;952:3;948:20;945:1;938:31;988:4;985:1;978:15;1012:4;1009:1;1002:15;1028:995;1105:6;1113;1166:2;1154:9;1145:7;1141:23;1137:32;1134:52;;;1182:1;1179;1172:12;1134:52;1205:29;1224:9;1205:29;:::i;:::-;1195:39;;1285:2;1274:9;1270:18;1257:32;1308:18;1349:2;1341:6;1338:14;1335:34;;;1365:1;1362;1355:12;1335:34;1403:6;1392:9;1388:22;1378:32;;1448:7;1441:4;1437:2;1433:13;1429:27;1419:55;;1470:1;1467;1460:12;1419:55;1506:2;1493:16;1528:2;1524;1521:10;1518:36;;;1534:18;;:::i;:::-;1609:2;1603:9;1577:2;1663:13;;-1:-1:-1;;1659:22:40;;;1683:2;1655:31;1651:40;1639:53;;;1707:18;;;1727:22;;;1704:46;1701:72;;;1753:18;;:::i;:::-;1793:10;1789:2;1782:22;1828:2;1820:6;1813:18;1868:7;1863:2;1858;1854;1850:11;1846:20;1843:33;1840:53;;;1889:1;1886;1879:12;1840:53;1945:2;1940;1936;1932:11;1927:2;1919:6;1915:15;1902:46;1990:1;1985:2;1980;1972:6;1968:15;1964:24;1957:35;2011:6;2001:16;;;;;;;1028:995;;;;;:::o;2418:316::-;2495:6;2503;2511;2564:2;2552:9;2543:7;2539:23;2535:32;2532:52;;;2580:1;2577;2570:12;2532:52;-1:-1:-1;;2603:23:40;;;2673:2;2658:18;;2645:32;;-1:-1:-1;2724:2:40;2709:18;;;2696:32;;2418:316;-1:-1:-1;2418:316:40:o;2739:397::-;2825:6;2833;2841;2849;2902:3;2890:9;2881:7;2877:23;2873:33;2870:53;;;2919:1;2916;2909:12;2870:53;2942:29;2961:9;2942:29;:::i;:::-;2932:39;;3018:2;3007:9;3003:18;2990:32;2980:42;;3069:2;3058:9;3054:18;3041:32;3031:42;;3092:38;3126:2;3115:9;3111:18;3092:38;:::i;:::-;3082:48;;2739:397;;;;;;;:::o;3141:186::-;3200:6;3253:2;3241:9;3232:7;3228:23;3224:32;3221:52;;;3269:1;3266;3259:12;3221:52;3292:29;3311:9;3292:29;:::i;3332:250::-;3417:1;3427:113;3441:6;3438:1;3435:13;3427:113;;;3517:11;;;3511:18;3498:11;;;3491:39;3463:2;3456:10;3427:113;;;-1:-1:-1;;3574:1:40;3556:16;;3549:27;3332:250::o;3587:396::-;3736:2;3725:9;3718:21;3699:4;3768:6;3762:13;3811:6;3806:2;3795:9;3791:18;3784:34;3827:79;3899:6;3894:2;3883:9;3879:18;3874:2;3866:6;3862:15;3827:79;:::i;:::-;3967:2;3946:15;-1:-1:-1;;3942:29:40;3927:45;;;;3974:2;3923:54;;3587:396;-1:-1:-1;;3587:396:40:o;4170:403::-;4372:2;4354:21;;;4411:2;4391:18;;;4384:30;4450:34;4445:2;4430:18;;4423:62;-1:-1:-1;;;4516:2:40;4501:18;;4494:37;4563:3;4548:19;;4170:403::o;8037:127::-;8098:10;8093:3;8089:20;8086:1;8079:31;8129:4;8126:1;8119:15;8153:4;8150:1;8143:15;8169:775;8367:4;8415:2;8404:9;8400:18;8445:6;8434:9;8427:25;8471:2;8509:6;8504:2;8493:9;8489:18;8482:34;8552:2;8547;8536:9;8532:18;8525:30;8575:6;8610;8604:13;8641:6;8633;8626:22;8679:3;8668:9;8664:19;8657:26;;8718:2;8710:6;8706:15;8692:29;;8739:1;8749:169;8763:6;8760:1;8757:13;8749:169;;;8824:13;;8812:26;;8893:15;;;;8858:12;;;;8785:1;8778:9;8749:169;;;-1:-1:-1;8935:3:40;;8169:775;-1:-1:-1;;;;;;;;8169:775:40:o;8949:245::-;9028:6;9036;9089:2;9077:9;9068:7;9064:23;9060:32;9057:52;;;9105:1;9102;9095:12;9057:52;-1:-1:-1;;9128:16:40;;9184:2;9169:18;;;9163:25;9128:16;;9163:25;;-1:-1:-1;8949:245:40:o;9199:184::-;9269:6;9322:2;9310:9;9301:7;9297:23;9293:32;9290:52;;;9338:1;9335;9328:12;9290:52;-1:-1:-1;9361:16:40;;9199:184;-1:-1:-1;9199:184:40:o;9388:287::-;9517:3;9555:6;9549:13;9571:66;9630:6;9625:3;9618:4;9610:6;9606:17;9571:66;:::i;:::-;9653:16;;;;;9388:287;-1:-1:-1;;9388:287:40:o", - "linkReferences": {}, - "immutableReferences": { - "45067": [ - { - "start": 2998, - "length": 32 - }, - { - "start": 3039, - "length": 32 - }, - { - "start": 3365, - "length": 32 - } - ] - } - }, - "methodIdentifiers": { - "UPGRADE_INTERFACE_VERSION()": "ad3cb1cc", - "getMMAddress()": "bd7fece8", - "getOwner()": "893d20e8", - "initialize(address,uint256,uint256,address)": "9e3d87cd", - "owner()": "8da5cb5b", - "proxiableUUID()": "52d1902d", - "renounceOwnership()": "715018a6", - "setEscrowAddress(uint256)": "9a63d92d", - "setEscrowWithdrawSelector(uint256)": "3e95784a", - "setMMAddress(address)": "a7139611", - "transfer(uint256,uint256,uint256)": "90dd2627", - "transferOwnership(address)": "f2fde38b", - "transfers(bytes32)": "3c64f04b", - "upgradeToAndCall(address,bytes)": "4f1ef286", - "withdraw(uint256,uint256,uint256)": "a41fe49f" - }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERC1967NonPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newEscrowAddress\",\"type\":\"uint256\"}],\"name\":\"ModifiedEscrowAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newEscrowWithdrawSelector\",\"type\":\"uint256\"}],\"name\":\"ModifiedEscrowWithdrawSelector\",\"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\":true,\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"srcAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"destAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isUsed\",\"type\":\"bool\"}],\"indexed\":false,\"internalType\":\"struct PaymentRegistry.TransferInfo\",\"name\":\"transferInfo\",\"type\":\"tuple\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"UPGRADE_INTERFACE_VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMMAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"snMessaging\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snEscrowAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"snEscrowWithdrawSelector\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"marketMaker\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"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\":\"uint256\",\"name\":\"snEscrowAddress\",\"type\":\"uint256\"}],\"name\":\"setEscrowAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snEscrowWithdrawSelector\",\"type\":\"uint256\"}],\"name\":\"setEscrowWithdrawSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newMMAddress\",\"type\":\"address\"}],\"name\":\"setMMAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"transfers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"destAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isUsed\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"orderId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"destAddress\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"AddressEmptyCode(address)\":[{\"details\":\"There's no code at `target` (it is not a contract).\"}],\"ERC1967InvalidImplementation(address)\":[{\"details\":\"The `implementation` of the proxy is invalid.\"}],\"ERC1967NonPayable()\":[{\"details\":\"An upgrade function sees `msg.value > 0` that may be lost.\"}],\"FailedInnerCall()\":[{\"details\":\"A call to an address target failed. The target may have reverted.\"}],\"InvalidInitialization()\":[{\"details\":\"The contract is already initialized.\"}],\"NotInitializing()\":[{\"details\":\"The contract is not initializing.\"}],\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}],\"UUPSUnauthorizedCallContext()\":[{\"details\":\"The call is from an unauthorized context.\"}],\"UUPSUnsupportedProxiableUUID(bytes32)\":[{\"details\":\"The storage `slot` is unsupported as a UUID.\"}]},\"events\":{\"Initialized(uint64)\":{\"details\":\"Triggered when the contract has been initialized or reinitialized.\"},\"Upgraded(address)\":{\"details\":\"Emitted when the implementation is upgraded.\"}},\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"upgradeToAndCall(address,bytes)\":{\"custom:oz-upgrades-unsafe-allow-reachable\":\"delegatecall\",\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/PaymentRegistry.sol\":\"PaymentRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/\",\":starknet/=lib/starknet/\"]},\"sources\":{\"lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol\":{\"keccak256\":\"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9706d43a0124053d9880f6e31a59f31bc0a6a3dc1acd66ce0a16e1111658c5f6\",\"dweb:/ipfs/QmUFmfowzkRwGtDu36cXV9SPTBHJ3n7dG9xQiK5B28jTf2\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\":{\"keccak256\":\"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609\",\"dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol\":{\"keccak256\":\"0x490959f972df54829d0ffacb71fa025429d9b7b9ebd118f418b41e9c0041ef73\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://1883bc1a16a88922abccd415d1b41caf00c38ee581ae3e5976018d9c17d2c4b7\",\"dweb:/ipfs/QmP2vzQM8RR8ce675KhuZEaUicAPRMUbPLwBsTpxByvn18\"]},\"lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol\":{\"keccak256\":\"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://08e39f23d5b4692f9a40803e53a8156b72b4c1f9902a88cd65ba964db103dab9\",\"dweb:/ipfs/QmPKn6EYDgpga7KtpkA8wV2yJCYGMtc9K4LkJfhKX2RVSV\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol\":{\"keccak256\":\"0xf5c04a8bf51755681f7db413095377dfd1a05b98b6326fb1da0e9a297057caf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f57690465f41860906cf84e6970baaacae9d05b8311674812e6b502bb510441e\",\"dweb:/ipfs/Qme5swSUieatWond1BHyZaEztdLAPu67KcoQTeY4pH5wVd\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol\":{\"keccak256\":\"0xf5769456c75195b708e2b006c58f7f349b79752ad13d7c70ec1db05739972b22\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d363b2bdfba6d28207d661c3b3c23beeab6405a8960ef444f8c61c2afe997600\",\"dweb:/ipfs/QmNcgJD5RL25RKtShX32WTRp1xRfPyThThA7CajTnXMjMA\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol\":{\"keccak256\":\"0xc59a78b07b44b2cf2e8ab4175fca91e8eca1eee2df7357b8d2a8833e5ea1f64c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5aa4f07e65444784c29cd7bfcc2341b34381e4e5b5da9f0c5bd00d7f430e66fa\",\"dweb:/ipfs/QmWRMh4Q9DpaU9GvsiXmDdoNYMyyece9if7hnfLz7uqzWM\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245\",\"dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y\"]},\"lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol\":{\"keccak256\":\"0x70d9a9cf8d5cc830d7396505ef8eb9686bd0c60a29c6644bd6cc278f9bab8ebe\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://719abb402c11be12355088da587ffd971fee1b035b5aa6b1ba3b1a9493d3c1d7\",\"dweb:/ipfs/QmanHMFVDqVtZAFFaH1CeGQWoHWsFnWHH75fCrguwi77Hq\"]},\"lib/starknet/IStarknetMessaging.sol\":{\"keccak256\":\"0x40014108e2795fd544af0f6322882e99cc3f0872990d504c1ccebce2afea9617\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://d3eec1c3f47243734573b4ac3fc42db2eee4d110d8c39be16fbc6f93498e318d\",\"dweb:/ipfs/QmdYdJFPdEPUFQATa24jNvL59GtdoJeym1w7EARyCq8CvY\"]},\"lib/starknet/IStarknetMessagingEvents.sol\":{\"keccak256\":\"0x71171b10854a020b53b175ed9dc068a56675e2b80f823c0f841ae18977b96e8c\",\"license\":\"Apache-2.0.\",\"urls\":[\"bzz-raw://70d345e80b4fbbceba9bc0b64be0688710434a5b5d6eb4a60fae808d2bcc03d9\",\"dweb:/ipfs/QmQBdERT6NHiC2cDvTwS7aob1CwuuqQZvZt5ibGzvYawvB\"]},\"src/PaymentRegistry.sol\":{\"keccak256\":\"0x0686fd2e64a8367fcb430b3cfce5e809b0b176875c9dfaaa872cd739a6bf02b5\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8712ff0ff60781e2be5bbbf2ce4af125af75a4c90dc33cc652fa95aa3ed2dec7\",\"dweb:/ipfs/QmUmXBAzbRNo9DQv2KNBfsgM8S8VZKd8idvtS8CME8nGkA\"]}},\"version\":1}", - "metadata": { - "compiler": { - "version": "0.8.24+commit.e11b9ed9" - }, - "language": "Solidity", - "output": { - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "type": "error", - "name": "AddressEmptyCode" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "type": "error", - "name": "ERC1967InvalidImplementation" - }, - { - "inputs": [], - "type": "error", - "name": "ERC1967NonPayable" - }, - { - "inputs": [], - "type": "error", - "name": "FailedInnerCall" - }, - { - "inputs": [], - "type": "error", - "name": "InvalidInitialization" - }, - { - "inputs": [], - "type": "error", - "name": "NotInitializing" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "type": "error", - "name": "OwnableInvalidOwner" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "type": "error", - "name": "OwnableUnauthorizedAccount" - }, - { - "inputs": [], - "type": "error", - "name": "UUPSUnauthorizedCallContext" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "slot", - "type": "bytes32" - } - ], - "type": "error", - "name": "UUPSUnsupportedProxiableUUID" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "version", - "type": "uint64", - "indexed": false - } - ], - "type": "event", - "name": "Initialized", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newEscrowAddress", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "ModifiedEscrowAddress", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "newEscrowWithdrawSelector", - "type": "uint256", - "indexed": false - } - ], - "type": "event", - "name": "ModifiedEscrowWithdrawSelector", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "previousOwner", - "type": "address", - "indexed": true - }, - { - "internalType": "address", - "name": "newOwner", - "type": "address", - "indexed": true - } - ], - "type": "event", - "name": "OwnershipTransferred", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "orderId", - "type": "uint256", - "indexed": true - }, - { - "internalType": "address", - "name": "srcAddress", - "type": "address", - "indexed": false - }, - { - "internalType": "struct PaymentRegistry.TransferInfo", - "name": "transferInfo", - "type": "tuple", - "components": [ - { - "internalType": "uint256", - "name": "destAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isUsed", - "type": "bool" - } - ], - "indexed": false - } - ], - "type": "event", - "name": "Transfer", - "anonymous": false - }, - { - "inputs": [ - { - "internalType": "address", - "name": "implementation", - "type": "address", - "indexed": true - } - ], - "type": "event", - "name": "Upgraded", - "anonymous": false - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "getMMAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "getOwner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "name": "snMessaging", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snEscrowAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "snEscrowWithdrawSelector", - "type": "uint256" - }, - { - "internalType": "address", - "name": "marketMaker", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "initialize" - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ] - }, - { - "inputs": [], - "stateMutability": "view", - "type": "function", - "name": "proxiableUUID", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ] - }, - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "function", - "name": "renounceOwnership" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snEscrowAddress", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "setEscrowAddress" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snEscrowWithdrawSelector", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "setEscrowWithdrawSelector" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newMMAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "setMMAddress" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "orderId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "destAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function", - "name": "transfer" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function", - "name": "transferOwnership" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "name": "transfers", - "outputs": [ - { - "internalType": "uint256", - "name": "destAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "isUsed", - "type": "bool" - } - ] - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newImplementation", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "stateMutability": "payable", - "type": "function", - "name": "upgradeToAndCall" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "orderId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "destAddress", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function", - "name": "withdraw" - } - ], - "devdoc": { - "kind": "dev", - "methods": { - "owner()": { - "details": "Returns the address of the current owner." - }, - "proxiableUUID()": { - "details": "Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." - }, - "renounceOwnership()": { - "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." - }, - "transferOwnership(address)": { - "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." - }, - "upgradeToAndCall(address,bytes)": { - "custom:oz-upgrades-unsafe-allow-reachable": "delegatecall", - "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } - }, - "settings": { - "remappings": [ - "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", - "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/", - "ds-test/=lib/forge-std/lib/ds-test/src/", - "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", - "forge-std/=lib/forge-std/src/", - "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", - "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/", - "starknet/=lib/starknet/" - ], - "optimizer": { - "enabled": true, - "runs": 200 - }, - "metadata": { - "bytecodeHash": "ipfs" - }, - "compilationTarget": { - "src/PaymentRegistry.sol": "PaymentRegistry" - }, - "evmVersion": "paris", - "libraries": {} - }, - "sources": { - "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol": { - "keccak256": "0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a", - "urls": [ - "bzz-raw://9706d43a0124053d9880f6e31a59f31bc0a6a3dc1acd66ce0a16e1111658c5f6", - "dweb:/ipfs/QmUFmfowzkRwGtDu36cXV9SPTBHJ3n7dG9xQiK5B28jTf2" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol": { - "keccak256": "0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b", - "urls": [ - "bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609", - "dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol": { - "keccak256": "0x490959f972df54829d0ffacb71fa025429d9b7b9ebd118f418b41e9c0041ef73", - "urls": [ - "bzz-raw://1883bc1a16a88922abccd415d1b41caf00c38ee581ae3e5976018d9c17d2c4b7", - "dweb:/ipfs/QmP2vzQM8RR8ce675KhuZEaUicAPRMUbPLwBsTpxByvn18" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol": { - "keccak256": "0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397", - "urls": [ - "bzz-raw://08e39f23d5b4692f9a40803e53a8156b72b4c1f9902a88cd65ba964db103dab9", - "dweb:/ipfs/QmPKn6EYDgpga7KtpkA8wV2yJCYGMtc9K4LkJfhKX2RVSV" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol": { - "keccak256": "0xf5c04a8bf51755681f7db413095377dfd1a05b98b6326fb1da0e9a297057caf0", - "urls": [ - "bzz-raw://f57690465f41860906cf84e6970baaacae9d05b8311674812e6b502bb510441e", - "dweb:/ipfs/Qme5swSUieatWond1BHyZaEztdLAPu67KcoQTeY4pH5wVd" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol": { - "keccak256": "0xf5769456c75195b708e2b006c58f7f349b79752ad13d7c70ec1db05739972b22", - "urls": [ - "bzz-raw://d363b2bdfba6d28207d661c3b3c23beeab6405a8960ef444f8c61c2afe997600", - "dweb:/ipfs/QmNcgJD5RL25RKtShX32WTRp1xRfPyThThA7CajTnXMjMA" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol": { - "keccak256": "0xc59a78b07b44b2cf2e8ab4175fca91e8eca1eee2df7357b8d2a8833e5ea1f64c", - "urls": [ - "bzz-raw://5aa4f07e65444784c29cd7bfcc2341b34381e4e5b5da9f0c5bd00d7f430e66fa", - "dweb:/ipfs/QmWRMh4Q9DpaU9GvsiXmDdoNYMyyece9if7hnfLz7uqzWM" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/Address.sol": { - "keccak256": "0xaf28a975a78550e45f65e559a3ad6a5ad43b9b8a37366999abd1b7084eb70721", - "urls": [ - "bzz-raw://b7bd24e224f67f65bfadf85dc2929fa965456bb2415478bd0125471b5ce35245", - "dweb:/ipfs/QmRaydGr8BTHs1kvaZfsNU69pKzUAGFrvABn1KiRSbE51y" - ], - "license": "MIT" - }, - "lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol": { - "keccak256": "0x70d9a9cf8d5cc830d7396505ef8eb9686bd0c60a29c6644bd6cc278f9bab8ebe", - "urls": [ - "bzz-raw://719abb402c11be12355088da587ffd971fee1b035b5aa6b1ba3b1a9493d3c1d7", - "dweb:/ipfs/QmanHMFVDqVtZAFFaH1CeGQWoHWsFnWHH75fCrguwi77Hq" - ], - "license": "MIT" - }, - "lib/starknet/IStarknetMessaging.sol": { - "keccak256": "0x40014108e2795fd544af0f6322882e99cc3f0872990d504c1ccebce2afea9617", - "urls": [ - "bzz-raw://d3eec1c3f47243734573b4ac3fc42db2eee4d110d8c39be16fbc6f93498e318d", - "dweb:/ipfs/QmdYdJFPdEPUFQATa24jNvL59GtdoJeym1w7EARyCq8CvY" - ], - "license": "Apache-2.0." - }, - "lib/starknet/IStarknetMessagingEvents.sol": { - "keccak256": "0x71171b10854a020b53b175ed9dc068a56675e2b80f823c0f841ae18977b96e8c", - "urls": [ - "bzz-raw://70d345e80b4fbbceba9bc0b64be0688710434a5b5d6eb4a60fae808d2bcc03d9", - "dweb:/ipfs/QmQBdERT6NHiC2cDvTwS7aob1CwuuqQZvZt5ibGzvYawvB" - ], - "license": "Apache-2.0." - }, - "src/PaymentRegistry.sol": { - "keccak256": "0x0686fd2e64a8367fcb430b3cfce5e809b0b176875c9dfaaa872cd739a6bf02b5", - "urls": [ - "bzz-raw://8712ff0ff60781e2be5bbbf2ce4af125af75a4c90dc33cc652fa95aa3ed2dec7", - "dweb:/ipfs/QmUmXBAzbRNo9DQv2KNBfsgM8S8VZKd8idvtS8CME8nGkA" - ], - "license": "Apache-2.0" - } - }, - "version": 1 - }, - "ast": { - "absolutePath": "src/PaymentRegistry.sol", - "id": 46965, - "exportedSymbols": { - "IStarknetMessaging": [ - 46269 - ], - "Initializable": [ - 45047 - ], - "OwnableUpgradeable": [ - 44793 - ], - "PaymentRegistry": [ - 46964 - ], - "UUPSUpgradeable": [ - 45229 - ] - }, - "nodeType": "SourceUnit", - "src": "39:4197:37", - "nodes": [ - { - "id": 46571, - "nodeType": "PragmaDirective", - "src": "39:24:37", - "nodes": [], - "literals": [ - "solidity", - "^", - "0.8", - ".21" - ] - }, - { - "id": 46573, - "nodeType": "ImportDirective", - "src": "65:67:37", - "nodes": [], - "absolutePath": "lib/starknet/IStarknetMessaging.sol", - "file": "starknet/IStarknetMessaging.sol", - "nameLocation": "-1:-1:-1", - "scope": 46965, - "sourceUnit": 46270, - "symbolAliases": [ - { - "foreign": { - "id": 46572, - "name": "IStarknetMessaging", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46269, - "src": "73:18:37", - "typeDescriptions": {} - }, - "nameLocation": "-1:-1:-1" - } - ], - "unitAlias": "" - }, - { - "id": 46575, - "nodeType": "ImportDirective", - "src": "133:101:37", - "nodes": [], - "absolutePath": "lib/openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol", - "nameLocation": "-1:-1:-1", - "scope": 46965, - "sourceUnit": 44794, - "symbolAliases": [ - { - "foreign": { - "id": 46574, - "name": "OwnableUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44793, - "src": "141:18:37", - "typeDescriptions": {} - }, - "nameLocation": "-1:-1:-1" - } - ], - "unitAlias": "" - }, - { - "id": 46577, - "nodeType": "ImportDirective", - "src": "235:96:37", - "nodes": [], - "absolutePath": "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol", - "file": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol", - "nameLocation": "-1:-1:-1", - "scope": 46965, - "sourceUnit": 45048, - "symbolAliases": [ - { - "foreign": { - "id": 46576, - "name": "Initializable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45047, - "src": "243:13:37", - "typeDescriptions": {} - }, - "nameLocation": "-1:-1:-1" - } - ], - "unitAlias": "" - }, - { - "id": 46579, - "nodeType": "ImportDirective", - "src": "332:100:37", - "nodes": [], - "absolutePath": "lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol", - "file": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol", - "nameLocation": "-1:-1:-1", - "scope": 46965, - "sourceUnit": 45230, - "symbolAliases": [ - { - "foreign": { - "id": 46578, - "name": "UUPSUpgradeable", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45229, - "src": "340:15:37", - "typeDescriptions": {} - }, - "nameLocation": "-1:-1:-1" - } - ], - "unitAlias": "" - }, - { - "id": 46964, - "nodeType": "ContractDefinition", - "src": "434:3801:37", - "nodes": [ - { - "id": 46592, - "nodeType": "StructDefinition", - "src": "519:101:37", - "nodes": [], - "canonicalName": "PaymentRegistry.TransferInfo", - "members": [ - { - "constant": false, - "id": 46587, - "mutability": "mutable", - "name": "destAddress", - "nameLocation": "557:11:37", - "nodeType": "VariableDeclaration", - "scope": 46592, - "src": "549:19:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46586, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "549:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46589, - "mutability": "mutable", - "name": "amount", - "nameLocation": "586:6:37", - "nodeType": "VariableDeclaration", - "scope": 46592, - "src": "578:14:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46588, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "578:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46591, - "mutability": "mutable", - "name": "isUsed", - "nameLocation": "607:6:37", - "nodeType": "VariableDeclaration", - "scope": 46592, - "src": "602:11:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 46590, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "602:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "name": "TransferInfo", - "nameLocation": "526:12:37", - "scope": 46964, - "visibility": "public" - }, - { - "id": 46601, - "nodeType": "EventDefinition", - "src": "626:87:37", - "nodes": [], - "anonymous": false, - "eventSelector": "b2511a43843fb5ad643d84c36214ea6ac6368d0ba2f4714f59c2c36124e87e27", - "name": "Transfer", - "nameLocation": "632:8:37", - "parameters": { - "id": 46600, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46594, - "indexed": true, - "mutability": "mutable", - "name": "orderId", - "nameLocation": "657:7:37", - "nodeType": "VariableDeclaration", - "scope": 46601, - "src": "641:23:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46593, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "641:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46596, - "indexed": false, - "mutability": "mutable", - "name": "srcAddress", - "nameLocation": "674:10:37", - "nodeType": "VariableDeclaration", - "scope": 46601, - "src": "666:18:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46595, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "666:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46599, - "indexed": false, - "mutability": "mutable", - "name": "transferInfo", - "nameLocation": "699:12:37", - "nodeType": "VariableDeclaration", - "scope": 46601, - "src": "686:25:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_memory_ptr", - "typeString": "struct PaymentRegistry.TransferInfo" - }, - "typeName": { - "id": 46598, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 46597, - "name": "TransferInfo", - "nameLocations": [ - "686:12:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 46592, - "src": "686:12:37" - }, - "referencedDeclaration": 46592, - "src": "686:12:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage_ptr", - "typeString": "struct PaymentRegistry.TransferInfo" - } - }, - "visibility": "internal" - } - ], - "src": "640:72:37" - } - }, - { - "id": 46605, - "nodeType": "EventDefinition", - "src": "718:54:37", - "nodes": [], - "anonymous": false, - "eventSelector": "037d258885f813f6f9a1239ba1e37c7619b400cdab6899abeacd56c24ed7471b", - "name": "ModifiedEscrowAddress", - "nameLocation": "724:21:37", - "parameters": { - "id": 46604, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46603, - "indexed": false, - "mutability": "mutable", - "name": "newEscrowAddress", - "nameLocation": "754:16:37", - "nodeType": "VariableDeclaration", - "scope": 46605, - "src": "746:24:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46602, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "746:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "745:26:37" - } - }, - { - "id": 46609, - "nodeType": "EventDefinition", - "src": "777:72:37", - "nodes": [], - "anonymous": false, - "eventSelector": "3229ec4fa8cd4c21f0ff3e83b104a37d201dc2d5dcb9a3e199641e7cd2379bdc", - "name": "ModifiedEscrowWithdrawSelector", - "nameLocation": "783:30:37", - "parameters": { - "id": 46608, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46607, - "indexed": false, - "mutability": "mutable", - "name": "newEscrowWithdrawSelector", - "nameLocation": "822:25:37", - "nodeType": "VariableDeclaration", - "scope": 46609, - "src": "814:33:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46606, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "814:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "813:35:37" - } - }, - { - "id": 46614, - "nodeType": "VariableDeclaration", - "src": "855:49:37", - "nodes": [], - "constant": false, - "functionSelector": "3c64f04b", - "mutability": "mutable", - "name": "transfers", - "nameLocation": "895:9:37", - "scope": 46964, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TransferInfo_$46592_storage_$", - "typeString": "mapping(bytes32 => struct PaymentRegistry.TransferInfo)" - }, - "typeName": { - "id": 46613, - "keyName": "", - "keyNameLocation": "-1:-1:-1", - "keyType": { - "id": 46610, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "863:7:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "Mapping", - "src": "855:32:37", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TransferInfo_$46592_storage_$", - "typeString": "mapping(bytes32 => struct PaymentRegistry.TransferInfo)" - }, - "valueName": "", - "valueNameLocation": "-1:-1:-1", - "valueType": { - "id": 46612, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 46611, - "name": "TransferInfo", - "nameLocations": [ - "874:12:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 46592, - "src": "874:12:37" - }, - "referencedDeclaration": 46592, - "src": "874:12:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage_ptr", - "typeString": "struct PaymentRegistry.TransferInfo" - } - } - }, - "visibility": "public" - }, - { - "id": 46616, - "nodeType": "VariableDeclaration", - "src": "910:28:37", - "nodes": [], - "constant": false, - "mutability": "mutable", - "name": "_marketMaker", - "nameLocation": "926:12:37", - "scope": 46964, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46615, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "910:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "private" - }, - { - "id": 46619, - "nodeType": "VariableDeclaration", - "src": "944:39:37", - "nodes": [], - "constant": false, - "mutability": "mutable", - "name": "_snMessaging", - "nameLocation": "971:12:37", - "scope": 46964, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IStarknetMessaging_$46269", - "typeString": "contract IStarknetMessaging" - }, - "typeName": { - "id": 46618, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 46617, - "name": "IStarknetMessaging", - "nameLocations": [ - "944:18:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 46269, - "src": "944:18:37" - }, - "referencedDeclaration": 46269, - "src": "944:18:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IStarknetMessaging_$46269", - "typeString": "contract IStarknetMessaging" - } - }, - "visibility": "private" - }, - { - "id": 46621, - "nodeType": "VariableDeclaration", - "src": "989:32:37", - "nodes": [], - "constant": false, - "mutability": "mutable", - "name": "_snEscrowAddress", - "nameLocation": "1005:16:37", - "scope": 46964, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46620, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "989:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "private" - }, - { - "id": 46623, - "nodeType": "VariableDeclaration", - "src": "1027:41:37", - "nodes": [], - "constant": false, - "mutability": "mutable", - "name": "_snEscrowWithdrawSelector", - "nameLocation": "1043:25:37", - "scope": 46964, - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46622, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1027:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "private" - }, - { - "id": 46630, - "nodeType": "FunctionDefinition", - "src": "1075:53:37", - "nodes": [], - "body": { - "id": 46629, - "nodeType": "Block", - "src": "1089:39:37", - "nodes": [], - "statements": [ - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 46626, - "name": "_disableInitializers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45015, - "src": "1099:20:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 46627, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1099:22:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46628, - "nodeType": "ExpressionStatement", - "src": "1099:22:37" - } - ] - }, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "parameters": { - "id": 46624, - "nodeType": "ParameterList", - "parameters": [], - "src": "1086:2:37" - }, - "returnParameters": { - "id": 46625, - "nodeType": "ParameterList", - "parameters": [], - "src": "1089:0:37" - }, - "scope": 46964, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "id": 46670, - "nodeType": "FunctionDefinition", - "src": "1196:450:37", - "nodes": [], - "body": { - "id": 46669, - "nodeType": "Block", - "src": "1369:277:37", - "nodes": [], - "statements": [ - { - "expression": { - "arguments": [ - { - "expression": { - "id": 46644, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1395:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46645, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1399:6:37", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "1395:10:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 46643, - "name": "__Ownable_init", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44653, - "src": "1380:14:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$", - "typeString": "function (address)" - } - }, - "id": 46646, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1380:26:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46647, - "nodeType": "ExpressionStatement", - "src": "1380:26:37" - }, - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 46648, - "name": "__UUPSUpgradeable_init", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 45101, - "src": "1416:22:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", - "typeString": "function ()" - } - }, - "id": 46649, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1416:24:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46650, - "nodeType": "ExpressionStatement", - "src": "1416:24:37" - }, - { - "expression": { - "id": 46655, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46651, - "name": "_snMessaging", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46619, - "src": "1451:12:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IStarknetMessaging_$46269", - "typeString": "contract IStarknetMessaging" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 46653, - "name": "snMessaging", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46632, - "src": "1485:11:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 46652, - "name": "IStarknetMessaging", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46269, - "src": "1466:18:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IStarknetMessaging_$46269_$", - "typeString": "type(contract IStarknetMessaging)" - } - }, - "id": 46654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1466:31:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IStarknetMessaging_$46269", - "typeString": "contract IStarknetMessaging" - } - }, - "src": "1451:46:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IStarknetMessaging_$46269", - "typeString": "contract IStarknetMessaging" - } - }, - "id": 46656, - "nodeType": "ExpressionStatement", - "src": "1451:46:37" - }, - { - "expression": { - "id": 46659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46657, - "name": "_snEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46621, - "src": "1507:16:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 46658, - "name": "snEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46634, - "src": "1526:15:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1507:34:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46660, - "nodeType": "ExpressionStatement", - "src": "1507:34:37" - }, - { - "expression": { - "id": 46663, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46661, - "name": "_snEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46623, - "src": "1551:25:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 46662, - "name": "snEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46636, - "src": "1579:24:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1551:52:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46664, - "nodeType": "ExpressionStatement", - "src": "1551:52:37" - }, - { - "expression": { - "id": 46667, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46665, - "name": "_marketMaker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46616, - "src": "1613:12:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 46666, - "name": "marketMaker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46638, - "src": "1628:11:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "1613:26:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 46668, - "nodeType": "ExpressionStatement", - "src": "1613:26:37" - } - ] - }, - "functionSelector": "9e3d87cd", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46641, - "kind": "modifierInvocation", - "modifierName": { - "id": 46640, - "name": "initializer", - "nameLocations": [ - "1357:11:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44901, - "src": "1357:11:37" - }, - "nodeType": "ModifierInvocation", - "src": "1357:11:37" - } - ], - "name": "initialize", - "nameLocation": "1205:10:37", - "parameters": { - "id": 46639, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46632, - "mutability": "mutable", - "name": "snMessaging", - "nameLocation": "1233:11:37", - "nodeType": "VariableDeclaration", - "scope": 46670, - "src": "1225:19:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46631, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1225:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46634, - "mutability": "mutable", - "name": "snEscrowAddress", - "nameLocation": "1262:15:37", - "nodeType": "VariableDeclaration", - "scope": 46670, - "src": "1254:23:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46633, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1254:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46636, - "mutability": "mutable", - "name": "snEscrowWithdrawSelector", - "nameLocation": "1295:24:37", - "nodeType": "VariableDeclaration", - "scope": 46670, - "src": "1287:32:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46635, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1287:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46638, - "mutability": "mutable", - "name": "marketMaker", - "nameLocation": "1337:11:37", - "nodeType": "VariableDeclaration", - "scope": 46670, - "src": "1329:19:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46637, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1329:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "1215:134:37" - }, - "returnParameters": { - "id": 46642, - "nodeType": "ParameterList", - "parameters": [], - "src": "1369:0:37" - }, - "scope": 46964, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "id": 46768, - "nodeType": "FunctionDefinition", - "src": "1653:800:37", - "nodes": [], - "body": { - "id": 46767, - "nodeType": "Block", - "src": "1756:697:37", - "nodes": [], - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 46684, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 46682, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46674, - "src": "1774:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "hexValue": "30", - "id": 46683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1789:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1774:16:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "496e76616c69642064657374696e6174696f6e20616464726573732e", - "id": 46685, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1792:30:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_2fa297eccd710853c85d8d9f7a4eaeeeaa7b619ef35c43f422f6799890e61a7b", - "typeString": "literal_string \"Invalid destination address.\"" - }, - "value": "Invalid destination address." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_2fa297eccd710853c85d8d9f7a4eaeeeaa7b619ef35c43f422f6799890e61a7b", - "typeString": "literal_string \"Invalid destination address.\"" - } - ], - "id": 46681, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1766:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46686, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1766:57:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46687, - "nodeType": "ExpressionStatement", - "src": "1766:57:37" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 46691, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 46689, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46676, - "src": "1841:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": { - "hexValue": "30", - "id": 46690, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1850:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "src": "1841:10:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "496e76616c696420616d6f756e742c2073686f756c6420626520686967686572207468616e20302e", - "id": 46692, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1853:42:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_fe4820437fc35a3f0e23566ebf2749a14357cf76424103f2c52b0da44824d1c2", - "typeString": "literal_string \"Invalid amount, should be higher than 0.\"" - }, - "value": "Invalid amount, should be higher than 0." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_fe4820437fc35a3f0e23566ebf2749a14357cf76424103f2c52b0da44824d1c2", - "typeString": "literal_string \"Invalid amount, should be higher than 0.\"" - } - ], - "id": 46688, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1833:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46693, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1833:63:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46694, - "nodeType": "ExpressionStatement", - "src": "1833:63:37" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 46699, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 46696, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "1914:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46697, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "1918:5:37", - "memberName": "value", - "nodeType": "MemberAccess", - "src": "1914:9:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 46698, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46676, - "src": "1927:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1914:19:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "496e76616c696420616d6f756e742c2073686f756c64206d61746368206d73672e76616c75652e", - "id": 46700, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1935:41:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_32321d8777936c29a4e4ba262029f40bd22d3edb82ec61a8e9aa2f0992b03972", - "typeString": "literal_string \"Invalid amount, should match msg.value.\"" - }, - "value": "Invalid amount, should match msg.value." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_32321d8777936c29a4e4ba262029f40bd22d3edb82ec61a8e9aa2f0992b03972", - "typeString": "literal_string \"Invalid amount, should match msg.value.\"" - } - ], - "id": 46695, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "1906:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "1906:71:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46702, - "nodeType": "ExpressionStatement", - "src": "1906:71:37" - }, - { - "assignments": [ - 46704 - ], - "declarations": [ - { - "constant": false, - "id": 46704, - "mutability": "mutable", - "name": "index", - "nameLocation": "1996:5:37", - "nodeType": "VariableDeclaration", - "scope": 46767, - "src": "1988:13:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 46703, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1988:7:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "id": 46713, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 46708, - "name": "orderId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46672, - "src": "2031:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46709, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46674, - "src": "2040:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46710, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46676, - "src": "2053:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 46706, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "2014:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 46707, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2018:12:37", - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "2014:16:37", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 46711, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2014:46:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 46705, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "2004:9:37", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 46712, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2004:57:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1988:73:37" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 46720, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "baseExpression": { - "id": 46715, - "name": "transfers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46614, - "src": "2079:9:37", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TransferInfo_$46592_storage_$", - "typeString": "mapping(bytes32 => struct PaymentRegistry.TransferInfo storage ref)" - } - }, - "id": 46717, - "indexExpression": { - "id": 46716, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46704, - "src": "2089:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2079:16:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage", - "typeString": "struct PaymentRegistry.TransferInfo storage ref" - } - }, - "id": 46718, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2096:6:37", - "memberName": "isUsed", - "nodeType": "MemberAccess", - "referencedDeclaration": 46591, - "src": "2079:23:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "66616c7365", - "id": 46719, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2106:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "2079:32:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5472616e7366657220616c72656164792070726f6365737365642e", - "id": 46721, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2113:29:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_1eb30a0985af0e424e609034fe49983c0c05fd15617b9b2529e83648a32b1438", - "typeString": "literal_string \"Transfer already processed.\"" - }, - "value": "Transfer already processed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_1eb30a0985af0e424e609034fe49983c0c05fd15617b9b2529e83648a32b1438", - "typeString": "literal_string \"Transfer already processed.\"" - } - ], - "id": 46714, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2071:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46722, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2071:72:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46723, - "nodeType": "ExpressionStatement", - "src": "2071:72:37" - }, - { - "expression": { - "id": 46732, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 46724, - "name": "transfers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46614, - "src": "2154:9:37", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TransferInfo_$46592_storage_$", - "typeString": "mapping(bytes32 => struct PaymentRegistry.TransferInfo storage ref)" - } - }, - "id": 46726, - "indexExpression": { - "id": 46725, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46704, - "src": "2164:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2154:16:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage", - "typeString": "struct PaymentRegistry.TransferInfo storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 46728, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46674, - "src": "2200:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46729, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46676, - "src": "2221:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "hexValue": "74727565", - "id": 46730, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2237:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 46727, - "name": "TransferInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46592, - "src": "2173:12:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_struct$_TransferInfo_$46592_storage_ptr_$", - "typeString": "type(struct PaymentRegistry.TransferInfo storage pointer)" - } - }, - "id": 46731, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "structConstructorCall", - "lValueRequested": false, - "nameLocations": [ - "2187:11:37", - "2213:6:37", - "2229:6:37" - ], - "names": [ - "destAddress", - "amount", - "isUsed" - ], - "nodeType": "FunctionCall", - "src": "2173:70:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_memory_ptr", - "typeString": "struct PaymentRegistry.TransferInfo memory" - } - }, - "src": "2154:89:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage", - "typeString": "struct PaymentRegistry.TransferInfo storage ref" - } - }, - "id": 46733, - "nodeType": "ExpressionStatement", - "src": "2154:89:37" - }, - { - "assignments": [ - 46735, - null - ], - "declarations": [ - { - "constant": false, - "id": 46735, - "mutability": "mutable", - "name": "success", - "nameLocation": "2260:7:37", - "nodeType": "VariableDeclaration", - "scope": 46767, - "src": "2255:12:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 46734, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "2255:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - null - ], - "id": 46752, - "initialValue": { - "arguments": [ - { - "hexValue": "", - "id": 46750, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2334:2:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - }, - "value": "" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "typeString": "literal_string \"\"" - } - ], - "expression": { - "arguments": [ - { - "arguments": [ - { - "arguments": [ - { - "id": 46742, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46674, - "src": "2296:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46741, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2288:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint160_$", - "typeString": "type(uint160)" - }, - "typeName": { - "id": 46740, - "name": "uint160", - "nodeType": "ElementaryTypeName", - "src": "2288:7:37", - "typeDescriptions": {} - } - }, - "id": 46743, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2288:20:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint160", - "typeString": "uint160" - } - ], - "id": 46739, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2280:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 46738, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2280:7:37", - "typeDescriptions": {} - } - }, - "id": 46744, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2280:29:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 46737, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2272:8:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_payable_$", - "typeString": "type(address payable)" - }, - "typeName": { - "id": 46736, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2272:8:37", - "stateMutability": "payable", - "typeDescriptions": {} - } - }, - "id": 46745, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2272:38:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "id": 46746, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2311:4:37", - "memberName": "call", - "nodeType": "MemberAccess", - "src": "2272:43:37", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 46749, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "expression": { - "id": 46747, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2323:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46748, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2327:5:37", - "memberName": "value", - "nodeType": "MemberAccess", - "src": "2323:9:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "2272:61:37", - "typeDescriptions": { - "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", - "typeString": "function (bytes memory) payable returns (bool,bytes memory)" - } - }, - "id": 46751, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2272:65:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2254:83:37" - }, - { - "expression": { - "arguments": [ - { - "id": 46754, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46735, - "src": "2356:7:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5472616e73666572206661696c65642e", - "id": 46755, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2365:18:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c81948f77ae7b56f1759fc612b6b373d090eebe7124f74c528fff8e0a139fe69", - "typeString": "literal_string \"Transfer failed.\"" - }, - "value": "Transfer failed." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c81948f77ae7b56f1759fc612b6b373d090eebe7124f74c528fff8e0a139fe69", - "typeString": "literal_string \"Transfer failed.\"" - } - ], - "id": 46753, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2348:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46756, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2348:36:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46757, - "nodeType": "ExpressionStatement", - "src": "2348:36:37" - }, - { - "eventCall": { - "arguments": [ - { - "id": 46759, - "name": "orderId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46672, - "src": "2408:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "expression": { - "id": 46760, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "2417:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46761, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2421:6:37", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "2417:10:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "baseExpression": { - "id": 46762, - "name": "transfers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46614, - "src": "2429:9:37", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TransferInfo_$46592_storage_$", - "typeString": "mapping(bytes32 => struct PaymentRegistry.TransferInfo storage ref)" - } - }, - "id": 46764, - "indexExpression": { - "id": 46763, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46704, - "src": "2439:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2429:16:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage", - "typeString": "struct PaymentRegistry.TransferInfo storage ref" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage", - "typeString": "struct PaymentRegistry.TransferInfo storage ref" - } - ], - "id": 46758, - "name": "Transfer", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46601, - "src": "2399:8:37", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_address_$_t_struct$_TransferInfo_$46592_memory_ptr_$returns$__$", - "typeString": "function (uint256,address,struct PaymentRegistry.TransferInfo memory)" - } - }, - "id": 46765, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2399:47:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46766, - "nodeType": "EmitStatement", - "src": "2394:52:37" - } - ] - }, - "functionSelector": "90dd2627", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46679, - "kind": "modifierInvocation", - "modifierName": { - "id": 46678, - "name": "onlyOwnerOrMM", - "nameLocations": [ - "1742:13:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 46954, - "src": "1742:13:37" - }, - "nodeType": "ModifierInvocation", - "src": "1742:13:37" - } - ], - "name": "transfer", - "nameLocation": "1662:8:37", - "parameters": { - "id": 46677, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46672, - "mutability": "mutable", - "name": "orderId", - "nameLocation": "1679:7:37", - "nodeType": "VariableDeclaration", - "scope": 46768, - "src": "1671:15:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46671, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1671:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46674, - "mutability": "mutable", - "name": "destAddress", - "nameLocation": "1696:11:37", - "nodeType": "VariableDeclaration", - "scope": 46768, - "src": "1688:19:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46673, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1688:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46676, - "mutability": "mutable", - "name": "amount", - "nameLocation": "1717:6:37", - "nodeType": "VariableDeclaration", - "scope": 46768, - "src": "1709:14:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46675, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1709:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1670:54:37" - }, - "returnParameters": { - "id": 46680, - "nodeType": "ParameterList", - "parameters": [], - "src": "1756:0:37" - }, - "scope": 46964, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "id": 46875, - "nodeType": "FunctionDefinition", - "src": "2459:779:37", - "nodes": [], - "body": { - "id": 46874, - "nodeType": "Block", - "src": "2562:676:37", - "nodes": [], - "statements": [ - { - "assignments": [ - 46780 - ], - "declarations": [ - { - "constant": false, - "id": 46780, - "mutability": "mutable", - "name": "index", - "nameLocation": "2580:5:37", - "nodeType": "VariableDeclaration", - "scope": 46874, - "src": "2572:13:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 46779, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "2572:7:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "visibility": "internal" - } - ], - "id": 46789, - "initialValue": { - "arguments": [ - { - "arguments": [ - { - "id": 46784, - "name": "orderId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46770, - "src": "2615:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46785, - "name": "destAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46772, - "src": "2624:11:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46786, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46774, - "src": "2637:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "id": 46782, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "2598:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 46783, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberLocation": "2602:12:37", - "memberName": "encodePacked", - "nodeType": "MemberAccess", - "src": "2598:16:37", - "typeDescriptions": { - "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", - "typeString": "function () pure returns (bytes memory)" - } - }, - "id": 46787, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2598:46:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "id": 46781, - "name": "keccak256", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -8, - "src": "2588:9:37", - "typeDescriptions": { - "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$", - "typeString": "function (bytes memory) pure returns (bytes32)" - } - }, - "id": 46788, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2588:57:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2572:73:37" - }, - { - "assignments": [ - 46792 - ], - "declarations": [ - { - "constant": false, - "id": 46792, - "mutability": "mutable", - "name": "transferInfo", - "nameLocation": "2676:12:37", - "nodeType": "VariableDeclaration", - "scope": 46874, - "src": "2655:33:37", - "stateVariable": false, - "storageLocation": "storage", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage_ptr", - "typeString": "struct PaymentRegistry.TransferInfo" - }, - "typeName": { - "id": 46791, - "nodeType": "UserDefinedTypeName", - "pathNode": { - "id": 46790, - "name": "TransferInfo", - "nameLocations": [ - "2655:12:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 46592, - "src": "2655:12:37" - }, - "referencedDeclaration": 46592, - "src": "2655:12:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage_ptr", - "typeString": "struct PaymentRegistry.TransferInfo" - } - }, - "visibility": "internal" - } - ], - "id": 46796, - "initialValue": { - "baseExpression": { - "id": 46793, - "name": "transfers", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46614, - "src": "2691:9:37", - "typeDescriptions": { - "typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_TransferInfo_$46592_storage_$", - "typeString": "mapping(bytes32 => struct PaymentRegistry.TransferInfo storage ref)" - } - }, - "id": 46795, - "indexExpression": { - "id": 46794, - "name": "index", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46780, - "src": "2701:5:37", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "2691:16:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage", - "typeString": "struct PaymentRegistry.TransferInfo storage ref" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2655:52:37" - }, - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 46801, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 46798, - "name": "transferInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46792, - "src": "2725:12:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage_ptr", - "typeString": "struct PaymentRegistry.TransferInfo storage pointer" - } - }, - "id": 46799, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2738:6:37", - "memberName": "isUsed", - "nodeType": "MemberAccess", - "referencedDeclaration": 46591, - "src": "2725:19:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "hexValue": "74727565", - "id": 46800, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2748:4:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "2725:27:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "5472616e73666572206e6f7420666f756e642e", - "id": 46802, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2754:21:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_df5214ebe3bfb770904efebf94bed0b3d093cefba7c856223cd0f237ff41a67e", - "typeString": "literal_string \"Transfer not found.\"" - }, - "value": "Transfer not found." - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_df5214ebe3bfb770904efebf94bed0b3d093cefba7c856223cd0f237ff41a67e", - "typeString": "literal_string \"Transfer not found.\"" - } - ], - "id": 46797, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2717:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46803, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2717:59:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46804, - "nodeType": "ExpressionStatement", - "src": "2717:59:37" - }, - { - "assignments": [ - 46809 - ], - "declarations": [ - { - "constant": false, - "id": 46809, - "mutability": "mutable", - "name": "payload", - "nameLocation": "2804:7:37", - "nodeType": "VariableDeclaration", - "scope": 46874, - "src": "2787:24:37", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[]" - }, - "typeName": { - "baseType": { - "id": 46807, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2787:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46808, - "nodeType": "ArrayTypeName", - "src": "2787:9:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - }, - "visibility": "internal" - } - ], - "id": 46815, - "initialValue": { - "arguments": [ - { - "hexValue": "35", - "id": 46813, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2828:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - }, - "value": "5" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_5_by_1", - "typeString": "int_const 5" - } - ], - "id": 46812, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "2814:13:37", - "typeDescriptions": { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (uint256[] memory)" - }, - "typeName": { - "baseType": { - "id": 46810, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2818:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46811, - "nodeType": "ArrayTypeName", - "src": "2818:9:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", - "typeString": "uint256[]" - } - } - }, - "id": 46814, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2814:16:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "2787:43:37" - }, - { - "expression": { - "id": 46823, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 46816, - "name": "payload", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46809, - "src": "2840:7:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 46818, - "indexExpression": { - "hexValue": "30", - "id": 46817, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2848:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2840:10:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 46821, - "name": "orderId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46770, - "src": "2861:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46820, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2853:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint128_$", - "typeString": "type(uint128)" - }, - "typeName": { - "id": 46819, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "2853:7:37", - "typeDescriptions": {} - } - }, - "id": 46822, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2853:16:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "src": "2840:29:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46824, - "nodeType": "ExpressionStatement", - "src": "2840:29:37" - }, - { - "expression": { - "id": 46834, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 46825, - "name": "payload", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46809, - "src": "2886:7:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 46827, - "indexExpression": { - "hexValue": "31", - "id": 46826, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2894:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2886:10:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 46832, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 46830, - "name": "orderId", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46770, - "src": "2907:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "hexValue": "313238", - "id": 46831, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2918:3:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_128_by_1", - "typeString": "int_const 128" - }, - "value": "128" - }, - "src": "2907:14:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46829, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2899:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint128_$", - "typeString": "type(uint128)" - }, - "typeName": { - "id": 46828, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "2899:7:37", - "typeDescriptions": {} - } - }, - "id": 46833, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "2899:23:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "src": "2886:36:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46835, - "nodeType": "ExpressionStatement", - "src": "2886:36:37" - }, - { - "expression": { - "id": 46841, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 46836, - "name": "payload", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46809, - "src": "2940:7:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 46838, - "indexExpression": { - "hexValue": "32", - "id": 46837, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2948:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_2_by_1", - "typeString": "int_const 2" - }, - "value": "2" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2940:10:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "expression": { - "id": 46839, - "name": "transferInfo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46792, - "src": "2953:12:37", - "typeDescriptions": { - "typeIdentifier": "t_struct$_TransferInfo_$46592_storage_ptr", - "typeString": "struct PaymentRegistry.TransferInfo storage pointer" - } - }, - "id": 46840, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "memberLocation": "2966:11:37", - "memberName": "destAddress", - "nodeType": "MemberAccess", - "referencedDeclaration": 46587, - "src": "2953:24:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "2940:37:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46842, - "nodeType": "ExpressionStatement", - "src": "2940:37:37" - }, - { - "expression": { - "id": 46850, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 46843, - "name": "payload", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46809, - "src": "2987:7:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 46845, - "indexExpression": { - "hexValue": "33", - "id": 46844, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2995:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_3_by_1", - "typeString": "int_const 3" - }, - "value": "3" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "2987:10:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "id": 46848, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46774, - "src": "3008:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46847, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3000:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint128_$", - "typeString": "type(uint128)" - }, - "typeName": { - "id": 46846, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "3000:7:37", - "typeDescriptions": {} - } - }, - "id": 46849, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3000:15:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "src": "2987:28:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46851, - "nodeType": "ExpressionStatement", - "src": "2987:28:37" - }, - { - "expression": { - "id": 46861, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "baseExpression": { - "id": 46852, - "name": "payload", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46809, - "src": "3032:7:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - }, - "id": 46854, - "indexExpression": { - "hexValue": "34", - "id": 46853, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3040:1:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_4_by_1", - "typeString": "int_const 4" - }, - "value": "4" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "3032:10:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 46859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "id": 46857, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46774, - "src": "3053:6:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": { - "hexValue": "313238", - "id": 46858, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3063:3:37", - "typeDescriptions": { - "typeIdentifier": "t_rational_128_by_1", - "typeString": "int_const 128" - }, - "value": "128" - }, - "src": "3053:13:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46856, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3045:7:37", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint128_$", - "typeString": "type(uint128)" - }, - "typeName": { - "id": 46855, - "name": "uint128", - "nodeType": "ElementaryTypeName", - "src": "3045:7:37", - "typeDescriptions": {} - } - }, - "id": 46860, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3045:22:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint128", - "typeString": "uint128" - } - }, - "src": "3032:35:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46862, - "nodeType": "ExpressionStatement", - "src": "3032:35:37" - }, - { - "expression": { - "arguments": [ - { - "id": 46869, - "name": "_snEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46621, - "src": "3154:16:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46870, - "name": "_snEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46623, - "src": "3184:25:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 46871, - "name": "payload", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46809, - "src": "3223:7:37", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", - "typeString": "uint256[] memory" - } - ], - "expression": { - "id": 46863, - "name": "_snMessaging", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46619, - "src": "3094:12:37", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IStarknetMessaging_$46269", - "typeString": "contract IStarknetMessaging" - } - }, - "id": 46865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3107:15:37", - "memberName": "sendMessageToL2", - "nodeType": "MemberAccess", - "referencedDeclaration": 46227, - "src": "3094:28:37", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_bytes32_$_t_uint256_$", - "typeString": "function (uint256,uint256,uint256[] memory) payable external returns (bytes32,uint256)" - } - }, - "id": 46868, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "names": [ - "value" - ], - "nodeType": "FunctionCallOptions", - "options": [ - { - "expression": { - "id": 46866, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "3130:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46867, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "3134:5:37", - "memberName": "value", - "nodeType": "MemberAccess", - "src": "3130:9:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "src": "3094:46:37", - "typeDescriptions": { - "typeIdentifier": "t_function_external_payable$_t_uint256_$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$_t_bytes32_$_t_uint256_$value", - "typeString": "function (uint256,uint256,uint256[] memory) payable external returns (bytes32,uint256)" - } - }, - "id": 46872, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3094:137:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$_t_bytes32_$_t_uint256_$", - "typeString": "tuple(bytes32,uint256)" - } - }, - "id": 46873, - "nodeType": "ExpressionStatement", - "src": "3094:137:37" - } - ] - }, - "functionSelector": "a41fe49f", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46777, - "kind": "modifierInvocation", - "modifierName": { - "id": 46776, - "name": "onlyOwnerOrMM", - "nameLocations": [ - "2548:13:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 46954, - "src": "2548:13:37" - }, - "nodeType": "ModifierInvocation", - "src": "2548:13:37" - } - ], - "name": "withdraw", - "nameLocation": "2468:8:37", - "parameters": { - "id": 46775, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46770, - "mutability": "mutable", - "name": "orderId", - "nameLocation": "2485:7:37", - "nodeType": "VariableDeclaration", - "scope": 46875, - "src": "2477:15:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46769, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2477:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46772, - "mutability": "mutable", - "name": "destAddress", - "nameLocation": "2502:11:37", - "nodeType": "VariableDeclaration", - "scope": 46875, - "src": "2494:19:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46771, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2494:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 46774, - "mutability": "mutable", - "name": "amount", - "nameLocation": "2523:6:37", - "nodeType": "VariableDeclaration", - "scope": 46875, - "src": "2515:14:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46773, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2515:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "2476:54:37" - }, - "returnParameters": { - "id": 46778, - "nodeType": "ParameterList", - "parameters": [], - "src": "2562:0:37" - }, - "scope": 46964, - "stateMutability": "payable", - "virtual": false, - "visibility": "external" - }, - { - "id": 46891, - "nodeType": "FunctionDefinition", - "src": "3244:182:37", - "nodes": [], - "body": { - "id": 46890, - "nodeType": "Block", - "src": "3314:112:37", - "nodes": [], - "statements": [ - { - "expression": { - "id": 46884, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46882, - "name": "_snEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46621, - "src": "3324:16:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 46883, - "name": "snEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46877, - "src": "3343:15:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3324:34:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46885, - "nodeType": "ExpressionStatement", - "src": "3324:34:37" - }, - { - "eventCall": { - "arguments": [ - { - "id": 46887, - "name": "snEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46877, - "src": "3395:15:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46886, - "name": "ModifiedEscrowAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46605, - "src": "3373:21:37", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 46888, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3373:38:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46889, - "nodeType": "EmitStatement", - "src": "3368:43:37" - } - ] - }, - "functionSelector": "9a63d92d", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46880, - "kind": "modifierInvocation", - "modifierName": { - "id": 46879, - "name": "onlyOwner", - "nameLocations": [ - "3304:9:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44688, - "src": "3304:9:37" - }, - "nodeType": "ModifierInvocation", - "src": "3304:9:37" - } - ], - "name": "setEscrowAddress", - "nameLocation": "3253:16:37", - "parameters": { - "id": 46878, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46877, - "mutability": "mutable", - "name": "snEscrowAddress", - "nameLocation": "3278:15:37", - "nodeType": "VariableDeclaration", - "scope": 46891, - "src": "3270:23:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46876, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3270:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3269:25:37" - }, - "returnParameters": { - "id": 46881, - "nodeType": "ParameterList", - "parameters": [], - "src": "3314:0:37" - }, - "scope": 46964, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 46907, - "nodeType": "FunctionDefinition", - "src": "3432:228:37", - "nodes": [], - "body": { - "id": 46906, - "nodeType": "Block", - "src": "3520:140:37", - "nodes": [], - "statements": [ - { - "expression": { - "id": 46900, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46898, - "name": "_snEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46623, - "src": "3530:25:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 46899, - "name": "snEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46893, - "src": "3558:24:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "3530:52:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 46901, - "nodeType": "ExpressionStatement", - "src": "3530:52:37" - }, - { - "eventCall": { - "arguments": [ - { - "id": 46903, - "name": "snEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46893, - "src": "3628:24:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 46902, - "name": "ModifiedEscrowWithdrawSelector", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46609, - "src": "3597:30:37", - "typeDescriptions": { - "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$", - "typeString": "function (uint256)" - } - }, - "id": 46904, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3597:56:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46905, - "nodeType": "EmitStatement", - "src": "3592:61:37" - } - ] - }, - "functionSelector": "3e95784a", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46896, - "kind": "modifierInvocation", - "modifierName": { - "id": 46895, - "name": "onlyOwner", - "nameLocations": [ - "3510:9:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44688, - "src": "3510:9:37" - }, - "nodeType": "ModifierInvocation", - "src": "3510:9:37" - } - ], - "name": "setEscrowWithdrawSelector", - "nameLocation": "3441:25:37", - "parameters": { - "id": 46894, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46893, - "mutability": "mutable", - "name": "snEscrowWithdrawSelector", - "nameLocation": "3475:24:37", - "nodeType": "VariableDeclaration", - "scope": 46907, - "src": "3467:32:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 46892, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3467:7:37", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "3466:34:37" - }, - "returnParameters": { - "id": 46897, - "nodeType": "ParameterList", - "parameters": [], - "src": "3520:0:37" - }, - "scope": 46964, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 46915, - "nodeType": "FunctionDefinition", - "src": "3689:92:37", - "nodes": [], - "body": { - "id": 46914, - "nodeType": "Block", - "src": "3745:36:37", - "nodes": [], - "statements": [ - { - "expression": { - "id": 46912, - "name": "_marketMaker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46616, - "src": "3762:12:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 46911, - "id": 46913, - "nodeType": "Return", - "src": "3755:19:37" - } - ] - }, - "functionSelector": "bd7fece8", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getMMAddress", - "nameLocation": "3698:12:37", - "parameters": { - "id": 46908, - "nodeType": "ParameterList", - "parameters": [], - "src": "3710:2:37" - }, - "returnParameters": { - "id": 46911, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46910, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 46915, - "src": "3736:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46909, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3736:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "3735:9:37" - }, - "scope": 46964, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "id": 46927, - "nodeType": "FunctionDefinition", - "src": "3787:107:37", - "nodes": [], - "body": { - "id": 46926, - "nodeType": "Block", - "src": "3850:44:37", - "nodes": [], - "statements": [ - { - "expression": { - "id": 46924, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "id": 46922, - "name": "_marketMaker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46616, - "src": "3860:12:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "id": 46923, - "name": "newMMAddress", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46917, - "src": "3875:12:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3860:27:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 46925, - "nodeType": "ExpressionStatement", - "src": "3860:27:37" - } - ] - }, - "functionSelector": "a7139611", - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46920, - "kind": "modifierInvocation", - "modifierName": { - "id": 46919, - "name": "onlyOwner", - "nameLocations": [ - "3840:9:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44688, - "src": "3840:9:37" - }, - "nodeType": "ModifierInvocation", - "src": "3840:9:37" - } - ], - "name": "setMMAddress", - "nameLocation": "3796:12:37", - "parameters": { - "id": 46918, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46917, - "mutability": "mutable", - "name": "newMMAddress", - "nameLocation": "3817:12:37", - "nodeType": "VariableDeclaration", - "scope": 46927, - "src": "3809:20:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46916, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3809:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "3808:22:37" - }, - "returnParameters": { - "id": 46921, - "nodeType": "ParameterList", - "parameters": [], - "src": "3850:0:37" - }, - "scope": 46964, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "id": 46936, - "nodeType": "FunctionDefinition", - "src": "3900:83:37", - "nodes": [], - "body": { - "id": 46935, - "nodeType": "Block", - "src": "3952:31:37", - "nodes": [], - "statements": [ - { - "expression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 46932, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44704, - "src": "3969:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 46933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "3969:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "functionReturnParameters": 46931, - "id": 46934, - "nodeType": "Return", - "src": "3962:14:37" - } - ] - }, - "functionSelector": "893d20e8", - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getOwner", - "nameLocation": "3909:8:37", - "parameters": { - "id": 46928, - "nodeType": "ParameterList", - "parameters": [], - "src": "3917:2:37" - }, - "returnParameters": { - "id": 46931, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46930, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 46936, - "src": "3943:7:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46929, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3943:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "3942:9:37" - }, - "scope": 46964, - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "id": 46954, - "nodeType": "ModifierDefinition", - "src": "3989:154:37", - "nodes": [], - "body": { - "id": 46953, - "nodeType": "Block", - "src": "4012:131:37", - "nodes": [], - "statements": [ - { - "expression": { - "arguments": [ - { - "commonType": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "id": 46948, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 46943, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 46939, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4030:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46940, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4034:6:37", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "4030:10:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 46941, - "name": "owner", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 44704, - "src": "4044:5:37", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$", - "typeString": "function () view returns (address)" - } - }, - "id": 46942, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4044:7:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4030:21:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "BinaryOperation", - "operator": "||", - "rightExpression": { - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 46947, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "expression": { - "id": 46944, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "4055:3:37", - "typeDescriptions": { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 46945, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberLocation": "4059:6:37", - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "4055:10:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "id": 46946, - "name": "_marketMaker", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46616, - "src": "4069:12:37", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "4055:26:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "4030:51:37", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "hexValue": "4f6e6c79204f776e6572206f72204d4d2063616e2063616c6c20746869732066756e6374696f6e", - "id": 46949, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4083:41:37", - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_12a9df0fd4731266a73e4e21a404602d5abec54cda79d296e9810e22967171af", - "typeString": "literal_string \"Only Owner or MM can call this function\"" - }, - "value": "Only Owner or MM can call this function" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_12a9df0fd4731266a73e4e21a404602d5abec54cda79d296e9810e22967171af", - "typeString": "literal_string \"Only Owner or MM can call this function\"" - } - ], - "id": 46938, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4022:7:37", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 46950, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "nameLocations": [], - "names": [], - "nodeType": "FunctionCall", - "src": "4022:103:37", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 46951, - "nodeType": "ExpressionStatement", - "src": "4022:103:37" - }, - { - "id": 46952, - "nodeType": "PlaceholderStatement", - "src": "4135:1:37" - } - ] - }, - "name": "onlyOwnerOrMM", - "nameLocation": "3998:13:37", - "parameters": { - "id": 46937, - "nodeType": "ParameterList", - "parameters": [], - "src": "4012:0:37" - }, - "virtual": false, - "visibility": "internal" - }, - { - "id": 46963, - "nodeType": "FunctionDefinition", - "src": "4149:84:37", - "nodes": [], - "body": { - "id": 46962, - "nodeType": "Block", - "src": "4231:2:37", - "nodes": [], - "statements": [] - }, - "baseFunctions": [ - 45183 - ], - "implemented": true, - "kind": "function", - "modifiers": [ - { - "id": 46960, - "kind": "modifierInvocation", - "modifierName": { - "id": 46959, - "name": "onlyOwner", - "nameLocations": [ - "4221:9:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44688, - "src": "4221:9:37" - }, - "nodeType": "ModifierInvocation", - "src": "4221:9:37" - } - ], - "name": "_authorizeUpgrade", - "nameLocation": "4158:17:37", - "overrides": { - "id": 46958, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "4212:8:37" - }, - "parameters": { - "id": 46957, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 46956, - "mutability": "mutable", - "name": "newImplementation", - "nameLocation": "4184:17:37", - "nodeType": "VariableDeclaration", - "scope": 46963, - "src": "4176:25:37", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 46955, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4176:7:37", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "4175:27:37" - }, - "returnParameters": { - "id": 46961, - "nodeType": "ParameterList", - "parameters": [], - "src": "4231:0:37" - }, - "scope": 46964, - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "abstract": false, - "baseContracts": [ - { - "baseName": { - "id": 46580, - "name": "Initializable", - "nameLocations": [ - "462:13:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 45047, - "src": "462:13:37" - }, - "id": 46581, - "nodeType": "InheritanceSpecifier", - "src": "462:13:37" - }, - { - "baseName": { - "id": 46582, - "name": "OwnableUpgradeable", - "nameLocations": [ - "477:18:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 44793, - "src": "477:18:37" - }, - "id": 46583, - "nodeType": "InheritanceSpecifier", - "src": "477:18:37" - }, - { - "baseName": { - "id": 46584, - "name": "UUPSUpgradeable", - "nameLocations": [ - "497:15:37" - ], - "nodeType": "IdentifierPath", - "referencedDeclaration": 45229, - "src": "497:15:37" - }, - "id": 46585, - "nodeType": "InheritanceSpecifier", - "src": "497:15:37" - } - ], - "canonicalName": "PaymentRegistry", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "linearizedBaseContracts": [ - 46964, - 45229, - 45285, - 44793, - 45275, - 45047 - ], - "name": "PaymentRegistry", - "nameLocation": "443:15:37", - "scope": 46965, - "usedErrors": [ - 44629, - 44634, - 44810, - 44813, - 45074, - 45079, - 45358, - 45371, - 45851, - 45854 - ], - "usedEvents": [ - 44640, - 44818, - 45337, - 46601, - 46605, - 46609 - ] - } - ], - "license": "Apache-2.0" - }, - "id": 37 -} diff --git a/mm-bot/resources/schema.sql b/mm-bot/resources/schema.sql index 3b7f096f..6c9fc2d8 100644 --- a/mm-bot/resources/schema.sql +++ b/mm-bot/resources/schema.sql @@ -12,7 +12,7 @@ CREATE TABLE IF NOT EXISTS orders herodotus_task_id VARCHAR(64) NULL, herodotus_block BIGINT NULL, -- uint 64 herodotus_slot BYTEA NULL, -- 32 bytes - eth_withdraw_tx_hash BYTEA NULL, -- 32 bytes + eth_claim_tx_hash BYTEA NULL, -- 32 bytes completed_at TIMESTAMP NULL, created_at TIMESTAMP NOT NULL DEFAULT clock_timestamp() ); diff --git a/mm-bot/src/config/constants.py b/mm-bot/src/config/constants.py index ac5c00ab..a87ee15a 100644 --- a/mm-bot/src/config/constants.py +++ b/mm-bot/src/config/constants.py @@ -36,4 +36,4 @@ LOGGING_LEVEL = os.getenv('LOGGING_LEVEL') LOGGING_DIR = os.getenv('LOGGING_DIR') -WITHDRAWER = os.getenv('WITHDRAWER') +PAYMENT_CLAIMER = os.getenv('PAYMENT_CLAIMER') diff --git a/mm-bot/src/main.py b/mm-bot/src/main.py index 8475a589..c680d95d 100644 --- a/mm-bot/src/main.py +++ b/mm-bot/src/main.py @@ -15,9 +15,9 @@ from services import starknet from services.overall_fee_calculator import estimate_overall_fee from services.order_service import OrderService -from services.withdrawer.ethereum_withdrawer import EthereumWithdrawer -from services.withdrawer.herodotus_withdrawer import HerodotusWithdrawer -from services.withdrawer.withdrawer import Withdrawer +from services.payment_claimer.ethereum_payment_claimer import EthereumPaymentClaimer +from services.payment_claimer.herodotus_payment_claimer import HerodotusPaymentClaimer +from services.payment_claimer.payment_claimer import PaymentClaimer setup_logger() logger = logging.getLogger(__name__) @@ -28,10 +28,10 @@ def using_herodotus(): - return constants.WITHDRAWER == "herodotus" + return constants.PAYMENT_CLAIMER == "herodotus" -withdrawer: Withdrawer = HerodotusWithdrawer() if using_herodotus() else EthereumWithdrawer() +payment_claimer: PaymentClaimer = HerodotusPaymentClaimer() if using_herodotus() else EthereumPaymentClaimer() async def run(): @@ -62,7 +62,7 @@ async def run(): # Listen events on starknet set_order_events: list = await starknet.get_order_events("pending", "pending") - # Process events (create order, transfer eth, prove, withdraw eth) + # Process events (create order, transfer eth, prove, claim payment eth) process_order_events(set_order_events, order_service, eth_lock, herodotus_semaphore) schedule.run_pending() @@ -140,16 +140,16 @@ async def process_order(order: Order, order_service: OrderService, # 3. Call herodotus to prove # extra: validate w3.eth.get_storage_at(addr, pos) before calling herodotus if order.status is OrderStatus.FULFILLED: - await withdrawer.send_withdraw(order, order_service) + await payment_claimer.send_payment_claim(order, order_service) # 4. Poll herodotus to check task status if order.status is OrderStatus.PROVING: - await withdrawer.wait_for_withdraw(order, order_service) + await payment_claimer.wait_for_payment_claim(order, order_service) - # 5. Withdraw eth from starknet + # 5. Claim payment eth from starknet # (bridging is complete for the mm) if order.status is OrderStatus.PROVED: - await withdrawer.close_withdraw(order, order_service) + await payment_claimer.close_payment_claim(order, order_service) if order.status is OrderStatus.COMPLETED: logger.info(f"[+] Order {order.order_id} completed") diff --git a/mm-bot/src/models/order.py b/mm-bot/src/models/order.py index 096fd502..aee4a33e 100644 --- a/mm-bot/src/models/order.py +++ b/mm-bot/src/models/order.py @@ -22,7 +22,7 @@ class Order(Base): herodotus_task_id: str = Column(String, nullable=True) herodotus_block: int = Column(Integer, nullable=True) herodotus_slot: HexBytes = Column(LargeBinary, nullable=True) - eth_withdraw_tx_hash: HexBytes = Column(LargeBinary, nullable=True) + eth_claim_tx_hash: HexBytes = Column(LargeBinary, nullable=True) completed_at: datetime = Column(DateTime, nullable=True) created_at: datetime = Column(DateTime, nullable=False, server_default="clock_timestamp()") diff --git a/mm-bot/src/services/ethereum.py b/mm-bot/src/services/ethereum.py index 8c924ecf..c82b61e8 100644 --- a/mm-bot/src/services/ethereum.py +++ b/mm-bot/src/services/ethereum.py @@ -83,24 +83,24 @@ def create_transfer(deposit_id, dst_addr_bytes, amount, rpc_node=main_rpc_node): return unsent_tx, signed_tx -def withdraw(deposit_id, dst_addr, amount, value): +def claim_payment(deposit_id, dst_addr, amount, value): deposit_id = Web3.to_int(deposit_id) dst_addr_bytes = int(dst_addr, 0) amount = Web3.to_int(amount) - unsent_tx, signed_tx = create_withdraw(deposit_id, dst_addr_bytes, amount, value) + unsent_tx, signed_tx = create_claim_payment(deposit_id, dst_addr_bytes, amount, value) gas_fee = estimate_transaction_fee(unsent_tx) if not has_enough_funds(gas_fee=gas_fee): - raise Exception("Not enough funds for withdraw") + raise Exception("Not enough funds for claim payment") tx_hash = send_raw_transaction(signed_tx) return tx_hash -@use_fallback(rpc_nodes, logger, "Failed to create withdraw eth") -def create_withdraw(deposit_id, dst_addr_bytes, amount, value, rpc_node=main_rpc_node): - unsent_tx = rpc_node.contract.functions.withdraw(deposit_id, dst_addr_bytes, amount).build_transaction({ +@use_fallback(rpc_nodes, logger, "Failed to create claim payment eth") +def create_claim_payment(deposit_id, dst_addr_bytes, amount, value, rpc_node=main_rpc_node): + unsent_tx = rpc_node.contract.functions.claimPayment(deposit_id, dst_addr_bytes, amount).build_transaction({ "chainId": ETH_CHAIN_ID, "from": rpc_node.account.address, "nonce": get_nonce(rpc_node.w3, rpc_node.account.address), diff --git a/mm-bot/src/services/order_service.py b/mm-bot/src/services/order_service.py index 48c5090d..9f795315 100644 --- a/mm-bot/src/services/order_service.py +++ b/mm-bot/src/services/order_service.py @@ -99,9 +99,9 @@ def set_order_proving_ethereum(self, order: Order, tx_hash) -> Order: Set the order status to "PROVING" :param order: the order to update - :param tx_hash: the tx_hash of the ethereum withdraw transaction + :param tx_hash: the tx_hash of the ethereum claim_payment transaction """ - order.eth_withdraw_tx_hash = tx_hash + order.eth_claim_tx_hash = tx_hash order.status = OrderStatus.PROVING.name return self.order_dao.update_order(order) diff --git a/mm-bot/src/services/overall_fee_calculator.py b/mm-bot/src/services/overall_fee_calculator.py index 4b1bda99..ace865bd 100644 --- a/mm-bot/src/services/overall_fee_calculator.py +++ b/mm-bot/src/services/overall_fee_calculator.py @@ -4,7 +4,7 @@ from models.order import Order from services.ethereum import create_transfer, estimate_transaction_fee, get_gas_price -from services.withdrawer.ethereum_withdrawer import EthereumWithdrawer +from services.payment_claimer.ethereum_payment_claimer import EthereumPaymentClaimer async def estimate_overall_fee(order: Order) -> int: @@ -12,13 +12,13 @@ async def estimate_overall_fee(order: Order) -> int: Operational cost per order done by the market maker. This includes: calling the transfer (from PaymentRegistry) + - withdraw (from PaymentRegistry) + - msg fee paid to Starknet (when calling withdraw) + claimPayment (from PaymentRegistry) + + msg fee paid to Starknet (when calling claim_payment) """ transfer_fee = await asyncio.to_thread(estimate_transfer_fee, order) message_fee = await estimate_message_fee(order) - withdraw_fee = estimate_yab_withdraw_fee() - return transfer_fee + message_fee + withdraw_fee + claim_payment_fee = estimate_claim_payment_fee() + return transfer_fee + message_fee + claim_payment_fee def estimate_transfer_fee(order: Order) -> int: @@ -31,17 +31,17 @@ def estimate_transfer_fee(order: Order) -> int: return estimate_transaction_fee(unsent_tx) -def estimate_yab_withdraw_fee() -> int: +def estimate_claim_payment_fee() -> int: """ Due to the deposit does not exist on ethereum at this point, - we cannot estimate the gas fee of the withdrawal transaction + we cannot estimate the gas fee of the claim payment transaction So we will use fixed values for the gas """ - eth_withdrawal_gas = 86139 # TODO this is a fixed value, if the contract changes, this should be updated - return eth_withdrawal_gas * get_gas_price() + eth_claim_payment_gas = 86139 # TODO this is a fixed value, if the contract changes, this should be updated + return eth_claim_payment_gas * get_gas_price() async def estimate_message_fee(order: Order) -> int: - return await EthereumWithdrawer.estimate_withdraw_fallback_message_fee(order.order_id, - order.recipient_address, - order.get_int_amount()) + return await EthereumPaymentClaimer.estimate_claim_payment_fallback_message_fee(order.order_id, + order.recipient_address, + order.get_int_amount()) diff --git a/mm-bot/src/services/withdrawer/ethereum_withdrawer.py b/mm-bot/src/services/payment_claimer/ethereum_payment_claimer.py similarity index 50% rename from mm-bot/src/services/withdrawer/ethereum_withdrawer.py rename to mm-bot/src/services/payment_claimer/ethereum_payment_claimer.py index 21d286f6..d279260e 100644 --- a/mm-bot/src/services/withdrawer/ethereum_withdrawer.py +++ b/mm-bot/src/services/payment_claimer/ethereum_payment_claimer.py @@ -6,29 +6,29 @@ from models.order import Order from services import ethereum, starknet from services.order_service import OrderService -from services.withdrawer.withdrawer import Withdrawer +from services.payment_claimer.payment_claimer import PaymentClaimer -class EthereumWithdrawer(Withdrawer): - """ - Makes the withdrawal on ethereum - Sends a 'withdraw' transaction to ethereum smart contract - """ +class EthereumPaymentClaimer(PaymentClaimer): - async def send_withdraw(self, order: Order, order_service: OrderService): - self.logger.info(f"[+] Sending withdraw tx to ethereum") + async def send_payment_claim(self, order: Order, order_service: OrderService): + """ + Makes the payment claim on ethereum + Sends a 'claimPayment' transaction to ethereum smart contract + """ + self.logger.info(f"[+] Sending payment claim tx to ethereum") order_id, recipient_address, amount = order.order_id, order.recipient_address, order.get_int_amount() - value = await self.estimate_withdraw_fallback_message_fee(order_id, recipient_address, amount) - tx_hash = await asyncio.to_thread(ethereum.withdraw, + value = await self.estimate_claim_payment_fallback_message_fee(order_id, recipient_address, amount) + tx_hash = await asyncio.to_thread(ethereum.claim_payment, order_id, recipient_address, amount, value) order_service.set_order_proving_ethereum(order, tx_hash) - self.logger.info(f"[+] Withdraw tx hash: {tx_hash.hex()}") + self.logger.info(f"[+] Payment claim tx hash: {tx_hash.hex()}") @staticmethod - async def estimate_withdraw_fallback_message_fee(order_id, recipient_address, amount): + async def estimate_claim_payment_fallback_message_fee(order_id, recipient_address, amount): from_address = constants.ETH_CONTRACT_ADDR to_address = constants.SN_CONTRACT_ADDR - entry_point_selector = hex(get_selector_from_name("withdraw")) + entry_point_selector = hex(get_selector_from_name("claim_payment")) payload = [ hex(order_id), "0x0", @@ -38,20 +38,18 @@ async def estimate_withdraw_fallback_message_fee(order_id, recipient_address, am ] return await starknet.estimate_message_fee(from_address, to_address, entry_point_selector, payload) - """ - Waits for the withdraw transaction to be confirmed on ethereum - """ - - async def wait_for_withdraw(self, order: Order, order_service: OrderService): - await asyncio.to_thread(ethereum.wait_for_transaction_receipt, order.eth_withdraw_tx_hash) + async def wait_for_payment_claim(self, order: Order, order_service: OrderService): + """ + Waits for the payment claim transaction to be confirmed on ethereum + """ + await asyncio.to_thread(ethereum.wait_for_transaction_receipt, order.eth_claim_tx_hash) order_service.set_order_proved(order) - self.logger.info(f"[+] Withdraw tx confirmed") - - """ - Closes the withdrawal setting the order as completed - """ + self.logger.info(f"[+] Claim payment tx confirmed") - async def close_withdraw(self, order: Order, order_service: OrderService): + async def close_payment_claim(self, order: Order, order_service: OrderService): + """ + Closes the payment claim setting the order as completed + """ retries = 0 while retries < constants.MAX_RETRIES: if await asyncio.to_thread(ethereum.get_is_used_order, @@ -59,5 +57,5 @@ async def close_withdraw(self, order: Order, order_service: OrderService): break retries += 1 await asyncio.sleep(10) - self.logger.info(f"[+] Withdraw complete") + self.logger.info(f"[+] Claim payment complete") order_service.set_order_completed(order) diff --git a/mm-bot/src/services/withdrawer/herodotus_withdrawer.py b/mm-bot/src/services/payment_claimer/herodotus_payment_claimer.py similarity index 61% rename from mm-bot/src/services/withdrawer/herodotus_withdrawer.py rename to mm-bot/src/services/payment_claimer/herodotus_payment_claimer.py index ee085592..03cdbdbb 100644 --- a/mm-bot/src/services/withdrawer/herodotus_withdrawer.py +++ b/mm-bot/src/services/payment_claimer/herodotus_payment_claimer.py @@ -5,15 +5,15 @@ from models.order import Order from services import ethereum, herodotus, starknet from services.order_service import OrderService -from services.withdrawer.withdrawer import Withdrawer +from services.payment_claimer.payment_claimer import PaymentClaimer -class HerodotusWithdrawer(Withdrawer): - """ - Initialize the proof on herodotus - """ +class HerodotusPaymentClaimer(PaymentClaimer): - async def send_withdraw(self, order: Order, order_service: OrderService): + async def send_payment_claim(self, order: Order, order_service: OrderService): + """ + Initialize the proof on herodotus + """ block = ethereum.get_latest_block() index = Web3.solidity_keccak(['uint256', 'uint256', 'uint256'], [order.order_id, int(order.recipient_address, 0), order.get_int_amount()]) @@ -25,11 +25,10 @@ async def send_withdraw(self, order: Order, order_service: OrderService): order_service.set_order_proving_herodotus(order, task_id, block, slot) self.logger.info(f"[+] Block being proved with task id: {task_id}") - """ - Wait for the prove to be done on herodotus - """ - - async def wait_for_withdraw(self, order: Order, order_service: OrderService): + async def wait_for_payment_claim(self, order: Order, order_service: OrderService): + """ + Wait for the proof to be done on herodotus + """ self.logger.info(f"[+] Polling herodotus for task status") # avoid weird case where herodotus insta says done await asyncio.sleep(10) @@ -38,12 +37,11 @@ async def wait_for_withdraw(self, order: Order, order_service: OrderService): order_service.set_order_proved(order) self.logger.info(f"[+] Task completed") - """ - Makes the withdraw on starknet - """ - - async def close_withdraw(self, order: Order, order_service: OrderService): - self.logger.info(f"[+] Withdrawing eth from starknet") - await starknet.withdraw(order.order_id, order.herodotus_block, order.herodotus_slot) + async def close_payment_claim(self, order: Order, order_service: OrderService): + """ + Makes the claim_payment on starknet + """ + self.logger.info(f"[+] Claiming payment eth from starknet") + await starknet.claim_payment(order.order_id, order.herodotus_block, order.herodotus_slot) order_service.set_order_completed(order) - self.logger.info(f"[+] Withdraw complete") + self.logger.info(f"[+] Claim payment complete") diff --git a/mm-bot/src/services/withdrawer/withdrawer.py b/mm-bot/src/services/payment_claimer/payment_claimer.py similarity index 56% rename from mm-bot/src/services/withdrawer/withdrawer.py rename to mm-bot/src/services/payment_claimer/payment_claimer.py index 207d5d33..16a282ca 100644 --- a/mm-bot/src/services/withdrawer/withdrawer.py +++ b/mm-bot/src/services/payment_claimer/payment_claimer.py @@ -5,7 +5,7 @@ from services.order_service import OrderService -class Withdrawer(ABC): +class PaymentClaimer(ABC): def __init__(self): self.logger = logging.getLogger(__name__) @@ -13,17 +13,17 @@ def __init__(self): """ """ @abstractmethod - async def send_withdraw(self, order: Order, order_service: OrderService): + async def send_payment_claim(self, order: Order, order_service: OrderService): pass """ """ @abstractmethod - async def wait_for_withdraw(self, order: Order, order_service: OrderService): + async def wait_for_payment_claim(self, order: Order, order_service: OrderService): pass """ """ @abstractmethod - async def close_withdraw(self, order: Order, order_service: OrderService): + async def close_payment_claim(self, order: Order, order_service: OrderService): pass diff --git a/mm-bot/src/services/starknet.py b/mm-bot/src/services/starknet.py index 7378cead..6b104541 100644 --- a/mm-bot/src/services/starknet.py +++ b/mm-bot/src/services/starknet.py @@ -150,13 +150,13 @@ async def get_latest_block(rpc_node=main_rpc_node) -> int: return latest_block.block_number -async def withdraw(order_id, block, slot) -> bool: +async def claim_payment(order_id, block, slot) -> bool: slot = slot.hex() slot_high = int(slot.replace("0x", "")[0:32], 16) slot_low = int(slot.replace("0x", "")[32:64], 16) call = Call( to_addr=int(constants.SN_CONTRACT_ADDR, 0), - selector=get_selector_from_name("withdraw"), + selector=get_selector_from_name("claim_payment"), calldata=[order_id, 0, block, 0, slot_low, slot_high] ) try: @@ -164,10 +164,10 @@ async def withdraw(order_id, block, slot) -> bool: result = await send_transaction(transaction) await wait_for_tx(result.transaction_hash) - logger.info(f"[+] Withdrawn from starknet: {hex(result.transaction_hash)}") + logger.info(f"[+] Claim payment from starknet: {hex(result.transaction_hash)}") return True except Exception as e: - logger.error(f"[-] Failed to withdraw from starknet: {e}") + logger.error(f"[-] Failed to claim payment from starknet: {e}") return False