Build with EPS #2 - Allowlists

You have allowlisted 25,000 cold wallets. Will any of them dare connect a cold wallet to your app??

Build with EPS #2 - Allowlists
Photo by Kilyan Sockalingum / Unsplash

Make sure they can get in....

Picture the scene: you're ready to drop, and you've come up with a great way to get your brand out there!  

There are some amazing NFT communities that you want to get onboard. You're going to allowlist these communities, so holders of these NFTs get a discount, or maybe even something for free?!

But there is a BIG problem. These NFTs are valuable, and most holders keep them locked up tight in cold wallet vaults. And these communities are relentlessly targeted by scammers, so holders are very reluctant to connect their cold wallets to apps in order do anything, including minting new NFTs.

Your allowlist is mostly cold wallets. And while your project is going to be huge, it's relatively unknown right now. Many people aren't going to take the risk of connecting their cold wallet to your minting app.

"My project is amazing. But will my allowlist holders risk minting??" Photo by Ethan Sykes / Unsplash

But hey, what else can you do?

You can use EPS...

EPS allows people to connect with a hot wallet with a handful of wei in and still prove that they own 480 bored apes in a cold wallet.

But you know that already, right? If not, read up here.

EPS and merkle tree allowlists fit together like they were made for each other. Because, uh, they were.

Add EPS to your merkle tree check in under 60 seconds or your money back

Ten key accounting calculator on yellow desk.
"Thank you, here is your 100% refund of nothing" Photo by StellrWeb / Unsplash

First of all the bad news: you're paying nothing for EPS, so there is no money for you to get back.

But, I truly believe you can add this to your contract in under a minute.

I am assuming you have a contract with a merkle tree allowlist check in there already. This article doesn't cover how you do that, just how you add EPS into the mix. If you really want an article on how to use a merkle tree for allowlist minting hit me up on twitter @eternalproxy and I'll think about writing one.

To add EPS to an existing merkle tree allowlist check do this:

😎
Import the EPSPortal

This provides a valid EPS object. (EPS is at the same address on all supported chains, no need to hunt through docs to find the right address to add to your constructor, it's already taken care of).

    
import "@eternalproxy/contracts/EPSPortal.sol";
    
🥳
Call getAddresses to get the cold address

We are going to use the getAddresses view in the EPS portal to tell us if the connected wallet has an EPS cold wallet associated.

Immediately before your merkle check add the following call:

    
(address coldWallet, , ) = epsPortal.getAddresses(msg.sender);
    

If the connected wallet has an EPS cold wallet you will now have that address in variable coldWallet. If it doesn't have an EPS cold wallet the connected wallet address is now in coldWallet. This makes this call 100% backwards compatible.

What do I do with 'coldWallet'?

Just pass coldWallet into your merkle check and you will be able to allowlist all those webaverse / ape / punk / wassie holders that have cold wallets on your allowlist and who have their cold wallet ledger devices buried in 3 feet of reinforced concrete.

(A note - cold wallets on an EPS record can't call getAddresses directly, they must operate through the hot wallet. This is important, otherwise they could mint through an EPS hot wallet call (returning the cold wallet address), and interacting directly. That would be double-dipping and just not fair, so we don't allow it).

Wait, am I all done?

You contract changes are done!

You need to make sure that you are passing in the right merkle proof from your front-end app. This means you need to check for the cold address in your front-end and calculate the proof for the cold wallet you get back for the hot (you can call the same function as above to get the cold wallet address).

Surely there is more?

No, you are done. Go touch grass friend.

Morning Dew
Photo by Ochir-Erdene Oyunmedeg / Unsplash

But I want there to be more!

OK, if you want to go next level and delight and amaze your new community make the call to getAddresses do this:

    
(address coldWallet, address deliveryWallet, ) = epsPortal.getAddresses(caller_);
    

The variable deliveryWallet now has the address that the holder has said they want new assets to go to. If you mint directly to this address you are allowing your new holder to get new assets directly where they want them. Maybe even to that ledger buried in 3 feet of reinforced concrete.

They don't have to shuffle from hot to cold. And now that your NFT is in their vault they will probably just hold it forever.

Which is what you both want, right?

Stay safe out there.