dgf-prototype/backend/contractArtifacts/DAO.json

828 lines
114 KiB
JSON
Raw Normal View History

{
"_format": "hh-sol-artifact-1",
"contractName": "DAO",
2024-04-16 16:50:09 -05:00
"sourceName": "contracts/core/DAO.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "id",
"type": "string"
}
],
"name": "PostAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "ValidationPoolInitiated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "votePasses",
"type": "bool"
},
{
"indexed": false,
"internalType": "bool",
"name": "quorumMet",
"type": "bool"
}
],
"name": "ValidationPoolResolved",
"type": "event"
},
{
"inputs": [
{
2024-04-19 18:07:48 -05:00
"components": [
{
"internalType": "uint256",
"name": "weightPercent",
"type": "uint256"
},
{
"internalType": "address",
"name": "authorAddress",
"type": "address"
}
],
"internalType": "struct Author[]",
"name": "authors",
"type": "tuple[]"
2024-03-19 22:22:36 -05:00
},
{
"internalType": "string",
"name": "contentId",
"type": "string"
2024-04-16 16:50:09 -05:00
},
{
"components": [
{
"internalType": "int256",
"name": "weightPercent",
"type": "int256"
},
{
"internalType": "string",
"name": "targetPostId",
"type": "string"
2024-04-16 16:50:09 -05:00
}
],
"internalType": "struct Citation[]",
"name": "citations",
"type": "tuple[]"
}
],
"name": "addPost",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
2024-03-29 18:08:30 -05:00
"stateMutability": "pure",
"type": "function"
},
2024-04-16 16:50:09 -05:00
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bool",
"name": "inFavor",
"type": "bool"
}
],
"name": "delegatedStakeOnValidationPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "evaluateOutcome",
"outputs": [
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
2024-04-19 18:07:48 -05:00
{
"inputs": [
{
"internalType": "string",
"name": "postId",
"type": "string"
}
],
"name": "getPostAuthors",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "weightPercent",
"type": "uint256"
},
{
"internalType": "address",
"name": "authorAddress",
"type": "address"
}
],
"internalType": "struct Author[]",
"name": "",
"type": "tuple[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
2024-03-18 14:03:53 -05:00
},
2024-03-26 15:20:54 -05:00
{
"internalType": "uint256[2]",
"name": "quorum",
"type": "uint256[2]"
2024-03-26 15:20:54 -05:00
},
{
"internalType": "uint256[2]",
"name": "winRatio",
"type": "uint256[2]"
2024-03-26 15:20:54 -05:00
},
{
"internalType": "uint256",
"name": "bindingPercent",
"type": "uint256"
},
{
"internalType": "bool",
"name": "redistributeLosingStakes",
"type": "bool"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "bool",
"name": "callbackOnValidate",
"type": "bool"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "initiateValidationPool",
"outputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "isMember",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "memberCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "members",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "postCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "postIds",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"name": "posts",
"outputs": [
{
"internalType": "string",
"name": "id",
"type": "string"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
2024-04-16 16:50:09 -05:00
{
"internalType": "uint256",
"name": "reputation",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
2024-04-16 16:50:09 -05:00
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
2024-04-16 16:50:09 -05:00
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
2024-04-16 16:50:09 -05:00
"name": "duration",
"type": "uint256"
2024-04-16 16:50:09 -05:00
}
],
"name": "stakeAvailability",
"outputs": [
{
"internalType": "bool",
2024-04-16 16:50:09 -05:00
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
2024-04-16 16:50:09 -05:00
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "uint256",
2024-04-16 16:50:09 -05:00
"name": "amount",
"type": "uint256"
2024-04-16 16:50:09 -05:00
},
{
"internalType": "bool",
2024-04-16 16:50:09 -05:00
"name": "inFavor",
"type": "bool"
}
],
2024-04-16 16:50:09 -05:00
"name": "stakeOnValidationPool",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
2024-04-16 16:50:09 -05:00
"name": "",
"type": "address"
},
{
"internalType": "uint256",
2024-04-16 16:50:09 -05:00
"name": "",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
2024-04-16 16:50:09 -05:00
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
2024-04-16 16:50:09 -05:00
"name": "",
"type": "address"
},
{
"internalType": "address",
2024-04-16 16:50:09 -05:00
"name": "",
"type": "address"
},
{
"internalType": "uint256",
2024-04-16 16:50:09 -05:00
"name": "",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
2024-04-16 16:50:09 -05:00
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "validationPoolCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "validationPools",
"outputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
2024-04-16 16:50:09 -05:00
{
"internalType": "uint256",
"name": "minted",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stakeCount",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
2024-03-29 18:08:30 -05:00
"name": "duration",
"type": "uint256"
},
2024-03-29 18:08:30 -05:00
{
"internalType": "uint256[2]",
"name": "quorum",
"type": "uint256[2]"
},
{
"internalType": "uint256[2]",
"name": "winRatio",
"type": "uint256[2]"
},
{
"internalType": "uint256",
"name": "bindingPercent",
"type": "uint256"
},
{
"internalType": "bool",
"name": "redistributeLosingStakes",
"type": "bool"
}
],
"internalType": "struct ValidationPoolParams",
"name": "params",
"type": "tuple"
},
2024-03-26 15:20:54 -05:00
{
"internalType": "uint256",
"name": "fee",
2024-03-26 15:20:54 -05:00
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "resolved",
"type": "bool"
},
{
"internalType": "bool",
"name": "outcome",
"type": "bool"
2024-03-18 14:03:53 -05:00
},
{
"internalType": "bool",
"name": "callbackOnValidate",
"type": "bool"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
}
],
2024-04-19 18:07:48 -05:00
"bytecode": "0x608060405260036009556040518060400160405280600160ff168152602001600a60ff16815250600f90600262000038929190620000df565b503480156200004657600080fd5b506040518060400160405280600a81526020017f52657075746174696f6e000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f52455000000000000000000000000000000000000000000000000000000000008152508160039081620000c49190620003c2565b508060049081620000d69190620003c2565b505050620004a9565b826002810192821562000116579160200282015b8281111562000115578251829060ff16905591602001919060010190620000f3565b5b50905062000125919062000129565b5090565b5b80821115620001445760008160009055506001016200012a565b5090565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620001ca57607f821691505b602082108103620001e057620001df62000182565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200024a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200020b565b6200025686836200020b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002a36200029d62000297846200026e565b62000278565b6200026e565b9050919050565b6000819050919050565b620002bf8362000282565b620002d7620002ce82620002aa565b84845462000218565b825550505050565b600090565b620002ee620002df565b620002fb818484620002b4565b505050565b5b81811015620003235762000317600082620002e4565b60018101905062000301565b5050565b601f82111562000372576200033c81620001e6565b6200034784620001fb565b8101602085101562000357578190505b6200036f6200036685620001fb565b83018262000300565b50505b505050565b600082821c905092915050565b6000620003976000198460080262000377565b1980831691505092915050565b6000620003b2838362000384565b9150826002028217905092915050565b620003cd8262000148565b67ffffffffffffffff811115620003e957620003e862000153565b5b620003f58254620001b1565b6200040282828562000327565b600060209050601f8311600181146200043a576000841562000425578287015190505b620004318582620003a4565b865550620004a1565b601f1984166200044a86620001e6565b60005b8281101562000474578489015182556001820191506020850194506020810190506200044d565b8683101562000494578489015162000490601f89168262000384565b8355505b6001600288020188555050505b505050505050565b615ee880620004b96000396000f3fe60806040526004361061014b5760003560e01c806370a08231116100b6578063a23362791161006f578063a2336279146104e7578063a9059cbb1461052f578063da66863a1461056c578063dd62ed3e146105a9578063e5b4d827146105e6578063f8300fca1461060f5761014b565b806370a08231146103ac57806388380274146103e957806395d89b4114610426578063975762b3146104515780639fbe7c731461047a578063a230c524146104aa5761014b565b806323b872dd1161010857806323b872dd146102765780632d17c062146102b3578063313ce567146102dc57806350cde8ef146103075780635daf08ca14610344578063642b5bfb146103815761014b565b806306fdde0314610150578063095ea7b31461017b57806311aee380146101b857806317906c2e146101e357806317c182171461020e57806318160ddd1461024b575b600080fd5b34801561015c57600080fd5b5061016561064e565b6040516101729190613a99565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190613b63565b6106e0565b6040516101af9190613bbe565b60405180910390f35b3480156101c457600080fd5b506101cd610703565b6040516101da9190613be8565b60405180910390f35b3480156101ef57600080fd5b506101f8610709565b6040516102059190613be8565b60405180910390f35b34801561021a57600080fd5b5061023560048036038101906102309190613c03565b61070f565b6040516102429190613bbe565b60405180910390f35b34801561025757600080fd5b5061026061129a565b60405161026d9190613be8565b60405180910390f35b34801561028257600080fd5b5061029d60048036038101906102989190613c30565b6112a4565b6040516102aa9190613bbe565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190613caf565b6112e1565b005b3480156102e857600080fd5b506102f161130a565b6040516102fe9190613d1e565b60405180910390f35b34801561031357600080fd5b5061032e60048036038101906103299190613c03565b611313565b60405161033b9190613a99565b6040
"deployedBytecode": "0x60806040526004361061014b5760003560e01c806370a08231116100b6578063a23362791161006f578063a2336279146104e7578063a9059cbb1461052f578063da66863a1461056c578063dd62ed3e146105a9578063e5b4d827146105e6578063f8300fca1461060f5761014b565b806370a08231146103ac57806388380274146103e957806395d89b4114610426578063975762b3146104515780639fbe7c731461047a578063a230c524146104aa5761014b565b806323b872dd1161010857806323b872dd146102765780632d17c062146102b3578063313ce567146102dc57806350cde8ef146103075780635daf08ca14610344578063642b5bfb146103815761014b565b806306fdde0314610150578063095ea7b31461017b57806311aee380146101b857806317906c2e146101e357806317c182171461020e57806318160ddd1461024b575b600080fd5b34801561015c57600080fd5b5061016561064e565b6040516101729190613a99565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190613b63565b6106e0565b6040516101af9190613bbe565b60405180910390f35b3480156101c457600080fd5b506101cd610703565b6040516101da9190613be8565b60405180910390f35b3480156101ef57600080fd5b506101f8610709565b6040516102059190613be8565b60405180910390f35b34801561021a57600080fd5b5061023560048036038101906102309190613c03565b61070f565b6040516102429190613bbe565b60405180910390f35b34801561025757600080fd5b5061026061129a565b60405161026d9190613be8565b60405180910390f35b34801561028257600080fd5b5061029d60048036038101906102989190613c30565b6112a4565b6040516102aa9190613bbe565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190613caf565b6112e1565b005b3480156102e857600080fd5b506102f161130a565b6040516102fe9190613d1e565b60405180910390f35b34801561031357600080fd5b5061032e60048036038101906103299190613c03565b611313565b60405161033b9190613a99565b60405180910390f35b34801561035057600080fd5b5061036b60048036038101906103669190613c03565b6113bf565b6040516103789190613d48565b60405180910390f35b34801561038d57600080fd5b506103966113f2565b6040516103a39190613be8565b60405180910390f35b3480156103b857600080fd5b506103d360048036038101906103ce9190613d63565b6113f8565b6040516103e09190613be8565b60405180910390f35b3480156103f557600080fd5b50610410600480360381019061040b9190613d90565b611440565b60405161041d9190613bbe565b60405180910390f35b34801561043257600080fd5b5061043b6114c7565b6040516104489190613a99565b60405180910390f35b34801561045d57600080fd5b5061047860048036038101906104739190613de3565b611559565b005b610494600480360381019061048f9190613f27565b61158e565b6040516104a19190613be8565b60405180910390f35b3480156104b657600080fd5b506104d160048036038101906104cc9190613d63565b611a48565b6040516104de9190613bbe565b60405180910390f35b3480156104f357600080fd5b5061050e60048036038101906105099190613c03565b611a68565b6040516105269c9b9a99989796959493929190614197565b60405180910390f35b34801561053b57600080fd5b5061055660048036038101906105519190613b63565b611ce2565b6040516105639190613bbe565b60405180910390f35b34801561057857600080fd5b50610593600480360381019061058e9190614261565b611d1f565b6040516105a0919061439b565b60405180910390f35b3480156105b557600080fd5b506105d060048036038101906105cb91906143bd565b611e08565b6040516105dd9190613be8565b60405180910390f35b3480156105f257600080fd5b5061060d600480360381019061060891906144a9565b611e8f565b005b34801561061b57600080fd5b506106366004803603810190610631919061468d565b61235c565b604051610645939291906146d6565b60405180910390f35b60606003805461065d90614743565b80601f016020809104026020016040519081016040528092919081815260200182805461068990614743565b80156106d65780601f106106ab576101008083540402835291602001916106d6565b820191906000526020600020905b8154815290600101906020018083116106b957829003601f168201915b5050505050905090565b6000806106eb612444565b90506106f881858561244c565b600191505092915050565b600d5481565b60075481565b600080600a60008481526020019081526020016000209050600060058260010160405161073c9190614817565b908152602001604051809103902090506000151582600f0160009054906101000a900460ff161515146107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079b9061487a565b60405180910390fd5b600080600080600090505b85600501548110156108205785600401600082815260200190815260200160002091508160010160009054906101000a900460ff1615610800578160020154846107f9
"linkReferences": {},
"deployedLinkReferences": {}
}