Injective | Documentation
InjectiveGithub
Injective | Documentation
Injective | Documentation
  • About Injective
  • Getting Started
    • Wallet
      • Create a wallet
      • Accounts
      • Staking
      • Governance
      • Auction
    • Token Standards
      • INJ coin
      • Token Factory
      • CW20 Standard
    • Transactions
      • Gas and Fees
  • Guides
    • Create a Wallet
    • Bridge
      • From Ethereum
      • Using Wormhole
      • Using IBC
      • From Solana
    • Launch a Token
    • Launch a Market
    • Denom Metadata
    • Get INJ
  • Toolkits
    • injectived
      • Install injectived
      • Using injectived
      • Commands
    • Injective TS SDK
    • Injective Go SDK
    • Injective Python SDK
    • Injective CW SDK
    • Injective Rust
    • The Graph
  • References
  • Glossary
  • Developers
    • Getting Started
      • Guides
        • Testnet Proposals
        • Convert addresses
        • Calculations
          • Min Price Tick Size
          • Min Quantity Tick Size
        • Testnet Faucet Integration
    • Exchange Developers
      • Build a DEX
      • Provider Oracle
    • Cosmwasm Developers
      • Your First Smart Contract
      • Guides
        • Local Development
        • Mainnet Deployment
        • Whitelisting deployment address
        • Create your Swap Contract
        • Creating UIs
      • Using Injective Queries and Messages
      • CW20 Adapter
      • Injective Test Tube
    • Modules
      • Injective
        • Auction
          • State
          • Messages
          • EndBlock
          • Events
          • Params
          • Errors
        • Exchange
          • Derivative Markets Concepts
          • Spot Markets Concepts
          • Binary Option Markets Concepts
          • Other Concepts
          • State
          • State Transitions
          • Messages
          • Proposals
          • BeginBlock
          • EndBlock
          • Events
          • Params
          • MsgPrivilegedExecuteContract
          • Errors
        • Insurance
          • State
          • State Transitions
          • Messages
          • EndBlock
          • Events
          • Params
          • Improvements
          • Errors
        • OCR
          • Concepts
          • State
          • Messages
          • Proposals
          • BeginBlock
          • Hooks
          • Events
          • Params
          • Errors
        • Oracle
          • State
          • Keeper
          • Messages
          • Proposals
          • Events
          • Improvements
          • Errors
        • Peggy
          • Definitions
          • Workflow
          • State
          • Messages
          • Slashing
          • EndBlock
          • Events
          • Params
          • Relay Semantics
          • Improvements
          • Errors
        • Permissions
          • Concepts
          • State
          • State Transition
          • Errors
        • TokenFactory
          • Concepts
          • State
          • Messages
          • Events
          • Params
          • Errors
        • WasmX
          • Concepts
          • Data
          • Proposals
          • Messages
          • Params
          • Errors
        • Lanes
        • TxFees
      • Core
        • Auth
        • AuthZ
        • Bank
        • Consensus
        • Crisis
        • Distribution
        • Evidence
        • Feegrant
        • Gov
        • Group
        • Mint
        • NFT
        • Params
        • Slashing
        • Staking
        • Upgrade
        • Circuit
        • Genutils
    • dApps Documentation
  • Nodes
    • Getting Started
      • Interact with a node
      • Running a node
        • Setting up the keyring
        • Join a network
        • Cosmovisor
        • Upgrade your node
    • Validators
      • Mainnet
        • Peggo
        • Canonical Chain Upgrades
          • Upgrade to 10002-rc1
          • Upgrade to 10002-rc2
          • Upgrade to 10003-rc1
          • Upgrade to 10004-rc1
          • Upgrade to 10004-rc1-patch
          • Upgrade to 10005-rc1
          • Upgrade to 10006-rc1
          • Upgrade to 10007-rc1
          • Upgrade to 10008 - Camelot
          • Upgrade to 10009
          • Upgrade to v1.10
          • Upgrade to v1.11
          • Upgrade to v1.12.0 - Volan
          • Upgrade to v1.12.1
          • Upgrade to v1.13.0 - Altaris
          • Upgrade to v1.13.2
          • Upgrade to v1.13.3
          • Upgrade to v1.14.0
          • Upgrade to v1.14.1
          • Upgrade to v1.15.0
      • Testnet
        • Testnet Peggo
    • Public Endpoints
    • Premium Endpoints
    • Injective Indexer Setup
  • Traders
    • Getting Started
    • Documentation
    • API Reference
  • Useful Links
    • Injective 101
    • Injective Hub
    • Injective Explorer
    • Chain API Reference
    • Indexer API Reference
    • Testnet Faucet
Powered by GitBook
On this page
  • MsgUpdateContract
  • MsgDeactivateContract
  • MsgActivateContract
  • MsgExecuteContract
  • MsgMigrateContract
  • MsgUpdateContractOwner
Edit on GitHub
Export as PDF
  1. Developers
  2. Modules
  3. Injective
  4. WasmX

Messages

MsgUpdateContract

Updates registered contract execution params (gas price, limit). Can also define a new admin account. Can be called only by admin (if defined) or contract itself.


type MsgUpdateContract struct {
    Sender string `json:"sender,omitempty"`
    // Unique Identifier for contract instance to be registered.
    ContractAddress string `json:"contract_address,omitempty"`
    // Maximum gas to be used for the smart contract execution.
    GasLimit uint64 `json:"gas_limit,omitempty"`
    // gas price to be used for the smart contract execution.
    GasPrice uint64 `json:"gas_price,omitempty"`
    // optional - admin account that will be allowed to perform any changes
    AdminAddress string `json:"admin_address,omitempty"`
}

MsgDeactivateContract

Deactivates a registered contract (it will no longer be executed in begin blocker)


type MsgDeactivateContract struct {
    Sender string `json:"sender,omitempty"`
    // Unique Identifier for contract instance to be activated.
    ContractAddress string `json:"contract_address,omitempty"`
}

MsgActivateContract

Reactivates a registered contract (it will be executed in begin blocker from now on again)


type MsgActivateContract struct {
    Sender string `json:"sender,omitempty"`
    // Unique Identifier for contract instance to be activated.
    ContractAddress string `json:"contract_address,omitempty"`
}

MsgExecuteContract

Invokes a function defined within the smart contract. Function and parameters are encoded in ExecuteMsg, which is a JSON message encoded in Base64.

type MsgExecuteContract struct {
    Sender     sdk.AccAddress   `json:"sender" yaml:"sender"`
    Contract   sdk.AccAddress   `json:"contract" yaml:"contract"`
    ExecuteMsg core.Base64Bytes `json:"execute_msg" yaml:"execute_msg"`
    Coins      sdk.Coins        `json:"coins" yaml:"coins"`
}

MsgMigrateContract

Can be issued by the owner of a migratable smart contract to reset its code ID to another one. MigrateMsg is a JSON message encoded in Base64.

type MsgMigrateContract struct {
    Owner      sdk.AccAddress   `json:"owner" yaml:"owner"`
    Contract   sdk.AccAddress   `json:"contract" yaml:"contract"`
    NewCodeID  uint64           `json:"new_code_id" yaml:"new_code_id"`
    MigrateMsg core.Base64Bytes `json:"migrate_msg" yaml:"migrate_msg"`
}

MsgUpdateContractOwner

Can be issued by the smart contract's owner to transfer ownership.

type MsgUpdateContractOwner struct {
    Owner    sdk.AccAddress `json:"owner" yaml:"owner"`
    NewOwner sdk.AccAddress `json:"new_owner" yaml:"new_owner"`
    Contract sdk.AccAddress `json:"contract" yaml:"contract"`
}
PreviousProposalsNextParams

Last updated 7 months ago