-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaiko
More file actions
98 lines (76 loc) · 2.62 KB
/
Taiko
File metadata and controls
98 lines (76 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl enable docker
Check:
sudo docker run hello-world
If this, when GOOOD!
Hello from Docker!
This message shows that your installation appears to be working correctly.
git clone https://github.com/taikoxyz/simple-taiko-node.git
cd simple-taiko-node
cp .env.sample .env
nano .env
Changes:
ENABLE_PROPOSER - false to true.
PRIVATE_KEY вс - metamask private key
FEE_RECIPIENT - metamask address
Start:
cd simple-taiko-node && docker compose up -d
Logs:
cd simple-taiko-node && docker compose logs -f
Faucets:
https://l1faucet.a1.taiko.xyz/
https://l2faucet.a1.taiko.xyz/
Grafana check:
http://IP:3000/d/L2ExecutionEngine/l2-execution-engine-overview?orgId=1&refresh=5s
Deploying a smart contract in the Taiko A1 network:
1) Go to https://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.7+commit.e28d00a7.js
2) Press New file button
3) Create a file with any name *.sol
4) Paste the contract code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract taiko{
address public owner;
mapping (address => uint) public payments;
constructor() {
owner = msg.sender;
}
function Donate() public payable {
payments[msg.sender] = msg.value;
}
function MoneyBack() public {
address payable _to = payable(owner);
address _thisContract = address(this);
_to.transfer(_thisContract.balance);
}
}
5) Save: Control + S
6) Go to the Deploy and Run transaction section
7) In the ENVIRONMENT tab, change to Metamask
8) Go to your Metamask and be sure to select the Taiko A1 network
9) Click Deploy button and sign transaction
10) Click Donate button. Sign the transaction in Metamask
11) Click MoneyBack button. Sign the transaction in Metamask.
Test 2
cd simple-taiko-node && docker compose down
cd && rm -rf simple-taiko-node
git clone https://github.com/taikoxyz/simple-taiko-node.git
cd simple-taiko-node
cp .env.sample .env
vim .env
cd simple-taiko-node && docker compose up -d && docker compose logs -f
docker compose down -v
docker compose up -d
docker compose logs -f