Skip to content

Commit

Permalink
feat: various tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeroman committed Nov 16, 2024
1 parent a52eafa commit b201592
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/OpReceiverProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ contract OpReceiverProxy is ERC20, Utils {
// ERC20 overrides

function name() public pure override returns (string memory) {
return "Fast ETH";
return "Relay ETH";
}

function symbol() public pure override returns (string memory) {
return "FASTETH";
return "RETH";
}

// Public methods
Expand Down Expand Up @@ -98,13 +98,15 @@ contract OpReceiverProxy is ERC20, Utils {
revert Unauthorized();
}

// Parse the data received from the sender chain
(uint256 id, address to, uint256 amount) = abi.decode(
data,
(uint256, address, uint256)
);

// If the parsed id was not already used then we simply forward the received funds to the parsed recipient
if (!idWasUsed[id]) {
// This was a fast bridge, so take the fee out of the amount
_send(to, amount - (amount * FEE_BPS) / 1e18);

// Mark the id as being used
Expand All @@ -118,10 +120,12 @@ contract OpReceiverProxy is ERC20, Utils {
revert Unauthorized();
}

// Parse the data received from the sender chain
(uint256 id, address to) = abi.decode(msg.data, (uint256, address));

// If the parsed id was not already used then we simply forward the received funds to the parsed recipient
if (!idWasUsed[id]) {
// This was a slow bridge, so no fee is taken out of the amount
_send(to, msg.value);

// Mark the id as being used
Expand Down

0 comments on commit b201592

Please sign in to comment.