base-org/op-viem

Add a stackblitz using op-viem

roninjin10 opened this issue · 2 comments

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

sbauch commented

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:

  • I am using a version of this package published here, which seems a bit more recent than the canonical package - https://www.npmjs.com/package/@roninjin10/op-viem
  • Should the example include contract source so that the stackblitz can be used to mint an L2 NFT? Is there maybe an NFT contract already deployed that's worth using here? I'm just using a random address for now, and the repo includes a contract borrowed from some EVMts examples
  • If the example should follow all the way through minting, then I'll want to add some functionality around tracking the transactions
  • unsure if this should be part of this repo, and haven't yet pushed anything to stackblitz, maybe it should be under your team?

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