Engram Tokio Chain Testnet
Participants need to install Metamask Wallet and connect to our EVM chain configuration. Please create new Wallet, save wallet address and private key. (note 1)
Blockchain Name: Engram Tokio Testnet
RPC Address: https://tokioswift.engram.tech
Chain ID: 131
Ticker: tGRAM
Explorer: https://tokioscan-v2.engram.tech
Faucet:
Server preparation
Ubuntu 22.04
Port Required:
8545/tcp
30303/tcp-udp
8551/tcp
Copy sudo apt update && apt upgrade -y
sudo apt install git curl -y
sudo apt install make clang pkg-config libssl-dev build-essential -y
Install Docker
Copy sudo apt install curl -y && curl -sO https://nodesync.top/docker_install && chmod +x docker_install && bash docker_install
Setup Node Engram
Copy git clone https://github.com/engram-network/tokio-docker.git
cd tokio-docker
git checkout dencun
chmod +x ./scripts/*.sh
./scripts/install-asdf.sh
mkdir -p execution consensus
Copy eth2-val-tools --help
ethereal version
Once everything required is fulfilled, you need to create a mnemonic phrase to prepare the deposit data. Keep your 24 words mnemonic! (note 2)
Copy eth2-val-tools mnemonic
Change your info in file validator-deposit-data.sh
Copy nano scripts/validator-deposit-data.sh
withdrawals-mnemonic: your mnemonic phrase from generate eth2-val-tools. (note 2)
validators-mnemonic: your mnemonic phrase from generate eth2-val-tools. (note 2)
from: address that was already funded from the faucet. (note 1)
privatekey: your privatekey address that has funds from the faucet. (note 1)
Run the following command to generate final the deposit data
You need faucet token and and check have 32 token on wallet (note 1) , before run bellow
Copy bash scripts/validator-deposit-data.sh
Validator Build
Copy bash scripts/validator-build.sh
Please choose your language ['1. العربية', '2. ελληνικά', '3. English', '4. Français', '5. Bahasa melayu', '6. Italiano', '7. 日本語', '8. 한국어', '9. Português do Brasil', '10. român', '11. Türkçe', '12. 简体中文']:
choose 3 + enter
Please repeat the index to confirm:
choose 0 + enter
Please enter your mnemonic separated by spaces (" "). Note: you only need to enter the first 4 letters of each word if you'd prefer.:
Paste your 24 words mnemonic! (note 2) + enter
Please choose the (mainnet or testnet) network/chain name ['mainnet-soon', 'devnet-1', 'devnet-3', 'devnet-4', 'devnet-5', 'testnet']: [mainnet-soon]:
choose testnet + enter
Enter yourpass and enter again
Copy nano docker-compose.yml
Change your info by note red on bellow image
ctrl+o, enter
ctrl +x
You see result bellow
[+] Running 4/4
⠿ Network tokio_default_default Created
⠿ Container striatum_init Exited
⠿ Container striatum_el Started
⠿ Container lighthouse_init Exited
⠿ Container lighthouse_cl Started
⠿ Container lighthouse_vc Started
Check logs
Copy docker logs -f striatum_el
Copy docker logs -f lighthouse_cl
Create Contract
Copy // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ERC20Token {
string public name = "xxxxxxxx";
string public symbol = "xxx";
uint8 public decimals = 18;
uint256 public totalSupply = 1000000 * 10**uint256(decimals);
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
balanceOf[msg.sender] = totalSupply;
}
function transfer(address to, uint256 value) public returns (bool success) {
require(to != address(0), "Invalid address");
require(balanceOf[msg.sender] >= value, "Insufficient balance");
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
function approve(address spender, uint256 value) public returns (bool success) {
require(spender != address(0), "Invalid address");
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
require(from != address(0), "Invalid address");
require(to != address(0), "Invalid address");
require(balanceOf[from] >= value, "Insufficient balance");
require(allowance[from][msg.sender] >= value, "Allowance exceeded");
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
}