Developer Resources
Block ExplorerGitHubRun a NodeMigration GuideETN Testnet Faucet
  • Overview
  • Foundational topics
    • Intro to the Electroneum Smart Chain
    • Intro to ETN
    • Intro to dapps
    • Web2 vs Web3
    • Accounts
    • Transactions
    • Blocks
    • Electroneum Virtual Machine (EVM)
      • Opcodes
    • Gas and Fees
    • Nodes and clients
    • Networks
    • Consensus mechanisms
      • IBFT
  • Electroneum Stack
    • Intro to the stack
    • Smart contracts
    • Development networks
    • Development frameworks
    • Electroneum client APIs
      • JavaScript APIs
      • JSON-RPC
    • Storage
    • Integrated Development Environments (IDEs)
    • Metamask
    • Rabby Wallet
    • Trust Wallet
  • Advanced
    • Bridges
    • Standards
      • Token standards
        • ERC-20 Fungible Tokens
        • ERC-721 NFTs
    • Oracles
    • Networking layer
      • Network addresses
    • Data structures and encoding
      • Patricia Merkle Trie
      • Recursive-length prefix (RLP)
      • Web3 secret storage definition
  • Design fundamentals
    • Intro to design and UX
  • ETN-SC Client
    • Getting started
      • Introduction
      • Hardware requirements
      • Instaling ETN-SC
    • Fundamentals
      • Command-line options
      • Security
      • Sync-modes
      • Account management
      • Databases
      • Backup & restore
      • Logs
      • Connecting to peers
      • Pruning
      • Private networks
      • Config files
      • Light client
    • Interacting with ETN-SC
      • JSON-RPC Server
        • Batch requests
        • Real-time events
      • JSON-RPC Namespaces
        • admin
        • clique
        • debug
        • eth
        • istanbul
        • les
        • miner
        • net
        • personal
        • txpool
      • JS Console
      • JS Console 2: Contracts
      • GraphQL Server
    • Developers
      • Introduction
      • Dapp developers
        • Dev mode
        • Go API
        • Go Account Management
        • Go Contract Bindings
      • EVM tracing
        • Introduction
        • Basic traces
        • Built-in tracers
        • Custom EVM tracer
        • Tutorial for JavaScript tracing
      • ETN-SC developer
        • Developer guide
        • Disclosures
        • DNS discovery setup guide
        • Code review guidelines
      • Contributing
    • Monitoring
      • Creating Dashboards
      • Understanding Dashboards
      • Ethstats
      • Metrics
    • Tools
      • Clef
        • Introduction
        • APIs
        • Rules
        • Setup
        • Datatypes
        • Tutorial
        • Clique-signing
      • abigen
      • devp2p
    • FAQs
  • Migration to Smart Chain
    • Overview
    • How to Migrate
      • ETN Online Wallets
      • Paper Wallets
      • CLI Wallet Users
      • Exchange Holders
      • Exchanges
    • Bridge Smart Contract
  • Misc. Guides
    • Set up Ledger + Metamask
  • MY.ELECTRONEUM.COM
    • Vendor API
Powered by GitBook
On this page
  • Block Explorer
  • Bridge Smart Contract Address
  • Interacting with the Bridge Smart Contract via Block Explorer

Was this helpful?

  1. Migration to Smart Chain

Bridge Smart Contract

Interacting with the Bridge Smart Contract

PreviousExchangesNextSet up Ledger + Metamask

Last updated 1 year ago

Was this helpful?

For those advanced users willing to query the bridge smart contract for more insights into the system can do so through our Block Explorer page. This page will guide you through the process of querying the bridge smart chain data using our Blockscout block explorer.

Block Explorer

We have different block explorers for the Electroneum Smart Chain mainnet and testnet, you can access them by following the link:

  • Mainnet Block Explorer:

  • Testnet Block Explorer:

Bridge Smart Contract Address

Depending on whether you are querying the bridge smart contract in mainnet or testnet, the contract address vary:

  • Mainnet Contract Address: 0xb7990022d3f22b6fb3afb626e05289ee3bf0ae62

  • Testnet Contract Address: 0xe5da12b1bcf74ff0aec20671beabc466f8b54727

For the rest of this guide we'll use the testnet block explorer and contract address for demonstration purposes.

Interacting with the Bridge Smart Contract via Block Explorer

First, head to the block explorer page and type the bridge contract address in explorer's search bar.

Make sure the address is correct and the explorer says "ERC1967Proxy", then click on the search result.

You are now in the bridge smart contract page where you can get some insights about the contract. The block explorer displays the bridge balance, how many calls to the bridge smart contract have been made (Transactions field), and the complete list of all transactions associated with this contract.

In order to get more specific info about the bridge smart contract itself, head to the "Read Proxy" tab.

The "Read Proxy" section allows you to interact with specific functions exposed by the contract implementation.

Some interesting functions exposed by our bridge smart contract includes:

  • getAddressFromLegacy: returns the new Smart Chain address associated with the provided legacy ETN address

  • getLegacyETNAddress: returns the legacy ETN address associated with the provided Smart Chain address

  • getTotalCrosschainAmount: returns the total amount of ETN that went through the bridge so far. (amount is displayed in atomic units - wei - by default)

  • getTotalTxCount: returns how many crosschain transfers were made so far

  • getTxAmount: returns the amount transacted in the specified crosschain tx hash (amount is displayed in atomic units - wei - by default)

  • getTxHistory: returns the crosschain transaction history of the provided Smart Chain address

https://blockexplorer.electroneum.com/
https://blockexplorer.thesecurityteam.rocks/