dgf-prototype/backend/contractArtifacts/Onboarding.json

486 lines
64 KiB
JSON
Raw Normal View History

2024-03-18 14:03:53 -05:00
{
"_format": "hh-sol-artifact-1",
"contractName": "Onboarding",
"sourceName": "contracts/Onboarding.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract DAO",
"name": "dao_",
"type": "address"
},
{
"internalType": "contract Proposals",
"name": "proposals_",
"type": "address"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "uint256",
"name": "price_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
}
],
"name": "AvailabilityStaked",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceProposalIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "price",
"type": "uint256"
}
],
"name": "PriceChangeAccepted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "priceProposalIndex",
"type": "uint256"
}
],
"name": "PriceChangeProposed",
"type": "event"
},
2024-03-18 14:03:53 -05:00
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bool",
"name": "approval",
"type": "bool"
}
],
"name": "WorkApprovalSubmitted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
}
],
"name": "WorkAssigned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
}
],
"name": "WorkEvidenceSubmitted",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "acceptAvailability",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "duration",
"type": "uint256"
}
],
"name": "extendAvailability",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "onProposalAccepted",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
2024-03-18 14:03:53 -05:00
{
"inputs": [
{
"internalType": "bool",
"name": "votePasses",
"type": "bool"
},
{
"internalType": "bool",
"name": "quorumMet",
"type": "bool"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "bytes",
"name": "callbackData",
"type": "bytes"
}
],
"name": "onValidate",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
2024-03-18 14:03:53 -05:00
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "price",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "priceProposalCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "priceProposals",
"outputs": [
{
"internalType": "uint256",
"name": "price",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "proposalIndex",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "newPrice",
"type": "uint256"
},
{
"internalType": "string",
"name": "postId",
"type": "string"
},
{
"internalType": "uint256[3]",
"name": "durations",
"type": "uint256[3]"
}
],
"name": "proposeNewPrice",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
2024-03-18 14:03:53 -05:00
{
"inputs": [],
"name": "requestCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
2024-03-19 22:22:36 -05:00
"inputs": [
{
"internalType": "string",
"name": "requestPostId",
2024-03-19 22:22:36 -05:00
"type": "string"
}
],
2024-03-18 14:03:53 -05:00
"name": "requestWork",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "requests",
"outputs": [
{
"internalType": "address",
"name": "customer",
"type": "address"
},
{
"internalType": "uint256",
"name": "fee",
"type": "uint256"
},
{
"internalType": "enum Work.WorkStatus",
2024-03-18 14:03:53 -05:00
"name": "status",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
},
2024-03-19 22:22:36 -05:00
{
"internalType": "string",
"name": "requestPostId",
2024-03-19 22:22:36 -05:00
"type": "string"
},
{
"internalType": "string",
"name": "evidencePostId",
2024-03-19 22:22:36 -05:00
"type": "string"
},
2024-03-18 14:03:53 -05:00
{
"internalType": "bool",
"name": "approval",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "stakeCount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "stakes",
"outputs": [
{
"internalType": "address",
"name": "worker",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "endTime",
"type": "uint256"
},
{
"internalType": "bool",
"name": "assigned",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
},
{
"internalType": "bool",
"name": "approval",
"type": "bool"
}
],
"name": "submitWorkApproval",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "requestIndex",
"type": "uint256"
2024-03-19 22:22:36 -05:00
},
{
"internalType": "string",
"name": "evidencePostId",
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[]"
2024-03-18 14:03:53 -05:00
}
],
"name": "submitWorkEvidence",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x60a06040523480156200001157600080fd5b50604051620036be380380620036be8339818101604052810190620000379190620001c4565b82828282808073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff168152505050508060038190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505062000220565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000f882620000cb565b9050919050565b60006200010c82620000eb565b9050919050565b6200011e81620000ff565b81146200012a57600080fd5b50565b6000815190506200013e8162000113565b92915050565b60006200015182620000eb565b9050919050565b620001638162000144565b81146200016f57600080fd5b50565b600081519050620001838162000158565b92915050565b6000819050919050565b6200019e8162000189565b8114620001aa57600080fd5b50565b600081519050620001be8162000193565b92915050565b600080600060608486031215620001e057620001df620000c6565b5b6000620001f0868287016200012d565b9350506020620002038682870162000172565b92505060406200021686828701620001ad565b9150509250925092565b60805161345862000266600039600081816104dc01528181610a4901528181610b1901528181610c3601528181610e490152818161106301526110f501526134586000f3fe6080604052600436106100e85760003560e01c8063a035b1fe1161008a578063cf37625611610059578063cf376256146102de578063d0fae95f1461031c578063d5a44f8614610345578063d76b679414610385576100e8565b8063a035b1fe14610222578063b4e6a1d51461024d578063b5b20c001461028a578063c4a9e116146102b3576100e8565b8063815a0572116100c6578063815a05721461015d57806381d12c581461019a578063854b6a4f146101dd57806399ad6c5614610206576100e8565b80630d0271d6146100ed578063216ed6ad146101095780635badbe4c14610132575b600080fd5b61010760048036038101906101029190611883565b6103b0565b005b34801561011557600080fd5b50610130600480360381019061012b9190611964565b6104da565b005b34801561013e57600080fd5b5061014761067a565b60405161015491906119c6565b60405180910390f35b34801561016957600080fd5b50610184600480360381019061017f9190611a37565b610680565b60405161019191906119c6565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611aab565b6106ff565b6040516101d49796959493929190611c09565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611cb2565b61088b565b005b610220600480360381019061021b9190611d14565b610cf6565b005b34801561022e57600080fd5b50610237610e3f565b60405161024491906119c6565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190611d88565b610e45565b60405161028191906119c6565b60405180910390f35b34801561029657600080fd5b506102b160048036038101906102ac9190611e22565b6111f3565b005b3480156102bf57600080fd5b506102c8611367565b6040516102d591906119c6565b60405180910390f35b3480156102ea57600080fd5b5061030560048036038101906103009190611aab565b61136d565b604051610313929190611e62565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190611ee1565b611391565b005b34801561035157600080fd5b5061036c60048036038101906103679190611aab565b6115c9565b60405161037c9493929190611f76565b60405180910390f35b34801561039157600080fd5b5061039a611626565b6040516103a791906119c6565b60405180910390f35b6003543410156103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90612007565b60405180910390fd5b60006007600081548092919061040a90612056565b9190505590506000600660008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034816001018190555061047b61162c565b816003018190555083838260040191826104969291906122e4565b507fd9e7f38a71691fb1db2da17057c03d381a42a9925350883f10e8e5d0bca4a3b48282600301546040516104cc929190611e62565b60405180910390a150505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612426565b60405180910390fd5b600082116105ab576040517f08c379a0000000000000000000000000000000000000000000000000
"deployedBytecode": "0x6080604052600436106100e85760003560e01c8063a035b1fe1161008a578063cf37625611610059578063cf376256146102de578063d0fae95f1461031c578063d5a44f8614610345578063d76b679414610385576100e8565b8063a035b1fe14610222578063b4e6a1d51461024d578063b5b20c001461028a578063c4a9e116146102b3576100e8565b8063815a0572116100c6578063815a05721461015d57806381d12c581461019a578063854b6a4f146101dd57806399ad6c5614610206576100e8565b80630d0271d6146100ed578063216ed6ad146101095780635badbe4c14610132575b600080fd5b61010760048036038101906101029190611883565b6103b0565b005b34801561011557600080fd5b50610130600480360381019061012b9190611964565b6104da565b005b34801561013e57600080fd5b5061014761067a565b60405161015491906119c6565b60405180910390f35b34801561016957600080fd5b50610184600480360381019061017f9190611a37565b610680565b60405161019191906119c6565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611aab565b6106ff565b6040516101d49796959493929190611c09565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611cb2565b61088b565b005b610220600480360381019061021b9190611d14565b610cf6565b005b34801561022e57600080fd5b50610237610e3f565b60405161024491906119c6565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190611d88565b610e45565b60405161028191906119c6565b60405180910390f35b34801561029657600080fd5b506102b160048036038101906102ac9190611e22565b6111f3565b005b3480156102bf57600080fd5b506102c8611367565b6040516102d591906119c6565b60405180910390f35b3480156102ea57600080fd5b5061030560048036038101906103009190611aab565b61136d565b604051610313929190611e62565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190611ee1565b611391565b005b34801561035157600080fd5b5061036c60048036038101906103679190611aab565b6115c9565b60405161037c9493929190611f76565b60405180910390f35b34801561039157600080fd5b5061039a611626565b6040516103a791906119c6565b60405180910390f35b6003543410156103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90612007565b60405180910390fd5b60006007600081548092919061040a90612056565b9190505590506000600660008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034816001018190555061047b61162c565b816003018190555083838260040191826104969291906122e4565b507fd9e7f38a71691fb1db2da17057c03d381a42a9925350883f10e8e5d0bca4a3b48282600301546040516104cc929190611e62565b60405180910390a150505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610568576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055f90612426565b60405180910390fd5b600082116105ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a290612492565b60405180910390fd5b6000600160008154809291906105c090612056565b91905055905060008060008381526020019081526020016000209050848160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160010181905550824261063491906124b2565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e98260405161066b91906119c6565b60405180910390a15050505050565b60075481565b60008083838101906106929190611aab565b9050600060046000838152602001908152602001600020905080600001546003819055507f6a3843c02c26620842ae8496fd3afcb44b27463b3808e2ccdae4bcee5a2e3f20826003546040516106e9929190611e62565b60405180910390a1600092505050949350505050565b60066020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900460ff169080600301549080600401805461076790612107565b80601f016020809104026020016040519081016040528092919081815260200182805461079390612107565b80156107e05780601f106107b5576101008083540402835291602001916107e0565b820191906000526020600020905b8154815290600101906020018083116107c357829003601f168201915b5050505050908060050180546107f5906121
2024-03-18 14:03:53 -05:00
"linkReferences": {},
"deployedLinkReferences": {}
}