dgf-prototype/backend/contractArtifacts/DAO.json

834 lines
84 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": "contract Reputation",
"name": "reputation_",
"type": "address"
},
{
"internalType": "contract Forum",
"name": "forum_",
"type": "address"
},
{
"internalType": "contract Bench",
"name": "bench_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "id",
"type": "string"
}
],
"name": "PostAdded",
"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": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"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": [],
"name": "distributeFeeAmongMembers",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "id",
"type": "string"
}
],
"name": "emitPostAdded",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "emitValidationPoolInitiated",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
},
{
"internalType": "bool",
"name": "quorumMet",
"type": "bool"
}
],
"name": "emitValidationPoolResolved",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "evaluateOutcome",
"outputs": [
{
"internalType": "bool",
"name": "",
"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": "",
"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": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
},
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
},
{
"internalType": "bool",
"name": "quorumMet",
"type": "bool"
},
{
"internalType": "uint256",
"name": "stakedFor",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stakedAgainst",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "onValidate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "postCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "postIndex",
"type": "uint256"
}
],
"name": "postIds",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "postId",
"type": "string"
}
],
"name": "posts",
"outputs": [
{
"internalType": "string",
"name": "id",
"type": "string"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "reputation",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "int256",
"name": "amount",
"type": "int256"
}
],
"name": "propagateReputation",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "registerMember",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
2024-04-16 16:50:09 -05:00
{
"internalType": "uint256",
"name": "value",
2024-04-16 16:50:09 -05:00
"type": "uint256"
}
],
"name": "spendAllowance",
"outputs": [],
"stateMutability": "nonpayable",
"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": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "update",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "validationPoolCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "validationPools",
"outputs": [
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"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
{
"components": [
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minted",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "resolved",
"type": "bool"
},
{
"internalType": "bool",
"name": "outcome",
"type": "bool"
}
],
"internalType": "struct ValidationPoolProps",
"name": "props",
"type": "tuple"
2024-03-18 14:03:53 -05:00
},
{
"internalType": "bool",
"name": "callbackOnValidate",
"type": "bool"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x60806040523480156200001157600080fd5b50604051620044d7380380620044d78339818101604052810190620000379190620003bb565b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b815260040162000154919062000482565b600060405180830381600087803b1580156200016f57600080fd5b505af115801562000184573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b8152600401620001e5919062000482565b600060405180830381600087803b1580156200020057600080fd5b505af115801562000215573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b815260040162000276919062000482565b600060405180830381600087803b1580156200029157600080fd5b505af1158015620002a6573d6000803e3d6000fd5b505050505050506200049f565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002e582620002b8565b9050919050565b6000620002f982620002d8565b9050919050565b6200030b81620002ec565b81146200031757600080fd5b50565b6000815190506200032b8162000300565b92915050565b60006200033e82620002d8565b9050919050565b620003508162000331565b81146200035c57600080fd5b50565b600081519050620003708162000345565b92915050565b60006200038382620002d8565b9050919050565b620003958162000376565b8114620003a157600080fd5b50565b600081519050620003b5816200038a565b92915050565b600080600060608486031215620003d757620003d6620002b3565b5b6000620003e7868287016200031a565b9350506020620003fa868287016200035f565b92505060406200040d86828701620003a4565b9150509250925092565b6000819050919050565b6000620004426200043c6200043684620002b8565b62000417565b620002b8565b9050919050565b6000620004568262000421565b9050919050565b60006200046a8262000449565b9050919050565b6200047c816200045d565b82525050565b600060208201905062000499600083018462000471565b92915050565b61402880620004af6000396000f3fe6080604052600436106101cd5760003560e01c806388380274116100f7578063a233627911610095578063dd8aaa4f11610064578063dd8aaa4f146106a6578063e5b4d827146106cf578063f8300fca146106f8578063fcb4888e14610737576101cd565b8063a2336279146105c0578063da66863a14610603578063dc00bbfe14610640578063dd62ed3e14610669576101cd565b80639dc29fac116100d15780639dc29fac146105015780639fbe7c731461052a5780639fd098721461055a578063a230c52414610583576101cd565b806388380274146104725780638ce516da146104af578063975762b3146104d8576101cd565b806340c10f191161016f5780635ffc70041161013e5780635ffc7004146103b8578063642b5bfb146103e157806370a082311461040c57806378e21c6e14610449576101cd565b806340c10f19146102ec57806350cde8ef146103155780635c253c0b146103525780635daf08ca1461037b576101cd565b806318160ddd116101ab57806318160ddd146102655780631d0d37c9146102905780631e57e078146102b95780632d17c062146102c3576101cd565b806311aee380146101d257806317906c2e146101fd57806317c1821714610228575b600080fd5b3480156101de57600080fd5b506101e7610760565b6040516101f49190611e8b565b60405180910390f35b34801561020957600080fd5b50610212610766565b60405161021f9190611e8b565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190611ee6565b6107fe565b60405161025c9190611f2e565b60405180910390f35b34801561027157600080fd5b5061027a6108a5565b6040516102879190611e8b565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190612038565b61093c565b005b6102c1610aa2565b005b3480156102cf57600080fd5b506102ea60048036038101906102e591906120e7565b610ba8565b005b3480156102f857600080fd5b50610313600480360381019061030e919061213a565b610c8b565b005b34801561032157600080fd5b5061033c60048036038101906103379190611ee6565b610e04565b604051610349919061220a
"deployedBytecode": "0x6080604052600436106101cd5760003560e01c806388380274116100f7578063a233627911610095578063dd8aaa4f11610064578063dd8aaa4f146106a6578063e5b4d827146106cf578063f8300fca146106f8578063fcb4888e14610737576101cd565b8063a2336279146105c0578063da66863a14610603578063dc00bbfe14610640578063dd62ed3e14610669576101cd565b80639dc29fac116100d15780639dc29fac146105015780639fbe7c731461052a5780639fd098721461055a578063a230c52414610583576101cd565b806388380274146104725780638ce516da146104af578063975762b3146104d8576101cd565b806340c10f191161016f5780635ffc70041161013e5780635ffc7004146103b8578063642b5bfb146103e157806370a082311461040c57806378e21c6e14610449576101cd565b806340c10f19146102ec57806350cde8ef146103155780635c253c0b146103525780635daf08ca1461037b576101cd565b806318160ddd116101ab57806318160ddd146102655780631d0d37c9146102905780631e57e078146102b95780632d17c062146102c3576101cd565b806311aee380146101d257806317906c2e146101fd57806317c1821714610228575b600080fd5b3480156101de57600080fd5b506101e7610760565b6040516101f49190611e8b565b60405180910390f35b34801561020957600080fd5b50610212610766565b60405161021f9190611e8b565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190611ee6565b6107fe565b60405161025c9190611f2e565b60405180910390f35b34801561027157600080fd5b5061027a6108a5565b6040516102879190611e8b565b60405180910390f35b34801561029c57600080fd5b506102b760048036038101906102b29190612038565b61093c565b005b6102c1610aa2565b005b3480156102cf57600080fd5b506102ea60048036038101906102e591906120e7565b610ba8565b005b3480156102f857600080fd5b50610313600480360381019061030e919061213a565b610c8b565b005b34801561032157600080fd5b5061033c60048036038101906103379190611ee6565b610e04565b604051610349919061220a565b60405180910390f35b34801561035e57600080fd5b506103796004803603810190610374919061235c565b610eae565b005b34801561038757600080fd5b506103a2600480360381019061039d9190611ee6565b610ee8565b6040516103af91906123b4565b60405180910390f35b3480156103c457600080fd5b506103df60048036038101906103da91906123cf565b610f1b565b005b3480156103ed57600080fd5b506103f6610faf565b6040516104039190611e8b565b60405180910390f35b34801561041857600080fd5b50610433600480360381019061042e9190612422565b611047565b6040516104409190611e8b565b60405180910390f35b34801561045557600080fd5b50610470600480360381019061046b919061244f565b6110eb565b005b34801561047e57600080fd5b50610499600480360381019061049491906124a2565b61112b565b6040516104a69190611f2e565b60405180910390f35b3480156104bb57600080fd5b506104d660048036038101906104d191906123cf565b61124b565b005b3480156104e457600080fd5b506104ff60048036038101906104fa91906124f5565b6113c7565b005b34801561050d57600080fd5b506105286004803603810190610523919061213a565b611489565b005b610544600480360381019061053f91906125d4565b611602565b6040516105519190611e8b565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612703565b6116c7565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612422565b611771565b6040516105b79190611f2e565b60405180910390f35b3480156105cc57600080fd5b506105e760048036038101906105e29190611ee6565b611791565b6040516105fa97969594939291906129a9565b60405180910390f35b34801561060f57600080fd5b5061062a60048036038101906106259190612a2a565b611864565b6040516106379190612b64565b60405180910390f35b34801561064c57600080fd5b5061066760048036038101906106629190611ee6565b611911565b005b34801561067557600080fd5b50610690600480360381019061068b9190612b86565b61194b565b60405161069d9190611e8b565b60405180910390f35b3480156106b257600080fd5b506106cd60048036038101906106c891906123cf565b6119f2565b005b3480156106db57600080fd5b506106f660048036038101906106f19190612c72565b611a86565b005b34801561070457600080fd5b5061071f600480360381019061071a9190612a2a565b611b27565b60405161072e93929190612d26565b60405180910390f35b34801561074357600080fd5b5061075e60048036038101906107599190612422565b611bdc565b005b60045481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317906c2e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f9
"linkReferences": {},
"deployedLinkReferences": {}
}