dgf-prototype/frontend/contractArtifacts/DAO.json

851 lines
116 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": "postId",
2024-03-19 22:22:36 -05:00
"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"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "forwardAllowance",
"outputs": [],
"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-29 17:51:51 -05:00
"bytecode": "0x60806040526003600c556040518060400160405280600160ff168152602001600a60ff16815250600f90600262000038929190620000df565b503480156200004657600080fd5b506040518060400160405280600a81526020017f52657075746174696f6e000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f52455000000000000000000000000000000000000000000000000000000000008152508160039081620000c49190620003c2565b508060049081620000d69190620003c2565b505050620004a9565b826002810192821562000116579160200282015b8281111562000115578251829060ff16905591602001919060010190620000f3565b5b50905062000125919062000129565b5090565b5b80821115620001445760008160009055506001016200012a565b5090565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620001ca57607f821691505b602082108103620001e057620001df62000182565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200024a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200020b565b6200025686836200020b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002a36200029d62000297846200026e565b62000278565b6200026e565b9050919050565b6000819050919050565b620002bf8362000282565b620002d7620002ce82620002aa565b84845462000218565b825550505050565b600090565b620002ee620002df565b620002fb818484620002b4565b505050565b5b81811015620003235762000317600082620002e4565b60018101905062000301565b5050565b601f82111562000372576200033c81620001e6565b6200034784620001fb565b8101602085101562000357578190505b6200036f6200036685620001fb565b83018262000300565b50505b505050565b600082821c905092915050565b6000620003976000198460080262000377565b1980831691505092915050565b6000620003b2838362000384565b9150826002028217905092915050565b620003cd8262000148565b67ffffffffffffffff811115620003e957620003e862000153565b5b620003f58254620001b1565b6200040282828562000327565b600060209050601f8311600181146200043a576000841562000425578287015190505b620004318582620003a4565b865550620004a1565b601f1984166200044a86620001e6565b60005b8281101562000474578489015182556001820191506020850194506020810190506200044d565b8683101562000494578489015162000490601f89168262000384565b8355505b6001600288020188555050505b505050505050565b615fde80620004b96000396000f3fe6080604052600436106101665760003560e01c8063642b5bfb116100d1578063a230c5241161008a578063da66863a11610064578063da66863a146105b0578063dd62ed3e146105ed578063e5b4d8271461062a578063f8300fca1461065357610166565b8063a230c524146104ee578063a23362791461052b578063a9059cbb1461057357610166565b8063642b5bfb146103c557806370a08231146103f0578063883802741461042d57806395d89b411461046a578063975762b3146104955780639fbe7c73146104be57610166565b806323b872dd1161012357806323b872dd146102915780632d17c062146102ce578063313ce567146102f757806350cde8ef146103225780635daf08ca1461035f5780635ffc70041461039c57610166565b806306fdde031461016b578063095ea7b31461019657806311aee380146101d357806317906c2e146101fe57806317c182171461022957806318160ddd14610266575b600080fd5b34801561017757600080fd5b50610180610692565b60405161018d9190613c03565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190613ccd565b610724565b6040516101ca9190613d28565b60405180910390f35b3480156101df57600080fd5b506101e8610747565b6040516101f59190613d52565b60405180910390f35b34801561020a57600080fd5b5061021361074d565b6040516102209190613d52565b60405180910390f35b34801561023557600080fd5b50610250600480360381019061024b9190613d6d565b610753565b60405161025d9190613d28565b60405180910390f35b34801561027257600080fd5b5061027b611135565b6040516102889190613d52565b60405180910390f35b34801561029d57600080fd5b506102b860048036038101906102b39190613d9a565b61113f565b6040516102c59190613d28565b60405180910390f35b3480156102da57600080fd5b506102f560048036038101906102f09190613e19565b61117c565b005b34801561030357600080fd5b5061030c6111a5565b6040516103199190613e88565b60405180910390f35b34801561032e57600080fd5b506103496004803603810190610344
"deployedBytecode": "0x6080604052600436106101665760003560e01c8063642b5bfb116100d1578063a230c5241161008a578063da66863a11610064578063da66863a146105b0578063dd62ed3e146105ed578063e5b4d8271461062a578063f8300fca1461065357610166565b8063a230c524146104ee578063a23362791461052b578063a9059cbb1461057357610166565b8063642b5bfb146103c557806370a08231146103f0578063883802741461042d57806395d89b411461046a578063975762b3146104955780639fbe7c73146104be57610166565b806323b872dd1161012357806323b872dd146102915780632d17c062146102ce578063313ce567146102f757806350cde8ef146103225780635daf08ca1461035f5780635ffc70041461039c57610166565b806306fdde031461016b578063095ea7b31461019657806311aee380146101d357806317906c2e146101fe57806317c182171461022957806318160ddd14610266575b600080fd5b34801561017757600080fd5b50610180610692565b60405161018d9190613c03565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190613ccd565b610724565b6040516101ca9190613d28565b60405180910390f35b3480156101df57600080fd5b506101e8610747565b6040516101f59190613d52565b60405180910390f35b34801561020a57600080fd5b5061021361074d565b6040516102209190613d52565b60405180910390f35b34801561023557600080fd5b50610250600480360381019061024b9190613d6d565b610753565b60405161025d9190613d28565b60405180910390f35b34801561027257600080fd5b5061027b611135565b6040516102889190613d52565b60405180910390f35b34801561029d57600080fd5b506102b860048036038101906102b39190613d9a565b61113f565b6040516102c59190613d28565b60405180910390f35b3480156102da57600080fd5b506102f560048036038101906102f09190613e19565b61117c565b005b34801561030357600080fd5b5061030c6111a5565b6040516103199190613e88565b60405180910390f35b34801561032e57600080fd5b5061034960048036038101906103449190613d6d565b6111ae565b6040516103569190613c03565b60405180910390f35b34801561036b57600080fd5b5061038660048036038101906103819190613d6d565b61125a565b6040516103939190613eb2565b60405180910390f35b3480156103a857600080fd5b506103c360048036038101906103be9190613d9a565b61128d565b005b3480156103d157600080fd5b506103da6112bc565b6040516103e79190613d52565b60405180910390f35b3480156103fc57600080fd5b5061041760048036038101906104129190613ecd565b6112c2565b6040516104249190613d52565b60405180910390f35b34801561043957600080fd5b50610454600480360381019061044f9190613efa565b61130a565b6040516104619190613d28565b60405180910390f35b34801561047657600080fd5b5061047f6113a5565b60405161048c9190613c03565b60405180910390f35b3480156104a157600080fd5b506104bc60048036038101906104b79190613f4d565b611437565b005b6104d860048036038101906104d39190614091565b61148a565b6040516104e59190613d52565b60405180910390f35b3480156104fa57600080fd5b5061051560048036038101906105109190613ecd565b611944565b6040516105229190613d28565b60405180910390f35b34801561053757600080fd5b50610552600480360381019061054d9190613d6d565b611964565b60405161056a9c9b9a99989796959493929190614301565b60405180910390f35b34801561057f57600080fd5b5061059a60048036038101906105959190613ccd565b611bde565b6040516105a79190613d28565b60405180910390f35b3480156105bc57600080fd5b506105d760048036038101906105d291906143cb565b611c1b565b6040516105e49190614505565b60405180910390f35b3480156105f957600080fd5b50610614600480360381019061060f9190614527565b611d04565b6040516106219190613d52565b60405180910390f35b34801561063657600080fd5b50610651600480360381019061064c9190614613565b611d8b565b005b34801561065f57600080fd5b5061067a600480360381019061067591906147f7565b61225e565b60405161068993929190614840565b60405180910390f35b6060600380546106a1906148ad565b80601f01602080910402602001604051908101604052809291908181526020018280546106cd906148ad565b801561071a5780601f106106ef5761010080835404028352916020019161071a565b820191906000526020600020905b8154815290600101906020018083116106fd57829003601f168201915b5050505050905090565b60008061072f612346565b905061073c81858561234e565b600191505092915050565b60065481565b600a5481565b600080600d600084815260200190815260200160002090506000151581600f0160009054906101000a900460ff161515146107c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ba9061492a565b60405180910390fd5b600080600080600090505b846005015481101561083f57846004016000828152602001908152602001600020915081
"linkReferences": {},
"deployedLinkReferences": {}
}