Skip to content

Commit f3bba33

Browse files
authored
fix: missing parts omitted from the ibc v2 PR (cosmos#122)
* fix: follow-up fix for ibc v2 feature * build: add explicit solhint version for constant ci
1 parent 019ac22 commit f3bba33

File tree

12 files changed

+24
-17
lines changed

12 files changed

+24
-17
lines changed

.github/workflows/solhint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
**/**.sol
1919
- uses: actions/setup-node@v4
2020
if: env.GIT_DIFF
21-
- run: npm install -g solhint
21+
- run: npm install -g solhint@v5.0.5
2222
if: env.GIT_DIFF
2323
- run: solhint --version
2424
if: env.GIT_DIFF

ibc/testing/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (path *Path) RelayPacketWithResults(packet channeltypes.Packet) (*abci.Exec
125125
return nil, nil, errors.New("packet commitment does not exist on either endpoint for provided packet")
126126
}
127127

128-
// RelayPacket attempts to relay the packet first on EndpointA and then on EndpointB
128+
// RelayPacketV2 attempts to relay the v2 packet first on EndpointA and then on EndpointB
129129
// if EndpointA does not contain a packet commitment for that packet. An error is returned
130130
// if a relay step fails or the packet commitment does not exist on either endpoint.
131131
func (path *Path) RelayPacketV2(packet channeltypesv2.Packet) error {

precompiles/ics20/errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ const (
1919
ErrNoMatchingAllocation = "no matching allocation found for source port: %s, source channel: %s, and denom: %s"
2020
// ErrDifferentOriginFromSender is raised when the origin address is not the same as the sender address.
2121
ErrDifferentOriginFromSender = "origin address %s is not the same as sender address %s"
22-
// ErrTraceFound is raised when the denom for the specified request does not exist.
23-
ErrTraceFound = "denomination not found"
22+
// ErrDenomNotFound is raised when the denom for the specified request does not exist.
23+
ErrDenomNotFound = "denomination not found"
2424
)

precompiles/ics20/query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (p Precompile) Denom(
4141
res, err := p.transferKeeper.Denom(ctx, req)
4242
if err != nil {
4343
// if the trace does not exist, return empty array
44-
if strings.Contains(err.Error(), ErrTraceFound) {
44+
if strings.Contains(err.Error(), ErrDenomNotFound) {
4545
return method.Outputs.Pack(transfertypes.Denom{})
4646
}
4747
return nil, err
@@ -85,7 +85,7 @@ func (p Precompile) DenomHash(
8585
res, err := p.transferKeeper.DenomHash(ctx, req)
8686
if err != nil {
8787
// if the denom hash does not exist, return empty string
88-
if strings.Contains(err.Error(), ErrTraceFound) {
88+
if strings.Contains(err.Error(), ErrDenomNotFound) {
8989
return method.Outputs.Pack("")
9090
}
9191
return nil, err

precompiles/testutil/contracts/InterchainSender.json

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

precompiles/testutil/contracts/InterchainSender.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ contract InterchainSender {
214214

215215
function testDenom(
216216
string memory hash
217-
) public view returns (Denom memory denomTrace) {
217+
) public view returns (Denom memory denom) {
218218
return ICS20_CONTRACT.denom(hash);
219219
}
220220

precompiles/testutil/contracts/InterchainSenderCaller.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

testutil/integration/os/utils/unit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func RegisterEvmosERC20Coins(
7373
return tokenPair, nil
7474
}
7575

76-
// RegisterIBCERC20Coins uses the UnitNetwork to register the denomTrace as an
76+
// RegisterIBCERC20Coins uses the UnitNetwork to register the denom as an
7777
// ERC20 token. The function performs all the required steps for the registration
7878
// like registering the denom in the transfer keeper and minting the token
7979
// with the bank. Returns the TokenPair or an error.

utils/utils_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func TestEvmosCoinDenom(t *testing.T) {
146146
},
147147
{
148148
"valid denom - ethereum address (ERC-20 contract)",
149-
"erc20/0x52908400098527886e0f7030069857D2E4169EE7",
149+
"erc20:0x52908400098527886e0f7030069857D2E4169EE7",
150150
false,
151151
},
152152
{

x/erc20/keeper/ibc_callbacks_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
2828
)
2929

30-
var erc20Denom = "erc20/0xdac17f958d2ee523a2206206994597c13d831ec7"
30+
var erc20Denom = "erc20:0xdac17f958d2ee523a2206206994597c13d831ec7"
3131

3232
func (suite *KeeperTestSuite) TestOnRecvPacket() {
3333
var ctx sdk.Context

0 commit comments

Comments
 (0)