dgf-prototype/backend/contractArtifacts/Onboarding.json

486 lines
63 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": "contentId",
"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": "requestContentId",
"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 WorkContract.WorkStatus",
"name": "status",
"type": "uint8"
},
{
"internalType": "uint256",
"name": "stakeIndex",
"type": "uint256"
},
2024-03-19 22:22:36 -05:00
{
"internalType": "string",
"name": "requestContentId",
"type": "string"
},
{
"internalType": "string",
"name": "evidenceContentId",
"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": "evidenceContentId",
"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": "0x60a06040523480156200001157600080fd5b50604051620035ac380380620035ac8339818101604052810190620000379190620001c1565b828282828073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505080600181905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050506200021d565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620000f582620000c8565b9050919050565b60006200010982620000e8565b9050919050565b6200011b81620000fc565b81146200012757600080fd5b50565b6000815190506200013b8162000110565b92915050565b60006200014e82620000e8565b9050919050565b620001608162000141565b81146200016c57600080fd5b50565b600081519050620001808162000155565b92915050565b6000819050919050565b6200019b8162000186565b8114620001a757600080fd5b50565b600081519050620001bb8162000190565b92915050565b600080600060608486031215620001dd57620001dc620000c3565b5b6000620001ed868287016200012a565b935050602062000200868287016200016f565b92505060406200021386828701620001aa565b9150509250925092565b6080516133506200025c6000396000818161098101528181610a5101528181610b6e01528181610d8101528181610f9b015261102d01526133506000f3fe6080604052600436106100e85760003560e01c8063a035b1fe1161008a578063cf37625611610059578063cf376256146102de578063d0fae95f1461031c578063d5a44f8614610345578063d76b679414610385576100e8565b8063a035b1fe14610222578063b4e6a1d51461024d578063b5b20c001461028a578063c4a9e116146102b3576100e8565b8063815a0572116100c6578063815a05721461015d57806381d12c581461019a578063854b6a4f146101dd57806399ad6c5614610206576100e8565b80630d0271d6146100ed578063216ed6ad146101095780635badbe4c14610132575b600080fd5b610107600480360381019061010291906117ff565b6103b0565b005b34801561011557600080fd5b50610130600480360381019061012b91906118e0565b61049e565b005b34801561013e57600080fd5b506101476105b1565b6040516101549190611942565b60405180910390f35b34801561016957600080fd5b50610184600480360381019061017f91906119b3565b6105b7565b6040516101919190611942565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611a27565b610636565b6040516101d49796959493929190611b85565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611c2e565b6107c2565b005b610220600480360381019061021b9190611c90565b610c2e565b005b34801561022e57600080fd5b50610237610d77565b6040516102449190611942565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190611d04565b610d7d565b6040516102819190611942565b60405180910390f35b34801561029657600080fd5b506102b160048036038101906102ac9190611d9e565b61112b565b005b3480156102bf57600080fd5b506102c86112a0565b6040516102d59190611942565b60405180910390f35b3480156102ea57600080fd5b5061030560048036038101906103009190611a27565b6112a6565b604051610313929190611dde565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190611e5d565b6112ca565b005b34801561035157600080fd5b5061036c60048036038101906103679190611a27565b611503565b60405161037c9493929190611ef2565b60405180910390f35b34801561039157600080fd5b5061039a611560565b6040516103a79190611942565b60405180910390f35b6001543410156103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90611f83565b60405180910390fd5b60006007600081548092919061040a90611fd2565b9190505590506000600660008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034816001018190555061047c82611566565b81600301819055508383826004019182610497929190612260565b5050505050565b600082116104e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d89061237c565b60405180910390fd5b6000600560008154809291906104f690611fd2565b9190505590506000600460008381526020019081526020016000209050848160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160010181905550824261056b919061239c565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e9826040516105
"deployedBytecode": "0x6080604052600436106100e85760003560e01c8063a035b1fe1161008a578063cf37625611610059578063cf376256146102de578063d0fae95f1461031c578063d5a44f8614610345578063d76b679414610385576100e8565b8063a035b1fe14610222578063b4e6a1d51461024d578063b5b20c001461028a578063c4a9e116146102b3576100e8565b8063815a0572116100c6578063815a05721461015d57806381d12c581461019a578063854b6a4f146101dd57806399ad6c5614610206576100e8565b80630d0271d6146100ed578063216ed6ad146101095780635badbe4c14610132575b600080fd5b610107600480360381019061010291906117ff565b6103b0565b005b34801561011557600080fd5b50610130600480360381019061012b91906118e0565b61049e565b005b34801561013e57600080fd5b506101476105b1565b6040516101549190611942565b60405180910390f35b34801561016957600080fd5b50610184600480360381019061017f91906119b3565b6105b7565b6040516101919190611942565b60405180910390f35b3480156101a657600080fd5b506101c160048036038101906101bc9190611a27565b610636565b6040516101d49796959493929190611b85565b60405180910390f35b3480156101e957600080fd5b5061020460048036038101906101ff9190611c2e565b6107c2565b005b610220600480360381019061021b9190611c90565b610c2e565b005b34801561022e57600080fd5b50610237610d77565b6040516102449190611942565b60405180910390f35b34801561025957600080fd5b50610274600480360381019061026f9190611d04565b610d7d565b6040516102819190611942565b60405180910390f35b34801561029657600080fd5b506102b160048036038101906102ac9190611d9e565b61112b565b005b3480156102bf57600080fd5b506102c86112a0565b6040516102d59190611942565b60405180910390f35b3480156102ea57600080fd5b5061030560048036038101906103009190611a27565b6112a6565b604051610313929190611dde565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190611e5d565b6112ca565b005b34801561035157600080fd5b5061036c60048036038101906103679190611a27565b611503565b60405161037c9493929190611ef2565b60405180910390f35b34801561039157600080fd5b5061039a611560565b6040516103a79190611942565b60405180910390f35b6001543410156103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90611f83565b60405180910390fd5b60006007600081548092919061040a90611fd2565b9190505590506000600660008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034816001018190555061047c82611566565b81600301819055508383826004019182610497929190612260565b5050505050565b600082116104e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d89061237c565b60405180910390fd5b6000600560008154809291906104f690611fd2565b9190505590506000600460008381526020019081526020016000209050848160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838160010181905550824261056b919061239c565b81600201819055507fa85b1153cd317f9d39e14d8dbfb592ffb46123e9fc61b21b3f70d7d90a81a7e9826040516105a29190611942565b60405180910390a15050505050565b60075481565b60008083838101906105c99190611a27565b9050600060026000838152602001908152602001600020905080600001546001819055507f6a3843c02c26620842ae8496fd3afcb44b27463b3808e2ccdae4bcee5a2e3f2082600154604051610620929190611dde565b60405180910390a1600092505050949350505050565b60066020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020160009054906101000a900460ff169080600301549080600401805461069e90612083565b80601f01602080910402602001604051908101604052809291908181526020018280546106ca90612083565b80156107175780601f106106ec57610100808354040283529160200191610717565b820191906000526020600020905b8154815290600101906020018083116106fa57829003601f168201915b50505050509080600501805461072c90612083565b80601f016020809104026020016040519081016040528092919081815260200182805461075890612083565b80156107a55780601f1061077a576101008083540402835291602001916107a5565b820191906000526020600020905b81548152906001019060200180831161078857829003601f168201915b5050505050908060070160009054906101000a900460ff16905087565b6000600660008481526020019081526020016000209050600160038111156107ed576107ec611a63565b5b8160020160
2024-03-18 14:03:53 -05:00
"linkReferences": {},
"deployedLinkReferences": {}
}