Closed smartcontracts closed 7 months ago
I'll try working on this!
@abarthell sick! Let me know if you have any questions
@smartcontracts Am I on the right track for the NFT smart contract? (this is my first time using solidity)
Additionally, I have a few questions:
_l2Gas
to when I call depositETHTo? I read that the first 1.92 million gas on L2 is freeAlso, if you have another faster way I can communicate during this project, do let me know; I'll certainly have some more questions š Otherwise, I can just post here too if that's preferred
We built a prototype of bridge pass on Maindrop.xyz about a year ago. We didn't see a ton of demand then but maybe we should revisit on OP at some point.
Caught my attention while I was scrolling this in Starbucks, here's my implementation on OP Goerli using NFTs as "bridge passes".
Try it out or ping me to send you a pass for 0.25 goETH!
Contract address
https://goerli.etherscan.io/address/0x87554f0f593982a3ca3764dca4e209d68c331d7c
Some quick thoughts on this
@0xV4L3NT1N3 do you wanna collab on this? I'm also experimenting with account abstraction on the side
The contract is verified, source code is open source to be built upon! What do you think account abstraction can help with ?
The Squirrel Labs team would like to build Optimism Giftcards. We will provide an app and SDK for end-users to buy a gift card on mainnet that can be redeemed for oEth and OP. In other words, Alice can send a gift card to Bob, such that Alice pays for it on mainnet with ETH or USDC, and Bob can redeem the equivalent value on optimism in oEth or OP. Alice could be an individual, the Optimism Foundation, or any other party.
End users create a gift card that contains a special note for the recipient and can be redeemed for a certain amount of ETH or OP on OP Mainnet.
Here is a proposal of how this would work.
To make this work, the following parts are necessary:
Gift cards should be easy to send. Gift cards have a redeeming mechanism which makes them suitable in scenarios where the recipientās address is not known. Currently, sending tokens, even on one chain, requires a back-and-forth between Alice and Bob, even if keystore contracts are implemented:
*Alice: I want to send you $1 on optimism Bob: How do I check my optimism address? Alice: Do you have an EOA or a SC address? Bob: I donāt know. I have this thing with the fox. Alice: Oh, thatās an EOA then. So your address will be the same. Click the fox and copy the long thing starting 0xā¦ Bob: OK, here it is 0x4f73235220371e3f2dde9c8afc1c310bca7889f3 Alice: OK, Iāve sent you $1 in oEth. Bob: I donāt see it. How can I check? Alice: You have to select the Optimism network on MetaMask and then click Assets. Here is the receipt https://optimistic.etherscan.io/tx/0x6ba58320977e5ee8133d9a328e842e4bcb4fd5f5db188cb4723e3a2345d8b4d2 Bob: This is hard. I donāt want to bother you anymore, so I will read some tutorials on how to do this next week.
- Bob might or might not be converted to an Optimism user **
Instead, we propose a gift card mechanism that relies on claiming tokens from a QR code or token. In other words, Alice deposits funds and sends a URL or QR that lets Bob withdraw the funds. The frontend ensures that Bob is connected to Optimism and adds Optimism if it has not been added. In effect, here is what gifting tokens this would look like this:
*Alice: I am sending you $1 in oEth to get you started on OptimismĀ https://peanut.to/claim?c=opt&v=v3&i=1401&p=5MagiC6PZq2Dwrp7 **
Bob: Ok, thanks! šæļø
So how does it work? The link is simply a user-friendly way of sending an off-chain message. All it is an array of parameters: For instance this Peanut linkĀ https://peanut.to/claim?c=3&v=v3&i=1251&p=twLDK7YWL9tOZi9A
Ā is actually just a medium for the following information:
{
"chain-id": 3,
"version": "v3",
"transfer-id": 1251,
"secret": "twLDK7YWL9tOZi9A"
}
The claim function on the frontend then ensures that that this array is relayed to an RPC.
If itās just an array of data, why use links? Because links will have a frontend that will deliver the JSON to the right place. Without such a frontend, each app would have to integrate a receive and send functionality within their app. URLs are already compatible with all devices, dapps, messengers and wallets without requiring any integration. The crazy thing is: everyone with internet access can already use this cutting-edge decentralised protocol called HTTPS, without any onboarding. This means links are compatible with a web2 audience too. In such a case, the frontend can guide a crypto newbie through the onboarding process, which with account abstraction will be a few clicks.
Alice should be able to buy a gift card on mainnet that can be redeemed on Optimism by Bob.
To do this, funds are deposited into Peanut Protocol on mainnet and then bridged to oEth on Optimism using Axelar and Squid. That is, Alice deposits $1 in Eth to Peanut Protocol on mainnet, and sends the gift card to Bob. As soon as Bob connects his wallet and reveals his Optimism wallet address, the mainnet Peanut Protocol smart contract routes the funds to Squid for bridging. Bob can click claim and no further action is required. The release of the funds will be triggered and gas will be paid by a paymaster from a gas pool for optimism onboarding.
Keep in mind that Alice and Bob could be the same person, making this useful also for onboarding oneself, rather than others.
Optimism folks, if you're interested, let's chat some more! @0xkkonrad or mail konrad at peanut.to
@smartcontracts lmk whether it makes sense to do this!
@0xkkonrad I've been experimenting with a similiar concept, how far along are you?
we're live :)
What is an Ecosystem Project Idea?
An Ecosystem Project Idea is an idea for a project that someone could build within the Optimism ecosystem. As opposed to an Ecosystem Concept or an Ecosystem Idea, an Ecosystem Project is generally more fleshed out and corresponds to a relatively clear product to be built.
Summary
Bridging UX today is a blocker to more people onboarding onto L2s. Weāve heard this especially for NFT users, who tend to be less technical and daring with random interfaces that take their tokens. Gift cards are a great way to get someone into the L2 ecosystem.
From the Bridge Pass Mirror post:
Create a gift card NFT that contains a special note for the recipient and can be redeemed for a certain amount of ETH or OP on OP Mainnet. The gift cards could live either on L1 or on L2.
Possible Features
Impact