UNPKG

@etherspot/contracts

Version:

Etherspot Solidity contracts

924 lines 215 kB
{ "address": "0xab648d198E2B9C415BE9Eac7d3C554ead7a2C1A1", "abi": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "depositAccount", "type": "address" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" } ], "name": "DepositAccountDeployed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "depositAccount", "type": "address" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "DepositExitCompleted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "depositAccount", "type": "address" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" } ], "name": "DepositExitRejected", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "depositAccount", "type": "address" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "lockedUntil", "type": "uint256" } ], "name": "DepositExitRequested", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "depositAccount", "type": "address" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "DepositWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "address", "name": "guardian", "type": "address" } ], "name": "GuardianAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "address", "name": "guardian", "type": "address" } ], "name": "GuardianRemoved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "initializer", "type": "address" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "hash", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "address", "name": "recipient", "type": "address" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "PaymentChannelCommitted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "channelHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "PaymentDeposited", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "channelHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "totalValue", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "depositValue", "type": "uint256" } ], "name": "PaymentSplit", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bytes32", "name": "channelHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "PaymentWithdrawn", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "guardian", "type": "address" } ], "name": "addGuardian", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "chainId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bytes", "name": "senderSignature", "type": "bytes" }, { "internalType": "bytes", "name": "guardianSignature", "type": "bytes" } ], "name": "commitPaymentChannelAndDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "depositPaymentValue", "type": "uint256" }, { "internalType": "bytes", "name": "senderSignature", "type": "bytes" }, { "internalType": "bytes", "name": "guardianSignature", "type": "bytes" } ], "name": "commitPaymentChannelAndSplit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bytes", "name": "senderSignature", "type": "bytes" }, { "internalType": "bytes", "name": "guardianSignature", "type": "bytes" } ], "name": "commitPaymentChannelAndWithdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "computeDepositAccountAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bytes32", "name": "uid", "type": "bytes32" } ], "name": "computePaymentChannelHash", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "deployDepositAccount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "depositExitLockPeriod", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "externalAccountRegistry", "outputs": [ { "internalType": "contract ExternalAccountRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "gateway", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" } ], "name": "getDepositExitLockedUntil", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" } ], "name": "getDepositWithdrawnAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "hash", "type": "bytes32" } ], "name": "getPaymentChannelCommittedAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "internalType": "struct PaymentRegistry.DepositWithdrawal", "name": "depositWithdrawal", "type": "tuple" } ], "name": "hashDepositWithdrawal", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "sender", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bytes32", "name": "uid", "type": "bytes32" }, { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "internalType": "struct PaymentRegistry.PaymentChannelCommit", "name": "paymentChannelCommit", "type": "tuple" } ], "name": "hashPaymentChannelCommit", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract ExternalAccountRegistry", "name": "externalAccountRegistry_", "type": "address" }, { "internalType": "contract PersonalAccountRegistry", "name": "personalAccountRegistry_", "type": "address" }, { "internalType": "uint256", "name": "depositExitLockPeriod_", "type": "uint256" }, { "internalType": "address[]", "name": "guardians_", "type": "address[]" }, { "internalType": "address", "name": "gateway_", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "isDepositAccountDeployed", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "guardian", "type": "address" } ], "name": "isGuardian", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "isInitialized", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "personalAccountRegistry", "outputs": [ { "internalType": "contract PersonalAccountRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "processDepositExit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "guardian", "type": "address" } ], "name": "removeGuardian", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "requestDepositExit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "messageHash", "type": "bytes32" }, { "internalType": "bytes", "name": "signature", "type": "bytes" } ], "name": "verifyGuardianSignature", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bytes", "name": "guardianSignature", "type": "bytes" } ], "name": "withdrawDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "transactionHash": "0xc949e205aca76ad456381e7151af83e46e51d262363c7ff242641e183b369001", "receipt": { "to": "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7", "from": "0x53fE9288897e254698175740aa359E19E26c10af", "contractAddress": null, "transactionIndex": 0, "gasUsed": "4298759", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "blockHash": "0xdbd912ae73e0bc5d3f85443876ef338e91085447ce315192c4e0c959c3c6af51", "transactionHash": "0xc949e205aca76ad456381e7151af83e46e51d262363c7ff242641e183b369001", "logs": [], "blockNumber": 2619399, "cumulativeGasUsed": "4298759", "status": 1, "byzantium": true }, "args": [], "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"DepositAccountDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositExitCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"DepositExitRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lockedUntil\",\"type\":\"uint256\"}],\"name\":\"DepositExitRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"PaymentChannelCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositValue\",\"type\":\"uint256\"}],\"name\":\"PaymentSplit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositPaymentValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndSplit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"computeDepositAccountAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"}],\"name\":\"computePaymentChannelHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployDepositAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositExitLockPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDepositExitLockedUntil\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDepositWithdrawnAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPaymentChannelCommittedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PaymentRegistry.DepositWithdrawal\",\"name\":\"depositWithdrawal\",\"type\":\"tuple\"}],\"name\":\"hashDepositWithdrawal\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PaymentRegistry.PaymentChannelCommit\",\"name\":\"paymentChannelCommit\",\"type\":\"tuple\"}],\"name\":\"hashPaymentChannelCommit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"externalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"personalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"depositExitLockPeriod_\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"isDepositAccountDeployed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"personalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"processDepositExit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"requestDepositExit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"withdrawDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski <stan@pillarproject.io>\",\"details\":\"the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message. Process will be rejected when any of senders channels will be committed.\",\"events\":{\"DepositAccountDeployed(address,address)\":{\"details\":\"Emitted when the deposit account is deployed\",\"params\":{\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\"}},\"DepositExitCompleted(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit exist is completed\",\"params\":{\"amount\":\"deposit exist amount\",\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositExitRejected(address,address,address)\":{\"details\":\"Emitted when the deposit exist is rejected\",\"params\":{\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositExitRequested(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit exist is requested\",\"params\":{\"depositAccount\":\"deposit account address\",\"lockedUntil\":\"deposit exist locked util time\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositWithdrawn(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit has been withdrawn\",\"params\":{\"amount\":\"withdrawn amount\",\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)\":{\"details\":\"Emitted when the payment channel has been committed\",\"params\":{\"amount\":\"committed amount\",\"hash\":\"channel hash\",\"recipient\":\"recipient address\",\"sender\":\"sender address\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"PaymentDeposited(bytes32,uint256)\":{\"details\":\"Emitted when the payment has been deposited\",\"params\":{\"channelHash\":\"channel hash\",\"value\":\"payment value\"}},\"PaymentSplit(bytes32,uint256,uint256)\":{\"details\":\"Emitted when the payment has been withdrawn and deposited (split)\",\"params\":{\"channelHash\":\"channel hash\",\"depositValue\":\"payment deposited value\",\"totalValue\":\"payment total value\"}},\"PaymentWithdrawn(bytes32,uint256)\":{\"details\":\"Emitted when the payment has been withdrawn\",\"params\":{\"channelHash\":\"channel hash\",\"value\":\"payment value\"}}},\"kind\":\"dev\",\"methods\":{\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"depositPaymentValue\":\"amount to deposit\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"computeDepositAccountAddress(address)\":{\"params\":{\"owner\":\"owner address\"},\"returns\":{\"_0\":\"deposit account address\"}},\"computePaymentChannelHash(address,address,address,bytes32)\":{\"params\":{\"recipient\":\"recipient address\",\"sender\":\"sender address\",\"token\":\"token address\",\"uid\":\"unique channel id\"},\"returns\":{\"_0\":\"hash\"}},\"constructor\":{\"details\":\"Public constructor\"},\"deployDepositAccount(address)\":{\"params\":{\"owner\":\"owner address\"}},\"getDepositExitLockedUntil(address,address)\":{\"params\":{\"owner\":\"owner address\",\"token\":\"token address\"},\"returns\":{\"_0\":\"locked until time\"}},\"getDepositWithdrawnAmount(address,address)\":{\"params\":{\"owner\":\"owner address\",\"token\":\"token address\"},\"returns\":{\"_0\":\"withdrawn amount\"}},\"getPaymentChannelCommittedAmount(bytes32)\":{\"params\":{\"hash\":\"payment channel hash\"},\"returns\":{\"_0\":\"committed amount\"}},\"hashDepositWithdrawal((address,address,uint256))\":{\"params\":{\"depositWithdrawal\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))\":{\"params\":{\"paymentChannelCommit\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address,uint256,address[],address)\":{\"params\":{\"depositExitLockPeriod_\":\"deposit exit lock period\",\"externalAccountRegistry_\":\"`ExternalAccountRegistry` contract address\",\"gateway_\":\"`Gateway` contract address\",\"guardians_\":\"array of guardians addresses\",\"personalAccountRegistry_\":\"`PersonalAccountRegistry` contract address\"}},\"isDepositAccountDeployed(address)\":{\"params\":{\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true when deposit account is deployed\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"processDepositExit(address)\":{\"params\":{\"token\":\"token address\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"requestDepositExit(address)\":{\"params\":{\"token\":\"token address\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}},\"withdrawDeposit(address,uint256,bytes)\":{\"params\":{\"amount\":\"amount to withdraw\",\"guardianSignature\":\"guardian signature\",\"token\":\"token address\"}}},\"title\":\"Payment registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel and deposit payment\"},\"commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel, withdraws and deposits (split) payment\"},\"commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel and withdraw payment\"},\"computeDepositAccountAddress(address)\":{\"notice\":\"Computes deposit account address\"},\"computePaymentChannelHash(address,address,address,bytes32)\":{\"notice\":\"Computes payment channel hash\"},\"deployDepositAccount(address)\":{\"notice\":\"Deploys deposit account\"},\"getDepositExitLockedUntil(address,address)\":{\"notice\":\"Gets deposit exit locked until time\"},\"getDepositWithdrawnAmount(address,address)\":{\"notice\":\"Gets deposit withdrawn amount\"},\"getPaymentChannelCommittedAmount(bytes32)\":{\"notice\":\"Gets payment channel committed amount\"},\"hashDepositWithdrawal((address,address,uint256))\":{\"notice\":\"Hashes `DepositWithdrawal` message payload\"},\"hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))\":{\"notice\":\"Hashes `PaymentChannelCommit` message payload\"},\"initialize(address,address,uint256,address[],address)\":{\"notice\":\"Initialize `PaymentRegistry` contract\"},\"isDepositAccountDeployed(address)\":{\"notice\":\"Checks if deposit account is deployed\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"processDepositExit(address)\":{\"notice\":\"Processes deposit exit\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"requestDepositExit(address)\":{\"notice\":\"Requests deposit exit\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"},\"withdrawDeposit(address,uint256,bytes)\":{\"notice\":\"Withdraws deposit\"}},\"notice\":\"A registry for payment and payment channels\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/payments/PaymentRegistry.sol\":\"PaymentRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski <stan@pillarproject.io>\\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski <stan@pillarproject.io>\\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski <stan@pillarproject.io>\\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n a