Skip to content

Commit

Permalink
feat: multi hop claiming (#74)
Browse files Browse the repository at this point in the history
* fezt: multi hop claiming

* fix: renamings

* fix: revert deployment
  • Loading branch information
Picodes authored Jun 20, 2024
1 parent ea7ba31 commit 4ce7788
Show file tree
Hide file tree
Showing 16 changed files with 5,890 additions and 42 deletions.
2 changes: 1 addition & 1 deletion contracts/Distributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ contract Distributor is UUPSHelper {
uint256 amount = amounts[i];

// Only approved operator can claim for `user`
if (msg.sender != user && operators[user][msg.sender] == 0) revert NotWhitelisted();
if (msg.sender != user && tx.origin != user && operators[user][msg.sender] == 0) revert NotWhitelisted();

Check warning on line 187 in contracts/Distributor.sol

View workflow job for this annotation

GitHub Actions / lint

Avoid to use tx.origin

Check warning on line 187 in contracts/Distributor.sol

View workflow job for this annotation

GitHub Actions / lint

Avoid to use tx.origin

// Verifying proof
bytes32 leaf = keccak256(abi.encode(user, token, amount));
Expand Down
2 changes: 1 addition & 1 deletion contracts/tokenWrappers/RadiantTokenWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ contract RadiantMerklTokenWrapper is BaseMerklTokenWrapper {

// ================================= CONSTANTS =================================

IVesting public constant VESTING = IVesting(0x76ba3eC5f5adBf1C58c91e86502232317EeA72dE);
IVesting public constant VESTING = IVesting(0x28E395a54a64284DBA39652921Cd99924f4e3797);
address internal immutable _UNDERLYING = VESTING.rdntToken();

// ================================= FUNCTIONS =================================
Expand Down
4 changes: 2 additions & 2 deletions deploy/0_distributor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
console.log('Now deploying Distributor');
console.log('Starting with the implementation');

await deploy('Distributor_Implementation_V2_1', {
await deploy('Distributor_Implementation_V2_2', {
contract: 'Distributor',
from: deployer.address,
log: !argv.ci,
});

const implementationAddress = (await ethers.getContract('Distributor_Implementation_V2_1')).address;
const implementationAddress = (await ethers.getContract('Distributor_Implementation_V2_2')).address;

console.log(`Successfully deployed the implementation for Distributor at ${implementationAddress}`);
console.log('');
Expand Down
File renamed without changes.
Loading

0 comments on commit 4ce7788

Please sign in to comment.