dgf-prototype/frontend/contractArtifacts/DAO.json

828 lines
115 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": "weightPPM",
2024-04-19 18:07:48 -05:00
"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": "weightPPM",
2024-04-16 16:50:09 -05:00
"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": "weightPPM",
2024-04-19 18:07:48 -05:00
"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-24 17:37:19 -05:00
"bytecode": "0x60806040526003600c556040518060400160405280600160ff168152602001600a60ff16815250600f90600262000038929190620000df565b503480156200004657600080fd5b506040518060400160405280600a81526020017f52657075746174696f6e000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f52455000000000000000000000000000000000000000000000000000000000008152508160039081620000c49190620003c2565b508060049081620000d69190620003c2565b505050620004a9565b826002810192821562000116579160200282015b8281111562000115578251829060ff16905591602001919060010190620000f3565b5b50905062000125919062000129565b5090565b5b80821115620001445760008160009055506001016200012a565b5090565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620001ca57607f821691505b602082108103620001e057620001df62000182565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200024a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200020b565b6200025686836200020b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002a36200029d62000297846200026e565b62000278565b6200026e565b9050919050565b6000819050919050565b620002bf8362000282565b620002d7620002ce82620002aa565b84845462000218565b825550505050565b600090565b620002ee620002df565b620002fb818484620002b4565b505050565b5b81811015620003235762000317600082620002e4565b60018101905062000301565b5050565b601f82111562000372576200033c81620001e6565b6200034784620001fb565b8101602085101562000357578190505b6200036f6200036685620001fb565b83018262000300565b50505b505050565b600082821c905092915050565b6000620003976000198460080262000377565b1980831691505092915050565b6000620003b2838362000384565b9150826002028217905092915050565b620003cd8262000148565b67ffffffffffffffff811115620003e957620003e862000153565b5b620003f58254620001b1565b6200040282828562000327565b600060209050601f8311600181146200043a576000841562000425578287015190505b620004318582620003a4565b865550620004a1565b601f1984166200044a86620001e6565b60005b8281101562000474578489015182556001820191506020850194506020810190506200044d565b8683101562000494578489015162000490601f89168262000384565b8355505b6001600288020188555050505b505050505050565b615f3980620004b96000396000f3fe60806040526004361061014b5760003560e01c806370a08231116100b6578063a23362791161006f578063a2336279146104e7578063a9059cbb1461052f578063da66863a1461056c578063dd62ed3e146105a9578063e5b4d827146105e6578063f8300fca1461060f5761014b565b806370a08231146103ac57806388380274146103e957806395d89b4114610426578063975762b3146104515780639fbe7c731461047a578063a230c524146104aa5761014b565b806323b872dd1161010857806323b872dd146102765780632d17c062146102b3578063313ce567146102dc57806350cde8ef146103075780635daf08ca14610344578063642b5bfb146103815761014b565b806306fdde0314610150578063095ea7b31461017b57806311aee380146101b857806317906c2e146101e357806317c182171461020e57806318160ddd1461024b575b600080fd5b34801561015c57600080fd5b5061016561064e565b6040516101729190613b5e565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190613c28565b6106e0565b6040516101af9190613c83565b60405180910390f35b3480156101c457600080fd5b506101cd610703565b6040516101da9190613cad565b60405180910390f35b3480156101ef57600080fd5b506101f8610709565b6040516102059190613cad565b60405180910390f35b34801561021a57600080fd5b5061023560048036038101906102309190613cc8565b61070f565b6040516102429190613c83565b60405180910390f35b34801561025757600080fd5b506102606110f1565b60405161026d9190613cad565b60405180910390f35b34801561028257600080fd5b5061029d60048036038101906102989190613cf5565b6110fb565b6040516102aa9190613c83565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190613d74565b611138565b005b3480156102e857600080fd5b506102f1611161565b6040516102fe9190613de3565b60405180910390f35b34801561031357600080fd5b5061032e60048036038101906103299190613cc8565b61116a565b60405161033b9190613b5e565b6040
"deployedBytecode": "0x60806040526004361061014b5760003560e01c806370a08231116100b6578063a23362791161006f578063a2336279146104e7578063a9059cbb1461052f578063da66863a1461056c578063dd62ed3e146105a9578063e5b4d827146105e6578063f8300fca1461060f5761014b565b806370a08231146103ac57806388380274146103e957806395d89b4114610426578063975762b3146104515780639fbe7c731461047a578063a230c524146104aa5761014b565b806323b872dd1161010857806323b872dd146102765780632d17c062146102b3578063313ce567146102dc57806350cde8ef146103075780635daf08ca14610344578063642b5bfb146103815761014b565b806306fdde0314610150578063095ea7b31461017b57806311aee380146101b857806317906c2e146101e357806317c182171461020e57806318160ddd1461024b575b600080fd5b34801561015c57600080fd5b5061016561064e565b6040516101729190613b5e565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d9190613c28565b6106e0565b6040516101af9190613c83565b60405180910390f35b3480156101c457600080fd5b506101cd610703565b6040516101da9190613cad565b60405180910390f35b3480156101ef57600080fd5b506101f8610709565b6040516102059190613cad565b60405180910390f35b34801561021a57600080fd5b5061023560048036038101906102309190613cc8565b61070f565b6040516102429190613c83565b60405180910390f35b34801561025757600080fd5b506102606110f1565b60405161026d9190613cad565b60405180910390f35b34801561028257600080fd5b5061029d60048036038101906102989190613cf5565b6110fb565b6040516102aa9190613c83565b60405180910390f35b3480156102bf57600080fd5b506102da60048036038101906102d59190613d74565b611138565b005b3480156102e857600080fd5b506102f1611161565b6040516102fe9190613de3565b60405180910390f35b34801561031357600080fd5b5061032e60048036038101906103299190613cc8565b61116a565b60405161033b9190613b5e565b60405180910390f35b34801561035057600080fd5b5061036b60048036038101906103669190613cc8565b611216565b6040516103789190613e0d565b60405180910390f35b34801561038d57600080fd5b50610396611249565b6040516103a39190613cad565b60405180910390f35b3480156103b857600080fd5b506103d360048036038101906103ce9190613e28565b61124f565b6040516103e09190613cad565b60405180910390f35b3480156103f557600080fd5b50610410600480360381019061040b9190613e55565b611297565b60405161041d9190613c83565b60405180910390f35b34801561043257600080fd5b5061043b61131e565b6040516104489190613b5e565b60405180910390f35b34801561045d57600080fd5b5061047860048036038101906104739190613ea8565b6113b0565b005b610494600480360381019061048f9190613fec565b6113e5565b6040516104a19190613cad565b60405180910390f35b3480156104b657600080fd5b506104d160048036038101906104cc9190613e28565b61189f565b6040516104de9190613c83565b60405180910390f35b3480156104f357600080fd5b5061050e60048036038101906105099190613cc8565b6118bf565b6040516105269c9b9a9998979695949392919061425c565b60405180910390f35b34801561053b57600080fd5b5061055660048036038101906105519190613c28565b611b39565b6040516105639190613c83565b60405180910390f35b34801561057857600080fd5b50610593600480360381019061058e9190614326565b611b76565b6040516105a09190614460565b60405180910390f35b3480156105b557600080fd5b506105d060048036038101906105cb9190614482565b611c5f565b6040516105dd9190613cad565b60405180910390f35b3480156105f257600080fd5b5061060d6004803603810190610608919061456e565b611ce6565b005b34801561061b57600080fd5b5061063660048036038101906106319190614752565b6121b9565b6040516106459392919061479b565b60405180910390f35b60606003805461065d90614808565b80601f016020809104026020016040519081016040528092919081815260200182805461068990614808565b80156106d65780601f106106ab576101008083540402835291602001916106d6565b820191906000526020600020905b8154815290600101906020018083116106b957829003601f168201915b5050505050905090565b6000806106eb6122a1565b90506106f88185856122a9565b600191505092915050565b60065481565b600a5481565b600080600d600084815260200190815260200160002090506000151581600f0160009054906101000a900460ff1615151461077f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077690614885565b60405180910390fd5b600080600080600090505b84600501548110156107fb5784600401600082815260200190815260200160002091508160010160009054906101000a900460ff16156107db578160020154846107d491906148d4565b93506107ee565b8160020154836107eb91906148d4565b92505b80806001
"linkReferences": {},
"deployedLinkReferences": {}
}