Skip to content

Commit

Permalink
fix usdc test
Browse files Browse the repository at this point in the history
  • Loading branch information
RensR committed Nov 27, 2024
1 parent 3938263 commit 4fd2f17
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions deployment/ccip/changeset/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const (
LinkSymbol TokenSymbol = "LINK"
WethSymbol TokenSymbol = "WETH"
USDCSymbol TokenSymbol = "USDC"
USDCName string = "USD Coin"
LinkDecimals = 18
WethDecimals = 18
UsdcDecimals = 6
)
8 changes: 6 additions & 2 deletions deployment/ccip/changeset/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/pkg/errors"
"github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers"

"github.com/smartcontractkit/chainlink-ccip/pluginconfig"

commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"
Expand Down Expand Up @@ -137,10 +138,13 @@ func DeployTestContracts(t *testing.T,
Chains: make(map[uint64]CCIPChainState),
}, ab, chains[homeChainSel])
require.NoError(t, err)

_, err = DeployFeeds(lggr, ab, chains[feedChainSel], linkPrice, wethPrice)
require.NoError(t, err)

evmChainID, err := chainsel.ChainIdFromSelector(homeChainSel)
require.NoError(t, err)

return deployment.CapabilityRegistryConfig{
EVMChainID: evmChainID,
Contract: capReg.Address,
Expand Down Expand Up @@ -929,7 +933,7 @@ func deployTransferTokenOneEnd(

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(
tokenAddress, tx, token, err2 := burn_mint_erc677.DeployBurnMintERC677(
chain.DeployerKey,
chain.Client,
tokenSymbol,
Expand All @@ -938,7 +942,7 @@ func deployTransferTokenOneEnd(
big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)),
)
return deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677]{
USDCTokenAddr, token, tx, deployment.NewTypeAndVersion(BurnMintToken, deployment.Version1_0_0), err2,
tokenAddress, token, tx, deployment.NewTypeAndVersion(BurnMintToken, deployment.Version1_0_0), err2,
}
})
if err != nil {
Expand Down
8 changes: 4 additions & 4 deletions deployment/ccip/changeset/test_usdc_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ func DeployUSDC(
tokenAddress, tx, tokenContract, err2 := burn_mint_erc677.DeployBurnMintERC677(
chain.DeployerKey,
chain.Client,
"USDC Token",
"USDC",
uint8(18),
big.NewInt(0).Mul(big.NewInt(1e9), big.NewInt(1e18)),
USDCName,
string(USDCSymbol),
UsdcDecimals,
big.NewInt(0),
)
return deployment.ContractDeploy[*burn_mint_erc677.BurnMintERC677]{
Address: tokenAddress,
Expand Down

0 comments on commit 4fd2f17

Please sign in to comment.