Content pfp
Content
@
0 reply
0 recast
2 reactions

scottrepreneur pfp
scottrepreneur
@scottrepreneur.eth
I'm looking for a simple example of using `L1CrossDomainMessenger` to move tokens/NFTs for a @safe on L1 to the aliased address on the /op-stack. @bountybot 0.125 ETH or equivalent on L2 Success criteria: 1. Safe on L1 with aliased address on L2 2. NFT and/or ERC20 tokens in the aliased address on L2 3. Execute a tx cross-chain via Safe to move the NFT/token to any other address Demo can be on Sepolia and Base/OP Sepolia with a Safe you control. Specifically looking to understand the message required to execute this transfer on the L2 address. Base contracts https://docs.base.org/docs/base-contracts Possibly relevant docs https://docs.optimism.io/connect/resources/glossary#address-aliasing https://docs.optimism.io/builders/app-developers/tutorials/cross-dom-solidity
8 replies
4 recasts
15 reactions

Drew Fisher pfp
Drew Fisher
@drewf.eth
Been a minute since I read those docs, but I think you might need to use the portal contract directly instead of xDM. I assume you want these to happen in separate transactions for clarity?
1 reply
0 recast
1 reaction

scottrepreneur pfp
scottrepreneur
@scottrepreneur.eth
Interesting! Yeah, likely multiple txs for the whole flow. With one tx to execute transferring out of the L2 aliased address.
1 reply
0 recast
0 reaction

Drew Fisher pfp
Drew Fisher
@drewf.eth
Ok I bridged an ERC721 to base, then tried transferring it out of the canonical bridged 721 implementation. Sending a message to it via xDM didn't have permissions to move the token from the aliased address, but transacting directly through the portal did. I'll make a thread with some tx links here.
1 reply
0 recast
1 reaction

Drew Fisher pfp
Drew Fisher
@drewf.eth
I couldn't think of a easy to acquire 721 on mainnet besides a UniV3 position, so that's what I used. To save on gas, I deployed OptimismMintableERC721 for it directly on base, in order to have a destination to bridge the token to. (You can build your own contract for this, with more functionality) https://basescan.org/tx/0x37b662511581a90506f7ea21cd5593195344b599f9472ea7381cda5585b08ba1
1 reply
0 recast
1 reaction

Drew Fisher pfp
Drew Fisher
@drewf.eth
Next, I approved the L1ERC721Bridge to take my NFT, and called bridgeERC721To( univ3_positions_mainnet_addr, just_deployed_univ3_positions_base_addr, my_safe_aliased_addr, tokenId, 5000000gas, 0x) https://etherscan.io/tx/0xb5fb089c405cceefd429e68ca29366ca2c0607837b784bc8e7d1464e061f208e/advanced
1 reply
0 recast
1 reaction