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
  • ContractRegistrationRequest
  • ContractRegistrationRequestProposal
  • BatchContractRegistrationRequestProposal
  • BatchStoreCodeProposal
  • BatchContractDeregistrationProposal
Edit on GitHub
Export as PDF
  1. Developers
  2. Modules
  3. Injective
  4. WasmX

Proposals

ContractRegistrationRequest

ContractRegistrationRequest is a base message for registering new contracts (shouldn't be used directly but as a part of proposal)

type ContractRegistrationRequest struct {
	ContractAddress string 
	GasLimit uint64 
	GasPrice    uint64 
	PinContract bool   
	AllowUpdating bool
	CodeId uint64
    ContractAdmin string 
	GranterAddress string
	FundMode FundingMode
}

Fields description

  • ContractAddress - unique Identifier for contract instance to be registered.

  • GasLimit - Maximum gas to be used for the smart contract execution.

  • GasPrice - Gas price to be used for the smart contract execution.

  • PinContract - should contract be pinned.

  • AllowUpdating- defines wether contract owner can migrate it without need to register again (if false only current code_id will be allowed to be executed)

  • CodeId - code_id of the contract being registered - will be verified on execution to allow last minute change (after votes were cast)

  • AdminAddress - optional address of admin account (that will be allowed to pause or update contract params)

  • GranterAddress - address of an account which granted funds for execution. Must be set if FundMode is other than SelfFunded (see below for an explanation)

FundingMode indicates how the contract will fund its own execution.

enum FundingMode {
    Unspecified = 0;
    SelfFunded = 1;
    GrantOnly = 2; 
    Dual = 3;      
}
  • SelfFunded - contract will use its own funds to execute.

  • GrantOnly - contract wil only use funds provided by the grant.

  • Dual - contract will first deplete grant's funds before using its own.

ContractRegistrationRequestProposal

ContractRegistrationRequestProposal defines an SDK message to register a single contract in wasmx contract registry.

type ContractRegistrationRequestProposal struct {
    Title                       string                      
    Description                 string                      
    ContractRegistrationRequest ContractRegistrationRequest 
}

Fields description

  • Title describes the title of the proposal.

  • Description describes the description of the proposal.

  • ContractRegistrationRequest contains contract registration request (as described above)

BatchContractRegistrationRequestProposal

BatchContractRegistrationRequestProposal defines an SDK message to register a batch of contracts in wasmx contract registry.

type BatchContractRegistrationRequestProposal struct {
    Title                       string                      
    Description                 string
	ContractRegistrationRequests  []ContractRegistrationRequest 
}

Fields description

  • Title describes the title of the proposal.

  • Description describes the description of the proposal.

  • ContractRegistrationRequests contains a list of contracts registration requests (as described above)

BatchStoreCodeProposal

BatchStoreCodeProposal defines an SDK message to store a batch of contracts in wasm.

type BatchStoreCodeProposal struct {
    Title                       string                      
    Description                 string
	Proposals   []types.StoreCodeProposal
}

Fields description

  • Title describes the title of the proposal.

  • Description describes the description of the proposal.

  • Proposals contains a list of store code proposals (as defined by Cosmos wasm module)

BatchContractDeregistrationProposal

BatchContractDeregistrationProposal defines an SDK message to deregister a batch of contracts in wasm.

type BatchContractDeregistrationProposal struct {
    Title                       string                      
    Description                 string
	Contracts   []string 
}

Fields description

  • Title describes the title of the proposal.

  • Description describes the description of the proposal.

  • Contracts contains a list of addresses of contracts to be deregistered

PreviousDataNextMessages

Last updated 7 months ago