Deploying your FoolProof Token in 3 steps
So you’re curious about the dark side, and you’re ready to get shadow b̶a̶n̶n̶e̶d̶ clanned? Welcome to the X-step guide.
Prerequisites:
- The FoolProof Discord: https://discord.gg/xb33xJBa
- The FoolProof Token GitHub: https://github.com/fool-proof-labs/shadow-token
- Your community’s collection (smart contract) address
Step 1: Download or clone the GitHub repository to your preferred environment.
Step 2: Notice that ERC721Surrogate takes 1 constructor argument:
the collection address that you want to shadow. Collect this address and prepare to deploy.
Step 3: If you want the classic immutable smart contract this is your last step! Pass in your collection address and deploy ERC721Surrogate to your network of choice. From the moment the contract is confirmed, your community’s shadows are instantly available, and instantly compatible with CollabLand.
Congratulations, your FoolProof Token is online!
Next Steps:
1. Verify the contract
2. Get to know the surrogate functions
3. Set the token URI for your shadows
Still here? Curious about the Upgradeable version?
ERC721Surrogate_Upgradeable uses the UUPS specification to restrict upgrades to the contract’s deployer / owner. To use this version
- Deploy the upgradeable and record this address
- Deploy your preferred proxy (e.g. ERC1967)
- Send a transaction to set the proxy implementation (see #1) and trigger the initialize(address collectionAddress) function with your smart contract address
Tip 1: The initialize(address) function has this format:
0xc4d66de80000000000000000000000005fbdb2315678afecb367f032d93f642f64180aa3
Tip 2: Avoid adding state variables to the proxy — this can affect the initilization data. Upgrade security is provided by the implementation via Ownable()
The call tree might look like this:
deploy ERC721Surrogate -> 0x123...def
deploy ERC1967(0x123...def, 0xc4d66de8...180)
'-> _upgradeToAndCallUUPS(0x123...def, 0xc4d66de8...180, false)
👏 Well done, you have a future-forward FoolProof Token. This address will be reusable forever, and paves the way for amazing new tech.
Security is just the beginning…
- Squeebo