-
Notifications
You must be signed in to change notification settings - Fork 28
Feat: Vdf Mint ADO #830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat: Vdf Mint ADO #830
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
#[cw_serde] | ||
pub enum ExecuteMsg { | ||
#[attrs(restricted, nonpayable)] | ||
AddActors { actors: Vec<AndrAddr> }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users should also have the option to remove actors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added remove_actors function
Can't we achieve this by extending the functionality of our Permissioning system? For example we already can limit the number of uses for a given action. |
Of course, it would be nice if we could extend the Permissioning system to add this functionality. |
RemoveActors { actors: Vec<AndrAddr> }, | ||
#[attrs(nonpayable)] | ||
VdfMint { token_id: String, owner: AndrAddr }, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MINT_COOLDOWN_MINUTES
should be customized as well.
msg: to_json_binary(&andromeda_non_fungible_tokens::cw721::ExecuteMsg::Mint { | ||
token_id, | ||
owner: owner.get_raw_address(&ctx.deps.as_ref())?.to_string(), | ||
token_uri: None, // Add a URI if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tokens minted via VdfMint
will always have no token_uri
. It should be passed by the VdfMint
message
token_id: String, | ||
owner: AndrAddr, | ||
) -> Result<Response, ContractError> { | ||
let cw721_address = CW721_ADDRESS.load(ctx.deps.storage)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure info.sender
has mint permission before proceeding. Unless anyone will be able to mint via VdfMint
Motivation
Let’s think about it in context of an NFT minting function.
We put a VDF ADO in front of the mint function and then someone can only mint one every 5 minutes.
This PR implements this VDF conception into the ADO.
Implementation
Testing
Unit test cases are added. (will add e2e tests with other ADOs(like Cw721))
Version Changes
Vdf Mint ADO Version: "0.1.0-b.1"
Checklist