dgf-prototype/frontend/contractArtifacts/DAO.json

811 lines
85 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": [
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"
}
],
2024-05-02 19:08:53 -05:00
"bytecode": "0x60806040523480156200001157600080fd5b5060405162004679380380620046798339818101604052810190620000379190620003bb565b826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b815260040162000154919062000482565b600060405180830381600087803b1580156200016f57600080fd5b505af115801562000184573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b8152600401620001e5919062000482565b600060405180830381600087803b1580156200020057600080fd5b505af115801562000215573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663fe0d695a306040518263ffffffff1660e01b815260040162000276919062000482565b600060405180830381600087803b1580156200029157600080fd5b505af1158015620002a6573d6000803e3d6000fd5b505050505050506200049f565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002e582620002b8565b9050919050565b6000620002f982620002d8565b9050919050565b6200030b81620002ec565b81146200031757600080fd5b50565b6000815190506200032b8162000300565b92915050565b60006200033e82620002d8565b9050919050565b620003508162000331565b81146200035c57600080fd5b50565b600081519050620003708162000345565b92915050565b60006200038382620002d8565b9050919050565b620003958162000376565b8114620003a157600080fd5b50565b600081519050620003b5816200038a565b92915050565b600080600060608486031215620003d757620003d6620002b3565b5b6000620003e7868287016200031a565b9350506020620003fa868287016200035f565b92505060406200040d86828701620003a4565b9150509250925092565b6000819050919050565b6000620004426200043c6200043684620002b8565b62000417565b620002b8565b9050919050565b6000620004568262000421565b9050919050565b60006200046a8262000449565b9050919050565b6200047c816200045d565b82525050565b600060208201905062000499600083018462000471565b92915050565b6141ca80620004af6000396000f3fe6080604052600436106101c25760003560e01c806378e21c6e116100f7578063a230c52411610095578063dd62ed3e11610064578063dd62ed3e1461065e578063e5b4d8271461069b578063f8300fca146106c4578063fcb4888e14610703576101c2565b8063a230c52414610578578063a2336279146105b5578063da66863a146105f8578063dc00bbfe14610635576101c2565b8063975762b3116100d1578063975762b3146104cd5780639dc29fac146104f65780639fbe7c731461051f5780639fd098721461054f576101c2565b806378e21c6e1461043e57806388380274146104675780638ce516da146104a4576101c2565b806340c10f19116101645780635daf08ca1161013e5780635daf08ca146103705780635ffc7004146103ad578063642b5bfb146103d657806370a0823114610401576101c2565b806340c10f19146102e157806350cde8ef1461030a5780635c253c0b14610347576101c2565b806318160ddd116101a057806318160ddd1461025a5780631d0d37c9146102855780631e57e078146102ae5780632d17c062146102b8576101c2565b806311aee380146101c757806317906c2e146101f257806317c182171461021d575b600080fd5b3480156101d357600080fd5b506101dc61072c565b6040516101e9919061202d565b60405180910390f35b3480156101fe57600080fd5b50610207610732565b604051610214919061202d565b60405180910390f35b34801561022957600080fd5b50610244600480360381019061023f9190612088565b6107ca565b60405161025191906120d0565b60405180910390f35b34801561026657600080fd5b5061026f610871565b60405161027c919061202d565b60405180910390f35b34801561029157600080fd5b506102ac60048036038101906102a791906121da565b610908565b005b6102b6610a6e565b005b3480156102c457600080fd5b506102df60048036038101906102da9190612289565b610b74565b005b3480156102ed57600080fd5b50610308600480360381019061030391906122dc565b610c57565b005b34801561031657600080fd5b50610331600480360381019061032c9190612088565b610dd0565b60405161033e91906123ac565b60405180910390f35b
"deployedBytecode": "0x6080604052600436106101c25760003560e01c806378e21c6e116100f7578063a230c52411610095578063dd62ed3e11610064578063dd62ed3e1461065e578063e5b4d8271461069b578063f8300fca146106c4578063fcb4888e14610703576101c2565b8063a230c52414610578578063a2336279146105b5578063da66863a146105f8578063dc00bbfe14610635576101c2565b8063975762b3116100d1578063975762b3146104cd5780639dc29fac146104f65780639fbe7c731461051f5780639fd098721461054f576101c2565b806378e21c6e1461043e57806388380274146104675780638ce516da146104a4576101c2565b806340c10f19116101645780635daf08ca1161013e5780635daf08ca146103705780635ffc7004146103ad578063642b5bfb146103d657806370a0823114610401576101c2565b806340c10f19146102e157806350cde8ef1461030a5780635c253c0b14610347576101c2565b806318160ddd116101a057806318160ddd1461025a5780631d0d37c9146102855780631e57e078146102ae5780632d17c062146102b8576101c2565b806311aee380146101c757806317906c2e146101f257806317c182171461021d575b600080fd5b3480156101d357600080fd5b506101dc61072c565b6040516101e9919061202d565b60405180910390f35b3480156101fe57600080fd5b50610207610732565b604051610214919061202d565b60405180910390f35b34801561022957600080fd5b50610244600480360381019061023f9190612088565b6107ca565b60405161025191906120d0565b60405180910390f35b34801561026657600080fd5b5061026f610871565b60405161027c919061202d565b60405180910390f35b34801561029157600080fd5b506102ac60048036038101906102a791906121da565b610908565b005b6102b6610a6e565b005b3480156102c457600080fd5b506102df60048036038101906102da9190612289565b610b74565b005b3480156102ed57600080fd5b50610308600480360381019061030391906122dc565b610c57565b005b34801561031657600080fd5b50610331600480360381019061032c9190612088565b610dd0565b60405161033e91906123ac565b60405180910390f35b34801561035357600080fd5b5061036e600480360381019061036991906124fe565b610e7a565b005b34801561037c57600080fd5b5061039760048036038101906103929190612088565b610eb4565b6040516103a49190612556565b60405180910390f35b3480156103b957600080fd5b506103d460048036038101906103cf9190612571565b610ee7565b005b3480156103e257600080fd5b506103eb6110b0565b6040516103f8919061202d565b60405180910390f35b34801561040d57600080fd5b50610428600480360381019061042391906125c4565b611148565b604051610435919061202d565b60405180910390f35b34801561044a57600080fd5b50610465600480360381019061046091906125f1565b6111ec565b005b34801561047357600080fd5b5061048e60048036038101906104899190612644565b61122c565b60405161049b91906120d0565b60405180910390f35b3480156104b057600080fd5b506104cb60048036038101906104c69190612571565b6113fd565b005b3480156104d957600080fd5b506104f460048036038101906104ef9190612697565b611579565b005b34801561050257600080fd5b5061051d600480360381019061051891906122dc565b6116bf565b005b61053960048036038101906105349190612776565b611838565b604051610546919061202d565b60405180910390f35b34801561055b57600080fd5b50610576600480360381019061057191906128a5565b6118fd565b005b34801561058457600080fd5b5061059f600480360381019061059a91906125c4565b6119a7565b6040516105ac91906120d0565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d79190612088565b6119c7565b6040516105ef9796959493929190612b4b565b60405180910390f35b34801561060457600080fd5b5061061f600480360381019061061a9190612bcc565b611a9a565b60405161062c9190612d06565b60405180910390f35b34801561064157600080fd5b5061065c60048036038101906106579190612088565b611b47565b005b34801561066a57600080fd5b5061068560048036038101906106809190612d28565b611b81565b604051610692919061202d565b60405180910390f35b3480156106a757600080fd5b506106c260048036038101906106bd9190612e14565b611c28565b005b3480156106d057600080fd5b506106eb60048036038101906106e69190612bcc565b611cc9565b6040516106fa93929190612ec8565b60405180910390f35b34801561070f57600080fd5b5061072a600480360381019061072591906125c4565b611d7e565b005b60045481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166317906c2e6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c59190612f1b565b905090565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffff
"linkReferences": {},
"deployedLinkReferences": {}
}