티스토리 뷰

Arbitrum stylus testnet faucet

 

Arbitrum Stylus Testnet Faucet - Bware Labs

Daily token allocation:15 Tokens claimed:2.1 Tokens left:12.900 Arbitrum Stylus Testnet Faucet Arbitrum is a L2 solution that enhances Ethereum's scalability by providing quicker transactions and lower costs, without compromising security. Stylus is an exc

bwarelabs.com

네트워크 이름 Stylus testnet
RPC URL https://stylus-testnet.arbitrum.io/rpc
체인 ID 23011913
통화 기호 ETH
블록 탐색기 URL https://stylus-testnet-explorer.arbitrum.io/

 


stylus 설치

설치

$ RUSTFLAGS="-C link-args=-rdynamic" cargo install --force cargo-stylus

빌드 타겟 설정

$ rustup target add wasm32-unknown-unknown

설치 확인

$ cargo stylus --help
Cargo command for developing Arbitrum Stylus projects

Usage: cargo stylus <COMMAND>

Commands:
  new         Create a new Rust project
  export-abi  Export a Solidity ABI
  check       Check that a contract can be activated onchain
  deploy      Deploy a stylus contract
  replay      Replay a transaction in gdb
  trace       Trace a transaction
  help        Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

stylus 프로젝트 생성

cargo stylus new <프로젝트명>

$ cargo stylus new counter
Cloning into 'counter'...
remote: Enumerating objects: 243, done.
remote: Counting objects: 100% (85/85), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 243 (delta 43), reused 53 (delta 30), pack-reused 158
Receiving objects: 100% (243/243), 652.46 KiB | 1.65 MiB/s, done.
Resolving deltas: 100% (121/121), done.
Initialized Stylus project at: /home/piatoss/counter
  •  stylus-hello-world의 사본을 생성
  • --minimal 플래그를 사용하여 더 간단한 구조의 프로젝트 생성 가능

디렉터리 구조

$ cd counter/
$ tree
.
├── Cargo.lock
├── Cargo.toml
├── README.md
├── examples
│   └── counter.rs
├── header.png
├── licenses
│   ├── Apache-2.0
│   ├── COPYRIGHT.md
│   ├── DCO.txt
│   └── MIT
└── src
    ├── lib.rs
    └── main.rs

3 directories, 11 files

프로젝트 유효성 검사

$ cargo stylus check

...

Uncompressed WASM size: 29.4 KB
Compressed WASM size to be deployed onchain: 10.7 KB
Connecting to Stylus RPC endpoint: https://stylus-testnet.arbitrum.io/rpc
Program succeeded Stylus onchain activation checks with Stylus version: 1

stylus 프로젝트 배포

가스비용 확인

$ cargo stylus deploy --private-key <프라이빗 키> --estimate-gas-only

...

====DEPLOYMENT====
Deploying program to address 0x4addc1557a14457AE4e9176de7B86e10e0e8d7Ac
Base fee: 0.100000000 gwei
Estimated gas for deployment: 16715512 gas units

배포

$ cargo stylus deploy --private-key <프라이빗 키>

...

====DEPLOYMENT====
Deploying program to address 0x4addc1557a14457AE4e9176de7B86e10e0e8d7Ac
Base fee: 0.100000000 gwei
Estimated gas for deployment: 20727838 gas units
Submitting deployment tx...
Confirmed deployment tx 0xba952bb6c920f8c9d3fb15250022cb895e47c0b6e39c8f0e39c0273b585e216c
Gas units used 18858620, effective gas price 0.100000000 gwei
Transaction fee: 0.001885862000000000 ETH

====ACTIVATION====
Activating program at address 0x4addc1557a14457AE4e9176de7B86e10e0e8d7Ac
Base fee: 0.100000000 gwei
Estimated gas for activation: 14345129 gas units
Submitting activation tx...
Confirmed activation tx 0xe106799bf33aa0c4483e1b5f235c0d37d0389673aff3c34387fb8d0ac04d4ab8
Gas units used 14278678, effective gas price 0.100000000 gwei
Transaction fee: 0.001427867800000000 ETH

stylus testnet 블록 탐색기 확인

 

Contract 0x4addc1557a14457AE4e9176de7B86e10e0e8d7Ac - Stylus Testnet Explorer

No Yes

stylus-testnet-explorer.arbitrum.io

최근에 올라온 글
최근에 달린 댓글
«   2025/01   »
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
Total
Today
Yesterday
글 보관함