By far this was the most ambitious challenge but also the most fun to implement. As there are several things that this contract does, we are going to analyze use cases and explain the functions that are being executed in the process.
Let’s start by looking at the typical use case: Collect all four keys and claim the bounty.
When we mint a token that has a key, what actually happens is that the token does not have the key, but rather has the right to claim it.TheCursedOne is a contract similar in its operation with WantedCaptains except for some details that we are going to analyze. Let’s remember that in TheCursedOne there is only one token that we can claim and for them we must obtain tokens that know the eight stanzas that compose the poem that we are trying to complete. The other detail is that these stanzas must be written down and at the time of pronouncing the poem we must still possess at least four of the eight tokens that provided them to us.As we mentioned in The Stories section, Wanted goal is obtaining two special tokens that betray a specific captain in order to gain the right to claim that captain’s token. At the beginning of this section we analyzed how the secrets work in BuccaneerCircus and how through them we can know if a token is special or not. Let’s start, then, by analyzing the function that allows us to know if any of our tokens is an informer of a captain.Smart contracts are probably the most interesting and complex part of the project and that is why we will spend more time understanding them.
In what follows we will first explain the concept of secret that is common to all three contracts and then we will analyze each contract separately. Some very technical issues may be omitted, but the analysis that we will carry out here is much more in-depth than the previous ones, trying to achieve a good understanding of the logic behind the contracts.Architecture A fundamental part of BuccaneerCircus is the different components of its architecture and how they cooperate to make everything work.
Among the requirements that define this architecture, the most relevant is the progressive disclosure of metadata, something that will make more sense when we analyze smart contracts. For the moment we must know that it will be necessary for some metadata fields to remain hidden until the corresponding token is minted.The Beginning At the beginning of 2021 we had the idea of creating a game taking advantage of NFT technology for its implementation. Although many ideas arose, most of them greatly exceeded the resources of time and money that we had to carry them out. However, we liked one idea because of its simplicity and because it allowed us to make a first approach to what we were looking for, with a good chance of coming to fruition.