252 lines
57 KiB
JSON
252 lines
57 KiB
JSON
|
{
|
||
|
"_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"
|
||
|
}
|
||
|
],
|
||
|
"bytecode": "0x60806040526040518060400160405280600160ff168152602001600a60ff1681525060039060026200003392919062000048565b503480156200004157600080fd5b50620000b1565b82600281019282156200007f579160200282015b828111156200007e578251829060ff169055916020019190600101906200005c565b5b5090506200008e919062000092565b5090565b5b80821115620000ad57600081600090555060010162000093565b5090565b61333480620000c16000396000f3fe6080604052600436106100555760003560e01c806317c182171461005a578063217c196114610097578063642b5bfb146100c0578063a1a38bf9146100eb578063a23362791461011b578063fe0d695a1461015e575b600080fd5b34801561006657600080fd5b50610081600480360381019061007c9190611ce5565b610187565b60405161008e9190611d2d565b60405180910390f35b3480156100a357600080fd5b506100be60048036038101906100b99190611dd2565b6111ce565b005b3480156100cc57600080fd5b506100d56112de565b6040516100e29190611e48565b60405180910390f35b61010560048036038101906101009190611f40565b6112e4565b6040516101129190611e48565b60405180910390f35b34801561012757600080fd5b50610142600480360381019061013d9190611ce5565b6118c9565b60405161015597969594939291906122ed565b60405180910390f35b34801561016a57600080fd5b50610185600480360381019061018091906123ac565b611b73565b005b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610219576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102109061245c565b60405180910390fd5b600080600084815260200190815260200160002090506000151581600b0160040160009054906101000a900460ff1615151461028a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610281906124c8565b60405180910390fd5b600080600080600090505b846003015481101561049a5784600201600082815260200190815260200160002091508160020154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318460030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161033c91906124e8565b602060405180830381865afa158015610359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037d9190612518565b101561044c57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161040291906124e8565b602060405180830381865afa15801561041f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104439190612518565b82600201819055505b8160010160009054906101000a900460ff161561047a578160020154846104739190612574565b935061048d565b81600201548361048a9190612574565b92505b8080600101915050610295565b50600284600b01600201546104af91906125d7565b836104ba9190612574565b9250600284600b01600201546104d091906125d7565b826104db9190612574565b91506000600285600b01600201546104f39190612608565b14610508576001836105059190612574565b92505b83600b01600301544211806105b75750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a99190612518565b82846105b59190612574565b145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed906126ab565b60405180910390fd5b836004016001016000600281106106105761060f6126cb565b5b0154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a39190612518565b6106ad91906126fa565b82846106b99190612574565b856004016001016001600281106106d3576106d26126cb565b5b01546106df91906126fa565b1161087a57600184600b0160040160006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffff
|
||
|
"deployedBytecode": "0x6080604052600436106100555760003560e01c806317c182171461005a578063217c196114610097578063642b5bfb146100c0578063a1a38bf9146100eb578063a23362791461011b578063fe0d695a1461015e575b600080fd5b34801561006657600080fd5b50610081600480360381019061007c9190611ce5565b610187565b60405161008e9190611d2d565b60405180910390f35b3480156100a357600080fd5b506100be60048036038101906100b99190611dd2565b6111ce565b005b3480156100cc57600080fd5b506100d56112de565b6040516100e29190611e48565b60405180910390f35b61010560048036038101906101009190611f40565b6112e4565b6040516101129190611e48565b60405180910390f35b34801561012757600080fd5b50610142600480360381019061013d9190611ce5565b6118c9565b60405161015597969594939291906122ed565b60405180910390f35b34801561016a57600080fd5b50610185600480360381019061018091906123ac565b611b73565b005b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610219576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102109061245c565b60405180910390fd5b600080600084815260200190815260200160002090506000151581600b0160040160009054906101000a900460ff1615151461028a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610281906124c8565b60405180910390fd5b600080600080600090505b846003015481101561049a5784600201600082815260200190815260200160002091508160020154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318460030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161033c91906124e8565b602060405180830381865afa158015610359573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037d9190612518565b101561044c57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a082318360030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161040291906124e8565b602060405180830381865afa15801561041f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104439190612518565b82600201819055505b8160010160009054906101000a900460ff161561047a578160020154846104739190612574565b935061048d565b81600201548361048a9190612574565b92505b8080600101915050610295565b50600284600b01600201546104af91906125d7565b836104ba9190612574565b9250600284600b01600201546104d091906125d7565b826104db9190612574565b91506000600285600b01600201546104f39190612608565b14610508576001836105059190612574565b92505b83600b01600301544211806105b75750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a99190612518565b82846105b59190612574565b145b6105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed906126ab565b60405180910390fd5b836004016001016000600281106106105761060f6126cb565b5b0154600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561067f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a39190612518565b6106ad91906126fa565b82846106b99190612574565b856004016001016001600281106106d3576106d26126cb565b5b01546106df91906126fa565b1161087a57600184600b0160040160006101000a81548160ff021916908315150217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166378e21c6e876000806040518463ffffffff1660e01b81526004016107649392919061273c565b600060405180830381600087803b15801561077e57600080fd5b505af1158015610792573d6000803e3d6000fd5b505050508360100160009054906101000a900460ff161561086d57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631d0d37c985600101600090
|
||
|
"linkReferences": {},
|
||
|
"deployedLinkReferences": {}
|
||
|
}
|