dgf-prototype/backend/contractArtifacts/Bench.json

252 lines
58 KiB
JSON
Raw Permalink Normal View History

{
"_format": "hh-sol-artifact-1",
"contractName": "Bench",
"sourceName": "contracts/core/Bench.sol",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "evaluateOutcome",
"outputs": [
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"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": "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": "contract DAO",
"name": "dao_",
"type": "address"
}
],
"name": "registerDAO",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bool",
"name": "inFavor",
"type": "bool"
}
],
"name": "stakeOnValidationPool",
"outputs": [],
"stateMutability": "nonpayable",
"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": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "stakeCount",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
},
{
"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"
},
{
"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"
},
{
"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": "0x60806040526040518060400160405280600160ff168152602001600a60ff1681525060039060026200003392919062000048565b503480156200004157600080fd5b50620000b1565b82600281019282156200007f579160200282015b828111156200007e578251829060ff169055916020019190600101906200005c565b5b5090506200008e919062000092565b5090565b5b80821115620000ad57600081600090555060010162000093565b5090565b61345680620000c16000396000f3fe6080604052600436106100555760003560e01c806317c182171461005a578063217c196114610097578063642b5bfb146100c0578063a1a38bf9146100eb578063a23362791461011b578063fe0d695a1461015e575b600080fd5b34801561006657600080fd5b50610081600480360381019061007c9190611d75565b610187565b60405161008e9190611dbd565b60405180910390f35b3480156100a357600080fd5b506100be60048036038101906100b99190611e62565b6111ce565b005b3480156100cc57600080fd5b506100d561136e565b6040516100e29190611ed8565b60405180910390f35b61010560048036038101906101009190611fd0565b611374565b6040516101129190611ed8565b60405180910390f35b34801561012757600080fd5b50610142600480360381019061013d9190611d75565b611959565b604051610155979695949392919061237d565b60405180910390f35b34801561016a57600080fd5b506101856004803603810190610180919061243c565b611c03565b005b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610219576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610210906124ec565b60405180910390fd5b600080600084815260200190815260200160002090506000151581600b0160040160009054906101000a900460ff1615151461028a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028190612558565b60405180910390fd5b600080600080600090505b846003015481101561049a5784600201600082815260200190815260200160002091508160020154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318460030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161033c9190612578565b602060405180830381865afa158015610359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037d91906125a8565b101561044c57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016104029190612578565b602060405180830381865afa15801561041f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044391906125a8565b82600201819055505b8160010160009054906101000a900460ff161561047a578160020154846104739190612604565b935061048d565b81600201548361048a9190612604565b92505b8080600101915050610295565b50600284600b01600201546104af9190612667565b836104ba9190612604565b9250600284600b01600201546104d09190612667565b826104db9190612604565b91506000600285600b01600201546104f39190612698565b14610508576001836105059190612604565b92505b83600b01600301544211806105b75750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a991906125a8565b82846105b59190612604565b145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed9061273b565b60405180910390fd5b836004016001016000600281106106105761060f61275b565b5b0154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a391906125a8565b6106ad919061278a565b82846106b99190612604565b856004016001016001600281106106d3576106d261275b565b5b01546106df919061278a565b1161087a57600184600b0160040160006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffff
"deployedBytecode": "0x6080604052600436106100555760003560e01c806317c182171461005a578063217c196114610097578063642b5bfb146100c0578063a1a38bf9146100eb578063a23362791461011b578063fe0d695a1461015e575b600080fd5b34801561006657600080fd5b50610081600480360381019061007c9190611d75565b610187565b60405161008e9190611dbd565b60405180910390f35b3480156100a357600080fd5b506100be60048036038101906100b99190611e62565b6111ce565b005b3480156100cc57600080fd5b506100d561136e565b6040516100e29190611ed8565b60405180910390f35b61010560048036038101906101009190611fd0565b611374565b6040516101129190611ed8565b60405180910390f35b34801561012757600080fd5b50610142600480360381019061013d9190611d75565b611959565b604051610155979695949392919061237d565b60405180910390f35b34801561016a57600080fd5b506101856004803603810190610180919061243c565b611c03565b005b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610219576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610210906124ec565b60405180910390fd5b600080600084815260200190815260200160002090506000151581600b0160040160009054906101000a900460ff1615151461028a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028190612558565b60405180910390fd5b600080600080600090505b846003015481101561049a5784600201600082815260200190815260200160002091508160020154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318460030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161033c9190612578565b602060405180830381865afa158015610359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037d91906125a8565b101561044c57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016104029190612578565b602060405180830381865afa15801561041f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044391906125a8565b82600201819055505b8160010160009054906101000a900460ff161561047a578160020154846104739190612604565b935061048d565b81600201548361048a9190612604565b92505b8080600101915050610295565b50600284600b01600201546104af9190612667565b836104ba9190612604565b9250600284600b01600201546104d09190612667565b826104db9190612604565b91506000600285600b01600201546104f39190612698565b14610508576001836105059190612604565b92505b83600b01600301544211806105b75750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a991906125a8565b82846105b59190612604565b145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed9061273b565b60405180910390fd5b836004016001016000600281106106105761060f61275b565b5b0154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a391906125a8565b6106ad919061278a565b82846106b99190612604565b856004016001016001600281106106d3576106d261275b565b5b01546106df919061278a565b1161087a57600184600b0160040160006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166378e21c6e876000806040518463ffffffff1660e01b8152600401610764939291906127cc565b600060405180830381600087803b15801561077e57600080fd5b505af1158015610792573d6000803e3d6000fd5b505050508360100160009054906101000a900460ff161561086d57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631d0d37c985600101600090
"linkReferences": {},
"deployedLinkReferences": {}
}