diff --git a/ethereum/contracts/Onboarding.sol b/ethereum/contracts/Onboarding.sol index af82a9e..bb498a2 100644 --- a/ethereum/contracts/Onboarding.sol +++ b/ethereum/contracts/Onboarding.sol @@ -42,8 +42,12 @@ contract Onboarding is WorkContract, IOnValidate { abi.encode(requestIndex) ); // We have an approval from stake.worker to transfer up to stake.amount - dao.transferFrom(stake.worker, address(this), stake.amount); - dao.stakeOnValidationPool(poolIndex, stake.amount, true); + dao.delegatedStakeOnValidationPool( + poolIndex, + stake.worker, + stake.amount, + true + ); } /// Callback to be executed when review pool completes diff --git a/ethereum/contracts/core/Reputation.sol b/ethereum/contracts/core/Reputation.sol index b166bcf..3ad4250 100644 --- a/ethereum/contracts/core/Reputation.sol +++ b/ethereum/contracts/core/Reputation.sol @@ -7,6 +7,19 @@ contract Reputation is ERC20("Reputation", "REP") { function decimals() public pure override returns (uint8) { return 9; } + + //function stake(address to, uint amount) public {} + function transfer(address, uint256) public pure override returns (bool) { + revert("REP transfer is not allowed"); + } + + function transferFrom( + address, + address, + uint256 + ) public pure override returns (bool) { + revert("REP transfer is not allowed"); + } } // TODO: try implementing as ERC721 diff --git a/ethereum/test/Work1.js b/ethereum/test/Work1.js index 0bebba0..7dd6f12 100644 --- a/ethereum/test/Work1.js +++ b/ethereum/test/Work1.js @@ -262,5 +262,7 @@ describe('Work1', () => { await work1.proposeNewPrice(12345, 'content-id', [1, 1, 1]); expect(await proposals.proposalCount()).to.equal(1); }); + + // TODO: can accept a new price }); });