Documentation
¶
Index ¶
- type AddSchedule
- type AddScheduleResponse
- type AdminProposal
- type BeforeSendHook
- type BeforeSendHookResponse
- type BindingMarshaller
- type BurnTokens
- type ChangeAdmin
- type ClientUpdateProposal
- type CreateDenom
- type DenomAdmin
- type DenomAdminResponse
- type Dex
- type DexQuery
- type Failures
- type FailuresResponse
- type ForceTransfer
- type FullDenom
- type FullDenomResponse
- type MintTokens
- type MsgExecuteContract
- type MsgPlaceLimitOrder
- type NeutronMsg
- type NeutronQuery
- type ParamChangeProposal
- type Plan
- type ProposalExecuteMessage
- type ProtobufAny
- type QueryEstimatePlaceLimitOrderRequest
- type QueryInterchainAccountAddressRequest
- type QueryInterchainAccountAddressResponse
- type QueryMinIbcFeeRequest
- type QueryMinIbcFeeResponse
- type QueryRegisteredQueriesRequest
- type QueryRegisteredQueriesResponse
- type QueryRegisteredQueryRequest
- type QueryRegisteredQueryResponse
- type QueryRegisteredQueryResultRequest
- type QueryRegisteredQueryResultResponse
- type QueryResult
- type QueryTotalBurnedNeutronsAmountRequest
- type QueryTotalBurnedNeutronsAmountResponse
- type RegisterInterchainAccount
- type RegisterInterchainAccountResponse
- type RegisterInterchainQuery
- type RegisterInterchainQueryResponse
- type RegisteredQuery
- type RemoveInterchainQuery
- type RemoveInterchainQueryResponse
- type RemoveSchedule
- type RemoveScheduleResponse
- type ResubmitFailure
- type ResubmitFailureResponse
- type SetBeforeSendHook
- type SetDenomMetadata
- type StorageValue
- type SubmitAdminProposal
- type SubmitTx
- type SubmitTxResponse
- type UpdateInterchainQuery
- type UpdateInterchainQueryResponse
- type UpgradeProposal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddSchedule ¶
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 ¶
type AddScheduleResponse struct{}
AddScheduleResponse holds response AddSchedule
type AdminProposal ¶
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 ¶
type BeforeSendHook struct {
Denom string `json:"denom"`
}
type BeforeSendHookResponse ¶
type BeforeSendHookResponse struct {
ContractAddr string `json:"contract_addr"`
}
type BindingMarshaller ¶
type BurnTokens ¶
type ChangeAdmin ¶
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 ¶
type CreateDenom ¶
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 ¶
type DenomAdmin struct {
Subdenom string `json:"subdenom"`
}
type DenomAdminResponse ¶
type DenomAdminResponse struct {
Admin string `json:"admin"`
}
type Dex ¶
type Dex struct {
Deposit *dextypes.MsgDeposit `json:"deposit"`
Withdrawal *dextypes.MsgWithdrawal `json:"withdrawal"`
PlaceLimitOrder *MsgPlaceLimitOrder `json:"place_limit_order"`
WithdrawFilledLimitOrder *dextypes.MsgWithdrawFilledLimitOrder `json:"withdraw_filled_limit_order"`
CancelLimitOrder *dextypes.MsgCancelLimitOrder `json:"cancel_limit_order"`
MultiHopSwap *dextypes.MsgMultiHopSwap `json:"multi_hop_swap"`
}
type DexQuery ¶
type DexQuery struct {
// Parameters queries the parameters of the module.
Params *dextypes.QueryParamsRequest `json:"params"`
// Queries a LimitOrderTrancheUser by index.
LimitOrderTrancheUser *dextypes.QueryGetLimitOrderTrancheUserRequest `json:"limit_order_tranche_user,omitempty"`
// Queries a list of LimitOrderTrancheUser items.
LimitOrderTrancheUserAll *dextypes.QueryAllLimitOrderTrancheUserRequest `json:"limit_order_tranche_user_all"`
// Queries a list of LimitOrderTrancheUser items for a given address.
LimitOrderTrancheUserAllByAddress *dextypes.QueryAllUserLimitOrdersRequest `json:"limit_order_tranche_user_all_by_address"`
// Queries a LimitOrderTranche by index.
LimitOrderTranche *dextypes.QueryGetLimitOrderTrancheRequest `json:"limit_order_tranche"`
// Queries a list of LimitOrderTranche items for a given pairID / TokenIn combination.
LimitOrderTrancheAll *dextypes.QueryAllLimitOrderTrancheRequest `json:"limit_order_tranche_all"`
// Queries a list of UserDeposits items.
UserDepositsAll *dextypes.QueryAllUserDepositsRequest `json:"user_deposit_all"`
// Queries a list of TickLiquidity items.
TickLiquidityAll *dextypes.QueryAllTickLiquidityRequest `json:"tick_liquidity_all"`
// Queries a InactiveLimitOrderTranche by index.
InactiveLimitOrderTranche *dextypes.QueryGetInactiveLimitOrderTrancheRequest `json:"inactive_limit_order_tranche"`
// Queries a list of InactiveLimitOrderTranche items.
InactiveLimitOrderTrancheAll *dextypes.QueryAllInactiveLimitOrderTrancheRequest `json:"inactive_limit_order_tranche_all"`
// Queries a list of PoolReserves items.
PoolReservesAll *dextypes.QueryAllPoolReservesRequest `json:"pool_reserves_all"`
// Queries a PoolReserve by index
PoolReserves *dextypes.QueryGetPoolReservesRequest `json:"pool_reserves"`
// Queries the simulated result of a multihop swap
EstimateMultiHopSwap *dextypes.QueryEstimateMultiHopSwapRequest `json:"estimate_multi_hop_swap"`
// Queries the simulated result of a PlaceLimit order
EstimatePlaceLimitOrder *QueryEstimatePlaceLimitOrderRequest `json:"estimate_place_limit_order"`
// Queries a pool by pair, tick and fee
Pool *dextypes.QueryPoolRequest `json:"pool"`
// Queries a pool by ID
PoolByID *dextypes.QueryPoolByIDRequest `json:"pool_by_id"`
// Queries a PoolMetadata by ID
PoolMetadata *dextypes.QueryGetPoolMetadataRequest `json:"pool_metadata"`
// Queries a list of PoolMetadata items.
PoolMetadataAll *dextypes.QueryAllPoolMetadataRequest `json:"pool_metadata_all"`
}
type Failures ¶
type Failures struct {
Address string `json:"address"`
Pagination *query.PageRequest `json:"pagination,omitempty"`
}
type FailuresResponse ¶
type FailuresResponse struct {
Failures []contractmanagertypes.Failure `json:"failures"`
}
type ForceTransfer ¶
type ForceTransfer struct {
Denom string `json:"denom"`
Amount math.Int `json:"amount"`
TransferFromAddress string `json:"transfer_from_address"`
TransferToAddress string `json:"transfer_to_address"`
}
ForceTransfer forces transferring of a specific denom is only allowed for the creator of the denom registered during CreateDenom.
type FullDenomResponse ¶
type FullDenomResponse struct {
Denom string `json:"denom"`
}
type MintTokens ¶
type MsgExecuteContract ¶
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 MsgPlaceLimitOrder ¶
type MsgPlaceLimitOrder struct {
Creator string `json:"creator,omitempty"`
Receiver string `json:"receiver,omitempty"`
TokenIn string `json:"token_in,omitempty"`
TokenOut string `json:"token_out,omitempty"`
TickIndexInToOut int64 `json:"tick_index_in_to_out,omitempty"`
AmountIn math.Int `json:"amount_in"`
OrderType string `json:"order_type,omitempty"`
// expirationTime is only valid iff orderType == GOOD_TIL_TIME.
ExpirationTime *uint64 `json:"expiration_time,omitempty"`
MaxAmountOut *math.Int `json:"max_amount_out"`
}
MsgPlaceLimitOrder is a copy dextypes.MsgPlaceLimitOrder with altered ExpirationTime field, it's a preferable way to pass timestamp as unixtime to contracts
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"`
/// Force transferring of a specific denom is only allowed for the creator of the denom registered during CreateDenom.
ForceTransfer *ForceTransfer `json:"force_transfer,omitempty"`
/// Setting of metadata for a specific denom is only allowed for the admin of the denom.
/// It allows the overwriting of the denom metadata in the bank module.
SetDenomMetadata *SetDenomMetadata `json:"set_denom_metadata,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"`
// dex module bindings
Dex *Dex `json:"dex,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"`
// dex module queries
Dex *DexQuery `json:"dex,omitempty"`
}
NeutronQuery contains neutron custom queries.
type ParamChangeProposal ¶
type ParamChangeProposal struct {
Title string `json:"title"`
Description string `json:"description"`
ParamChanges []paramChange.ParamChange `json:"param_changes"`
}
type ProposalExecuteMessage ¶
type ProposalExecuteMessage struct {
Message string `json:"message,omitempty"`
}
type ProtobufAny ¶
ProtobufAny is a hack-struct to serialize protobuf Any message into JSON object
type QueryEstimatePlaceLimitOrderRequest ¶
type QueryEstimatePlaceLimitOrderRequest struct {
Creator string `json:"creator,omitempty"`
Receiver string `json:"receiver,omitempty"`
TokenIn string `json:"token_in,omitempty"`
TokenOut string `json:"token_out,omitempty"`
TickIndexInToOut int64 `json:"tick_index_in_to_out,omitempty"`
AmountIn math.Int `json:"amount_in"`
OrderType string `json:"order_type,omitempty"`
// expirationTime is only valid iff orderType == GOOD_TIL_TIME.
ExpirationTime *uint64 `json:"expiration_time,omitempty"`
MaxAmountOut *math.Int `json:"max_amount_out"`
}
QueryEstimatePlaceLimitOrderRequest is a copy dextypes.QueryEstimatePlaceLimitOrderRequest with altered ExpirationTime field, it's a preferable way to pass timestamp as unixtime to contracts
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 ¶
type QueryMinIbcFeeRequest struct{}
type QueryMinIbcFeeResponse ¶
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 ¶
type QueryTotalBurnedNeutronsAmountRequest struct{}
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 ¶
type RemoveSchedule struct {
Name string `json:"name"`
}
RemoveSchedule removes existing schedule with given name
type RemoveScheduleResponse ¶
type RemoveScheduleResponse struct{}
RemoveScheduleResponse holds response RemoveSchedule
type ResubmitFailure ¶
type ResubmitFailure struct {
FailureId uint64 `json:"failure_id"`
}
type ResubmitFailureResponse ¶
type ResubmitFailureResponse struct {
FailureId uint64 `json:"failure_id"`
}
type SetBeforeSendHook ¶
type SetBeforeSendHook struct {
Denom string `json:"denom"`
ContractAddr string `json:"contract_addr"`
}
SetBeforeSendHook Allowing to assign a CosmWasm contract to call with a BeforeSend hook for a specific denom is only allowed for the creator of the denom registered during CreateDenom.
type SetDenomMetadata ¶
SetDenomMetadata is sets the denom's bank metadata
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 ¶
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 UpdateInterchainQueryResponse ¶
type UpdateInterchainQueryResponse struct{}
type UpgradeProposal ¶
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"`
}