app

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 124 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bech32Chars        = "qpzry9x8gf2tvdw0s3jn54khce6mua7l"
	AddrDataLength     = 32
	WasmAddrDataLength = 52
	MaxAddrDataLength  = 100
	AddrChecksumLength = 6

	AccAddressPrefix  = ""
	ValAddressPrefix  = "valoper"
	ConsAddressPrefix = "valcons"

	FlagGenesisTime = "genesis-time"

	ModuleAccount            = "/cosmos.auth.v1beta1.ModuleAccount"
	BaseAccount              = "/cosmos.auth.v1beta1.BaseAccount"
	DelayedVestingAccount    = "/cosmos.vesting.v1beta1.DelayedVestingAccount"
	ContinuousVestingAccount = "/cosmos.vesting.v1beta1.ContinuousVestingAccount"
	PermanentLockedAccount   = "/cosmos.vesting.v1beta1.PermanentLockedAccount"
	PeriodicVestingAccount   = "/cosmos.vesting.v1beta1.PeriodicVestingAccount"

	UnspecifiedBondStatus = "BOND_STATUS_UNSPECIFIED"
	UnbondedStatus        = "BOND_STATUS_UNBONDED"
	UnbondingStatus       = "BOND_STATUS_UNBONDING"
	BondedStatus          = "BOND_STATUS_BONDED"

	// Modules with balance
	BondedPoolAccName    = "bonded_tokens_pool"
	NotBondedPoolAccName = "not_bonded_tokens_pool"
	GravityAccName       = "gravity"
	DistributionAccName  = "distribution"

	// Modules without balance
	MintAccName         = "cudoMint"
	GovAccName          = "gov"
	MarketplaceAccName  = "marketplace"
	FeeCollectorAccName = "fee_collector"

	RecursionDepthLimit = 50
)
View Source
const (
	AccountAddressPrefix = "fetch"
)
View Source
const Name = "fetchd"

Variables

View Source
var (
	// ProposalsEnabled controls x/wasm Proposals
	// If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals.
	// If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals.
	ProposalsEnabled = "false"
	// EnableSpecificProposals allows to enable only specific x/wasm proposals
	// If set to non-empty string it must be comma-separated list of values that are all a subset
	// of "EnableAllProposals" (takes precedence over ProposalsEnabled)
	// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
	EnableSpecificProposals = ""
)
View Source
var (
	AccountPubKeyPrefix    = AccountAddressPrefix + "pub"
	ValidatorAddressPrefix = AccountAddressPrefix + "valoper"
	ValidatorPubKeyPrefix  = AccountAddressPrefix + "valoperpub"
	ConsNodeAddressPrefix  = AccountAddressPrefix + "valcons"
	ConsNodePubKeyPrefix   = AccountAddressPrefix + "valconspub"
)
View Source
var (
	DefaultMaxToleratedRemainingDistributionBalance, _ = sdk.NewIntFromString("1000000000000000000")
	DefaultMaxToleratedRemainingStakingBalance, _      = sdk.NewIntFromString("100000000")
	DefaultMaxToleratedRemainingMintBalance, _         = sdk.NewIntFromString("100000000")
)
View Source
var NetworkInfos = map[string]NetworkConfig{
	"fetchhub-4": {
		ReconciliationInfo: &ReconciliationInfo{
			TargetAddress:   "fetch1tynmzk68pq6kzawqffrqdhquq475gw9ccmlf9gk24mxjjy6ugl3q70aeyd",
			InputCSVRecords: readInputReconciliationData(reconciliationData),
		},
		Contracts: &ContractSet{
			Reconciliation: &Reconciliation{
				Addr:     "fetch1tynmzk68pq6kzawqffrqdhquq475gw9ccmlf9gk24mxjjy6ugl3q70aeyd",
				NewAdmin: getStringPtr("fetch15p3rl5aavw9rtu86tna5lgxfkz67zzr6ed4yhw"),
				NewLabel: getStringPtr("reconciliation-contract"),
				NewContractVersion: &ContractVersion{
					CW2version: &CW2ContractVersion{
						Contract: "contract-fetch-reconciliation",
						Version:  "1.0.0",
					},
				},
			},
			Almanac: &ProdDevContract{
				ProdAddr: "fetch1mezzhfj7qgveewzwzdk6lz5sae4dunpmmsjr9u7z0tpmdsae8zmquq3y0y",
			},
			AName: &ProdDevContract{
				ProdAddr: "fetch1479lwv5vy8skute5cycuz727e55spkhxut0valrcm38x9caa2x8q99ef0q",
			},
			TokenBridge: &TokenBridge{
				Addr:     "fetch1qxxlalvsdjd07p07y3rc5fu6ll8k4tmetpha8n",
				NewAdmin: getStringPtr("fetch15p3rl5aavw9rtu86tna5lgxfkz67zzr6ed4yhw"),
			},
		},
		CudosMerge: &CudosMergeConfigJSON{
			IbcTargetAddr:                    "cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",
			RemainingStakingBalanceAddr:      "cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",
			RemainingGravityBalanceAddr:      "cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",
			RemainingDistributionBalanceAddr: "cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",
			ContractDestinationFallbackAddr:  "cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",
			GenericModuleRemainingBalance:    "cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",

			CommissionFetchAddr:          "fetch122j02czdt5ca8cf576wy2hassyxyx67wg5xmgc",
			ExtraSupplyFetchAddr:         "fetch122j02czdt5ca8cf576wy2hassyxyx67wg5xmgc",
			VestingCollisionDestAddr:     "fetch122j02czdt5ca8cf576wy2hassyxyx67wg5xmgc",
			CommunityPoolBalanceDestAddr: "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",

			VestingPeriod:    3 * 30 * 24 * 60 * 60,
			NewMaxValidators: 91,

			BalanceConversionConstants: []Pair[string, sdk.Dec]{
				{"acudos", newDec("118.344")},
			},

			TotalCudosSupply: newInt("10000000000000000000000000000"),

			TotalFetchSupplyToMint: newInt("88946755672000000000000000"),

			NotVestedAccounts: []string{
				"cudos1qqz5ezf9ylgft0eq97d66v5aakynux540ds9mv",
			},

			NotDelegatedAccounts: []string{
				"cudos1qx3yaanre054nlq84qdzufsjmrrxcqxwzdkh6c",
			},

			MovedAccounts: []BalanceMovement{
				BalanceMovement{"cudos1h6r6g0pwq7kcys5jcvfm9r7gcj3n2753hvk2ym", "cudos1w63ph9e4l07vpx7xdnje43cr2tlnr4jsfm4mvq", nil, ""},
				BalanceMovement{"cudos1jxyc7lny4q7te6sj5xyt9j86kyz82vlfdprl4a", "cudos1tfmkdzx9hm8g28vpgc3xhhxjjn460wzkwtayxr", nil, ""},
			},

			BackupValidators: []string{"fetchvaloper14w6a4al72uc3fpfy4lqtg0a7xtkx3w7hda0vel"},
			ValidatorsMap: []Pair[string, string]{
				{"cudosvaloper1s5qa3dpghnre6dqfgfhudxqjhwsv0mx43xayku", "fetchvaloper14w6a4al72uc3fpfy4lqtg0a7xtkx3w7hda0vel"},
				{"cudosvaloper1ctcrpuyumt60733u0yd5htwzedgfae0n8gql5n", "fetchvaloper14w6a4al72uc3fpfy4lqtg0a7xtkx3w7hda0vel"},
			},
		},
	},

	"dorado-1": {
		ReconciliationInfo: &ReconciliationInfo{
			TargetAddress:   "fetch1g5ur2wc5xnlc7sw9wd895lw7mmxz04r5syj3s6ew8md6pvwuweqqavkgt0",
			InputCSVRecords: readInputReconciliationData(reconciliationDataTestnet),
		},
		Contracts: &ContractSet{
			Reconciliation: &Reconciliation{
				Addr: "fetch1g5ur2wc5xnlc7sw9wd895lw7mmxz04r5syj3s6ew8md6pvwuweqqavkgt0",
				NewContractVersion: &ContractVersion{
					CW2version: &CW2ContractVersion{
						Contract: "contract-fetch-reconciliation",
						Version:  "1.0.0",
					},
				},
			},
			Almanac: &ProdDevContract{
				ProdAddr: "fetch1tjagw8g8nn4cwuw00cf0m5tl4l6wfw9c0ue507fhx9e3yrsck8zs0l3q4w",
				DevAddr:  "fetch135h26ys2nwqealykzey532gamw4l4s07aewpwc0cyd8z6m92vyhsplf0vp",
			},
			AName: &ProdDevContract{
				ProdAddr: "fetch1mxz8kn3l5ksaftx8a9pj9a6prpzk2uhxnqdkwuqvuh37tw80xu6qges77l",
				DevAddr:  "fetch1kewgfwxwtuxcnppr547wj6sd0e5fkckyp48dazsh89hll59epgpspmh0tn",
			},
		},
		CudosMerge: &CudosMergeConfigJSON{
			IbcTargetAddr:                    "cudos1c3qgr4df6u3awsz6rqwkxcpsef7aau7p23pew5",
			RemainingStakingBalanceAddr:      "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
			RemainingGravityBalanceAddr:      "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
			RemainingDistributionBalanceAddr: "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
			ContractDestinationFallbackAddr:  "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
			GenericModuleRemainingBalance:    "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",

			CommissionFetchAddr:          "fetch15p3rl5aavw9rtu86tna5lgxfkz67zzr6ed4yhw",
			ExtraSupplyFetchAddr:         "fetch1wp8fl6fl4je40cfh2reeyj6cvucve9s6antdav",
			VestingCollisionDestAddr:     "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
			CommunityPoolBalanceDestAddr: "cudos1dslwarknhfsw3pfjzxxf5mn28q3ewfectw0gta",

			VestingPeriod: 3 * 30 * 24 * 60 * 60,

			BalanceConversionConstants: []Pair[string, sdk.Dec]{
				{"acudos", newDec("266.629")}},

			TotalCudosSupply:       newInt("22530000000000000000000000000"),
			TotalFetchSupplyToMint: newInt("88946755672000000000000000"),

			NotVestedAccounts: []string{
				"cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
				"cudos15jpukx39rtkt8w3u3gzwwvyptdeyejcjade6he",
				"fetch15p3rl5aavw9rtu86tna5lgxfkz67zzr6ed4yhw",
			},

			NotDelegatedAccounts: []string{
				"cudos1dslwarknhfsw3pfjzxxf5mn28q3ewfectw0gta",
				"cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5",
				"cudos15jpukx39rtkt8w3u3gzwwvyptdeyejcjade6he",
			},

			MovedAccounts: []BalanceMovement{
				{"cudos196nrmandtwz67d8h4h0ux7amlcluecglx00wlw", "cudos1nj49l56x7sss5hqyvfmctxr3mq64whg273g3x5", newIntRef("10000"), ""},
				{"cudos1xcwjdw09cc9dyshr4gt5520sgsh582mjj03jge", "cudos1dslwarknhfsw3pfjzxxf5mn28q3ewfectw0gta", nil, ""},
				{"cudos1ejmf96efvjp6pmsaj8djv3gpmnsvmpnctger4v", "cudos15p3rl5aavw9rtu86tna5lgxfkz67zzr6tp4ltv", nil, ""},
			},

			BackupValidators: []string{"fetchvaloper1m9cjw6xgt04f9ddw25fff3cfe2exgwk07eu46u", "fetchvaloper122j02czdt5ca8cf576wy2hassyxyx67wdsecml"},
			ValidatorsMap: []Pair[string, string]{
				{"cudosvaloper1qr5rt72yf7s340azajpxay6hw3z5ldner7r4jv", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1vz78ezuzskf9fgnjkmeks75xum49hug6zeqfc4", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},

				{"cudosvaloper1n8lx8qac4d3gj63m4av29q755hy83kchzfkshd", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper16ndhv2a69jrwv32e0smpz6fy57kdsx36egshcm", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1vlpn2rne3vrms9gtjpwl2vfx2mky5dmv44rqqr", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1suxdyst8l9zw64rs8nd9yfygvlynjs7sqcqvfw", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1n738v30yvnge2cc3lq773d8vyvqj3rejnspa3r", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper15juh20tsfmx3ezustkn4ph7as67rcd5q4hv259", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1zsc3uv725d59t654t5vcmcflt2k68ahfvxqd6k", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1j9csyu6dptzwhrmv9fyhaw2hzw44mn5jjg60uz", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},

				{"cudosvaloper1hap6rg0kk0pgmew5vua99tm2ue96f8aahyw4zj", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1avnl53xv6kj7dk5u35jlk52vxwg95n9zlh3jl8", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper17594fddghhfjfwl634qj82tkqtq6wqt9x7aqea", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1zje9zjjx3k8u3g6d57daxq4q9wpsqqyfvzpu3c", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1r9nsfhl2ul5alytrqlsvynexg7563s9nxn3fjn", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1dslwarknhfsw3pfjzxxf5mn28q3ewfeckapf2q", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1kw3y4p2gc5u025wl2wwyek94yxwdcgj3nupvtj", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1pasz9ppwxggyty7fl5745c6lfqrs8g2shhs74e", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1tmtmme96cuj0fn94xg463dq3zjfy8ad0uxsc4u", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1wkd0e3zzamaa2xwawe5tvh80n0qzrcwj7pzgdq", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper10hpr2qpmmp3da7trujcezutx3vaenysruemsd7", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper134a4es94hjqqej732cymf0w3988zh3c4pqfy0s", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1n746qrg5ja87mfu9y6u0acwe20jz045uky99le", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper14rqsrn8mr2lcyzra2dy77emgurw00tlm4dxj8u", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1evkgaxd24y7n5cghgh6d4q9wcr8tuft8wlrv06", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper19hyhj7ace4r6uppv4ll7vh8mfzv4ed6x0dtl4l", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1tutujcdd40rcdjlmuuxtvqsyfspdr64ft6mnnv", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper16ksrhugywq8yewndp0thsceqwgcupjvras48xl", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1a08d0kwjgns5w09narc4zvfmp349dlch2j7j7x", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1zdhktkrjyye0vn877rg40unec0mele5e4uxrav", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1yvd9h3nhukllwdhzy6r48q82aq900nwf8wfdvt", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1g03p85mj85rzkntt5u5qzjw7k5hedwwz0xre4h", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1spx72c3lskj7jh4svauy7cnez4e7wf4zavegrv", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper16c50t6wwfagzcswdnmnk2f5ntdyrjsxyzjjgkf", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1uckrunvmqugrhem0hlu9r8j08x0uhufryc9mc6", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper17lkl2ce4ee440teswxr757kafyz3m9x655pq7g", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1y9ag39jrrdqq0wmadd7a49nqxzcnjr2qf48nze", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper12jk94gydmc20ygn68c6ly0cans3zytvx2svdwy", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1d0new9u2f80rcmmlw0zftxeh0385c2gwugrdx3", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper10ku077u0mfgj5pt8mla8hd4n0lw9yyqj7p68z0", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1esx247nhaal7epksdwh8zpa25vtjvy570lqa48", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1a0gdnlchyh5flrtqmvvpdcxf3tk5kgngtufwg3", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1zd6jfttjrh8rr6hkkce7v550wsrsx9lsc0w8sq", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1wvqepntffmqfzngujy24x6zue49u724twt5zlf", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1e57dml5afa2gy5wrv9wd0dhc7jsca6cdjkd9a4", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper19x6hxpuasshs80vy39j2kh2rcjhz0982wwz9r0", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1xgqr7pn80g6w398wzdmye3lu6wsgk32sq5zz89", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1f245xp5v3gg5cuwz4eg3j42mxhjyqhy0629nec", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1wyv883wzp84d7hzf3q2jeq3l43aga72td8spvs", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1sh38ackq0aquq9kd6s2dsfxm43vwpxgf98le9q", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1jxyc7lny4q7te6sj5xyt9j86kyz82vlfsjd75q", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1j5ssarsg0yqah4a3s0ejhkenlldg65mt0vpudr", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1ns848uhesnue734232srhgjf5vfyuhd4spt2kk", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1n7t5l7ck9slnnpl5pt0smua0p34qfhusv8rfsf", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper16n9r2nkg06ewuun9hmkt8c6urjsyv3ruee3ypj", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1706mmp25jy7s6xymdm9ar8pvny8eynwa8kxycp", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1x5wgh6vwye60wv3dtshs9dmqggwfx2ld0zt8n8", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1ayq6mrlk5neyuugv7u0wt2tn8zf7e6dxhp2cd2", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1a025fyry0gpk0c9sec00u938jvevvvjevp5a8e", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper18ygfl4ahy988k4skf6mat0ya8n3sj565qqufdf", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1gz2c6rkwf9quztvwynwr2hsa9lmldnjlu2ypxq", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1anrcmsms8l3rm0td3qspm375vf3pu329gjv3xx", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper17h6h89mm5jxhxjsqjlxths8g8f5xhw40ss4nfa", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1qx9agmqrruhhyhmdz4ncxdkl769fv7kc0xfk8c", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper1per8wmhqh9868j42v8a4rfmkdef5eymap2yde6", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1y4ye66cymhnl0pexpcja84ujcjjg0dr0gkjlw0", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper18mqn8vssedje6ux24apmpl5y8fsn7ajv2evdpk", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper125xd54s26aylmnys3ruh2yrtyw5p2wjfhqrgzt", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1sda6ngnryjv8lpqefpdqycl2ttg7gcspkf3tvc", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1nutnsjtxx37spn2juhgn046e6p324nx537eclp", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
				{"cudosvaloper16q3f9ech805pa995x9u5g3hqk0cvtah8mnaepp", "fetchvaloper1rsane988vksrgp2mlqzclmt8wucxv0ej4hrn2k"},
				{"cudosvaloper1mnc7gm9sazrmcfdkshhmx3f0s4n2wp94gavnng", "fetchvaloper1je7r8yuqgaf5f2tx4z2f9008wp4jx0ct6msnzg"},
				{"cudosvaloper1aqndlcfcyw3adhwe24gngnw7e8hy69v79jdh3l", "fetchvaloper1edqmkwy4rh87020rvf9xn7kktyu7x894led46w"},
			},
		},
	},
}
View Source
var ReconciliationRecords = map[string]*[][]string{
	"fetchhub-4":            readInputReconciliationData(reconciliationData),
	"fetchhub-cudos-test-4": readInputReconciliationData(reconciliationData),
	"dorado-1":              readInputReconciliationData(reconciliationDataTestnet),
}

Functions

func CalculateDelegationRewards added in v0.14.0

func CalculateDelegationRewards(blockHeight uint64, distributionInfo *DistributionInfo, val *ValidatorInfo, del *DelegationInfo, endingPeriod uint64) (rewards sdk.DecCoins, err error)

calculate the total rewards accrued by a delegation

func ConvertAddressPrefix added in v0.14.0

func ConvertAddressPrefix(addr string, newPrefix string) (string, error)

func CudosMergeUpgradeHandler added in v0.14.0

func CudosMergeUpgradeHandler(app *App, ctx sdk.Context, cudosCfg *CudosMergeConfig, genesisData *GenesisData, manifest *UpgradeManifest) error

func DoGenesisAccountMovements added in v0.14.0

func DoGenesisAccountMovements(genesisData *GenesisData, cudosCfg *CudosMergeConfig, manifest *UpgradeManifest) error

func DropHexPrefix added in v0.14.0

func DropHexPrefix(hexEncodedData string) string

func GenerateSHA256FromFile added in v0.14.0

func GenerateSHA256FromFile(filePath string) (string, error)

func GenerateSha256Hex added in v0.14.0

func GenerateSha256Hex(dataToVerify []byte) (actualHashHex string)

func GetAccPrefix added in v0.14.0

func GetAccPrefix(jsonData map[string]interface{}) (string, error)

func GetAddressByName added in v0.14.0

func GetAddressByName(genesisAccounts *OrderedMap[string, *AccountInfo], name string) (string, error)

func GetBondDenom added in v0.14.0

func GetBondDenom(jsonData map[string]interface{}) (string, error)

func GetEnabledProposals

func GetEnabledProposals() []wasm.ProposalType

GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func IterateValidatorSlashEventsBetween added in v0.14.0

func IterateValidatorSlashEventsBetween(distributionInfo *DistributionInfo, val string, startingHeight uint64, endingHeight uint64,
	handler func(height uint64, event *ValidatorSlashEvent) (stop bool, err error),
) error

iterate over slash events between heights, inclusive

func LoadAndParseMergeSourceInputFiles added in v0.14.0

func LoadAndParseMergeSourceInputFiles(app *App, ctx sdk.Context, manifest *UpgradeManifest) (*GenesisData, *NetworkConfig, error)

func LoadCudosGenesis added in v0.14.0

func LoadCudosGenesis(app *App, manifest *UpgradeManifest) (*map[string]interface{}, *tmtypes.GenesisDoc, error)

func MakeEncodingConfig added in v0.8.0

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func MigrateGenesisAccounts added in v0.14.0

func MigrateGenesisAccounts(genesisData *GenesisData, ctx sdk.Context, app *App, cudosCfg *CudosMergeConfig, manifest *UpgradeManifest) error

func NewAnteHandler added in v0.10.0

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

func ProcessSourceNetworkGenesis added in v0.14.0

func ProcessSourceNetworkGenesis(logger log.Logger, cudosCfg *CudosMergeConfig, genesisData *GenesisData, manifest *UpgradeManifest) error

func RegisterSwaggerAPI added in v0.8.4

func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

func RegisterVestingCollision added in v0.14.0

func RegisterVestingCollision(manifest *UpgradeManifest, originalAccount *AccountInfo, targetAccountFunds types.Coins, targetAccount authtypes.AccountI) error

func SaveManifest added in v0.14.0

func SaveManifest(app *App, manifest *UpgradeManifest, upgradeLabel string) error

func SaveManifestToPath added in v0.14.0

func SaveManifestToPath(manifest *UpgradeManifest, manifestFilePath string) error

func SetConfig added in v0.8.0

func SetConfig()

func UpdateValidatorData added in v0.14.0

func UpdateValidatorData(distributionInfo *DistributionInfo, val *ValidatorInfo) uint64

Code based on IncrementValidatorPeriod

func VerifyAddressPrefix added in v0.14.0

func VerifyAddressPrefix(addr string, expectedPrefix string) error

func VerifyConfig added in v0.14.0

func VerifyConfig(cudosCfg *CudosMergeConfig, sourceAddrPrefix string, DestAddrPrefix string) error

func VerifySha256 added in v0.14.0

func VerifySha256(dataToVerify []byte, expectedSha256Hex *string) (isVerified bool, actualHashHex string, err error)

Types

type AccountInfo added in v0.14.0

type AccountInfo struct {
	// Base
	Pubkey     cryptotypes.PubKey
	Address    string
	RawAddress sdk.AccAddress

	// Bank
	Balance sdk.Coins

	// Module
	Name string

	// BaseVesting
	EndTime         int64
	OriginalVesting sdk.Coins

	// ContinuousVesting
	StartTime int64

	// Custom
	AccountType AccountType
	Migrated    bool

	RawAccData map[string]interface{}
}

type AccountType added in v0.14.0

type AccountType string
const (
	BaseAccountType              AccountType = "base_acc"
	ModuleAccountType            AccountType = "module_acc"
	ContractAccountType          AccountType = "contract_acc"
	IBCAccountType               AccountType = "IBC_acc"
	DelayedVestingAccountType    AccountType = "delayed_vesting_acc"
	ContinuousVestingAccountType AccountType = "continuous_vesting_acc"
	PermanentLockedAccountType   AccountType = "permanent_locked_vesting_acc"
	PeriodicVestingAccountType   AccountType = "periodic_vesting_acc"
)

type App added in v0.8.0

type App struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper    authkeeper.AccountKeeper
	BankKeeper       bankkeeper.Keeper
	CapabilityKeeper *capabilitykeeper.Keeper
	StakingKeeper    stakingkeeper.Keeper
	SlashingKeeper   slashingkeeper.Keeper
	MintKeeper       mintkeeper.Keeper
	DistrKeeper      distrkeeper.Keeper
	GovKeeper        govkeeper.Keeper
	CrisisKeeper     crisiskeeper.Keeper
	UpgradeKeeper    upgradekeeper.Keeper
	ParamsKeeper     paramskeeper.Keeper
	AuthzKeeper      authzkeeper.Keeper
	EvidenceKeeper   evidencekeeper.Keeper
	FeeGrantKeeper   feegrantkeeper.Keeper
	IBCKeeper        *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	ICAHostKeeper    *icahostkeeper.Keeper
	TransferKeeper   *ibctransferkeeper.Keeper
	WasmKeeper       wasm.Keeper

	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper  capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper
	ScopedWasmKeeper     capabilitykeeper.ScopedKeeper
	// contains filtered or unexported fields
}

App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func New added in v0.8.0

func New(
	logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool,
	skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, cudosGenesisPath string, cudosMigrationConfigPath string, cudosGenesisSha256 string, cudosMigrationConfigSha256 string, encodingConfig appparams.EncodingConfig, enabledProposals []wasm.ProposalType,
	appOpts servertypes.AppOptions, wasmOpts []wasm.Option, baseAppOptions ...func(*baseapp.BaseApp),
) *App

New returns a reference to an initialized Gaia. NewSimApp returns a reference to an initialized SimApp.

func (*App) AppCodec added in v0.8.0

func (app *App) AppCodec() codec.Codec

AppCodec returns Gaia's app codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*App) BeginBlocker added in v0.8.0

func (app *App) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker application updates every begin block

func (*App) ChangeContractLabel added in v0.14.0

func (app *App) ChangeContractLabel(ctx types.Context, contractAddr *string, newLabel *string, manifest *UpgradeManifest) error

func (*App) ChangeContractLabels added in v0.14.0

func (app *App) ChangeContractLabels(ctx types.Context, networkInfo *NetworkConfig, manifest *UpgradeManifest) error

func (*App) ChangeContractVersion added in v0.14.0

func (app *App) ChangeContractVersion(ctx types.Context, contractAddr *string, newVersion *ContractVersion, manifest *UpgradeManifest) error

func (*App) ChangeContractVersions added in v0.14.0

func (app *App) ChangeContractVersions(ctx types.Context, networkInfo *NetworkConfig, manifest *UpgradeManifest) error

func (*App) DeleteContractState added in v0.14.0

func (app *App) DeleteContractState(ctx types.Context, contractAddr string, manifest *UpgradeManifest) error

func (*App) DeleteContractStates added in v0.14.0

func (app *App) DeleteContractStates(ctx types.Context, networkInfo *NetworkConfig, manifest *UpgradeManifest) error

func (*App) EndBlocker added in v0.8.0

func (app *App) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker application updates every end block

func (*App) ExportAppStateAndValidators added in v0.8.0

func (app *App) ExportAppStateAndValidators(
	forZeroHeight bool, jailAllowedAddrs []string,
) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*App) GetKey added in v0.8.0

func (app *App) GetKey(storeKey string) *sdk.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*App) GetMemKey added in v0.8.0

func (app *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*App) GetSubspace added in v0.8.0

func (app *App) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

NOTE: This is solely to be used for testing purposes.

func (*App) GetTKey added in v0.8.0

func (app *App) GetTKey(storeKey string) *sdk.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

NOTE: This is solely to be used for testing purposes.

func (*App) InitChainer added in v0.8.0

func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer application update at chain initialization

func (*App) InterfaceRegistry added in v0.8.0

func (app *App) InterfaceRegistry() types.InterfaceRegistry

InterfaceRegistry returns Gaia's InterfaceRegistry

func (*App) LegacyAmino added in v0.8.0

func (app *App) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns SimApp's amino codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*App) LoadHeight added in v0.8.0

func (app *App) LoadHeight(height int64) error

LoadHeight loads a particular height

func (*App) ModuleAccountAddrs added in v0.8.0

func (app *App) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*App) Name added in v0.8.0

func (app *App) Name() string

Name returns the name of the App

func (*App) ProcessReconciliation added in v0.14.0

func (app *App) ProcessReconciliation(ctx types.Context, networkInfo *NetworkConfig, manifest *UpgradeManifest) error

func (*App) RegisterAPIRoutes added in v0.8.0

func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*App) RegisterTendermintService added in v0.8.0

func (app *App) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*App) RegisterTxService added in v0.8.0

func (app *App) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*App) RegisterUpgradeHandlers added in v0.10.4

func (app *App) RegisterUpgradeHandlers(cfg module.Configurator)

func (*App) ReplaceReconciliationContractState added in v0.14.0

func (app *App) ReplaceReconciliationContractState(ctx types.Context, networkInfo *NetworkConfig, manifest *UpgradeManifest) error

func (*App) UpgradeContractAdmin added in v0.14.0

func (app *App) UpgradeContractAdmin(ctx types.Context, contractAddr *string, newAdmin *string, manifest *UpgradeManifest) error

func (*App) UpgradeContractAdmins added in v0.14.0

func (app *App) UpgradeContractAdmins(ctx types.Context, networkInfo *NetworkConfig, manifest *UpgradeManifest) error

func (*App) WithdrawReconciliationBalances added in v0.14.0

func (app *App) WithdrawReconciliationBalances(ctx types.Context, networkInfo *NetworkConfig, records [][]string, manifest *UpgradeManifest) error

type BalanceMovement added in v0.14.0

type BalanceMovement struct {
	SourceAddress      string   `json:"from"`
	DestinationAddress string   `json:"to"`
	Amount             *sdk.Int `json:"amount,omitempty"`
	Memo               string   `json:"memo,omitempty"`
}

type CW2ContractVersion added in v0.14.0

type CW2ContractVersion struct {
	Contract string `json:"contract"`
	Version  string `json:"version"`
}

type ContractInfo added in v0.14.0

type ContractInfo struct {
	Admin   string
	Creator string
}

type ContractSet added in v0.14.0

type ContractSet struct {
	Reconciliation *Reconciliation  `json:"reconciliation,omitempty"`
	TokenBridge    *TokenBridge     `json:"token_bridge,omitempty"`
	Almanac        *ProdDevContract `json:"almanac,omitempty"`
	AName          *ProdDevContract `json:"a_name,omitempty"`
}

type ContractValueUpdate added in v0.14.0

type ContractValueUpdate struct {
	Address string `json:"address"`
	From    string `json:"from"`
	To      string `json:"to"`
}

type ContractVersion added in v0.14.0

type ContractVersion struct {
	CW2version *CW2ContractVersion `json:"cw_2_version,omitempty"`
}

type ContractVersionUpdate added in v0.14.0

type ContractVersionUpdate struct {
	Address string              `json:"address"`
	From    *CW2ContractVersion `json:"from,omitempty"`
	To      *CW2ContractVersion `json:"to"`
}

type Contracts added in v0.14.0

type Contracts struct {
	StateCleaned   []string                `json:"contracts_state_cleaned,omitempty"`
	AdminUpdated   []ContractValueUpdate   `json:"contracts_admin_updated,omitempty"`
	LabelUpdated   []ContractValueUpdate   `json:"contracts_label_updated,omitempty"`
	VersionUpdated []ContractVersionUpdate `json:"version_updated,omitempty"`
}

type CosmosApp added in v0.8.0

type CosmosApp interface {
	// The assigned name of the app.
	Name() string

	// The application types codec.
	// NOTE: This shoult be sealed before being returned.
	LegacyAmino() *codec.LegacyAmino

	// Application updates every begin block.
	BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

	// Application updates every end block.
	EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

	// Application update at chain (i.e app) initialization.
	InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

	// Loads the app at a given height.
	LoadHeight(height int64) error

	// Exports the state of the application for a genesis file.
	ExportAppStateAndValidators(
		forZeroHeight bool, jailAllowedAddrs []string,
	) (types.ExportedApp, error)

	// All the registered module account addreses.
	ModuleAccountAddrs() map[string]bool
}

App implements the common methods for a Cosmos SDK-based application specific blockchain.

type CudosMergeConfig added in v0.14.0

type CudosMergeConfig struct {
	Config *CudosMergeConfigJSON

	BalanceConversionConstants *OrderedMap[string, sdk.Dec]

	NotVestedAccounts    *OrderedMap[string, bool]
	NotDelegatedAccounts *OrderedMap[string, bool]

	ValidatorsMap *OrderedMap[string, string]
}

func NewCudosMergeConfig added in v0.14.0

func NewCudosMergeConfig(config *CudosMergeConfigJSON) *CudosMergeConfig

type CudosMergeConfigJSON added in v0.14.0

type CudosMergeConfigJSON struct {
	IbcTargetAddr                    string `json:"ibc_target_addr"`                            // Cudos address
	RemainingStakingBalanceAddr      string `json:"remaining_staking_balance_addr"`             // Cudos account for remaining bonded and not-bonded pool balances
	RemainingGravityBalanceAddr      string `json:"remaining_gravity_balance_addr"`             // Cudos address
	RemainingDistributionBalanceAddr string `json:"remaining_distribution_balance_addr"`        // Cudos address
	ContractDestinationFallbackAddr  string `json:"contract_destination_fallback_addr"`         // Cudos address
	CommunityPoolBalanceDestAddr     string `json:"community_pool_balance_dest_addr,omitempty"` // Cudos address, funds are moved to destination chain community pool if not set
	GenericModuleRemainingBalance    string `json:"generic_module_remaining_balance"`           // Cudos address for all leftover funds remaining on module accounts after the processing

	CommissionFetchAddr      string `json:"commission_fetch_addr"`       // Fetch address for commission
	ExtraSupplyFetchAddr     string `json:"extra_supply_fetch_addr"`     // Fetch address for extra supply
	VestingCollisionDestAddr string `json:"vesting_collision_dest_addr"` // This gets converted to raw address, so it can be fetch or cudos address

	VestingPeriod    int64  `json:"vesting_period"`               // Vesting period
	NewMaxValidators uint32 `json:"new_max_validators,omitempty"` // Set new value for staking params max validators

	BalanceConversionConstants []Pair[string, sdk.Dec] `json:"balance_conversion_constants,omitempty"`

	TotalCudosSupply       sdk.Int `json:"total_cudos_supply"`
	TotalFetchSupplyToMint sdk.Int `json:"total_fetch_supply_to_mint"`

	NotVestedAccounts    []string          `json:"not_vested_accounts,omitempty"`
	NotDelegatedAccounts []string          `json:"not_delegated_accounts,omitempty"`
	MovedAccounts        []BalanceMovement `json:"moved_accounts,omitempty"`

	ValidatorsMap []Pair[string, string] `json:"validators_map,omitempty"`

	BackupValidators []string `json:"backup_validators,omitempty"`

	MaxToleratedRemainingDistributionBalance *sdk.Int `json:"max_remaining_distribution_module_balance,omitempty"`
	MaxToleratedRemainingStakingBalance      *sdk.Int `json:"max_remaining_staking_module_balance,omitempty"`
	MaxToleratedRemainingMintBalance         *sdk.Int `json:"max_remaining_mint_module_balance,omitempty"`
}

type DelegationInfo added in v0.14.0

type DelegationInfo struct {
	DelegatorAddress string
	Shares           sdk.Dec
}

type DelegatorStartingInfo added in v0.14.0

type DelegatorStartingInfo struct {
	// contains filtered or unexported fields
}

type DistributionInfo added in v0.14.0

type DistributionInfo struct {
	FeePool            *FeePool
	OutstandingRewards *OrderedMap[string, sdk.DecCoins]

	ValidatorAccumulatedCommissions *OrderedMap[string, sdk.DecCoins]                                    // validator_addr -> validator_accumulated_commissions
	ValidatorCurrentRewards         *OrderedMap[string, *ValidatorCurrentReward]                         // validator_addr -> validator_current_rewards
	ValidatorHistoricalRewards      *OrderedMap[string, *OrderedMap[uint64, *ValidatorHistoricalReward]] // validator_addr -> period -> validator_historical_reward

	DelegatorStartingInfos           *OrderedMap[string, *OrderedMap[string, *DelegatorStartingInfo]] // validator_addr -> delegator_addr -> starting_info
	DelegatorWithdrawInfos           *OrderedMap[string, string]                                      // delegator_address -> withdraw_address
	ValidatorSlashEvents             *OrderedMap[string, *OrderedMap[uint64, *ValidatorSlashEvent]]   // validator_address -> height -> validator_slash_event
	DistributionModuleAccountAddress string

	// Aggregated values
	Rewards          *OrderedMap[string, *OrderedMap[string, sdk.DecCoins]] // delegator_addr -> validator_addr -> reward
	ValidatorRewards *OrderedMap[string, sdk.DecCoins]                      // validator_addr -> validator_rewards
}

func (DistributionInfo) GetDelegatorWithdrawAddr added in v0.14.0

func (d DistributionInfo) GetDelegatorWithdrawAddr(delAddr string) string

get the delegator withdraw address, defaulting to the delegator address

type FeePool added in v0.14.0

type FeePool struct {
	CommunityPool sdk.DecCoins
}

type GenesisData added in v0.14.0

type GenesisData struct {
	TotalSupply sdk.Coins
	BlockHeight int64
	ChainId     string
	Prefix      string
	BondDenom   string

	Accounts             *OrderedMap[string, *AccountInfo]
	Contracts            *OrderedMap[string, *ContractInfo]
	IbcAccounts          *OrderedMap[string, *IBCInfo]
	Delegations          *OrderedMap[string, *OrderedMap[string, sdk.Int]]
	UnbondedDelegations  *OrderedMap[string, *OrderedMap[string, sdk.Int]]
	UnbondingDelegations *OrderedMap[string, *OrderedMap[string, sdk.Int]]

	Validators           *OrderedMap[string, *ValidatorInfo]
	BondedPoolAddress    string
	NotBondedPoolAddress string

	DistributionInfo *DistributionInfo

	GravityModuleAccountAddress string

	CollisionMap  *OrderedMap[string, string]
	MovedAccounts *OrderedMap[string, bool]
}

func ParseGenesisData added in v0.14.0

func ParseGenesisData(jsonData map[string]interface{}, genDoc *tmtypes.GenesisDoc, cudosCfg *CudosMergeConfig, manifest *UpgradeManifest) (*GenesisData, error)

type GenesisState

type GenesisState map[string]json.RawMessage

The genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

func NewDefaultGenesisState

func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState

NewDefaultGenesisState generates the default state for the application.

type HandlerOptions added in v0.10.0

type HandlerOptions struct {
	ante.HandlerOptions

	IBCKeeper         *ibckeeper.Keeper
	WasmConfig        *wasmTypes.WasmConfig
	TXCounterStoreKey sdk.StoreKey
}

HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.

type IBCInfo added in v0.14.0

type IBCInfo struct {
	// contains filtered or unexported fields
}

type IContractAdmin added in v0.14.0

type IContractAdmin interface {
	IContractBase
	GetNewAdminAddr() *string
}

type IContractBase added in v0.14.0

type IContractBase interface {
	GetPrimaryContractAddr() *string
	GetContracts(contracts []string) []string
}

type IContractLabel added in v0.14.0

type IContractLabel interface {
	IContractBase
	GetNewLabel() *string
}

type IContractVersion added in v0.14.0

type IContractVersion interface {
	IContractBase
	GetNewVersion() *ContractVersion
}

type NetworkConfig added in v0.14.0

type NetworkConfig struct {
	MergeSourceChainID string `json:"merge_source_chain_id"`
	DestinationChainID string `json:"destination_chain_id"`

	ReconciliationInfo *ReconciliationInfo   `json:"reconciliation_info,omitempty"`
	Contracts          *ContractSet          `json:"contracts,omitempty"`
	CudosMerge         *CudosMergeConfigJSON `json:"cudos_merge,omitempty"`
}

func LoadAndVerifyNetworkConfigFromFile added in v0.14.0

func LoadAndVerifyNetworkConfigFromFile(configFilePath string, expectedSha256Hex *string) (*NetworkConfig, error)

func LoadNetworkConfigFromFile added in v0.14.0

func LoadNetworkConfigFromFile(configFilePath string) (*NetworkConfig, *[]byte, error)

type OrderedMap added in v0.14.0

type OrderedMap[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewOrderedMap added in v0.14.0

func NewOrderedMap[K comparable, V any]() *OrderedMap[K, V]

NewOrderedMap creates a new OrderedMap empty instance

func NewOrderedMapFromPairs added in v0.14.0

func NewOrderedMapFromPairs[K comparable, V any](pairs []Pair[K, V]) *OrderedMap[K, V]

NewOrderedMapFromPairs creates an OrderedMap from the keys-value pairs

func NewOrderedSet added in v0.14.0

func NewOrderedSet[K comparable](keys []K) *OrderedMap[K, bool]

NewOrderedSet creates an OrderedMap with the keys set to true

func (*OrderedMap[K, V]) Delete added in v0.14.0

func (om *OrderedMap[K, V]) Delete(key K)

Delete removes a key-value pair from the map

func (*OrderedMap[K, V]) Get added in v0.14.0

func (om *OrderedMap[K, V]) Get(key K) (V, bool)

Get retrieves the value associated with the key

func (*OrderedMap[K, V]) GetOrSetDefault added in v0.14.0

func (om *OrderedMap[K, V]) GetOrSetDefault(key K, defaultValue V) (V, bool)

func (*OrderedMap[K, V]) Has added in v0.14.0

func (om *OrderedMap[K, V]) Has(key K) bool

func (*OrderedMap[K, V]) IsSorted added in v0.14.0

func (om *OrderedMap[K, V]) IsSorted() bool

IsSorted returns true *IF* order in the map is *still* sorted after calling `SortKeys(...)` method.

func (*OrderedMap[K, V]) Iterate added in v0.14.0

func (om *OrderedMap[K, V]) Iterate() <-chan Pair[K, V]

Iterate returns a channel that yields key-value pairs in insertion order

func (*OrderedMap[K, V]) Keys added in v0.14.0

func (om *OrderedMap[K, V]) Keys() []K

Keys returns the keys in insertion order

func (*OrderedMap[K, V]) MustGet added in v0.14.0

func (om *OrderedMap[K, V]) MustGet(key K) V

MustGet retrieves the value associated with the key, panics otherwise

func (*OrderedMap[K, V]) PrintOrdered added in v0.14.0

func (om *OrderedMap[K, V]) PrintOrdered()

PrintOrdered prints the map in current order

func (*OrderedMap[K, V]) Set added in v0.14.0

func (om *OrderedMap[K, V]) Set(key K, value V)

Set adds a key-value pair to the map

func (*OrderedMap[K, V]) SetNew added in v0.14.0

func (om *OrderedMap[K, V]) SetNew(key K, value V)

SetNew adds a key-value pair to the map - it must not exist before

func (*OrderedMap[K, V]) SortKeys added in v0.14.0

func (om *OrderedMap[K, V]) SortKeys(lessFunc func(i, j K) bool)

SortKeys sorts the keys in ascending order

type Pair added in v0.14.0

type Pair[K comparable, V any] struct {
	Key   K `json:"key"`
	Value V `json:"value"`
}

type ParamsChange added in v0.14.0

type ParamsChange[T any] struct {
	OriginalVal T `json:"original_val"`
	NewVal      T `json:"new_val"`
}

type ProdDevContract added in v0.14.0

type ProdDevContract struct {
	DevAddr  string `json:"dev_addr"`
	ProdAddr string `json:"prod_addr"`
}

func (*ProdDevContract) GetContracts added in v0.14.0

func (c *ProdDevContract) GetContracts(contracts []string) []string

type Reconciliation added in v0.14.0

type Reconciliation struct {
	Addr               string           `json:"addr"`
	NewAdmin           *string          `json:"new_admin,omitempty"`
	NewLabel           *string          `json:"new_label,omitempty"`
	NewContractVersion *ContractVersion `json:"new_contract_version,omitempty"`
}

func (*Reconciliation) GetContracts added in v0.14.0

func (c *Reconciliation) GetContracts(contracts []string) []string

func (*Reconciliation) GetNewAdminAddr added in v0.14.0

func (c *Reconciliation) GetNewAdminAddr() *string

func (*Reconciliation) GetNewLabel added in v0.14.0

func (c *Reconciliation) GetNewLabel() *string

func (*Reconciliation) GetNewVersion added in v0.14.0

func (c *Reconciliation) GetNewVersion() *ContractVersion

func (*Reconciliation) GetPrimaryContractAddr added in v0.14.0

func (c *Reconciliation) GetPrimaryContractAddr() *string

type ReconciliationContractStateRecord added in v0.14.0

type ReconciliationContractStateRecord struct {
	Paused bool `json:"paused"`
}

type ReconciliationInfo added in v0.14.0

type ReconciliationInfo struct {
	TargetAddress   string      `json:"target_address"`
	InputCSVRecords *[][]string `json:"input_csv_records,omitempty"`
}

type TokenBridge added in v0.14.0

type TokenBridge struct {
	Addr     string  `json:"addr"`
	NewAdmin *string `json:"new_admin,omitempty"`
}

func (*TokenBridge) GetContracts added in v0.14.0

func (c *TokenBridge) GetContracts(contracts []string) []string

func (*TokenBridge) GetNewAdminAddr added in v0.14.0

func (c *TokenBridge) GetNewAdminAddr() *string

func (*TokenBridge) GetPrimaryContractAddr added in v0.14.0

func (c *TokenBridge) GetPrimaryContractAddr() *string

type UnbondingDelegationEntry added in v0.14.0

type UnbondingDelegationEntry struct {
	Balance        sdk.Int
	InitialBalance sdk.Int
	CreationHeight uint64
	CompletionTime string
}

type UnbondingDelegationInfo added in v0.14.0

type UnbondingDelegationInfo struct {
	DelegatorAddress string
	Entries          []*UnbondingDelegationEntry
}

type UpgradeAccountCreation added in v0.14.0

type UpgradeAccountCreation struct {
	Address string `json:"address"`
	Reason  string `json:"reason"`
}

type UpgradeBalanceMovement added in v0.14.0

type UpgradeBalanceMovement struct {
	From          string      `json:"from"`
	To            string      `json:"to"`
	SourceBalance types.Coins `json:"source_balance,omitempty"`
	DestBalance   types.Coins `json:"dest_balance,omitempty"`
	Memo          string      `json:"memo,omitempty"`
}

type UpgradeBalances added in v0.14.0

type UpgradeBalances struct {
	Address                      string      `json:"address"`
	BankBalance                  types.Coins `json:"bank_balance"`
	VestedBalance                types.Coins `json:"vested_balance,omitempty"`
	BondedStakingBalancesAggr    types.Coins `json:"bonded_staking_balances_aggr,omitempty"`
	UnbondedStakingBalancesAggr  types.Coins `json:"unbonded_staking_balances_aggr,omitempty"`
	UnbondingStakingBalancesAggr types.Coins `json:"unbonding_staking_balances_aggr,omitempty"`
	DelegatorRewardsAggr         types.Coins `json:"delegator_rewards_aggr,omitempty"`
	ValidatorRewards             types.Coins `json:"validator_rewards,omitempty"`

	BondedStakingBalances    []ValidatorBalance `json:"bonded_staking_balances,omitempty"`
	UnbondedStakingBalances  []ValidatorBalance `json:"unbonded_staking_balances,omitempty"`
	UnbondingStakingBalances []ValidatorBalance `json:"unbonding_staking_balances,omitempty"`
	DelegatorRewards         []ValidatorBalance `json:"delegator_rewards,omitempty"`
}

type UpgradeCreatedAccounts added in v0.14.0

type UpgradeCreatedAccounts struct {
	Accounts          []UpgradeAccountCreation `json:"accounts,omitempty"`
	NumberOfCreations int                      `json:"number_of_creations"`
}

type UpgradeDelegate added in v0.14.0

type UpgradeDelegate struct {
	Delegations               []UpgradeDelegation `json:"delegation"`
	AggregatedDelegatedAmount *types.Int          `json:"aggregated_delegated_amount"`
	NumberOfDelegations       int                 `json:"number_of_delegations"`
}

type UpgradeDelegation added in v0.14.0

type UpgradeDelegation struct {
	OriginalValidator string    `json:"original_validator"`
	NewValidator      string    `json:"new_validator"`
	NewDelegator      string    `json:"new_delegator"`
	OriginalTokens    types.Int `json:"original_tokens"`
	NewTokens         types.Int `json:"new_tokens"`
	NewShares         types.Dec `json:"new_shares"`
}

type UpgradeDelegationMovements added in v0.14.0

type UpgradeDelegationMovements struct {
	From      string    `json:"from"`
	To        string    `json:"to"`
	Validator string    `json:"validator"`
	Tokens    types.Int `json:"tokens"`
	Memo      string    `json:"memo,omitempty"`
}

type UpgradeIBCTransfer added in v0.14.0

type UpgradeIBCTransfer struct {
	From      string      `json:"from"`
	ChannelID string      `json:"channel_id"`
	Amount    types.Coins `json:"amount"`
}

type UpgradeIBCTransfers added in v0.14.0

type UpgradeIBCTransfers struct {
	Transfers                   []UpgradeIBCTransfer `json:"transfer"`
	To                          string               `json:"to"`
	AggregatedTransferredAmount types.Coins          `json:"aggregated_transferred_amount"`
	NumberOfTransfers           int                  `json:"number_of_transfers"`
}

type UpgradeManifest added in v0.14.0

type UpgradeManifest struct {
	MovedBalances   []UpgradeBalances `json:"moved_balances,omitempty"`
	InitialBalances []UpgradeBalances `json:"initial_balances,omitempty"`

	// Following 2 hash data members are intentionally without `omitempty` parameter in `json:...` decorator
	GenesisFileSha256           string                `json:"genesis_file_sha256"`
	NetworkConfigFileSha256     string                `json:"network_config_file_sha256"`
	MergeSourceChainID          string                `json:"merge_source_chain_id"`
	DestinationChainID          string                `json:"destination_chain_id"`
	SourceChainBlockHeight      int64                 `json:"source_chain_block_height"`
	DestinationChainBlockHeight int64                 `json:"destination_chain_block_height"`
	GovProposalUpgradePlanName  string                `json:"gov_proposal_upgrade_plan_name"`
	MaxValidatorsChange         *ParamsChange[uint32] `json:"max_validators_change,omitempty"`

	Reconciliation     *UpgradeReconciliation     `json:"reconciliation,omitempty"`
	Contracts          *Contracts                 `json:"contracts,omitempty"`
	IBC                *UpgradeIBCTransfers       `json:"ibc,omitempty"`
	Migration          *UpgradeMigation           `json:"migration,omitempty"`
	MoveGenesisBalance *UpgradeMoveGenesisBalance `json:"move_genesis_balance,omitempty"`
	Delegate           *UpgradeDelegate           `json:"delegate,omitempty"`
	MoveMintedBalance  *UpgradeMoveMintedBalance  `json:"move_minted_balance,omitempty"`
	VestingCollision   *UpgradeVestingCollision   `json:"vesting_collision,omitempty"`
	MoveDelegations    *UpgradeMoveDelegations    `json:"move_delegation,omitempty"`
	CreatedAccounts    *UpgradeCreatedAccounts    `json:"created_accounts,omitempty"`
}

func LoadManifestFromPath added in v0.14.0

func LoadManifestFromPath(manifestFilePath string) (*UpgradeManifest, error)

func NewUpgradeManifest added in v0.14.0

func NewUpgradeManifest() *UpgradeManifest

type UpgradeMigation added in v0.14.0

type UpgradeMigation struct {
	Migrations               []UpgradeBalanceMovement `json:"migration"`
	AggregatedMigratedAmount types.Coins              `json:"aggregated_migrated_amount"`
	NumberOfMigrations       int                      `json:"number_of_migrations"`
}

type UpgradeMoveDelegations added in v0.14.0

type UpgradeMoveDelegations struct {
	Movements         []UpgradeDelegationMovements `json:"delegation_movements"`
	NumberOfMovements int                          `json:"number_of_movements"`
}

type UpgradeMoveGenesisBalance added in v0.14.0

type UpgradeMoveGenesisBalance struct {
	Movements             []UpgradeBalanceMovement `json:"movements"`
	AggregatedMovedAmount types.Coins              `json:"aggregated_moved_amount"`
	NumberOfMovements     int                      `json:"number_of_movements"`
}

type UpgradeMoveMintedBalance added in v0.14.0

type UpgradeMoveMintedBalance struct {
	Movements []UpgradeBalanceMovement `json:"movements"`
}

type UpgradeReconciliation added in v0.14.0

type UpgradeReconciliation struct {
	Transfers     *UpgradeReconciliationTransfers     `json:"transfers,omitempty"`
	ContractState *UpgradeReconciliationContractState `json:"contract_state,omitempty"`
}

type UpgradeReconciliationContractState added in v0.14.0

type UpgradeReconciliationContractState struct {
	Balances                 []UpgradeReconciliationContractStateBalanceRecord `json:"balances"`
	AggregatedBalancesAmount types.Coins                                       `json:"aggregated_balances_amount"`
	NumberOfBalanceRecords   int                                               `json:"number_of_balance_records"`
}

type UpgradeReconciliationContractStateBalanceRecord added in v0.14.0

type UpgradeReconciliationContractStateBalanceRecord struct {
	EthAddr  string      `json:"eth_addr"`
	Balances types.Coins `json:"balances"`
}

type UpgradeReconciliationTransfer added in v0.14.0

type UpgradeReconciliationTransfer struct {
	From    string      `json:"from"`
	EthAddr string      `json:"eth_addr"`
	Amount  types.Coins `json:"amount"`
}

type UpgradeReconciliationTransfers added in v0.14.0

type UpgradeReconciliationTransfers struct {
	Transfers                   []UpgradeReconciliationTransfer `json:"transfers"`
	To                          string                          `json:"to"`
	AggregatedTransferredAmount types.Coins                     `json:"aggregated_transferred_amount"`
	NumberOfTransfers           int                             `json:"number_of_transfers"`
}

type UpgradeVestingCollision added in v0.14.0

type UpgradeVestingCollision struct {
	Collisions         []VestingCollision `json:"collisions"`
	NumberOfCollisions int                `json:"number_of_collisions"`
}

type ValidatorBalance added in v0.14.0

type ValidatorBalance struct {
	Validator string      `json:"validator"`
	Balance   types.Coins `json:"balance"`
}

type ValidatorCurrentReward added in v0.14.0

type ValidatorCurrentReward struct {
	// contains filtered or unexported fields
}

type ValidatorHistoricalReward added in v0.14.0

type ValidatorHistoricalReward struct {
	// contains filtered or unexported fields
}

type ValidatorInfo added in v0.14.0

type ValidatorInfo struct {
	Stake                sdk.Int
	Shares               sdk.Dec
	Status               string
	OperatorAddress      string
	ConsensusPubkey      cryptotypes.PubKey
	Delegations          *OrderedMap[string, *DelegationInfo]
	UnbondingDelegations *OrderedMap[string, *UnbondingDelegationInfo]
}

func (ValidatorInfo) TokensFromShares added in v0.14.0

func (v ValidatorInfo) TokensFromShares(shares sdk.Dec) sdk.Dec

type ValidatorSlashEvent added in v0.14.0

type ValidatorSlashEvent struct {
	// contains filtered or unexported fields
}

type ValueUpdate added in v0.14.0

type ValueUpdate struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type VestingCollision added in v0.14.0

type VestingCollision struct {
	OriginalAccount      any         `json:"original_account"`
	OriginalAccountFunds types.Coins `json:"original_account_funds"`
	TargetAccount        any         `json:"target_account,omitempty"`
	TargetAccountFunds   types.Coins `json:"target_account_funds,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL