Skip to content

Commit

Permalink
fix: variable names and comment fix , added hasher for token amounts
Browse files Browse the repository at this point in the history
Signed-off-by: 0xsuryansh <[email protected]>
  • Loading branch information
0xsuryansh committed Sep 13, 2024
1 parent 9a6f624 commit 2640d6d
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 123 deletions.
216 changes: 108 additions & 108 deletions contracts/gas-snapshots/ccip.gas-snapshot

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/src/v0.8/ccip/libraries/Internal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ library Internal {
bytes extraData;
uint256 amount; // Amount of tokens.
// Destination chain specific execution data encoded in bytes
// for an EVM destination, it consists of the amount of gas available for the releaseOrMint
// for an EVM destination, it consists of the amount of gas available for the releaseOrMint
// and transfer calls made by the offRamp
bytes destExecData;
}
Expand Down
3 changes: 1 addition & 2 deletions contracts/src/v0.8/ccip/offRamp/OffRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base {
}

// We retrieve the local token balance of the receiver before the pool call.
(uint256 balancePre, uint256 gasLeft) =
_getBalanceOfReceiver(receiver, localToken, sourceTokenAmount.destGasAmount);
(uint256 balancePre, uint256 gasLeft) = _getBalanceOfReceiver(receiver, localToken, sourceTokenAmount.destGasAmount);

// We determined that the pool address is a valid EVM address, but that does not mean the code at this
// address is a (compatible) pool contract. _callWithExactGasSafeReturnData will check if the location
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/v0.8/ccip/test/BaseTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract BaseTest is Test {
uint16 internal constant DEST_GAS_PER_PAYLOAD_BYTE = 16;

uint16 internal constant DEFAULT_TOKEN_FEE_USD_CENTS = 50;
uint32 internal constant DEFAULT_TOKEN_DEST_GAS_OVERHEAD = 90_000;
uint32 internal constant DEFAULT_TOKEN_DEST_GAS_OVERHEAD = 100_000;
uint32 internal constant DEFAULT_TOKEN_BYTES_OVERHEAD = 32;

bool private s_baseTestInitialized;
Expand Down
2 changes: 1 addition & 1 deletion contracts/src/v0.8/ccip/test/e2e/MultiRampsEnd2End.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ contract MultiRampsE2E is OnRampSetup, OffRampSetup {
destTokenAddress: abi.decode(msgEvent.tokenAmounts[i].destTokenAddress, (address)),
extraData: msgEvent.tokenAmounts[i].extraData,
amount: msgEvent.tokenAmounts[i].amount,
destGasAmount: abi.decode(msgEvent.tokenAmounts[i].destExecData, (uint32))
destGasAmount: DEFAULT_TOKEN_DEST_GAS_OVERHEAD
});
}
return Internal.Any2EVMRampMessage({
Expand Down
20 changes: 10 additions & 10 deletions core/gethwrappers/ccip/mocks/fee_quoter_interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2640d6d

Please sign in to comment.