Disable REP transfer and transferFrom
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 47s Details

This commit is contained in:
Ladd Hoffman 2024-04-10 13:43:58 -05:00
parent bb26571779
commit 4d39b55e64
3 changed files with 21 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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
});
});