I wrote earlier that NFTs are an essential piece in the identity layer on web3.
Identities are contracts deployed on chain, thus has an address just like a user.
A user can deploy a contract for an identity. Each identity has multiple owners. Each owner has an equity in the identity.
constructor(address[] owners, uint[] equities) public
Owners can transfer NFTs to the contract
function transferNFT(address NFTCollection, uint tokenId) public {
// requires approval before this call
}
Anyone can check if the identity has an NFT from a certain collection
function hasNft(address NFTCollection) external returns(uint tokenId, uint since) {
// since = number of blocks since the NFT has been transferred to this identity
}
Once the NFT has been transferred to the identity it cannot be returned to the original owner. The only way to return it is to disintegrate the identity.
Anyone can transfer ERC20 tokens or native token to the contract. Any owner can add the addresses of tokens that they're willing to accept
function acceptErc20(address) public
All the money is stored in the contract. Any owner can initiate a withdraw. The money is sent to all the owners in proportion to their equities.
function withdraw() public {
// loop on all acceptedErcs, loop on all owners
}
To get all the money and NFTs back, any owner can call disintegrate
function disintegrateInit() {
require(msg.sender == one of the owners)
withdraw();
}
function disintegrateFinalize() {
// return all NFTs to original owner
}
The contract must be deployed to Optimism Mainnet and should have a simple UI. The UI must have the following
Maximum bounty 5000USDC!