Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.66 KB

README.md

File metadata and controls

49 lines (31 loc) · 1.66 KB

// THIS CODE IS LIT 🌿🔥

About

This repository provides instructions on how to deploy your smart contract to the WVM testnet using Forge. It focuses on the Arweave precompiles (0x17, 0x18) to provide a tutorial on how to read and write data to Arweave from the EVM smart contract interface.

Example deploy address for Merged Precompiles 0x69420

0x9fb0F63B569f9FD8718Bbb2856a4b6F2458C2d70

Prerequisites

  • Foundry installed
  • Your smart contract ready for deployment

Deployment Steps

forge create src/MergedPrecompiles0x69420.sol:MergedPrecompiles0x69420 --rpc-url https://testnet-rpc.wvm.dev/ --private-key <private key starting with 0x...> --gas-price 10gwei

Calling methods

cast call 0x9fb0F63B569f9FD8718Bbb2856a4b6F2458C2d70 "read_from_arweave(string)" <ArweaveTXID> --rpc-url https://testnet-rpc.wvm.dev

cast call 0x9fb0F63B569f9FD8718Bbb2856a4b6F2458C2d70 "upload_to_arweave(string)" <dataString> --rpc-url https://testnet-rpc.wvm.dev

Helper method example:

sh ./script/upload.sh

Feel free to substitute / change the contract address

Notes

  • The RPC URL https://testnet-rpc.wvm.dev is for the WVM testnet.
  • Make sure you have sufficient test tokens from the faucet for gas fees.

Additional Resources

License

This repository is licensed under the MIT License