base-org / op-viem

Viem extensions for the Op Stack
https://opviem.sh
MIT License
345 stars 235 forks source link

Add a stackblitz using op-viem #93

Open roninjin10 opened 1 year ago

roninjin10 commented 1 year ago

Add a sharable example of using op-viem to mint an nft on l2 from l1

sbauch commented 1 year ago

I've got a first pass at this after DMing with @roninjin10 about it!

here's the relevant part of the code in my repo - https://github.com/sbauch/op-viem-contract-deposit-example/blob/main/src/App.tsx

Struggled a bit getting set up, and some TODOs before I go too far:

roninjin10 commented 1 year ago

Yea looks good. I can publish the latest code for you. You would want this to be its own GitHub repo. We can fork it. Once you got a GitHub repo to open it in stack blitz you just go to the url with the GitHub url at the end like this https://stackblitz.com/~/github.com/evmts/evmts-vite-wagmi-example .

for the nft the contract you grabbed from evmts is deployed to op goerli. You can use that contract address