omgnetwork / optimism-v2

ARCHIVE of monorepo implementing Boba, an L2 Compute solution built on Optimistic Ethereum - active repo is at https://github.com/bobanetwork/boba
https://github.com/bobanetwork/boba
MIT License
40 stars 22 forks source link

Bridges: Semi-automize process of registering NFT pairs #479

Open wsdt opened 2 years ago

wsdt commented 2 years ago

NOTE: Once you have your L2StandardERC721 address, please contact us so we can register that address in the L1 and L2 NFT bridges.

Gas on Boba is cheap, why not letting people register their NFT pairs directly on the bridge and Boba then simply has to approve the pairs afterwards:

E.g.:

 // Info of each NFT
    struct PairNFTInfo {
        address l1Contract;
        address l2Contract;
        Network baseNetwork; // L1 or L2
        bool approved; // default false
    }

So users can add their contracts here via external function and boba (onlyOwner) simply has to set the pair to approved = true.

Nevertheless, this could come with 2 risks:

Curious to know what you think and if this has more advantages than disadvantages in your opinion! :-)