Skip to content

Commit

Permalink
Adding buffer time to verify the balance
Browse files Browse the repository at this point in the history
  • Loading branch information
b-gopalswami committed Nov 18, 2024
1 parent d1703b7 commit e441007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions deployment/ccip/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/pkg/errors"
"github.com/smartcontractkit/ccip-owner-contracts/pkg/config"
owner_helpers "github.com/smartcontractkit/ccip-owner-contracts/pkg/gethwrappers"

cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-ccip/pluginconfig"
commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"
Expand Down Expand Up @@ -155,7 +156,7 @@ func DeployPrerequisiteContracts(e deployment.Environment, ab deployment.Address
e.Logger.Errorw("Failed to deploy token admin registry", "err", err)
return err
}
e.Logger.Infow("deployed tokenAdminRegistry", "addr", tokenAdminRegistry)
e.Logger.Infow("deployed tokenAdminRegistry", "addr", tokenAdminRegistry.Address)
tokenAdminReg = tokenAdminRegistry.Contract
} else {
e.Logger.Infow("tokenAdminRegistry already deployed", "addr", tokenAdminReg.Address)
Expand All @@ -175,7 +176,7 @@ func DeployPrerequisiteContracts(e deployment.Environment, ab deployment.Address
e.Logger.Errorw("Failed to deploy custom registry module", "err", err)
return err
}
e.Logger.Infow("deployed custom registry module", "addr", customRegistryModule)
e.Logger.Infow("deployed custom registry module", "addr", customRegistryModule.Address)
registryModule = customRegistryModule.Contract
} else {
e.Logger.Infow("custom registry module already deployed", "addr", registryModule.Address)
Expand Down
10 changes: 6 additions & 4 deletions integration-tests/smoke/ccip_usdc_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package smoke

import (
"github.com/stretchr/testify/assert"
"math/big"
"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -194,10 +195,11 @@ func TestUSDCTokenTransfer(t *testing.T) {

for _, token := range tt.tokens {
destToken := srcDstTokenMapping[token.Token]

balance, err := destToken.BalanceOf(&bind.CallOpts{Context: tests.Context(t)}, tt.receiver)
require.NoError(t, err)
require.Equal(t, new(big.Int).Add(initialBalances[token.Token], tinyOneCoin), balance)
assert.Eventually(t, func() bool {
balance, err := destToken.BalanceOf(&bind.CallOpts{Context: tests.Context(t)}, tt.receiver)
require.NoError(t, err)
return new(big.Int).Add(initialBalances[token.Token], tinyOneCoin) == balance
}, 1*time.Minute, 5*time.Second, "balance not updated")
}
})
}
Expand Down

0 comments on commit e441007

Please sign in to comment.