bindings

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSchedule added in v0.3.0

type AddSchedule struct {
	Name   string               `json:"name"`
	Period uint64               `json:"period"`
	Msgs   []MsgExecuteContract `json:"msgs"`
}

AddSchedule adds new schedule to the cron module

type AddScheduleResponse added in v0.3.0

type AddScheduleResponse struct{}

AddScheduleResponse holds response AddSchedule

type AdminProposal added in v0.2.0

type AdminProposal struct {
	ParamChangeProposal    *ParamChangeProposal    `json:"param_change_proposal,omitempty"`
	UpgradeProposal        *UpgradeProposal        `json:"upgrade_proposal,omitempty"`
	ClientUpdateProposal   *ClientUpdateProposal   `json:"client_update_proposal,omitempty"`
	ProposalExecuteMessage *ProposalExecuteMessage `json:"proposal_execute_message,omitempty"`
}

type BeforeSendHook added in v1.1.0

type BeforeSendHook struct {
	Denom string `json:"denom"`
}

type BeforeSendHookResponse added in v1.1.0

type BeforeSendHookResponse struct {
	ContractAddr string `json:"contract_addr"`
}

type BurnTokens added in v0.3.0

type BurnTokens struct {
	Denom  string   `json:"denom"`
	Amount math.Int `json:"amount"`
	// BurnFromAddress must be set to "" for now.
	BurnFromAddress string `json:"burn_from_address"`
}

type ChangeAdmin added in v0.3.0

type ChangeAdmin struct {
	Denom           string `json:"denom"`
	NewAdminAddress string `json:"new_admin_address"`
}

ChangeAdmin changes the admin for a factory denom. If the NewAdminAddress is empty, the denom has no admin.

type ClientUpdateProposal added in v0.3.0

type ClientUpdateProposal struct {
	Title              string `json:"title,omitempty"`
	Description        string `json:"description,omitempty"`
	SubjectClientId    string `json:"subject_client_id,omitempty"`
	SubstituteClientId string `json:"substitute_client_id,omitempty"`
}

type CreateDenom added in v0.3.0

type CreateDenom struct {
	Subdenom string `json:"subdenom"`
}

CreateDenom creates a new factory denom, of denomination: factory/{creating contract address}/{Subdenom} Subdenom can be of length at most 44 characters, in [0-9a-zA-Z./] The (creating contract address, subdenom) pair must be unique. The created denom's admin is the creating contract address, but this admin can be changed using the ChangeAdmin binding.

type DenomAdmin added in v0.3.0

type DenomAdmin struct {
	Subdenom string `json:"subdenom"`
}

type DenomAdminResponse added in v0.3.0

type DenomAdminResponse struct {
	Admin string `json:"admin"`
}

type Failures added in v1.1.0

type Failures struct {
	Address    string             `json:"address"`
	Pagination *query.PageRequest `json:"pagination,omitempty"`
}

type FailuresResponse added in v1.1.0

type FailuresResponse struct {
	Failures []contractmanagertypes.Failure `json:"failures"`
}

type FullDenom added in v0.3.0

type FullDenom struct {
	CreatorAddr string `json:"creator_addr"`
	Subdenom    string `json:"subdenom"`
}

type FullDenomResponse added in v0.3.0

type FullDenomResponse struct {
	Denom string `json:"denom"`
}

type MintTokens added in v0.3.0

type MintTokens struct {
	Denom         string   `json:"denom"`
	Amount        math.Int `json:"amount"`
	MintToAddress string   `json:"mint_to_address"`
}

type MsgExecuteContract added in v0.3.0

type MsgExecuteContract struct {
	// Contract is the address of the smart contract
	Contract string `json:"contract,omitempty"`
	// Msg json encoded message to be passed to the contract
	Msg string `json:"msg,omitempty"`
}

MsgExecuteContract defined separate from wasmtypes since we can get away with just passing the string into bindings

type NeutronMsg

type NeutronMsg struct {
	SubmitTx                  *SubmitTx                         `json:"submit_tx,omitempty"`
	RegisterInterchainAccount *RegisterInterchainAccount        `json:"register_interchain_account,omitempty"`
	RegisterInterchainQuery   *RegisterInterchainQuery          `json:"register_interchain_query,omitempty"`
	UpdateInterchainQuery     *UpdateInterchainQuery            `json:"update_interchain_query,omitempty"`
	RemoveInterchainQuery     *RemoveInterchainQuery            `json:"remove_interchain_query,omitempty"`
	IBCTransfer               *transferwrappertypes.MsgTransfer `json:"ibc_transfer,omitempty"`
	SubmitAdminProposal       *SubmitAdminProposal              `json:"submit_admin_proposal,omitempty"`

	// Token factory types
	/// Contracts can create denoms, namespaced under the contract's address.
	/// A contract may create any number of independent sub-denoms.
	CreateDenom *CreateDenom `json:"create_denom,omitempty"`
	/// Contracts can change the admin of a denom that they are the admin of.
	ChangeAdmin *ChangeAdmin `json:"change_admin,omitempty"`
	/// Contracts can mint native tokens for an existing factory denom
	/// that they are the admin of.
	MintTokens *MintTokens `json:"mint_tokens,omitempty"`
	/// Contracts can burn native tokens for an existing factory denom
	/// that they are the admin of.
	/// Currently, the burn from address must be the admin contract.
	BurnTokens *BurnTokens `json:"burn_tokens,omitempty"`
	/// Contracts can set before send hook for an existing factory denom
	//	that they are the admin of.
	//	Currently, the set before hook call should be performed from address that must be the admin contract.
	SetBeforeSendHook *SetBeforeSendHook `json:"set_before_send_hook,omitempty"`

	// Cron types
	AddSchedule    *AddSchedule    `json:"add_schedule,omitempty"`
	RemoveSchedule *RemoveSchedule `json:"remove_schedule,omitempty"`

	// Contractmanager types
	/// A contract that has failed acknowledgement can resubmit it
	ResubmitFailure *ResubmitFailure `json:"resubmit_failure,omitempty"`
}

NeutronMsg is used like a sum type to hold one of custom Neutron messages. Follow https://github.com/neutron-org/neutron-sdk/blob/main/packages/neutron-sdk/src/bindings/msg.rs for more information.

type NeutronQuery

type NeutronQuery struct {
	// Registered Interchain Query Result for specified QueryID
	InterchainQueryResult *QueryRegisteredQueryResultRequest `json:"interchain_query_result,omitempty"`
	// Interchain account address for specified ConnectionID and OwnerAddress
	InterchainAccountAddress *QueryInterchainAccountAddressRequest `json:"interchain_account_address,omitempty"`
	// RegisteredInterchainQueries
	RegisteredInterchainQueries *QueryRegisteredQueriesRequest `json:"registered_interchain_queries,omitempty"`
	// RegisteredInterchainQuery
	RegisteredInterchainQuery *QueryRegisteredQueryRequest `json:"registered_interchain_query,omitempty"`
	// TotalBurnedNeutronsAmount
	TotalBurnedNeutronsAmount *QueryTotalBurnedNeutronsAmountRequest `json:"total_burned_neutrons_amount,omitempty"`
	// MinIbcFee
	MinIbcFee *QueryMinIbcFeeRequest `json:"min_ibc_fee,omitempty"`
	// Token Factory queries
	// Given a subdenom minted by a contract via `NeutronMsg::MintTokens`,
	// returns the full denom as used by `BankMsg::Send`.
	FullDenom *FullDenom `json:"full_denom,omitempty"`
	// Returns the admin of a denom, if the denom is a Token Factory denom.
	DenomAdmin *DenomAdmin `json:"denom_admin,omitempty"`
	// Returns the before send hook if it was set before
	BeforeSendHook *BeforeSendHook `json:"before_send_hook,omitempty"`
	// Contractmanager queries
	// Query all failures for address
	Failures *Failures `json:"failures,omitempty"`
}

NeutronQuery contains neutron custom queries.

type ParamChangeProposal added in v0.2.0

type ParamChangeProposal struct {
	Title        string                    `json:"title"`
	Description  string                    `json:"description"`
	ParamChanges []paramChange.ParamChange `json:"param_changes"`
}

type Plan added in v0.2.0

type Plan struct {
	Name   string `json:"name"`
	Height int64  `json:"height"`
	Info   string `json:"info"`
}

type ProposalExecuteMessage added in v1.1.0

type ProposalExecuteMessage struct {
	Message string `json:"message,omitempty"`
}

type ProtobufAny

type ProtobufAny struct {
	TypeURL string `json:"type_url"`
	Value   []byte `json:"value"`
}

ProtobufAny is a hack-struct to serialize protobuf Any message into JSON object

type QueryInterchainAccountAddressRequest

type QueryInterchainAccountAddressRequest struct {
	// owner_address is the owner of the interchain account on the controller chain
	OwnerAddress string `json:"owner_address,omitempty"`
	// interchain_account_id is an identifier of your interchain account from which you want to execute msgs
	InterchainAccountID string `json:"interchain_account_id,omitempty"`
	// connection_id is an IBC connection identifier between Neutron and remote chain
	ConnectionID string `json:"connection_id,omitempty"`
}

type QueryInterchainAccountAddressResponse

type QueryInterchainAccountAddressResponse struct {
	// The corresponding interchain account address on the host chain
	InterchainAccountAddress string `json:"interchain_account_address,omitempty"`
}

Query response for an interchain account address

type QueryMinIbcFeeRequest added in v0.3.0

type QueryMinIbcFeeRequest struct{}

type QueryMinIbcFeeResponse added in v0.3.0

type QueryMinIbcFeeResponse struct {
	MinFee feerefundertypes.Fee `json:"min_fee"`
}

type QueryRegisteredQueriesRequest

type QueryRegisteredQueriesRequest struct {
	Owners       []string           `json:"owners,omitempty"`
	ConnectionID string             `json:"connection_id,omitempty"`
	Pagination   *query.PageRequest `json:"pagination,omitempty"`
}

type QueryRegisteredQueriesResponse

type QueryRegisteredQueriesResponse struct {
	RegisteredQueries []RegisteredQuery `json:"registered_queries"`
}

type QueryRegisteredQueryRequest

type QueryRegisteredQueryRequest struct {
	QueryID uint64 `json:"query_id,omitempty"`
}

type QueryRegisteredQueryResponse

type QueryRegisteredQueryResponse struct {
	RegisteredQuery *RegisteredQuery `json:"registered_query,omitempty"`
}

type QueryRegisteredQueryResultRequest

type QueryRegisteredQueryResultRequest struct {
	QueryID uint64 `json:"query_id,omitempty"`
}

type QueryRegisteredQueryResultResponse

type QueryRegisteredQueryResultResponse struct {
	Result *QueryResult `json:"result,omitempty"`
}

type QueryResult

type QueryResult struct {
	KvResults []*StorageValue `json:"kv_results,omitempty"`
	Height    uint64          `json:"height,omitempty"`
	Revision  uint64          `json:"revision,omitempty"`
}

type QueryTotalBurnedNeutronsAmountRequest added in v0.2.0

type QueryTotalBurnedNeutronsAmountRequest struct{}

type QueryTotalBurnedNeutronsAmountResponse added in v0.2.0

type QueryTotalBurnedNeutronsAmountResponse struct {
	Coin sdktypes.Coin `json:"coin"`
}

type RegisterInterchainAccount

type RegisterInterchainAccount struct {
	ConnectionId        string    `json:"connection_id"`
	InterchainAccountId string    `json:"interchain_account_id"`
	RegisterFee         sdk.Coins `json:"register_fee,omitempty"`
}

RegisterInterchainAccount creates account on remote chain.

type RegisterInterchainAccountResponse

type RegisterInterchainAccountResponse struct{}

RegisterInterchainAccountResponse holds response for RegisterInterchainAccount.

type RegisterInterchainQuery

type RegisterInterchainQuery struct {
	QueryType          string            `json:"query_type"`
	Keys               []*icqtypes.KVKey `json:"keys"`
	TransactionsFilter string            `json:"transactions_filter"`
	ConnectionId       string            `json:"connection_id"`
	UpdatePeriod       uint64            `json:"update_period"`
}

RegisterInterchainQuery creates a query for remote chain.

type RegisterInterchainQueryResponse

type RegisterInterchainQueryResponse struct {
	Id uint64 `json:"id"`
}

RegisterInterchainQueryResponse holds response for RegisterInterchainQuery

type RegisteredQuery

type RegisteredQuery struct {
	// The unique id of the registered query.
	ID uint64 `json:"id"`
	// The address that registered the query.
	Owner string `json:"owner"`
	// The KV-storage keys for which we want to get values from remote chain
	Keys []*types.KVKey `json:"keys"`
	// The filter for transaction search ICQ
	TransactionsFilter string `json:"transactions_filter"`
	// The query type identifier (i.e. 'kv' or 'tx' for now).
	QueryType string `json:"query_type"`
	// The IBC connection ID for getting ConsensusState to verify proofs.
	ConnectionID string `json:"connection_id"`
	// Parameter that defines how often the query must be updated.
	UpdatePeriod uint64 `json:"update_period"`
	// The local chain last block height when the query result was updated.
	LastSubmittedResultLocalHeight uint64 `json:"last_submitted_result_local_height"`
	// The remote chain last block height when the query result was updated.
	LastSubmittedResultRemoteHeight *ibcclienttypes.Height `json:"last_submitted_result_remote_height,omitempty"`
	// Amount of coins deposited for the query.
	Deposit sdktypes.Coins `json:"deposit"`
	// Timeout before query becomes available for everybody to remove.
	SubmitTimeout uint64 `json:"submit_timeout"`
	// The local chain height when the query was registered.
	RegisteredAtHeight uint64 `json:"registered_at_height"`
}

func (RegisteredQuery) MarshalJSON

func (rq RegisteredQuery) MarshalJSON() ([]byte, error)

type RemoveInterchainQuery

type RemoveInterchainQuery struct {
	QueryId uint64 `json:"query_id"`
}

type RemoveInterchainQueryResponse

type RemoveInterchainQueryResponse struct{}

type RemoveSchedule added in v0.3.0

type RemoveSchedule struct {
	Name string `json:"name"`
}

RemoveSchedule removes existing schedule with given name

type RemoveScheduleResponse added in v0.3.0

type RemoveScheduleResponse struct{}

RemoveScheduleResponse holds response RemoveSchedule

type ResubmitFailure added in v1.1.0

type ResubmitFailure struct {
	FailureId uint64 `json:"failure_id"`
}

type ResubmitFailureResponse added in v1.1.0

type ResubmitFailureResponse struct {
	FailureId uint64 `json:"failure_id"`
}

type SetBeforeSendHook added in v1.1.0

type SetBeforeSendHook struct {
	Denom        string `json:"denom"`
	ContractAddr string `json:"contract_addr"`
}

type StorageValue

type StorageValue struct {
	StoragePrefix string `json:"storage_prefix,omitempty"`
	Key           []byte `json:"key"`
	Value         []byte `json:"value"`
}

func (StorageValue) MarshalJSON

func (sv StorageValue) MarshalJSON() ([]byte, error)

type SubmitAdminProposal added in v0.2.0

type SubmitAdminProposal struct {
	AdminProposal AdminProposal `json:"admin_proposal"`
}

type SubmitTx

type SubmitTx struct {
	ConnectionId        string        `json:"connection_id"`
	InterchainAccountId string        `json:"interchain_account_id"`
	Msgs                []ProtobufAny `json:"msgs"`
	Memo                string        `json:"memo"`
	Timeout             uint64        `json:"timeout"`
	Fee                 feetypes.Fee  `json:"fee"`
}

SubmitTx submits interchain transaction on a remote chain.

type SubmitTxResponse

type SubmitTxResponse struct {
	// SequenceId is a channel's sequence_id for outgoing ibc packet. Unique per a channel.
	SequenceId uint64 `json:"sequence_id"`
	// Channel is a src channel on neutron side transaction was submitted from
	Channel string `json:"channel"`
}

SubmitTxResponse holds response from SubmitTx.

type UpdateInterchainQuery

type UpdateInterchainQuery struct {
	QueryId               uint64            `json:"query_id,omitempty"`
	NewKeys               []*icqtypes.KVKey `json:"new_keys,omitempty"`
	NewUpdatePeriod       uint64            `json:"new_update_period,omitempty"`
	NewTransactionsFilter string            `json:"new_transactions_filter,omitempty"`
}

type UpdateInterchainQueryResponse

type UpdateInterchainQueryResponse struct{}

type UpgradeProposal added in v0.3.0

type UpgradeProposal struct {
	Title               string           `json:"title,omitempty"`
	Description         string           `json:"description,omitempty"`
	Plan                Plan             `json:"plan"`
	UpgradedClientState *cosmostypes.Any `json:"upgraded_client_state,omitempty"`
}

Jump to

Keyboard shortcuts

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