Quantum
  • Welcome to Quantum
  • Developer portal
    • Pricing
  • Self-Custody Infrastructure
    • Pincode Management
    • Private Key Management
  • Quickstart guide
  • Authentication
    • API Authentication
  • Faucets
  • Networks & URLs
  • Walletify Api
    • Overview
    • Getting started
    • User Management
    • Signing Methods
    • Testnet Assets
    • Basic Guides
      • Create a user
      • Retrieve a user
      • Update a user
      • Delete a user
      • Create a signing method
      • Update a signing method
      • Delete a signing method
      • Create a wallet
      • Retrieve wallet
      • Archive a wallet
      • Import a wallet
      • Export a wallet
      • Retrieve native balance
      • Retrieve ERC20 tokens
      • Retrieve NFTs
      • Transfer a native token
      • Transfer an ERC20 token
      • Transfer an NFT
      • Transfer a fungible token
      • Signatures
      • Read a contract
      • Execute a contract call
      • Get Transaction status
      • Resubmit a transaction
      • Get wallet events
      • Webhooks
    • Advanced Guides
      • Burn an NFT
      • Filter Spam NFTs
      • Filter NSFW NFTs
      • SWAP Token Pairs
      • Gasless/Meta Transactions
      • Sign RAW Transactions
      • Using Fiat Onramp with Walletify-API
      • Deploy an Ethereum contract
      • Integrate with WalletConnect
      • Set Up NFT Token Gating
      • Chain Specific Fields
      • Integrate with WalletConnect
      • Encrypted PIN Transfer
  • Nft Wizard Api
    • Overview
    • Getting started
    • Basic Guides
      • Get any NFT info
      • Get any NFT contract
      • Get NFTs by any wallet
      • Get wallets by any NFT
      • Create contract
      • Retrieve Contract
      • Delete Contract
      • Check Contract Status
      • Retrieve Contract Metadata
      • Update Contract Metadata
      • Create Token-type (NFT template)
      • Retrieve Token-type (NFT template)
      • Delete Token-type (NFT Template)
      • Check Token-type Status
      • Retrieve Token-type Metadata
      • Update Token-type Metadata
      • Mint an NFT
      • Batch Mint NFTs
      • Update NFT Metadata
      • Retrieve NFT Metadata
      • Add Audio to your NFTs
      • Add Video to your NFTs
      • Store NFT Media
      • Webhooks
    • Advanced Guides
      • Mass Minting
      • Speed Up Minting
      • Dynamic NFTs
      • Configure Royalties
      • Create Company Minter Wallet
      • Retrieve Company Minter Wallets
      • Store NFT Metadata on IPFS
      • View NFT on sandbox/testnet
    • NFT Configuration
      • Attributes
      • Animation & Media
      • Collection Info
      • Max Supply
      • Mint Number
      • Burnable
      • Metadata Storage
  • TMINTER API
    • Overview
    • Getting started
    • Basic Guide
      • Retrieve Any NFT Information
      • Retrieve NFT Contract Information
      • Retrieve NFTs by Wallet Address
      • Retrieve Wallets by NFT
      • Create a New NFT Contract
      • Retrieve a Contract
      • Delete a Contract
      • Check Contract Status
      • Retrieve Contract Metadata
      • Update Contract Metadata
      • Create Token-Type
      • Retrieve Token-Type
      • Delete Token-Type
      • Check Token-Type Status
      • Retrieve Token-Type Metadata
      • Update Token-Type Metadata
      • Mint a Single NFT
      • Batch Mint Multiple NFTs
      • Update NFT Metadata
      • Retrieve NFT Metadata
      • Add Audio to Your NFTs
      • Add Video to Your NFTs
      • Store NFT Media
      • Webhooks for NFT Events
    • Advance Guide
      • Dynamic NFT Creation
      • Token Economics and Supply Control
      • Advanced Minting: Royalty Distribution
      • Cross-Chain NFT Minting
      • NFT Sharding (Fractional Ownership)
      • Batch NFT Minting with Custom Metadata
      • Add Interactivity to NFTs
      • Advanced Media Integration: VR and AR
      • Webhook Triggers for Automated Processes
Powered by GitBook
On this page
  • Deploying a smart contract
  • 1.Develop the solidity contract
  • 2.Generate the bytecode
  • 3.Deploy the smart contract
  1. Walletify Api
  2. Advanced Guides

Deploy an Ethereum contract

PreviousUsing Fiat Onramp with Walletify-APINextIntegrate with WalletConnect

Last updated 9 months ago

Deploying a smart contract

A smart contract can be deployed using the existing endpoints/functions from quantum

Steps to follow in order to deploy the contract:

1.Develop the solidity contract

Below is a simple Solidity smart contract that you can deploy on the Ethereum blockchain. This contract is a basic example of a token contract that allows you to create

There are several tools and methods available for compiling Solidity code, and I'll provide an example using Remix, a web-based IDE.

Open in your web browser:

JSON

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0 <0.7.0;
contract SimpleStorage {
    uint storedData;
    function set(uint x) public {
        storedData = x;
    }
    function get() public view returns (uint) {
        return storedData;
    }
} 

Write or paste your Solidity code into the editor. (see example above)

In the Solidity Compiler tab on the left sidebar, you can find the compiler version. Choose the appropriate version for your contract.

Click on the Compile button to compile your contract.

2.Generate the bytecode

To generate the bytecode for a developed Solidity contract, you need to compile the Solidity code into Ethereum Virtual Machine (EVM) bytecode.

After compilation, you will see a list of compiled artifacts including the bytecode. Look for your contract name under the Contracts section, and you'll find the bytecode under BYTECODE.

Bytecode in this case: 608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806360fe47b11460375780636d4ce63c146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b6000805490509056fea264697066735822122018e873e978df16c207f8f6ed18612b17e2c2a70d0916ff978c0755f6a45e26fc64736f6c634300060c0033

3.Deploy the smart contract

To deploy the smart contract you will need to execute a native token transfer where the to field is empty, the value is 0 and the data contains the bytecode see example:

JSON

{  
    "pincode": "123456",  
    "transactionRequest": {  
         "type": "TRANSFER",
        "walletId": "d7d10358-c36b-495b-9c1c-77237505f5d0",  
        "value": "0",  
        "secretType": "ETHEREUM",   
        "data": "608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806360fe47b11460375780636d4ce63c146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b6000805490509056fea264697066735822122018e873e978df16c207f8f6ed18612b17e2c2a70d0916ff978c0755f6a45e26fc64736f6c634300060c0033" // bytecode from step 3 
    }  
}

The response from this request gives us the TX Hash which can be used to check in the block explorer if the contract has been deployed:

JSON

{
    "success": true,
    "result": {
        "id": "d7e3f894-4a6b-433d-93b0-f9f2e1972ea3",
        "transactionHash": "0x14011289f295db9a46ea7f030e140737a7ea835095171d6e69050e553a0d03a9"
    }
}

📘

Solidity compiler contract view
Solidity Compiler Bytecode
Transaction details in blockchain explorer

The wallet executing the native token transfer must have ETH to pay for the gas, if you do not have eth in the wallet, you can add some from the .

https://goerli.etherscan.io/tx/0x14011289f295db9a46ea7f030e140737a7ea835095171d6e69050e553a0d03a9
faucets
Remix
Transaction details in blockchain explorer
Solidity Compiler Bytecode
Solidity compiler contract view