dgf-prototype/backend/contractArtifacts/Proposals.json

356 lines
63 KiB
JSON
Raw Normal View History

{
"_format": "hh-sol-artifact-1",
"contractName": "Proposals",
"sourceName": "contracts/Proposals.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract DAO",
"name": "dao",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
2024-03-29 18:08:30 -05:00
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"name": "Attestation",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"name": "NewProposal",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"name": "ProposalAccepted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "string",
"name": "reason",
"type": "string"
}
],
"name": "ProposalFailed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
}
],
"name": "ReferendumStarted",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "attest",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"name": "evaluateAttestation",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
2024-03-29 18:08:30 -05:00
{
"inputs": [
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"name": "getPools",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "poolIndex",
"type": "uint256"
},
{
"internalType": "bool",
"name": "started",
"type": "bool"
},
{
"internalType": "bool",
"name": "completed",
"type": "bool"
},
{
"internalType": "uint256",
"name": "stakedFor",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "stakedAgainst",
"type": "uint256"
},
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
},
{
"internalType": "bool",
"name": "quorumMet",
"type": "bool"
}
],
"internalType": "struct Proposals.Pool[3][3]",
"name": "pools",
"type": "tuple[3][3]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"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": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "proposalCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "proposals",
"outputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
2024-03-29 10:59:29 -05:00
{
"internalType": "uint256",
"name": "remainingFee",
"type": "uint256"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "uint256",
"name": "startTime",
"type": "uint256"
},
{
"internalType": "enum Proposals.Stage",
"name": "stage",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "attestationTotal",
"type": "uint256"
},
{
"internalType": "bool",
"name": "callbackOnAccepted",
"type": "bool"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "contentId",
"type": "string"
},
{
"internalType": "address",
"name": "author",
"type": "address"
},
{
"internalType": "uint256[3]",
"name": "durations",
"type": "uint256[3]"
},
{
"internalType": "bool",
"name": "callbackOnAccepted",
"type": "bool"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "propose",
"outputs": [
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
2024-03-29 18:08:30 -05:00
},
{
"inputs": [
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"name": "reclaimRemainingFee",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
2024-04-24 17:37:19 -05:00
"bytecode": "0x60a06040526040518060600160405280600060ff168152602001600160ff168152602001606460ff1681525060029060036200003d929190620001ef565b5060405180606001604052806000151515158152602001600015151515815260200160011515151581525060059060036200007a92919062000239565b5060405180606001604052806040518060400160405280600160ff168152602001600a60ff1681525081526020016040518060400160405280600160ff168152602001600a60ff1681525081526020016040518060400160405280600160ff168152602001600a60ff168152508152506006906003620000fc929190620002d9565b5060405180606001604052806040518060400160405280600260ff168152602001600360ff1681525081526020016040518060400160405280600260ff168152602001600360ff1681525081526020016040518060400160405280600260ff168152602001600360ff16815250815250600c9060036200017e929190620002d9565b503480156200018c57600080fd5b50604051620039d1380380620039d18339818101604052810190620001b291906200044e565b808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505062000480565b826003810192821562000226579160200282015b8281111562000225578251829060ff1690559160200191906001019062000203565b5b50905062000235919062000331565b5090565b826003601f01602090048101928215620002c65791602002820160005b838211156200029557835183826101000a81548160ff021916908315150217905550926020019260010160208160000104928301926001030262000256565b8015620002c45782816101000a81549060ff021916905560010160208160000104928301926001030262000295565b505b509050620002d5919062000331565b5090565b82600360020281019282156200031e579160200282015b828111156200031d578251829060026200030c92919062000350565b5091602001919060020190620002f0565b5b5090506200032d91906200039a565b5090565b5b808211156200034c57600081600090555060010162000332565b5090565b826002810192821562000387579160200282015b8281111562000386578251829060ff1690559160200191906001019062000364565b5b50905062000396919062000331565b5090565b5b80821115620003be5760008181620003b49190620003c2565b506002016200039b565b5090565b506000815560010160009055565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200040282620003d5565b9050919050565b60006200041682620003f5565b9050919050565b620004288162000409565b81146200043457600080fd5b50565b60008151905062000448816200041d565b92915050565b600060208284031215620004675762000466620003d0565b5b6000620004778482850162000437565b91505092915050565b608051613512620004bf6000396000818161046d01528181610a0301528181610bef01528181610de901528181611685015261185301526135126000f3fe60806040526004361061007b5760003560e01c8063b4e6a1d51161004e578063b4e6a1d51461015b578063c019faab14610198578063da35c664146101c1578063ea923e63146101ec5761007b565b8063013cf08b146100805780632805b5d9146100c557806362d26ed7146100f5578063a3bb24cc14610132575b600080fd5b34801561008c57600080fd5b506100a760048036038101906100a29190611b65565b610229565b6040516100bc99989796959493929190611d59565b60405180910390f35b6100df60048036038101906100da9190611f29565b6103c1565b6040516100ec9190611fe5565b60405180910390f35b34801561010157600080fd5b5061011c60048036038101906101179190611b65565b6106c7565b60405161012991906121e5565b60405180910390f35b34801561013e57600080fd5b5061015960048036038101906101549190612201565b610a00565b005b34801561016757600080fd5b50610182600480360381019061017d9190612241565b610beb565b60405161018f9190611fe5565b60405180910390f35b3480156101a457600080fd5b506101bf60048036038101906101ba9190611b65565b6114c0565b005b3480156101cd57600080fd5b506101d66115ec565b6040516101e39190611fe5565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e9190611b65565b6115f2565b60405161022091906122db565b60405180910390f35b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201549080600301805461027e90612325565b80601f01602080910402602001604051908101604052809291908181526020018280546102aa90612325565b80156102f75780601f106102cc576101008083540402835291602001916102f7565b820191906000526020600020905b8154815290600101906020018083116102da57829003601f168201915b5050505050908060040154908060050160009054906101000a900460ff169080600701549080603b0160009054906101000a900460ff169080603c0180546103
"deployedBytecode": "0x60806040526004361061007b5760003560e01c8063b4e6a1d51161004e578063b4e6a1d51461015b578063c019faab14610198578063da35c664146101c1578063ea923e63146101ec5761007b565b8063013cf08b146100805780632805b5d9146100c557806362d26ed7146100f5578063a3bb24cc14610132575b600080fd5b34801561008c57600080fd5b506100a760048036038101906100a29190611b65565b610229565b6040516100bc99989796959493929190611d59565b60405180910390f35b6100df60048036038101906100da9190611f29565b6103c1565b6040516100ec9190611fe5565b60405180910390f35b34801561010157600080fd5b5061011c60048036038101906101179190611b65565b6106c7565b60405161012991906121e5565b60405180910390f35b34801561013e57600080fd5b5061015960048036038101906101549190612201565b610a00565b005b34801561016757600080fd5b50610182600480360381019061017d9190612241565b610beb565b60405161018f9190611fe5565b60405180910390f35b3480156101a457600080fd5b506101bf60048036038101906101ba9190611b65565b6114c0565b005b3480156101cd57600080fd5b506101d66115ec565b6040516101e39190611fe5565b60405180910390f35b3480156101f857600080fd5b50610213600480360381019061020e9190611b65565b6115f2565b60405161022091906122db565b60405180910390f35b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600101549080600201549080600301805461027e90612325565b80601f01602080910402602001604051908101604052809291908181526020018280546102aa90612325565b80156102f75780601f106102cc576101008083540402835291602001916102f7565b820191906000526020600020905b8154815290600101906020018083116102da57829003601f168201915b5050505050908060040154908060050160009054906101000a900460ff169080600701549080603b0160009054906101000a900460ff169080603c01805461033e90612325565b80601f016020809104026020016040519081016040528092919081815260200182805461036a90612325565b80156103b75780601f1061038c576101008083540402835291602001916103b7565b820191906000526020600020905b81548152906001019060200180831161039a57829003601f168201915b5050505050905089565b600060606000600167ffffffffffffffff8111156103e2576103e1612356565b5b60405190808252806020026020018201604052801561041b57816020015b610408611a56565b8152602001906001900390816104005790505b5090506040518060400160405280620f424081526020018973ffffffffffffffffffffffffffffffffffffffff16815250816000815181106104605761045f612385565b5b60200260200101819052507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e5b4d827828c8c866040518563ffffffff1660e01b81526004016104ca949392919061263f565b600060405180830381600087803b1580156104e457600080fd5b505af11580156104f8573d6000803e3d6000fd5b505050506001600081548092919061050f906126bc565b91905055925060008060008581526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508a8a8260030191826105819291906128bb565b504281600401819055508760006003811061059f5761059e612385565b5b6020020135816008016000600381106105bb576105ba612385565b5b6011020160000181905550876001600381106105da576105d9612385565b5b6020020135816008016001600381106105f6576105f5612385565b5b60110201600001819055508760026003811061061557610614612385565b5b60200201358160080160026003811061063157610630612385565b5b6011020160000181905550348160010181905550806001015481600201819055508681603b0160006101000a81548160ff021916908315150217905550858582603c0191826106819291906129f1565b507f9a863892f20a6b9c6cec64d611b5864be6373191ce2cacc3b05a299bce3bf80e846040516106b19190611fe5565b60405180910390a1505050979650505050505050565b6106cf611a86565b60008060008481526020019081526020016000209050806008016000600381106106fc576106fb612385565b5b60110201600101600380602002604051908101604052809291906000905b828210156107cc578382600502016040518060e0016040529081600082015481526020016001820160009054906101000a900460ff161515151581526020016001820160019054906101000a900460ff1615151515815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff161515151581526020016004820160019054906101000a900460ff1615151515815250508152602001906001019061071a565b50505050826000600381106107e4576107e3612385565b5b6020020181905250806008016001
"linkReferences": {},
"deployedLinkReferences": {}
}