Deploy a Smart Contract - GIWA

GIWA is fully EVM-equivalent, so contracts deploy using the standard Solidity toolchain — Foundry, Hardhat, or Remix — with a GetBlock endpoint. This guide covers adding the network to a wallet and deploying a first contract to GIWA.

Prerequisites

Network Details

PropertyGIWA
Chain ID91342 (0x164ce)
RPC URLhttps://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/
Currency SymbolETH
Block Explorersepolia-explorer.giwa.io

Ethereum Mainnet and Sepolia are pre-configured in MetaMask by default. GIWA is not, so it must be added manually — use the button below or the manual steps that follow.

This guide targets GIWA (a test network). Deploy and exercise contracts here before deploying to any production network. Never commit a real private key: use environment variables and a throwaway deployer key for testing. Private keys committed to a public repository are drained within seconds by automated bots.

Add Network to Your Wallet

  1. Open MetaMask (or your EVM wallet of choice).
  2. Click the network dropdown at the top of the wallet.
  3. Click Add network → Add a network manually.
  4. Enter the network details from the Network Details table above.
  5. Save and switch to the newly added GIWA network.

Deploy with Foundry

  1. Install Foundry
bashcurl -L https://foundry.paradigm.xyz | bash
foundryup
  1. Create a project
bashmkdir giwa-deploy && cd giwa-deploy
forge init
  1. Create a contract — save as src/HelloGiwa.sol:

src/HelloGiwa.sol

solidity// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

contract HelloGiwa {
    function hello() external pure returns (string memory) {
        return "Hello, GIWA";
    }
}
  1. Deploy — export your credentials and broadcast:
bashexport PRIVATE_KEY=0xyour_throwaway_test_key
export GIWA_RPC_URL=https://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/

forge create src/HelloGiwa.sol:HelloGiwa \
  --rpc-url $GIWA_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast
  1. Verify on the block explorer — GIWA uses a Blockscout explorer:
bashforge verify-contract <CONTRACT_ADDRESS> src/HelloGiwa.sol:HelloGiwa \
  --chain-id 91342 \
  --verifier blockscout \
  --verifier-url https://sepolia-explorer.giwa.io/api/

Deploy with Hardhat

  1. Create a project
bashmkdir giwa-deploy && cd giwa-deploy
npm init -y
npm install --save-dev hardhat
npx hardhat init
  1. Configure the network — populate hardhat.config.js:

hardhat.config.js

javascriptrequire('@nomicfoundation/hardhat-toolbox');

const GIWA_SEPOLIA_CHAIN_ID = 91342;

module.exports = {
  solidity: '0.8.30',
  networks: {
    giwaSepolia: {
      url: 'https://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/',
      chainId: GIWA_SEPOLIA_CHAIN_ID,
      accounts: [process.env.PRIVATE_KEY]
    }
  },
  etherscan: {
    apiKey: { giwaSepolia: 'blockscout' },
    customChains: [
      {
        network: 'giwaSepolia',
        chainId: GIWA_SEPOLIA_CHAIN_ID,
        urls: {
          apiURL: 'https://sepolia-explorer.giwa.io/api/',
          browserURL: 'https://sepolia-explorer.giwa.io'
        }
      }
    ]
  }
};
  1. Create a contract — save as contracts/HelloGiwa.sol:

contracts/HelloGiwa.sol

solidity// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

contract HelloGiwa {
    function hello() external pure returns (string memory) {
        return "Hello, GIWA";
    }
}
  1. Compile and deploy — save as scripts/deploy.js, then run it:

scripts/deploy.js

javascriptconst hre = require('hardhat');

async function main() {
  const contract = await hre.ethers.deployContract('HelloGiwa');
  await contract.waitForDeployment();
  console.log('HelloGiwa deployed to:', await contract.getAddress());
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});
bashexport PRIVATE_KEY=0xyour_throwaway_test_key
npx hardhat compile
npx hardhat run scripts/deploy.js --network giwaSepolia
  1. Verify on the block explorer
bashnpx hardhat verify --network giwaSepolia <CONTRACT_ADDRESS>