Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions build/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/CoreumFoundation/coreumbridge-xrpl/build

go 1.23.3
go 1.24

toolchain go1.24.2

// CosmosSDK replacements
replace (
Expand All @@ -17,8 +19,8 @@ replace (

require (
github.com/CoreumFoundation/coreum/build v0.0.0-20250417103402-9a7f9035f445
github.com/CoreumFoundation/crust v0.0.0-20250404130536-23de310e6eb8
github.com/CoreumFoundation/crust/znet v0.0.0-20250404130536-23de310e6eb8
github.com/CoreumFoundation/crust v0.0.0-20250609061659-5bcd4773c685
github.com/CoreumFoundation/crust/znet v0.0.0-20250609061659-5bcd4773c685
github.com/pkg/errors v0.9.1
)

Expand Down Expand Up @@ -48,6 +50,7 @@ require (
github.com/99designs/keyring v1.2.2 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20241202115740-dbc6962a4d0a // indirect
github.com/CoreumFoundation/coreum/v6 v6.0.0-20250421142245-52bdcb2a0560 // indirect
github.com/CosmWasm/wasmd v0.54.0 // indirect
github.com/CosmWasm/wasmvm/v2 v2.2.2 // indirect
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
Expand Down
10 changes: 6 additions & 4 deletions build/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,12 @@ github.com/CoreumFoundation/coreum/build v0.0.0-20250417103402-9a7f9035f445 h1:b
github.com/CoreumFoundation/coreum/build v0.0.0-20250417103402-9a7f9035f445/go.mod h1:9LO1Sy+zjLtcPw6p0p12/ExWpUeZs8oa/v9rGst+NVI=
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008 h1:zuNtN9SzKYm2q8XWVwBp4zX0KBGv3lT8icA9vdsilh8=
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008/go.mod h1:LQbK4qqr0E1icUCcQT464isJfMeW2mybvX6XXkTpeGI=
github.com/CoreumFoundation/crust v0.0.0-20250404130536-23de310e6eb8 h1:Hed06EDU5Lt6P89Sgfs/gKt0SIGJOpqt7NCKyGDsiiM=
github.com/CoreumFoundation/crust v0.0.0-20250404130536-23de310e6eb8/go.mod h1:6upahk1765UAryMA55OskmSDVoP98MMEAF4A+TFDyJI=
github.com/CoreumFoundation/crust/znet v0.0.0-20250404130536-23de310e6eb8 h1:0tWqlNkHNzb2TrZEBa3RjWknVVWoHahQDVPNRIVBlCs=
github.com/CoreumFoundation/crust/znet v0.0.0-20250404130536-23de310e6eb8/go.mod h1:XVapwHb6v63p46hUZ7+Yfelm0/lA8xBiTqFkDlH/acM=
github.com/CoreumFoundation/coreum/v6 v6.0.0-20250421142245-52bdcb2a0560 h1:Mii4YioytmDq1ZHZg+fXxEke0H0cMyHc2ERkQOevuIc=
github.com/CoreumFoundation/coreum/v6 v6.0.0-20250421142245-52bdcb2a0560/go.mod h1:S7PDev3DSxWj84+G3+RPYtboc8rIiQiFXLjC25P+axw=
github.com/CoreumFoundation/crust v0.0.0-20250609061659-5bcd4773c685 h1:A1OqFCyfNAEZgzgHlOuSmG2Phn67Hto7bQ2R5efo2wI=
github.com/CoreumFoundation/crust v0.0.0-20250609061659-5bcd4773c685/go.mod h1:nTVhm7aaOrQSWIswfIdDrxV4BNI2vgwFSPaO+0G+cgM=
github.com/CoreumFoundation/crust/znet v0.0.0-20250609061659-5bcd4773c685 h1:nXNASERiN38fgd4Daz3kV9PMjiE9ieEjjljKWWrmynE=
github.com/CoreumFoundation/crust/znet v0.0.0-20250609061659-5bcd4773c685/go.mod h1:mGXKXTmOMlK0EPDZXkyo9h5xWiGgDKBbi3EVN5hY1dU=
github.com/CosmWasm/wasmd v0.54.0 h1:/txsBehV1xnAi46H1xwuuY6D4NySujBy+wa5+ryItS8=
github.com/CosmWasm/wasmd v0.54.0/go.mod h1:8Zu/rj6RHbJ8Gx0WdqsGeHvgnEQb0rqchpqhgMxASRU=
github.com/CosmWasm/wasmvm/v2 v2.2.2 h1:MaQMtaZN8L08N0uAlBlOICP+GWolibJsajHGo3fQ03w=
Expand Down
4 changes: 3 additions & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
go 1.23.3
go 1.24

toolchain go1.24.2

use (
./build
Expand Down
6 changes: 4 additions & 2 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,12 @@ github.com/CoreumFoundation/coreum/build v0.0.0-20240612092619-8d09603e839d/go.m
github.com/CoreumFoundation/coreum/build v0.0.0-20241226122636-d94c10aed210/go.mod h1:s+ys9/oHbB96g/UuLfzCUrULf7EMQikReCSK6NmqXiU=
github.com/CoreumFoundation/coreum/v4 v4.0.0-20240213123712-d7d6a45ddb8f h1:a+lBcN3rWvoa/5mvdOQMaUU604/J3h/0rumGnISRglo=
github.com/CoreumFoundation/coreum/v4 v4.0.0-20240213123712-d7d6a45ddb8f/go.mod h1:m17GEOObKO0uMNRSeitPFjjne55MSbzFeTlAONaMGkI=
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008 h1:zuNtN9SzKYm2q8XWVwBp4zX0KBGv3lT8icA9vdsilh8=
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008/go.mod h1:LQbK4qqr0E1icUCcQT464isJfMeW2mybvX6XXkTpeGI=
github.com/CoreumFoundation/crust v0.0.0-20250128110620-54d733b60040/go.mod h1:+tc+D5f9K7oNNtv8UazzNy8LheAhBG7UDc25JwY803Y=
github.com/CoreumFoundation/crust v0.0.0-20250130080025-fcd3df66ed33/go.mod h1:+tc+D5f9K7oNNtv8UazzNy8LheAhBG7UDc25JwY803Y=
github.com/CoreumFoundation/crust v0.0.0-20250530123432-a2daec21dfc1 h1:e+uqeNvJZKoPOojSHmGMm9zH7AzygwVwSuU/mZndmFw=
github.com/CoreumFoundation/crust v0.0.0-20250530123432-a2daec21dfc1/go.mod h1:nTVhm7aaOrQSWIswfIdDrxV4BNI2vgwFSPaO+0G+cgM=
github.com/CoreumFoundation/crust/znet v0.0.0-20250530123432-a2daec21dfc1 h1:/WswWf1Uz9IxX4Jeahau1lKcPTKXhcJRM8Chl/3PQkg=
github.com/CoreumFoundation/crust/znet v0.0.0-20250530123432-a2daec21dfc1/go.mod h1:mGXKXTmOMlK0EPDZXkyo9h5xWiGgDKBbi3EVN5hY1dU=
github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc=
github.com/CosmWasm/wasmvm v1.5.1 h1:2MHN9uFyHP6pxfvpBJ0JW6ujvAIBk9kQk283zyri0Ro=
github.com/CosmWasm/wasmvm v1.5.1/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc=
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/contract/sending_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2942,7 +2942,7 @@ func TestFeeCalculations_MultipleAssetsAndPartialClaim(t *testing.T) {
for _, asset := range assets {
if asset.registeredToken.CoreumDenom == fee.Denom {
found = true
assert.EqualValues(t, fee.Amount.String(), asset.bridgingFee.Quo(sdkmath.NewInt(int64(len(relayers)))).String())
assert.Equal(t, fee.Amount.String(), asset.bridgingFee.Quo(sdkmath.NewInt(int64(len(relayers)))).String())
break
}
}
Expand Down Expand Up @@ -2972,7 +2972,7 @@ func TestFeeCalculations_MultipleAssetsAndPartialClaim(t *testing.T) {
remainderFees := initialFees.Sub(oneThirdOfFees...)
fees, err := contractClient.GetFeesCollected(ctx, relayer.CoreumAddress)
require.NoError(t, err)
require.EqualValues(t, remainderFees.String(), fees.String())
require.Equal(t, remainderFees.String(), fees.String())

// claim remainder of fees
_, err = contractClient.ClaimRelayerFees(ctx, relayer.CoreumAddress, remainderFees)
Expand Down Expand Up @@ -3399,7 +3399,7 @@ func claimFeesAndMakeAssertions(
require.NoError(t, err)
balanceChange := relayerBalanceAfterClaim.Balance.
Sub(*relayerBalanceBeforeClaim.Balance)
require.EqualValues(t, expectedFeeAmount.String(), balanceChange.Amount.String())
require.Equal(t, expectedFeeAmount.String(), balanceChange.Amount.String())

// assert fees are now collected
fees, err = contractClient.GetFeesCollected(ctx, relayer.CoreumAddress)
Expand All @@ -3408,7 +3408,7 @@ func claimFeesAndMakeAssertions(
require.Empty(t, fees, 0)
} else {
expectedRemainder := remainderAmount.QuoRaw(int64(len(relayers)))
require.EqualValues(t, fees[0].Amount.String(), expectedRemainder.String())
require.Equal(t, fees[0].Amount.String(), expectedRemainder.String())
}
}
}
4 changes: 2 additions & 2 deletions integration-tests/contract/token_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ func TestEnableAndDisableXRPLOriginatedToken(t *testing.T) {
pendingRefunds, err := contractClient.GetPendingRefunds(ctx, coreumRecipient)
require.NoError(t, err)
require.Len(t, pendingRefunds, 1)
require.EqualValues(t, pendingRefunds[0].Coin.String(), coinToSendBack.String())
require.Equal(t, pendingRefunds[0].Coin.String(), coinToSendBack.String())
_, err = contractClient.ClaimRefund(ctx, coreumRecipient, pendingRefunds[0].ID)
require.NoError(t, err)

Expand Down Expand Up @@ -1075,7 +1075,7 @@ func TestEnableAndDisableCoreumOriginatedToken(t *testing.T) {
pendingRefunds, err := contractClient.GetPendingRefunds(ctx, coreumSenderAddress)
require.NoError(t, err)
require.Len(t, pendingRefunds, 1)
require.EqualValues(t, pendingRefunds[0].Coin.String(), coinToSendFromCoreumToXRPL.String())
require.Equal(t, pendingRefunds[0].Coin.String(), coinToSendFromCoreumToXRPL.String())
_, err = contractClient.ClaimRefund(ctx, coreumSenderAddress, pendingRefunds[0].ID)
require.NoError(t, err)

Expand Down
9 changes: 5 additions & 4 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/CoreumFoundation/coreumbridge-xrpl/integration-tests

go 1.23.3
go 1.24

toolchain go1.24.2

// same replacements as in coreum
replace (
Expand All @@ -18,7 +20,7 @@ replace (

require (
cosmossdk.io/math v1.5.0
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20241202115740-dbc6962a4d0a
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20250605161222-1d26ddd79ec6
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008
github.com/CoreumFoundation/coreumbridge-xrpl/relayer v1.0.0
github.com/CosmWasm/wasmd v0.54.0
Expand Down Expand Up @@ -219,10 +221,9 @@ require (
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect
go.opentelemetry.io/otel/trace v1.32.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/mock v0.4.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.23.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.35.0 // indirect
golang.org/x/exp v0.0.0-20250215185904-eff6e970281f // indirect
Expand Down
14 changes: 4 additions & 10 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20241202115740-dbc6962a4d0a h1:1vgtS45y86pyFZ/n2RBHjKQhHRDK1VQek7NHbkPfkGU=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20241202115740-dbc6962a4d0a/go.mod h1:VD93vCHkxYaT/RhOesXTFgd/GQDW54tr0BqGi5JU1c0=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20250605161222-1d26ddd79ec6 h1:cNHj15Ewh5bkzPVHM0GJiA89KUkymr5NCA8g0Jzx8Rc=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20250605161222-1d26ddd79ec6/go.mod h1:A3ktFfEBKcujFSpsEPjBlyWGX0VxSOe49q80gknmHWE=
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008 h1:zuNtN9SzKYm2q8XWVwBp4zX0KBGv3lT8icA9vdsilh8=
github.com/CoreumFoundation/coreum/v5 v5.0.0-20250526103302-5a3f05b11008/go.mod h1:LQbK4qqr0E1icUCcQT464isJfMeW2mybvX6XXkTpeGI=
github.com/CosmWasm/wasmd v0.54.0 h1:/txsBehV1xnAi46H1xwuuY6D4NySujBy+wa5+ryItS8=
Expand Down Expand Up @@ -287,7 +287,6 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX
github.com/aws/aws-sdk-go v1.54.15 h1:ErgCEVbzuSfuZl9nR+g8FFnzjgeJ/AqAGOEWn6tgAHo=
github.com/aws/aws-sdk-go v1.54.15/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
Expand Down Expand Up @@ -1110,27 +1109,22 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down
6 changes: 4 additions & 2 deletions integration-tests/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var chains Chains

// flag variables.
var (
ctx context.Context
coreumCfg CoreumChainConfig
xrplCfg XRPLChainConfig
bridgeCfg BridgeConfig
Expand All @@ -43,6 +44,7 @@ func init() {
flag.StringVar(&bridgeCfg.ContractAddress, "contract-address", "devcore14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sd4f0ak", "Smart contract address of the bridge (znet)")
flag.StringVar(&bridgeCfg.OwnerMnemonic, "owner-mnemonic", "analyst evil lucky job exhaust inform note where grant file already exit vibrant come finger spatial absorb enter aisle orange soldier false attend response", "Smart contract owner of the bridge (znet)")

ctx = context.Background()
// accept testing flags
testing.Init()
// parse additional flags
Expand All @@ -61,7 +63,7 @@ func init() {
if err != nil {
panic(errors.Wrapf(err, "failed to init coreum chain"))
}
coreumChain.Chain.ClientContext = coreumChain.Chain.ClientContext.WithCodec(coreumChain.Chain.EncodingConfig.Codec)
coreumChain.ClientContext = coreumChain.ClientContext.WithCodec(coreumChain.EncodingConfig.Codec)
chains.Coreum = coreumChain

xrplChain, err := NewXRPLChain(xrplCfg, chains.Log)
Expand All @@ -73,7 +75,7 @@ func init() {

// NewTestingContext returns the configured coreum and xrpl chains and new context for the integration tests.
func NewTestingContext(t *testing.T) (context.Context, Chains) {
testCtx, testCtxCancel := context.WithTimeout(context.Background(), 30*time.Minute)
testCtx, testCtxCancel := context.WithTimeout(ctx, 30*time.Minute)
t.Cleanup(func() {
require.NoError(t, testCtx.Err())
testCtxCancel()
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/processes/sending_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func TestSendXRPLOriginatedTokensFromXRPLToCoreumAndBack(t *testing.T) {
require.NoError(t, err)
require.Len(t, fees, 1)
expectedFees := bridgingFee.MulRaw(5).QuoRaw(int64(envCfg.RelayersCount))
require.EqualValues(t, expectedFees.String(), fees.AmountOf(registeredXRPLToken.CoreumDenom).String())
require.Equal(t, expectedFees.String(), fees.AmountOf(registeredXRPLToken.CoreumDenom).String())
}
}

Expand Down
6 changes: 3 additions & 3 deletions integration-tests/processes/tickets_allocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestTicketsReAllocationByTheXRPLTokenRegistration(t *testing.T) {
require.NoError(t, err)
require.Len(t, availableTicketsAfterReallocation, int(envCfg.UsedTicketSequenceThreshold))
// check that tickets are used
require.NotEqualValues(t, initialAvailableTickets, availableTicketsAfterReallocation)
require.NotEqual(t, initialAvailableTickets, availableTicketsAfterReallocation)

// use re-allocated tickets
for range numberOfXRPLTokensToRegister {
Expand All @@ -245,8 +245,8 @@ func TestTicketsReAllocationByTheXRPLTokenRegistration(t *testing.T) {
runnerEnv.AwaitNoPendingOperations(ctx, t)
availableTicketsAfterSecondReallocation, err := runnerEnv.ContractClient.GetAvailableTickets(ctx)
require.NoError(t, err)
require.NotEqualValues(t, initialAvailableTickets, availableTicketsAfterSecondReallocation)
require.NotEqualValues(t, availableTicketsAfterReallocation, availableTicketsAfterSecondReallocation)
require.NotEqual(t, initialAvailableTickets, availableTicketsAfterSecondReallocation)
require.NotEqual(t, availableTicketsAfterReallocation, availableTicketsAfterSecondReallocation)
}

func TestSendXRPLOriginatedTokenFromXRPLToCoreumWithTicketsReallocation(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/stress/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func NewEnv(t *testing.T, cfg EnvConfig) *Env {
)

// import contract owner mnemonic
contractOwner := chains.Coreum.ChainContext.ImportMnemonic(bridgeCfg.OwnerMnemonic)
contractOwner := chains.Coreum.ImportMnemonic(bridgeCfg.OwnerMnemonic)

return &Env{
Cfg: cfg,
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/stress/stress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestStress(t *testing.T) {
envCfg := DefaultEnvConfig()
env := NewEnv(t, envCfg)

ctx, cancel := context.WithTimeout(context.Background(), envCfg.TestTimeout)
ctx, cancel := context.WithTimeout(t.Context(), envCfg.TestTimeout)
t.Cleanup(cancel)

type testCase struct {
Expand Down
16 changes: 8 additions & 8 deletions integration-tests/xrpl/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func TestCreateAndUseTicketForPaymentAndTicketsCreation(t *testing.T) {
}
chains.XRPL.AutoFillTx(ctx, t, &createTicketsTx, senderAcc)
// reset sequence and add ticket
createTicketsTx.TxBase.Sequence = 0
createTicketsTx.Sequence = 0
createTicketsTx.TicketSequence = createdTickets[0].TicketSequence
require.NoError(t, chains.XRPL.SignAndSubmitTx(ctx, t, &createTicketsTx, senderAcc))

Expand All @@ -272,7 +272,7 @@ func TestCreateAndUseTicketForPaymentAndTicketsCreation(t *testing.T) {
}
chains.XRPL.AutoFillTx(ctx, t, &xrpPaymentTx, senderAcc)
// reset sequence and add ticket
xrpPaymentTx.TxBase.Sequence = 0
xrpPaymentTx.Sequence = 0
xrpPaymentTx.TicketSequence = createdTickets[0].TicketSequence

t.Logf("Recipient account balance before: %s", chains.XRPL.GetAccountBalances(ctx, t, recipientAcc))
Expand Down Expand Up @@ -300,7 +300,7 @@ func TestCreateAndUseTicketForPaymentAndTicketsCreation(t *testing.T) {
}
chains.XRPL.AutoFillTx(ctx, t, &fooPaymentTx, senderAcc)
// reset sequence and add ticket
fooPaymentTx.TxBase.Sequence = 0
fooPaymentTx.Sequence = 0
fooPaymentTx.TicketSequence = ticketForFailingTx
// there is no trust set so the tx should fail and use the ticket
require.ErrorContains(
Expand All @@ -319,7 +319,7 @@ func TestCreateAndUseTicketForPaymentAndTicketsCreation(t *testing.T) {
}
chains.XRPL.AutoFillTx(ctx, t, &xrpPaymentTx, senderAcc)
// reset sequence and add ticket
xrpPaymentTx.TxBase.Sequence = 0
xrpPaymentTx.Sequence = 0
xrpPaymentTx.TicketSequence = ticketForFailingTx
// the ticket is used in prev failed transaction so can't be used here
require.ErrorContains(t, chains.XRPL.SignAndSubmitTx(ctx, t, &fooPaymentTx, senderAcc), "Ticket is not in ledger")
Expand Down Expand Up @@ -1031,7 +1031,7 @@ func TestXRPLClawback(t *testing.T) {
require.NoError(t, chains.XRPL.AutoFillSignAndSubmitTx(ctx, t, &clawbackTx, issuerClawbackAcc))
balancesAfter = chains.XRPL.GetAccountBalances(ctx, t, recipientAcc)
t.Logf("Recipient account balances after: %s", balancesAfter)
require.True(t, balancesAfter[currencyIssuerClawbackKey].Value.IsZero())
require.True(t, balancesAfter[currencyIssuerClawbackKey].IsZero())

// try to do the clawback after the issuance
fooNoClawbackCurrencyTrustSetTx := rippledata.TrustSet{
Expand Down Expand Up @@ -1116,7 +1116,7 @@ func buildXrpPaymentTxForMultiSigning(
}
xrplChain.AutoFillTx(ctx, t, &tx, from)
// important for the multi-signing
tx.TxBase.SigningPubKey = &rippledata.PublicKey{}
tx.SigningPubKey = &rippledata.PublicKey{}

return tx
}
Expand Down Expand Up @@ -1148,7 +1148,7 @@ func buildCreateTicketsTxForMultiSigning(
tx.TicketSequence = ticketSeq
}
// important for the multi-signing
tx.TxBase.SigningPubKey = &rippledata.PublicKey{}
tx.SigningPubKey = &rippledata.PublicKey{}

return tx
}
Expand Down Expand Up @@ -1179,7 +1179,7 @@ func buildUpdateSignerListSetTxForMultiSigning(
}
xrplChain.AutoFillTx(ctx, t, &tx, from)
// important for the multi-signing
tx.TxBase.SigningPubKey = &rippledata.PublicKey{}
tx.SigningPubKey = &rippledata.PublicKey{}

if ticketSeq != nil {
tx.Sequence = 0
Expand Down
Loading