Oraichain
  • ORAICHAIN
    • Introduction
    • System Overview
      • AI Layer 1 for Data Economy & blockchain oracle services
      • Layer 2 Rollups and Subnetworks
      • Verifiable and trustless AI Execution
      • Protocol Messages
      • IBC Integration
    • Use Cases
    • Token Economics
  • DEVELOPER GUIDES
    • General
      • Blockchain details
    • CosmWasm Contracts
      • Compile a Contract
      • Deploy a Contract
      • Query a Contract
      • Send tokens to a Contract
      • Manage Contracts using design patterns
      • End-to-end CosmWasm testing with CW-simulate
    • Local testnet chain
    • Wallet
      • OWallet
    • Price Feed
      • CW Oracle Hub
    • VRF 2.0
      • Introduction to Oraichain VRF 2.0
      • Get a Random Value from API
        • Get VRF Value from different networks
        • Contract Addresses and Pricing
        • Validate a Group Signature
      • Security Remarks
      • API Reference
      • Get support from Oraichain team
    • OraiDEX
      • ORAIX Token
      • OBridge
        • OraiBTC
        • TON Bridge
          • TON Blockchain 101
      • Decentralization
    • Indexers
      • SubQuery
    • OraichainEVM
      • Getting started
      • Smart Contracts
        • Oraichain EVM Precompiled Contracts
        • Address
        • Bank
        • Wasm
        • Authz
      • Guides
        • Metamask
        • Remix
        • Foundry
        • Hardhat
        • Tools
        • Oraichain EVM RPC
  • GOVERNANCE
    • Privacy Policy
  • NODES & VALIDATORS
    • Networks
      • Joining Mainnet
        • Build Linux binary from source and become a Sentry Node Operator
        • Become a Validator
      • Joining Testnet
        • Become Testnet Fullnode From Source
        • StateSync Testnet
        • Faucet Testnet
    • Oraichain Tutorials
      • Migrate one Oraichain node to another
      • Cosmovisor
      • Update validator image
      • Tenderduty
      • Grafana
      • Tracking Unvoted Proposals
      • Tmtop
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. DEVELOPER GUIDES
  2. OraichainEVM
  3. Smart Contracts

Bank

PreviousAddressNextWasm

Last updated 1 month ago

Was this helpful?

Precompiles contract is a gate-way that allowed Solidity contracts can interact with Cosmos SDK Bank module. This is convenient for developers as they don’t need to know the implementation details behind the x/bank module in the Cosmos SDK. Instead, they can interact with bank functions using the Ethereum interface they are familiar with.

Solidity Interfaces

The Bank solidity interface includes the following transactions

  • send

Send defined a method that perform sending logic to a specific address

function send(
        address toAddress,
        string memory denom,
        uint256 amount
    ) external returns (bool success);
  • burn

Burn defined a method that perform burning amount of token from a specific address

function burn(
        address account,
        string memory denom,
        uint256 amount
    ) external returns (bool success);
  • balance

Balance defined a query method that get a user balance of a specific denomination

function balance(
        address acc,
        string memory denom
    ) external view returns (uint256 amount);
  • name

Get the Name that defined in Token Metadata

function name(
        string memory denom
    ) external view returns (string memory response);
  • symbol

Get the Symbol that defined in Token Metadata

function symbol(
        string memory denom
    ) external view returns (string memory response);
  • decimals

Get the token decimals that defined in Token Metadata

function decimals(
        string memory denom
    ) external view returns (uint8 response);
  • supply

Get the total supply of the token

function supply(
        string memory denom
    ) external view returns (uint256 response);
Bank