Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Stylish-Stylus/zig-stylus
Zig SDK for stylus smart contracts
https://github.com/Stylish-Stylus/zig-stylus
Last synced: 14 days ago
JSON representation
Zig SDK for stylus smart contracts
- Host: GitHub
- URL: https://github.com/Stylish-Stylus/zig-stylus
- Owner: Stylish-Stylus
- Created: 2023-12-09T05:21:59.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-30T08:41:27.000Z (11 months ago)
- Last Synced: 2024-08-02T11:22:08.254Z (4 months ago)
- Language: Zig
- Homepage:
- Size: 11.2 MB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-stylus - Zig Stylus - Zig SDK for Stylus smart contracts (Tools)
README
# Zig Stylus
Zig Stylus is an Arbitrum Stylus SDK for the Zig programming language, designed for writing WebAssembly (WASM) smart contracts. It offers a concise and minimal syntax for those who prefer not to use Rust, providing an alternative for developing Zig smart contracts on the Arbitrum Stylus platform.
**Note: This library is still in development and not mature enough for production use.**
# Installation
1. Install Cargo Stylus CLI:
```bash
cargo install cargo-stylus
```2. Install Foundary Cast for calling deployed contracts:
```bash
curl -L https://foundry.paradigm.xyz | bash
```3. Clone the Repository
```bash
git clone https://github.com/Stylish-Stylus/zig-stylus.git
cd zig-stylus
```4. Build your Contract
```bash
zig build-lib ./src/main.zig -target wasm32-freestanding -dynamic --export=user_entrypoint -OReleaseSmall
```
5. Check Deployment Compatibility
```bash
cargo stylus check --wasm-file-path main.wasm
```
6. Deploy to Arbitrum Stylus```bash
cargo stylus deploy --wasm-file-path chainid.wasm --private-key
```
7. Call Contract Entry Point```bash
./cast call --rpc-url 'https://stylus-testnet.arbitrum.io/rpc'
```