Docs - SliceLedger
  • What is Slice Ledger?
  • SliceLedger Key Features
  • SliceLedger Wallet
    • SliceLedger Crypto Wallet
      • Slice Web Extension
    • SliceLedger Explorer
    • SliceLedger DEX
    • SliceLedger NFT Market
  • Sliceledger Chain Network
    • Sliceledger Chain Mainnet
    • Sliceledger Chain Testnet
    • CLI Commands
    • Audit
    • Slice Faucet
  • Integrating Metamask
    • Add SliceLedger Chain Network to Metamask
    • Config Custom Token
    • How to Reset Metamask Wallet
  • Slice Ledger Protocols
    • SLICE Game
    • SLICE Reward
    • SLICE Privacy
  • SliceLedger Exclusive Products
    • Bharat NFT Marketplace
    • Bharat Token
    • Slice Crypto Wallet
    • Slice Wallet Extension
    • Bouquet NFT Collection
  • Enterprise Blockchain
    • Diamond Industry
  • SLICE Token
    • Technical
    • Utility
    • Coin Distribution
  • Developer Guide
    • Token Standards
      • SLICE-20 Tokens
      • SLICE-721 Tokens
    • Verify Smart Contract
  • Masternode
    • Masternode Requirements
    • Masternode Setup Guide
    • Run a Full SliceLedger Node
    • Apply For SliceLedger Masternode
    • Resign as Masternode
  • API
    • accounts
    • blockNumber
    • call
    • chainId
    • estimateGas
    • gasPrice
    • getBalance
    • getBlockByHash
    • getBlockByNumber
    • getBlockTransactionCountByHash
    • getBlockTransactionCountByNumber
    • getCode
    • getLogs
    • getStorageAt
    • getTransactionByBlockHashAndIndex
    • getTransactionByBlockNumberAndIndex
    • getTransactionByHash
    • getTransactionCount
    • getTransactionReceipt
    • getUncleByBlockHashAndIndex
    • getUncleByBlockNumberAndIndex
    • getUncleCountByBlockHash
    • getUncleCountByBlockNumber
    • getWork
    • hashrate
    • mining
    • protocolVersion
    • sendRawTransaction
    • submitWork
    • syncing
    • net_listening
    • net_peerCount
    • net_version
    • web3_clientVersion
    • parity_nextNonce
    • Filter methods
    • newFilter
    • newBlockFilter
    • getFilterChanges
    • uninstallFilter
  • Deploying on SliceLedger Chain
    • Using Remix
    • Using Truffle
    • Using Hardhat
Powered by GitBook
On this page
  • The smart contract
  • Compile Smart Contract
  • Verifying your Contracts on SliceLedgerScan
  1. Deploying on SliceLedger Chain

Using Remix

Hello World style starter project. Deploys a smart contract with a message, and renders it in the front-end. You can change the message using the interact panel!

PreviousDeploying on SliceLedger ChainNextUsing Truffle

Last updated 2 years ago

This dapp implements a "Hello World" style application that echoes a message passed to the contract to the front end. This tutorial is intended to be followed using the online IDE available at .

Setting up

  • Remix IDE is an online IDE to develop smart contracts.

  • If you’re new to Remix, You’ll first need to activate two modules: Solidity Compiler and Deploy & Run Transactions.

  • Search for 'Solidity Compiler' and 'Deploy & Run Transactions' plugins in the plugin tab in Remix.

  • Activate the two plugins

  • Select Solidity Environment

  • Copy/Paste the Smart contract below into the newly created file HelloSliceLedger.sol

The smart contract

pragma solidity ^0.8.10

contract helloWorld { 

  string public hello = "Hello World!"

}

Compile Smart Contract

  • Go to Solidity Compiler.

  • Select Compiler Version to 0.8.10.

  • Now, Compile Hello SliceLedger.sol

Now, We have to deploy our smart contract on SliceLedger Chain network. For that, we have to connect to web3 world, this can be done by using Metamask.

Please follow this tutorial to setup a Metamask Account.

  • Open Metamask and select Add Network from the networks dropdown.

  • Put in a Network name - “SliceLedger Testnet”

  • Enter the Chain ID: 1443

  • Go ahead and click save

  • Copy your address from Metamask

Now, let's Deploy the Smart Contract on SliceLedger Chain:

  • Select Injected Web3 in the Environment dropdown and your contract

  • Accept the Connection Request!

  • Once Metamask is connected to Remix, the ‘Deploy’ transaction would generate another Metamask popup that requires transaction confirmation.

Congratulations! You have successfully deployed HelloSliceLedger Smart Contract. Now you can interact with the Smart Contract.

Verifying your Contracts on SliceLedgerScan

The first and foremost step is to flatten the solidity contract into a single file.

Flatten your solidity contract

  • Flatten using command

sol-merger \"./contracts/*.sol\" ./build

Verifying Contract on SliceLedgerscan

  • Navigate to your contract's SliceLedgerscan page and then click verify and publish

  • Select Solidity (Single File) in compiler type

  • Select appropriate compiler version

  • Choose the license type of your contract

Onto the next section, paste your flattened contract here.

If you had enabled optimization then adjust the optimization section accordingly.

Constructor arguments should have been filled in automatically, if not, they can be retrieved from the trailing bytes of the deployment transaction, they resemble something like 0000000000000000076172d1a6fa476172d1fb5f76172d178d61b04b0ecd319c

If you have followed the process successfully, the contract would be verified.

Go to File Explorers, and Create a new file , Name it HelloSliceLedger.sol

The first line, pragma solidity ^0.8.10 specifies that the source code is for a Solidity version greater than 0.8.10. are common instructions for compilers about how to treat the source code (e.g., pragma once).

In URL field you can add the URL as "

(Optional Fields) Symbol: "SLICE" and Block Explorer URL: "

Head over to and request test SLICE- you will need this pay for gas on SliceLedger Chain.

Check the deployment status here: https://test.SliceLedgerscan.com/

Install or

Pragmas
https://test-slice-rpc.com
"
https://testnet-slicescan.io/
"
Slice Faucet
.
truffle-flattener
sol-merger
Remix IDE
Remix IDE