Skip to content

Commit

Permalink
add CCIPEncodingUtils contract and gethwrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanRHall committed Sep 11, 2024
1 parent fc50683 commit 63ec29e
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/scripts/native_solc_compile_all_ccip
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ compileContract ccip/test/mocks/MockE2EUSDCTokenMessenger.sol
compileContract ccip/test/mocks/MockE2EUSDCTransmitter.sol
compileContract ccip/test/WETH9.sol


# Encoding Utils
compileContract ccip/CCIPEncodingUtils.sol

# Customer contracts
compileContract ccip/pools/USDC/USDCTokenPool.sol

Expand Down
16 changes: 16 additions & 0 deletions contracts/src/v0.8/ccip/CCIPEncodingUtils.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.24;

import {RMNRemote} from "./rmn/RMNRemote.sol";

/// @dev this file exposes structs that are otherwise internal to the CCIP codebase
/// doing this allows those structs to be encoded and decoded with type safety in offchain code
/// and tests because generated wrappers are available
contract CCIPEncodingUtils {
constructor() {
revert("do not deploy");
}

/// @dev the RMN Report struct is used in integration / E2E tests
function _rmnReport(RMNRemote.Report memory rmnReport) external {}
}

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

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ burn_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnMintTokenPoo
burn_with_from_mint_token_pool: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPool/BurnWithFromMintTokenPool.bin 6333d0314d0bd29e75ea5e05fe62a4516ade0c6db91c30b6f93645035db52ed8
burn_with_from_mint_token_pool_and_proxy: ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPoolAndProxy/BurnWithFromMintTokenPoolAndProxy.abi ../../../contracts/solc/v0.8.24/BurnWithFromMintTokenPoolAndProxy/BurnWithFromMintTokenPoolAndProxy.bin 08ed1235dda921ce8841b26aa18d0c0f36db4884779dd7670857159801b6d597
ccip_config: ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.abi ../../../contracts/solc/v0.8.24/CCIPConfig/CCIPConfig.bin 93e3bceec6fff366e876f636001253f1d9c60b43e2c95484674f7ae245b302e6
ccip_encoding_utils: ../../../contracts/solc/v0.8.24/CCIPEncodingUtils/CCIPEncodingUtils.abi ../../../contracts/solc/v0.8.24/CCIPEncodingUtils/CCIPEncodingUtils.bin 3a4929b6678378e789407449dc994dd3a239deea68dc7996198d65a910ca3d30
ccip_reader_tester: ../../../contracts/solc/v0.8.24/CCIPReaderTester/CCIPReaderTester.abi ../../../contracts/solc/v0.8.24/CCIPReaderTester/CCIPReaderTester.bin 481d461f14c98308cd788b64be1151e92bac6f95ddd55eefc926296454316f13
commit_store: ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.abi ../../../contracts/solc/v0.8.24/CommitStore/CommitStore.bin 274d87db70b643e00ab0a7e7845bb4b791f3b613bfc87708d33fc5a8369e2a41
commit_store_helper: ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.abi ../../../contracts/solc/v0.8.24/CommitStoreHelper/CommitStoreHelper.bin f7128dcc2ee6dbcbc976288abcc16970ffb19b59412c5202ef6b259d2007f801
Expand Down
3 changes: 3 additions & 0 deletions core/gethwrappers/ccip/go_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ package ccip
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTokenMessenger/MockE2EUSDCTokenMessenger.bin MockE2EUSDCTokenMessenger mock_usdc_token_messenger
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.abi ../../../contracts/solc/v0.8.24/MockE2EUSDCTransmitter/MockE2EUSDCTransmitter.bin MockE2EUSDCTransmitter mock_usdc_token_transmitter

// EncodingUtils
//go:generate go run ../generation/generate/wrap.go ../../../contracts/solc/v0.8.24/CCIPEncodingUtils/CCIPEncodingUtils.abi ../../../contracts/solc/v0.8.24/CCIPEncodingUtils/CCIPEncodingUtils.bin EncodingUtils ccip_encoding_utils

// To run these commands, you must either install docker, or the correct version
// of abigen. The latter can be installed with these commands, at least on linux:
//
Expand Down

0 comments on commit 63ec29e

Please sign in to comment.