Skip to content

Instantly share code, notes, and snippets.

@novaknole
Created December 8, 2021 18:03
Show Gist options
  • Save novaknole/36905837dff70cdfa6b685187f296dd6 to your computer and use it in GitHub Desktop.
Save novaknole/36905837dff70cdfa6b685187f296dd6 to your computer and use it in GitHub Desktop.
We create Genesis Contract, with 10,000 NFT's max. Users in the pre-sale mode can mint max 5, and in the public sale,
they can mint as many as they want, though, each mint transaction can mint max 20. So one user can mint 20 and
then call mint again and mint another 20.. When Genesis's public sale is done, we build another contract Called Stage2Airdrop
and depending on how many users bought on Genesis, we give them specific badge NFTs.
if user bought 5, we give him black ops badge NFT
Question 1: if user bought 10, we give him 2 black ops and if user bought 14,
we give him 2 black ops + 1 Special ops ? Is this correct assumption ?
If user has black ops badge id on Stage2Aidrop contract, he is always gonna have this.
One scenario we talked about was what if this user sells let's say 3 genesis NFTs, ?
Should this user still be black ops on Stage2Aidrop ? But downgrading his rank or upgrading is complicated,
so even if he sells NFTs on Genesis, he still stays whatever badge he was on Stage2Aidrop.
Now, we could have such scenario at this point
Genesis Mint
Giorgi - 5
Nelson - 4
Michael - 2
Using merkleproof solution here in order to airdrop badges on Stage2Aidrop might be wrong, because we need to figure out
which badge to give the user at that EXACT time he tries to get his badge, because if we say at 14:00h user deserves to get
black ops, by the time Stage2Aidrop is deployed and run, user might have sold the Genesis NFT and won't be eligible for black
ops anymore. So one 100% guaranteed way is to ask users to click mint function on Stage2Aidrop again.
Then, We generated on Stage2Aidrop depending on the above Genesis Mint information/results.
Giorgi - black ops
Nelson - special ops
Michael - intel handler
Now, before stage 3, Giorgi sold his 1 NFT to Nelson, and sold his 1 NFT to new user, Jordan.
Scenario now is this:
On Genesis:
Giorgi - 3
Nelson - 5
Michael - 2
Jordan - 1
Now, we deploy stage 3 contract.
Let's say now, Marlon comes in and tries to mint. (Marlon has no Genesis NFT) and now uses
Giorgi's badge id(which is black ops)
We do the following:
1. Check if badgeId exists on Stage2Aidrop contract
2. We check and get how many NFT's Giorgi has on Genesis(it's 3)
3. We check and get how many NFT's Marlon has on Genesis(it's 0)
Now, % of how much should go to Giorgi depends on the number 3(that he currently has) and not the badge he has(which is black ops).
So, Giorgi will get 30% of the money. One thing to note is that Marlon will get his minted token,
but he won't be able to retire Giorgi, as Marlon has 0 tokens on Genesis, and in order to retire Giorgi,
Marlon needs to have Question 2: 3 or 5 ?
Another scenario: Let's say that Marlon had 3 on Genesis and it requires 3 to retire Giorgi.
Now, Marlon should mint also 3 on the stage 3 contract to retire Giorgi. Let's say all checks out.
So how do we do the retire ? And if the Marlon retires Giorgi, Question 3: Marlon gets still black ops badge, right ?
Even though Giorgi has 3 tokens and implicitly, he is not black ops anymore.
Solution 1: we burn Giorgi's Badge on Stage2Aidrop contract and he loses the badge, but how does Marlon get that badge now ?
So idea will be that we burn Giorgi's badge and mint the same tokenId on the Marlon. This will require Stage3 contract to call Stage 2 contract and
Stage 2 will need some kind of permissions that can only be called from Stage 3.
Solution 2: Giorgi has to somehow call Approve on his badgeId for Stage2Airdrop Contract at some point and
then stage2Aidrop will call transferFrom later on to give it to Marlon.
When does Giorgi call Approve ? Maybe when we mint tokens to Giorgi on Stage 2 Airdrop, we automatically call approve.
@nalonsoxcode
Copy link

Question 1: if user bought 10, we give him 2 black ops and if user bought 14,
we give him 2 black ops + 1 Special ops ? Is this correct assumption?

Answer 1: For pre-sale we lock it at 5-per wallet. Public sale the above is correct.

Question 2: How many NFTs does a person need to Retire a TBI Agent.
How can a sponsored user "Retire" a TBI Agent and take his place:
IF sponsored user has 1 NFT from Genesis Mission and Mints 1 NFT from new sponsored mission he can retire a Field Ops Agent
IF sponsored user has 2 NFT from Genesis Mission and Mints 2 NFTs from new sponsored mission he can retire an Intel Handler Agent
IF sponsored user has 3 NFT from Genesis Mission and Mints 3 NFTs from new sponsored mission he can retire a S.W.A.T. Agent
IF sponsored user has 4 NFT from Genesis Mission and Mints 4 NFTs from new sponsored mission he can retire a Special Ops Agent
IF sponsored user has 5 NFT from Genesis Mission and Mints 5 NFTs from new sponsored mission he can retire a Black Ops Agent

Question 3:
All logic to determine how much does a TBI Agent can collect from Sponsored sales, and if he can be retired, must be made at the time the sponsored individual mints using that agent's TBI Badge ID. It all depends on how many Genesis NFTs he holds at that point regardless of Badge rank.

Question 4: What happens to "Retired agent badge". Two options here. 1- burn it and mint new badge for the person doing the retiring based on how many Genesis NFTs he holds. 2- (preferred) Change metadata on old retired badge to a json file that has "retired:yes" and change token image URL to a black star, and mint new badge for person doing the retiring with new badge ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment