Skip to content

Commit

Permalink
fix offchain
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR committed Nov 22, 2024
1 parent 1733801 commit 9880f64
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/solidity-foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
{ "name": "functions", "setup": { "run-coverage": false, "min-coverage": 98.5, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "keystone", "setup": { "run-coverage": true, "min-coverage": 72.8, "run-gas-snapshot": false, "run-forge-fmt": false }},
{ "name": "l2ep", "setup": { "run-coverage": true, "min-coverage": 61.0, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 46.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "liquiditymanager", "setup": { "run-coverage": true, "min-coverage": 44, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "llo-feeds", "setup": { "run-coverage": true, "min-coverage": 49.3, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "operatorforwarder", "setup": { "run-coverage": true, "min-coverage": 55.7, "run-gas-snapshot": true, "run-forge-fmt": false }},
{ "name": "shared", "setup": { "run-coverage": true, "extra-coverage-params": "--no-match-path='*CallWithExactGas*' --ir-minimum", "min-coverage": 32.6, "run-gas-snapshot": true, "run-forge-fmt": false }},
Expand Down
7 changes: 7 additions & 0 deletions core/services/ocr2/plugins/ccip/testhelpers/ccip_contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -789,10 +789,14 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh
// │ Deploy Pools │
// ================================================================

// All the tokens deployed above have 18 decimals
tokenDecimals := uint8(18)

sourcePoolLinkAddress, _, _, err := lock_release_token_pool.DeployLockReleaseTokenPool(
sourceUser,
sourceChain.Client(),
sourceLinkTokenAddress,
tokenDecimals,
[]common.Address{},
armProxySourceAddress,
true,
Expand All @@ -809,6 +813,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh
sourceUser,
sourceChain.Client(),
sourceWeth9addr,
tokenDecimals,
[]common.Address{},
armProxySourceAddress,
true,
Expand All @@ -827,6 +832,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh
destUser,
destChain.Client(),
destLinkTokenAddress,
tokenDecimals,
[]common.Address{},
armProxyDestAddress,
true,
Expand Down Expand Up @@ -858,6 +864,7 @@ func SetupCCIPContracts(t *testing.T, sourceChainID, sourceChainSelector, destCh
destUser,
destChain.Client(),
destWeth9addr,
tokenDecimals,
[]common.Address{},
armProxyDestAddress,
true,
Expand Down
5 changes: 4 additions & 1 deletion deployment/ccip/changeset/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,14 +887,16 @@ func deployTransferTokenOneEnd(
}
}

tokenDecimals := uint8(18)

tokenContract, err := deployment.DeployContract(lggr, chain, addressBook,
func(chain deployment.Chain) deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677] {
USDCTokenAddr, tx, token, err2 := burn_mint_erc677.DeployBurnMintERC677(
chain.DeployerKey,
chain.Client,
tokenSymbol,
tokenSymbol,
uint8(18),
tokenDecimals,
big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)),
)
return deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677]{
Expand All @@ -921,6 +923,7 @@ func deployTransferTokenOneEnd(
chain.DeployerKey,
chain.Client,
tokenContract.Address,
tokenDecimals,
[]common.Address{},
common.HexToAddress(rmnAddress),
common.HexToAddress(routerAddress),
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/ccip-tests/contracts/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import (
"github.com/rs/zerolog/log"
"golang.org/x/crypto/curve25519"

"github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain"
ocrconfighelper2 "github.com/smartcontractkit/libocr/offchainreporting2/confighelper"
ocrtypes2 "github.com/smartcontractkit/libocr/offchainreporting2/types"

"github.com/smartcontractkit/chainlink-common/pkg/config"
"github.com/smartcontractkit/chainlink-testing-framework/lib/blockchain"

"github.com/smartcontractkit/chainlink/deployment/environment/nodeclient"
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
Expand Down Expand Up @@ -505,6 +505,7 @@ func (e *CCIPContractsDeployer) DeployLockReleaseTokenPoolContract(tokenAddr str
auth,
wrappers.MustNewWrappedContractBackend(e.evmClient, nil),
token,
18,
[]common.Address{},
rmnProxy,
true,
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/ccip-tests/contracts/contract_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ func (pool *TokenPool) SetRemoteChainOnPool(remoteChainSelector uint64, remotePo

selectorsToUpdate = append(selectorsToUpdate, token_pool.TokenPoolChainUpdate{
RemoteChainSelector: remoteChainSelector,
RemotePoolAddress: encodedPoolAddress,
RemotePoolAddresses: [][]byte{encodedPoolAddress},
RemoteTokenAddress: encodedTokenAddress,
InboundRateLimiterConfig: token_pool.RateLimiterConfig{
IsEnabled: true,
Expand Down

0 comments on commit 9880f64

Please sign in to comment.