VELA Knowledge Base
  • Exchange
    • Platform Overview
    • Account Setup
      • Deposit & Withdraw
      • 1-Click Trading
    • Staking
      • $VLP
      • $VELA and $esVELA
      • Rewards
      • Hyper VLP
        • Hyper VLP Legacy
        • Hyper VLP 2.0
    • Trading
      • Positions
        • Profit, Loss, and ROI
        • Increase Collateral/ Leverage
        • Add to Position
        • Triggered Orders
        • Edit Triggered Orders
        • Close Position
      • Chart Trading
      • Mobile
    • Platform Mechanics
      • Fees
      • Price Feeds
      • Risk Mitigation
    • Tokenomics
    • Restricted Countries
  • Community
    • Grand Prix Trading Competition
      • Credits
      • Missions & Streaks
      • Nitro Boost
    • Social Features
      • Referrals
      • Share Trade
      • Leaderboards
      • AstraBit Guide
      • Previous Events
        • Pirate's Loot Trading Competition
    • NFTs
  • Support
    • Resources (Links)
    • Brand Kit
    • Gnosis Safe Management
  • Developers
    • APIs
      • The Graph API
      • Trade Bots API
      • Market Maker API
    • Asset Pairs and VelaId
    • Contracts
      • Arbitrum Mainnet
      • Arbitrum Testnet
      • Base Mainnet
      • Base Testnet
    • Contract Functions
      • Vault
      • Position Vault
      • Liquidate Vault
      • Order Vault
      • Price Manager
      • Settings Manager
      • Multicall
    • Audit
Powered by GitBook
On this page
  • Aggregate
  • Get Eth Balance
  • Get Block Hash
  • Get Last Block Hash
  • Get Current Block Timestamp
  • Get Current Block Gas Limit
  • Get Current Block Coinbase
  1. Developers
  2. Contract Functions

Multicall

This contract is designed to aggregate multiple calls into a single call, which can be useful for reducing the number of separate Ethereum calls a client needs to make. It also provides several helper

Aggregate

This function takes an array of Call structs, each containing a target address and call data, and executes each call. It returns the block number at the time of execution and an array of bytes arrays containing the return data from each call.

Example Input:

Multicall.aggregate(
    Multicall.Call[] memory calls
);

Example Output:

// Returns the block number at the time of execution and an array of bytes arrays containing the return data from each call.

Get Eth Balance

This function returns the Ether balance of a given address.

Example Input:

Multicall.getEthBalance(
    address addr
);

Example Output:

// Returns the Ether balance of the given address.

Get Block Hash

This function returns the block hash of a given block number.

Example Input:

Multicall.getBlockHash(
    uint256 blockNumber
);

Example Output:

// Returns the block hash of the given block number.

Get Last Block Hash

This function returns the block hash of the last block.

Example Input:

Multicall.getLastBlockHash();

Example Output:

// Returns the block hash of the last block.

Get Current Block Timestamp

This function returns the timestamp of the current block.

Example Input:

Multicall.getCurrentBlockTimestamp();

Example Output:

// Returns the difficulty of the current block.

Get Current Block Gas Limit

This function returns the gas limit of the current block.

Example Input:

Multicall.getCurrentBlockGasLimit();

Example Output:

// Returns the gas limit of the current block.

Get Current Block Coinbase

This function returns the coinbase (miner's address) of the current block.

Example Input:

Multicall.getCurrentBlockCoinbase();

Example Output:

// Returns the coinbase (miner's address) of the current block.
PreviousSettings ManagerNextAudit

Last updated 1 year ago