{ "contractName": "StakedExpenditure", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "expenditureId", "type": "uint256" } ], "name": "ExpenditureCancelled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "creator", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "expenditureId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "stake", "type": "uint256" } ], "name": "ExpenditureMadeViaStake", "type": "event" }, { "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": "uint256", "name": "stakeFraction", "type": "uint256" } ], "name": "StakeFractionSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "expenditureId", "type": "uint256" } ], "name": "StakeReclaimed", "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": "_stakeFraction", "type": "uint256" } ], "name": "setStakeFraction", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_permissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_childSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_domainId", "type": "uint256" }, { "internalType": "bytes", "name": "_key", "type": "bytes" }, { "internalType": "bytes", "name": "_value", "type": "bytes" }, { "internalType": "uint256", "name": "_branchMask", "type": "uint256" }, { "internalType": "bytes32[]", "name": "_siblings", "type": "bytes32[]" } ], "name": "makeExpenditureWithStake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_expenditureId", "type": "uint256" } ], "name": "reclaimStake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_permissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_childSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_expenditureId", "type": "uint256" } ], "name": "cancelAndReclaimStake", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_permissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_childSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_callerPermissionDomainId", "type": "uint256" }, { "internalType": "uint256", "name": "_callerChildSkillIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_expenditureId", "type": "uint256" }, { "internalType": "bool", "name": "_punish", "type": "bool" } ], "name": "cancelAndPunish", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getStakeFraction", "outputs": [ { "internalType": "uint256", "name": "_stakeFraction", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_expenditureId", "type": "uint256" } ], "name": "getStake", "outputs": [ { "components": [ { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "internalType": "struct StakedExpenditure.Stake", "name": "stake", "type": "tuple" } ], "stateMutability": "view", "type": "function" } ], "devdoc": { "kind": "dev", "methods": { "cancelAndPunish(uint256,uint256,uint256,uint256,uint256,bool)": { "params": { "_callerChildSkillIndex": "The index that the `_domainId` is relative to `_callerPermissionDomainId`", "_callerPermissionDomainId": "The domainId in which the caller has the arbitration permission", "_childSkillIndex": "The index that the `_domainId` is relative to `_permissionDomainId`", "_expenditureId": "The id of the expenditure", "_permissionDomainId": "The domainId in which the extension has the arbitration permission", "_punish": "Whether the staker should be punished by losing an amount of reputation equal to the stake" } }, "cancelAndReclaimStake(uint256,uint256,uint256)": { "params": { "_childSkillIndex": "The index that the `_domainId` is relative to `_permissionDomainId`", "_expenditureId": "The id of the expenditure", "_permissionDomainId": "The domainId in which the extension has the arbitration permission" } }, "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" } }, "getStake(uint256)": { "params": { "_expenditureId": "The id of the expenditure to get the stake for" }, "returns": { "stake": "The stake, a struct holding the staker's address and the stake amount" } }, "getStakeFraction()": { "returns": { "_stakeFraction": "The stake fraction" } }, "identifier()": { "returns": { "_identifier": "The extension's identifier" } }, "install(address)": { "params": { "_colony": "The colony in which the extension holds permissions" } }, "makeExpenditureWithStake(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])": { "params": { "_branchMask": "The branchmask of the proof", "_childSkillIndex": "The index that the `_domainId` is relative to `_permissionDomainId`,", "_domainId": "The domain where the expenditure belongs", "_key": "A reputation hash tree key, of the total reputation in _domainId", "_permissionDomainId": "The domainId in which the extension has the administration permission", "_siblings": "The siblings of the proof", "_value": "Reputation value indicating the total reputation in _domainId" } }, "reclaimStake(uint256)": { "params": { "_expenditureId": "The id of the expenditure" } }, "setStakeFraction(uint256)": { "params": { "_stakeFraction": "WAD-denominated fraction, used to determine stake as fraction of rep in domain" } }, "version()": { "returns": { "_version": "The extension's version number" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "cancelAndPunish(uint256,uint256,uint256,uint256,uint256,bool)": { "notice": "Cancel the expenditure and punish the stakerCan only be called by an arbitration user" }, "cancelAndReclaimStake(uint256,uint256,uint256)": { "notice": "Cancel the expenditure and reclaim the stake in one transactionCan only be called by expenditure owner while expenditure is in draft state" }, "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" }, "getStake(uint256)": { "notice": "Get the stake for an expenditure" }, "getStakeFraction()": { "notice": "Get the stake fraction" }, "identifier()": { "notice": "Returns the identifier of the extension" }, "install(address)": { "notice": "Configures the extension" }, "makeExpenditureWithStake(uint256,uint256,uint256,bytes,bytes,uint256,bytes32[])": { "notice": "Make an expenditure by putting up a stake" }, "reclaimStake(uint256)": { "notice": "Reclaims the stake if the expenditure is finalized or cancelled" }, "setStakeFraction(uint256)": { "notice": "Sets the stake fraction" }, "uninstall()": { "notice": "Called when uninstalling the extension" }, "version()": { "notice": "Returns the version of the extension" } }, "version": 1 } }