{ "contractName": "StreamingPayments", "abi": [ { "anonymous": false, "inputs": [], "name": "ExtensionInitialised", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "authority", "type": "address" } ], "name": "LogSetAuthority", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" } ], "name": "LogSetOwner", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "user", "type": "address" }, { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" } ], "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "agent", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "streamingPaymentId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "PaymentTokenUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "agent", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "streamingPaymentId", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "token", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "StreamingPaymentClaimed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "agent", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "streamingPaymentId", "type": "uint256" } ], "name": "StreamingPaymentCreated", "type": "event" }, { "inputs": [], "name": "authority", "outputs": [ { "internalType": "contract DSAuthority", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "bytes", "name": "_payload", "type": "bytes" }, { "internalType": "bytes32", "name": "_sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "_sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "_sigV", "type": "uint8" } ], "name": "executeMetaTransaction", "outputs": [ { "internalType": "bytes", "name": "", "type": "bytes" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "_sig", "type": "bytes4" } ], "name": "getCapabilityRoles", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getChainId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getColony", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getDeprecated", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_user", "type": "address" } ], "name": "getMetatransactionNonce", "outputs": [ { "internalType": "uint256", "name": "nonce", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "contract DSAuthority", "name": "authority_", "type": "address" } ], "name": "setAuthority", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner_", "type": "address" } ], "name": "setOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "uint256", "name": "_nonce", "type": "uint256" }, { "internalType": "uint256", "name": "_chainId", "type": "uint256" }, { "internalType": "bytes", "name": "_payload", "type": "bytes" }, { "internalType": "bytes32", "name": "_sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "_sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "_sigV", "type": "uint8" } ], "name": "verify", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "identifier", "outputs": [ { "internalType": "bytes32", "name": "_identifier", "type": "bytes32" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "version", "outputs": [ { "internalType": "uint256", "name": "_version", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_colony", "type": "address" } ], "name": "install", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "finishUpgrade", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "_deprecated", "type": "bool" } ], "name": "deprecate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "uninstall", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_fundingPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_fundingChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_adminPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_adminChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_domainId", "type": "uint256" }, { "internalType": "uint256", "name": "_startTime", "type": "uint256" }, { "internalType": "uint256", "name": "_endTime", "type": "uint256" }, { "internalType": "uint256", "name": "_interval", "type": "uint256" }, { "internalType": "address payable", "name": "_recipient", "type": "address" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" }, { "internalType": "uint256[]", "name": "_amounts", "type": "uint256[]" } ], "name": "create", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_permissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_childSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_fromChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_toChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" } ], "name": "claim", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_fundingPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_fundingChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "addToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_fundingPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_fundingChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_permissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_childSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_fromChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_toChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address", "name": "_token", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "setTokenAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_adminPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_adminChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "uint256", "name": "_startTime", "type": "uint256" } ], "name": "setStartTime", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_adminPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_adminChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "uint256", "name": "_endTime", "type": "uint256" } ], "name": "setEndTime", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_adminPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_adminChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "cancel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address[]", "name": "_tokens", "type": "address[]" } ], "name": "cancelAndWaive", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "getStreamingPayment", "outputs": [ { "components": [ { "internalType": "address payable", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "domainId", "type": "uint256" }, { "internalType": "uint256", "name": "startTime", "type": "uint256" }, { "internalType": "uint256", "name": "endTime", "type": "uint256" }, { "internalType": "uint256", "name": "interval", "type": "uint256" } ], "internalType": "struct StreamingPayments.StreamingPayment", "name": "streamingPayment", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address", "name": "_token", "type": "address" } ], "name": "getPaymentToken", "outputs": [ { "components": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "pseudoAmountClaimedFromStart", "type": "uint256" } ], "internalType": "struct StreamingPayments.PaymentToken", "name": "paymentToken", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getNumStreamingPayments", "outputs": [ { "internalType": "uint256", "name": "numPayments", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" }, { "internalType": "address", "name": "_token", "type": "address" } ], "name": "getAmountEntitledFromStart", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ], "devdoc": { "kind": "dev", "methods": { "addToken(uint256,uint256,uint256,address,uint256)": { "params": { "_amount": "The amount to pay out", "_fundingChildSkillIndex": "The index linking the fundingPermissionDomainId to the domainId", "_fundingPermissionDomainId": "The domain in which the caller holds the funding permission", "_id": "The id of the streaming payment", "_token": "The address of the token" } }, "cancel(uint256,uint256,uint256)": { "params": { "_adminChildSkillIndex": "The index linking the adminPermissionDomainId to the domainId", "_adminPermissionDomainId": "The domain in which the caller holds the admin permission", "_id": "The id of the streaming payment" } }, "cancelAndWaive(uint256,address[])": { "params": { "_id": "The id of the streaming payment", "_tokens": "The tokens to waive any claims to." } }, "claim(uint256,uint256,uint256,uint256,uint256,address[])": { "params": { "_childSkillIndex": "The index linking the permissionDomainId to the domainId the payment is in", "_fromChildSkillIndex": "The linking the domainId to the fromPot domain", "_id": "The id of the streaming payment", "_permissionDomainId": "The domain in which the extension holds the funding & admin permissions", "_toChildSkillIndex": "The linking the domainId to the toPot domain", "_tokens": "The tokens to be paid out" } }, "create(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,address[],uint256[])": { "params": { "_adminChildSkillIndex": "The index linking the adminPermissionDomainId to the domainId", "_adminPermissionDomainId": "The domain in which the caller holds the admin permission", "_amounts": "The amounts to be paid out (per _interval of time)", "_domainId": "The domain out of which the streaming payment will be paid", "_endTime": "The time at which the payment ends paying out", "_fundingChildSkillIndex": "The index linking the fundingPermissionDomainId to the domainId", "_fundingPermissionDomainId": "The domain in which the caller holds the funding permission", "_interval": "The period of time over which _amounts are paid out", "_recipient": "The recipient of the streaming payment", "_startTime": "The time at which the payment begins paying out", "_tokens": "The tokens to be paid out" } }, "deprecate(bool)": { "params": { "_deprecated": "Indicates whether the extension should be deprecated or undeprecated" } }, "executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)": { "params": { "_payload": "Function call to make via meta transaction", "_sigR": "R part of the signature", "_sigS": "S part of the signature", "_sigV": "V part of the signature", "_user": "Address of user trying to do meta transaction" } }, "getAmountEntitledFromStart(uint256,address)": { "params": { "_id": "The id of the streaming payment", "_token": "The address of the token" }, "returns": { "amount": "The amount entitled" } }, "getNumStreamingPayments()": { "returns": { "numPayments": "The total number of streaming payments" } }, "getPaymentToken(uint256,address)": { "params": { "_id": "The id of the streaming payment", "_token": "The address of the token" }, "returns": { "paymentToken": "The payment token struct" } }, "getStreamingPayment(uint256)": { "params": { "_id": "The id of the streaming payment" }, "returns": { "streamingPayment": "The streaming payment struct" } }, "identifier()": { "returns": { "_identifier": "The extension's identifier" } }, "install(address)": { "params": { "_colony": "The colony in which the extension holds permissions" } }, "setEndTime(uint256,uint256,uint256,uint256)": { "params": { "_adminChildSkillIndex": "The index linking the adminPermissionDomainId to the domainId", "_adminPermissionDomainId": "The domain in which the caller holds the admin permission", "_endTime": "The new endTime to set", "_id": "The id of the streaming payment" } }, "setStartTime(uint256,uint256,uint256,uint256)": { "params": { "_adminChildSkillIndex": "The index linking the adminPermissionDomainId to the domainId", "_adminPermissionDomainId": "The domain in which the caller holds the admin permission", "_id": "The id of the streaming payment", "_startTime": "The new startTime to set" } }, "setTokenAmount(uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint256)": { "params": { "_amount": "The new amount to pay out", "_childSkillIndex": "The index linking the permissionDomainId to the domainId", "_fromChildSkillIndex": "The linking the domainId to the fromPot domain", "_fundingChildSkillIndex": "The index linking the fundingPermissionDomainId to the domainId", "_fundingPermissionDomainId": "The domain in which the caller holds the funding permission", "_id": "The id of the streaming payment", "_permissionDomainId": "The domain in which the extension holds the funding & admin permissions", "_toChildSkillIndex": "The linking the domainId to the toPot domain", "_token": "The address of the token" } }, "version()": { "returns": { "_version": "The extension's version number" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "addToken(uint256,uint256,uint256,address,uint256)": { "notice": "Add a new token/amount pair" }, "cancel(uint256,uint256,uint256)": { "notice": "Cancel the streaming payment, specifically by setting endTime to block.timestamp" }, "cancelAndWaive(uint256,address[])": { "notice": "Cancel the streaming payment, specifically by setting endTime to block.timestamp, and waive claim to specified tokens already earned. Only callable by the recipient." }, "claim(uint256,uint256,uint256,uint256,uint256,address[])": { "notice": "Claim a streaming payment" }, "create(uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,address[],uint256[])": { "notice": "Creates a new streaming payment" }, "deprecate(bool)": { "notice": "Called when deprecating (or undeprecating) the extension" }, "executeMetaTransaction(address,bytes,bytes32,bytes32,uint8)": { "notice": "Main function to be called when user wants to execute meta transaction. The actual function to be called should be passed as param with name functionSignature Here the basic signature recovery is being used. Signature is expected to be generated using personal_sign method." }, "finishUpgrade()": { "notice": "Called when upgrading the extension" }, "getAmountEntitledFromStart(uint256,address)": { "notice": "Get the amount entitled to claim from the start of the stream" }, "getNumStreamingPayments()": { "notice": "Get the total number of streaming payments" }, "getPaymentToken(uint256,address)": { "notice": "Get the payment token struct by Id and token" }, "getStreamingPayment(uint256)": { "notice": "Get the streaming payment struct by Id" }, "identifier()": { "notice": "Returns the identifier of the extension" }, "install(address)": { "notice": "Configures the extension" }, "setEndTime(uint256,uint256,uint256,uint256)": { "notice": "Update the endTime, only if the new endTime is in the future" }, "setStartTime(uint256,uint256,uint256,uint256)": { "notice": "Update the startTime, only if the current startTime is in the future" }, "setTokenAmount(uint256,uint256,uint256,uint256,uint256,uint256,uint256,address,uint256)": { "notice": "Update the token amount to be paid out. Claims existing payout prior to the change" }, "uninstall()": { "notice": "Called when uninstalling the extension" }, "version()": { "notice": "Returns the version of the extension" } }, "version": 1 } }