dgf-prototype/backend/contractArtifacts/DAO.json

815 lines
83 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": "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": "0x60806040523480156200001157600080fd5b506040516200439c3803806200439c8339818101604052810190620000379190620003bb565b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b815260040162000154919062000482565b600060405180830381600087803b1580156200016f57600080fd5b505af115801562000184573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b8152600401620001e5919062000482565b600060405180830381600087803b1580156200020057600080fd5b505af115801562000215573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b815260040162000276919062000482565b600060405180830381600087803b1580156200029157600080fd5b505af1158015620002a6573d6000803e3d6000fd5b505050505050506200049f565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002e582620002b8565b9050919050565b6000620002f982620002d8565b9050919050565b6200030b81620002ec565b81146200031757600080fd5b50565b6000815190506200032b8162000300565b92915050565b60006200033e82620002d8565b9050919050565b620003508162000331565b81146200035c57600080fd5b50565b600081519050620003708162000345565b92915050565b60006200038382620002d8565b9050919050565b620003958162000376565b8114620003a157600080fd5b50565b600081519050620003b5816200038a565b92915050565b600080600060608486031215620003d757620003d6620002b3565b5b6000620003e7868287016200031a565b9350506020620003fa868287016200035f565b92505060406200040d86828701620003a4565b9150509250925092565b6000819050919050565b6000620004426200043c6200043684620002b8565b62000417565b620002b8565b9050919050565b6000620004568262000421565b9050919050565b60006200046a8262000449565b9050919050565b6200047c816200045d565b82525050565b600060208201905062000499600083018462000471565b92915050565b613eed80620004af6000396000f3fe6080604052600436106101c25760003560e01c806388380274116100f7578063a233627911610095578063dd8aaa4f11610064578063dd8aaa4f1461065e578063e5b4d82714610687578063f8300fca146106b0578063fcb4888e146106ef576101c2565b8063a233627914610578578063da66863a146105bb578063dc00bbfe146105f8578063dd62ed3e14610621576101c2565b80639dc29fac116100d15780639dc29fac146104b95780639fbe7c73146104e25780639fd0987214610512578063a230c5241461053b576101c2565b8063883802741461042a5780638ce516da14610467578063975762b314610490576101c2565b806340c10f19116101645780635ffc70041161013e5780635ffc700414610370578063642b5bfb1461039957806370a08231146103c457806378e21c6e14610401576101c2565b806340c10f19146102e15780635c253c0b1461030a5780635daf08ca14610333576101c2565b806318160ddd116101a057806318160ddd1461025a5780631d0d37c9146102855780631e57e078146102ae5780632d17c062146102b8576101c2565b806311aee380146101c757806317906c2e146101f257806317c182171461021d575b600080fd5b3480156101d357600080fd5b506101dc610718565b6040516101e99190611d99565b60405180910390f35b3480156101fe57600080fd5b5061020761071e565b6040516102149190611d99565b60405180910390f35b34801561022957600080fd5b50610244600480360381019061023f9190611df4565b6107b6565b6040516102519190611e3c565b60405180910390f35b34801561026657600080fd5b5061026f61085d565b60405161027c9190611d99565b60405180910390f35b34801561029157600080fd5b506102ac60048036038101906102a79190611f46565b6108f4565b005b6102b6610a5a565b005b3480156102c457600080fd5b506102df60048036038101906102da9190611ff5565b610b60565b005b3480156102ed57600080fd5b5061030860048036038101906103039190612048565b610c43565b005b34801561031657600080fd5b50610331600480360381019061032c91906121c9565b610dbc565b005b34801561033f57600080fd5b5061035a60048036
"deployedBytecode": "0x6080604052600436106101c25760003560e01c806388380274116100f7578063a233627911610095578063dd8aaa4f11610064578063dd8aaa4f1461065e578063e5b4d82714610687578063f8300fca146106b0578063fcb4888e146106ef576101c2565b8063a233627914610578578063da66863a146105bb578063dc00bbfe146105f8578063dd62ed3e14610621576101c2565b80639dc29fac116100d15780639dc29fac146104b95780639fbe7c73146104e25780639fd0987214610512578063a230c5241461053b576101c2565b8063883802741461042a5780638ce516da14610467578063975762b314610490576101c2565b806340c10f19116101645780635ffc70041161013e5780635ffc700414610370578063642b5bfb1461039957806370a08231146103c457806378e21c6e14610401576101c2565b806340c10f19146102e15780635c253c0b1461030a5780635daf08ca14610333576101c2565b806318160ddd116101a057806318160ddd1461025a5780631d0d37c9146102855780631e57e078146102ae5780632d17c062146102b8576101c2565b806311aee380146101c757806317906c2e146101f257806317c182171461021d575b600080fd5b3480156101d357600080fd5b506101dc610718565b6040516101e99190611d99565b60405180910390f35b3480156101fe57600080fd5b5061020761071e565b6040516102149190611d99565b60405180910390f35b34801561022957600080fd5b50610244600480360381019061023f9190611df4565b6107b6565b6040516102519190611e3c565b60405180910390f35b34801561026657600080fd5b5061026f61085d565b60405161027c9190611d99565b60405180910390f35b34801561029157600080fd5b506102ac60048036038101906102a79190611f46565b6108f4565b005b6102b6610a5a565b005b3480156102c457600080fd5b506102df60048036038101906102da9190611ff5565b610b60565b005b3480156102ed57600080fd5b5061030860048036038101906103039190612048565b610c43565b005b34801561031657600080fd5b50610331600480360381019061032c91906121c9565b610dbc565b005b34801561033f57600080fd5b5061035a60048036038101906103559190611df4565b610df6565b6040516103679190612221565b60405180910390f35b34801561037c57600080fd5b506103976004803603810190610392919061223c565b610e29565b005b3480156103a557600080fd5b506103ae610ebd565b6040516103bb9190611d99565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e6919061228f565b610f55565b6040516103f89190611d99565b60405180910390f35b34801561040d57600080fd5b50610428600480360381019061042391906122bc565b610ff9565b005b34801561043657600080fd5b50610451600480360381019061044c919061230f565b611039565b60405161045e9190611e3c565b60405180910390f35b34801561047357600080fd5b5061048e6004803603810190610489919061223c565b611159565b005b34801561049c57600080fd5b506104b760048036038101906104b29190612362565b6112d5565b005b3480156104c557600080fd5b506104e060048036038101906104db9190612048565b611397565b005b6104fc60048036038101906104f79190612441565b611510565b6040516105099190611d99565b60405180910390f35b34801561051e57600080fd5b5061053960048036038101906105349190612570565b6115d5565b005b34801561054757600080fd5b50610562600480360381019061055d919061228f565b61167f565b60405161056f9190611e3c565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a9190611df4565b61169f565b6040516105b2979695949392919061284b565b60405180910390f35b3480156105c757600080fd5b506105e260048036038101906105dd91906128cc565b611772565b6040516105ef9190612a06565b60405180910390f35b34801561060457600080fd5b5061061f600480360381019061061a9190611df4565b61181f565b005b34801561062d57600080fd5b5061064860048036038101906106439190612a28565b611859565b6040516106559190611d99565b60405180910390f35b34801561066a57600080fd5b506106856004803603810190610680919061223c565b611900565b005b34801561069357600080fd5b506106ae60048036038101906106a99190612b14565b611994565b005b3480156106bc57600080fd5b506106d760048036038101906106d291906128cc565b611a35565b6040516106e693929190612c12565b60405180910390f35b3480156106fb57600080fd5b506107166004803603810190610711919061228f565b611aea565b005b60045481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317906c2e6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b19190612c65565b905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663
"linkReferences": {},
"deployedLinkReferences": {}
}