LogoLogo
WebsiteTwitterGitHub
  • Introduction
    • Bridge
  • Wallets
    • fWallet
    • Rabby
    • MetaMask
    • Coinbase Wallet
    • Ledger
  • Staking
    • Overview
    • Stake FTM
    • Liquid Staking
    • Governance
  • Build on Opera
    • Overview
    • Tutorials
      • Deploy Contract
      • Verify Contract
      • Unit Test Contract
      • Create Fixed-Cap Asset
      • Create Variable-Cap Asset
      • Proxy Pattern
      • Diamond Proxy Pattern
    • Oracles
      • Chainlink
      • Band Protocol
      • API3
    • API
      • Public Endpoints
      • Transaction Tracing
      • Web3 API
      • GraphQL
        • Getting Started
        • Installation
        • Schema Basics
        • Schema Structure
        • Implementation Details
    • Providers
      • Contracts
        • Chainstack
        • thirdweb
        • GetBlock
      • API
        • The Graph
        • Covalent
        • Moralis
  • Funding
    • Gas Monetization
  • Run a Node
    • Overview
    • Node Providers
    • Mainnet
      • Run Validator Node
      • Run API Node
    • Testnet
      • Run Validator Node
      • Run Read-Only Node
    • Troubleshooting
    • FAQ
  • Technology
    • Overview
    • Consensus
    • Database Storage
    • Proof of Stake
    • Transaction Fees
    • Stablecoin
    • FAQ
  • Security
    • Contract Library
    • Fantom Safe
Powered by GitBook

© 2024 Fantom Foundation

On this page
  • Requirements
  • Example of Smart Contract Deployment
  • Deployment Using Remix
  • Additional Resources
  • Tools
Export as PDF
  1. Build on Opera
  2. Tutorials

Deploy Contract

PreviousTutorialsNextVerify Contract

Opera utilizes a major part of the Ethereum Virtual Machine (EVM) in the backend. Smart contracts are written in Solidity and they can function on Opera as they do on Ethereum.

To deploy a smart contract, you send an Opera transaction containing your bytecode without specifying any recipients. You will need FTM tokens to pay the gas fees when deploying smart contracts. To request your testnet FTMs on the testnet, you can use the .

After the contract is deployed, it will be available to all users of the Opera network. Smart contracts have an Opera address like other accounts.

Requirements

  • Bytecode (compiled code) of your smart contract

  • FTM for gas costs

  • Deployment script/plugin

  • Access to an Opera node, either by running your own node or API access to a node

Example of Smart Contract Deployment

If you are deploying a smart contract on Opera for the first time, you may take a look at the .

The repository contains the materials to deploy a smart contract using Hardhat and Truffle tools. Instructions to work with the mainnet and testnet are included.

Deployment Using Remix

If you want to deploy a smart contract using Remix to the Opera testnet, you just need to connect MetaMask to the Opera Testnet and choose Injected Provider - MetaMask in the Environment option.

You can see that the network ID is set to 4002, which is the Opera testnet's chain ID. When you deploy the contract, it will be deployed to the Fantom testnet.

Additional Resources

Tools

: Development environment for editing, compiling, debugging, and deploying your smart contracts using the EVM.

: Development environment, testing framework, and asset pipeline for blockchains using the EVM.

: IDE that’s used to write, compile, debug, and deploy Solidity code in your browser.

: Solidity is an object-oriented, high-level programming language for implementing smart contracts.

: OpenZeppelin Contracts helps you minimize risk by using battle-tested libraries of smart contracts for Ethereum and other blockchains.

: Complete Web3 development framework that provides everything you need to connect your applications and games to decentralized networks.

testnet faucet
example given here
Compiling
Deploying a Smart Contract on Ethereum
Hardhat
Truffle
Remix
Solidity
OpenZeppelin
thirdweb