Some checks failed
CodeQL / Analyze (push) Waiting to run
golangci-lint / lint (push) Waiting to run
Tests / Code Coverage / build (amd64) (push) Waiting to run
Tests / Code Coverage / build (arm64) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[additional-args:-tags="test_e2e" name:e2e path:./e2e]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:08-wasm path:./modules/light-clients/08-wasm]) (push) Waiting to run
Tests / Code Coverage / unit-tests (map[name:ibc-go path:.]) (push) Waiting to run
Docker Build & Push Simapp (main) / docker-build (push) Has been cancelled
79 lines
2.6 KiB
Go
79 lines
2.6 KiB
Go
/*
|
|
This file contains the variables, constants, and default values
|
|
used in the testing package and commonly defined in tests.
|
|
*/
|
|
package ibctesting
|
|
|
|
import (
|
|
"time"
|
|
|
|
sdkmath "cosmossdk.io/math"
|
|
|
|
sdk "git.cw.tr/mukan-network/mukan-sdk/types"
|
|
|
|
"git.cw.tr/mukan-network/mukan-consensus/crypto/tmhash"
|
|
|
|
ibctransfertypes "git.cw.tr/mukan-network/mukan-ibc/modules/apps/transfer/types"
|
|
connectiontypes "git.cw.tr/mukan-network/mukan-ibc/modules/core/03-connection/types"
|
|
commitmenttypes "git.cw.tr/mukan-network/mukan-ibc/modules/core/23-commitment/types"
|
|
ibctm "git.cw.tr/mukan-network/mukan-ibc/modules/light-clients/07-tendermint"
|
|
"git.cw.tr/mukan-network/mukan-ibc/testing/mock"
|
|
)
|
|
|
|
const (
|
|
FirstClientID = "07-tendermint-0"
|
|
SecondClientID = "07-tendermint-1"
|
|
FirstChannelID = "channel-0"
|
|
SecondChannelID = "channel-1"
|
|
FirstConnectionID = "connection-0"
|
|
SecondConnectionID = "connection-1"
|
|
|
|
// Default params constants used to create a TM client
|
|
TrustingPeriod time.Duration = time.Hour * 24 * 7 * 2
|
|
UnbondingPeriod time.Duration = time.Hour * 24 * 7 * 3
|
|
MaxClockDrift time.Duration = time.Second * 10
|
|
DefaultDelayPeriod uint64 = 0
|
|
|
|
DefaultChannelVersion = mock.Version
|
|
InvalidID = "IDisInvalid"
|
|
|
|
// Application Ports
|
|
TransferPort = ibctransfertypes.ModuleName
|
|
MockPort = mock.ModuleName
|
|
|
|
// used for testing proposals
|
|
Title = "title"
|
|
Description = "description"
|
|
|
|
// character set used for generating a random string in GenerateString
|
|
charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
)
|
|
|
|
var (
|
|
DefaultOpenInitVersion *connectiontypes.Version
|
|
|
|
// DefaultTrustLevel sets params variables used to create a TM client
|
|
DefaultTrustLevel = ibctm.DefaultTrustLevel
|
|
|
|
DefaultTimeoutTimestampDelta = uint64(time.Hour.Nanoseconds())
|
|
DefaultCoinAmount = sdkmath.NewInt(100)
|
|
|
|
TestAccAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs"
|
|
TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, DefaultCoinAmount)
|
|
SecondaryDenom = "ufoo"
|
|
SecondaryTestCoin = sdk.NewCoin(SecondaryDenom, DefaultCoinAmount)
|
|
TestCoins = sdk.NewCoins(TestCoin, SecondaryTestCoin)
|
|
|
|
UpgradePath = []string{"upgrade", "upgradedIBCState"}
|
|
|
|
ConnectionVersion = connectiontypes.GetCompatibleVersions()[0]
|
|
|
|
MockAcknowledgement = mock.MockAcknowledgement.Acknowledgement()
|
|
MockPacketData = mock.MockPacketData
|
|
MockFailPacketData = mock.MockFailPacketData
|
|
|
|
prefix = commitmenttypes.NewMerklePrefix([]byte("ibc"))
|
|
// unusedHash is a placeholder hash used for testing.
|
|
unusedHash = tmhash.Sum([]byte{0x00})
|
|
MerklePath = commitmenttypes.NewMerklePath([]byte("ibc"), []byte(""))
|
|
)
|