Documentation
¶
Index ¶
- Variables
- func BlacklistAccount(t *testing.T, ctx context.Context, val *cosmos.ChainNode, ...)
- func ConfigureMinter(t *testing.T, ctx context.Context, val *cosmos.ChainNode, ...)
- func GhcrImage(version string) ibc.DockerImage
- func ICAAddress(ctx context.Context, controller *cosmos.CosmosChain, address string, ...) (string, error)
- func NobleChainSpec(ctx context.Context, nw *NobleWrapper, chainID string, ...) *interchaintest.ChainSpec
- func NobleEncoding() *testutil.TestEncodingConfig
- func PauseFiatTF(t *testing.T, ctx context.Context, val *cosmos.ChainNode, pauser ibc.Wallet)
- func RegisterICAAccount(ctx context.Context, icaTs *ICATestSuite) (string, error)
- func SendICATx(ctx context.Context, icaTs *ICATestSuite) error
- func SetupMinterAndController(t *testing.T, ctx context.Context, noble *cosmos.CosmosChain, ...) (minter ibc.Wallet, minterController ibc.Wallet)
- func ShowBlacklisted(ctx context.Context, val *cosmos.ChainNode, blacklistedWallet ibc.Wallet) (fiattokenfactorytypes.QueryGetBlacklistedResponse, error)
- func ShowBlacklister(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetBlacklisterResponse, error)
- func ShowMasterMinter(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetMasterMinterResponse, error)
- func ShowMinterController(ctx context.Context, val *cosmos.ChainNode, minterController ibc.Wallet) (fiattokenfactorytypes.QueryGetMinterControllerResponse, error)
- func ShowMinters(ctx context.Context, val *cosmos.ChainNode, minter ibc.Wallet) (fiattokenfactorytypes.QueryGetMintersResponse, error)
- func ShowOwner(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetOwnerResponse, error)
- func ShowPaused(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetPausedResponse, error)
- func ShowPauser(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetPauserResponse, error)
- func SimdEncoding() *testutil.TestEncodingConfig
- func TestChainUpgrade(t *testing.T, genesisVersion string, upgrades []ChainUpgrade, testICA bool)
- func UnblacklistAccount(t *testing.T, ctx context.Context, val *cosmos.ChainNode, ...)
- func UnpauseFiatTF(t *testing.T, ctx context.Context, val *cosmos.ChainNode, pauser ibc.Wallet)
- type CCTPRoles
- type ChainUpgrade
- type FiatTfRoles
- type ICAAddressResponse
- type ICATestSuite
- type NobleWrapper
Constants ¶
This section is empty.
Variables ¶
var ( LocalImages = []ibc.DockerImage{ { Repository: "noble", Version: "local", UIDGID: "1025:1025", }, } DenomMetadataUsdc = banktypes.Metadata{ Description: "USD Coin", DenomUnits: []*banktypes.DenomUnit{ { Denom: "uusdc", Exponent: 0, Aliases: []string{ "microusdc", }, }, { Denom: "usdc", Exponent: 6, Aliases: []string{}, }, }, Base: "uusdc", Display: "usdc", Name: "usdc", Symbol: "USDC", } )
Functions ¶
func BlacklistAccount ¶
func BlacklistAccount(t *testing.T, ctx context.Context, val *cosmos.ChainNode, blacklister ibc.Wallet, toBlacklist ibc.Wallet)
BlacklistAccount blacklists an account and then runs the `show-blacklisted` query to ensure the account was successfully blacklisted on chain
func ConfigureMinter ¶
func ConfigureMinter(t *testing.T, ctx context.Context, val *cosmos.ChainNode, minterController, minter ibc.Wallet, allowance int64)
ConfigureMinter configures a minter with a specified allowance of `uusdc`. It then runs the `show-minters` query to ensure the minter was properly configured
func GhcrImage ¶
func GhcrImage(version string) ibc.DockerImage
func ICAAddress ¶
func ICAAddress( ctx context.Context, controller *cosmos.CosmosChain, address string, connectionID string, ) (string, error)
ICAAddress attempts to query the address of a registered interchain account on a controller chain for a given address and connection ID.
func NobleChainSpec ¶
func NobleChainSpec( ctx context.Context, nw *NobleWrapper, chainID string, version []ibc.DockerImage, nv, nf int, setupAllCircleRoles bool, ) *interchaintest.ChainSpec
func NobleEncoding ¶
func NobleEncoding() *testutil.TestEncodingConfig
func PauseFiatTF ¶
PauseFiatTF pauses the fiat tokenfactory. It then runs the `show-paused` query to ensure the the tokenfactory was successfully paused
func RegisterICAAccount ¶
func RegisterICAAccount(ctx context.Context, icaTs *ICATestSuite) (string, error)
RegisterICAAccount attempts to register a new interchain account on a host chain via a controller chain.
func SendICATx ¶
func SendICATx(ctx context.Context, icaTs *ICATestSuite) error
SendICATx attempts to serialize a slice of sdk.Msg and generate interchain account packet data, using the specified encoding, before attempting to send an ICA tx via the controller module.
func SetupMinterAndController ¶
func SetupMinterAndController(t *testing.T, ctx context.Context, noble *cosmos.CosmosChain, val *cosmos.ChainNode, masterMinter ibc.Wallet, allowance int64) (minter ibc.Wallet, minterController ibc.Wallet)
SetupMinterAndController creates a minter controller and minter. It also sets up a minter with an specified allowance of `uusdc`
func ShowBlacklisted ¶
func ShowBlacklisted(ctx context.Context, val *cosmos.ChainNode, blacklistedWallet ibc.Wallet) (fiattokenfactorytypes.QueryGetBlacklistedResponse, error)
ShowBlacklisted queries for a specific blacklisted address by running: `query fiat-tokenfactory show-blacklisted <address>`. An error is returned if the address is not blacklisted
func ShowBlacklister ¶
func ShowBlacklister(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetBlacklisterResponse, error)
ShowBlacklister queries for the token factory Blacklister by running: `query fiat-tokenfactory show-blacklister`.
func ShowMasterMinter ¶
func ShowMasterMinter(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetMasterMinterResponse, error)
ShowMasterMinter queries for the token factory Master Minter by running: `query fiat-tokenfactory show-master-minter`.
func ShowMinterController ¶
func ShowMinterController(ctx context.Context, val *cosmos.ChainNode, minterController ibc.Wallet) (fiattokenfactorytypes.QueryGetMinterControllerResponse, error)
ShowMinterController queries for a specific minter controller by running: `query fiat-tokenfactory show-minter-controller <address>`. An error is returned if the minter controller does not exist
func ShowMinters ¶
func ShowMinters(ctx context.Context, val *cosmos.ChainNode, minter ibc.Wallet) (fiattokenfactorytypes.QueryGetMintersResponse, error)
ShowMinters queries for a specific minter by running: `query fiat-tokenfactory show-minters <address>`. An error is returned if the minter does not exist
func ShowOwner ¶
func ShowOwner(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetOwnerResponse, error)
ShowOwner queries for the token factory Owner by running: `query fiat-tokenfactory show-owner`.
func ShowPaused ¶
func ShowPaused(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetPausedResponse, error)
ShowPaused queries the paused state of the token factory by running: `query fiat-tokenfactory show-paused`.
func ShowPauser ¶
func ShowPauser(ctx context.Context, val *cosmos.ChainNode) (fiattokenfactorytypes.QueryGetPauserResponse, error)
ShowPauser queries for the token factory Pauser by running: `query fiat-tokenfactory show-pauser`.
func SimdEncoding ¶
func SimdEncoding() *testutil.TestEncodingConfig
func TestChainUpgrade ¶
func TestChainUpgrade( t *testing.T, genesisVersion string, upgrades []ChainUpgrade, testICA bool, )
func UnblacklistAccount ¶
func UnblacklistAccount(t *testing.T, ctx context.Context, val *cosmos.ChainNode, blacklister ibc.Wallet, unBlacklist ibc.Wallet)
UnblacklistAccount unblacklists an account and then runs the `show-blacklisted` query to ensure the account was successfully unblacklisted on chain
Types ¶
type ChainUpgrade ¶
type ChainUpgrade struct { Image ibc.DockerImage UpgradeName string // if upgradeName is empty, assumes patch/rolling update Emergency bool PreUpgrade func(t *testing.T, ctx context.Context, noble *cosmos.CosmosChain, authority ibc.Wallet, icaTs *ICATestSuite) PostUpgrade func(t *testing.T, ctx context.Context, noble *cosmos.CosmosChain, authority ibc.Wallet, icaTs *ICATestSuite) }
type FiatTfRoles ¶
type ICAAddressResponse ¶
type ICAAddressResponse struct {
Address string `json:"address"`
}
ICAAddressResponse represents the response from querying an interchain account via the controller module.
type ICATestSuite ¶
type ICATestSuite struct { Host *cosmos.CosmosChain Controller *cosmos.CosmosChain Relayer ibc.Relayer Rep *testreporter.RelayerExecReporter OwnerAddress string IcaAddress string InitBal math.Int HostConnectionID string ControllerConnectionID string Encoding string Msgs []sdk.Msg TxMemo string }
ICATestSuite is used to test interchain accounts. The IcaAddress field is initially an empty string, after initializing the ICA account you must update the field with the corresponding value if you need to send ICA txs in later test logic.
type NobleWrapper ¶
type NobleWrapper struct { Chain *cosmos.CosmosChain FiatTfRoles FiatTfRoles CCTPRoles CCTPRoles Authority ibc.Wallet }
func NobleSpinUp ¶
func NobleSpinUp(t *testing.T, ctx context.Context, version []ibc.DockerImage, setupAllCircleRoles bool) (nw NobleWrapper, client *client.Client)
NobleSpinUp starts noble chain
setupAllCircleRoles: if true, all Tokenfactory and CCTP roles will be created and setup at genesis, if false, only the Owner role will be created
func NobleSpinUpIBC ¶
func NobleSpinUpIBC(t *testing.T, ctx context.Context, version []ibc.DockerImage, setupAllCircleRoles bool) ( nw NobleWrapper, ibcSimd *cosmos.CosmosChain, rf interchaintest.RelayerFactory, r ibc.Relayer, ibcPathName string, rep *testreporter.Reporter, eRep *testreporter.RelayerExecReporter, client *client.Client, network string, )
NobleSpinUpIBC is the same as nobleSpinUp but it also spins up a ibcSimd chain and creates an IBC path between them
setupAllCircleRoles: if true, all Tokenfactory and CCTP roles will be created and setup at genesis, if false, only the Owner role will be created