Comments (5)
@macadev this seems like an interesting use-case and problem but unfortunately I can't expand Metaboss issues to broader Solana support otherwise I would be completely inundated with issues and I want this repo to focus on Metaboss itself. There are a number of Solana Discords you can join where you can collaborate with developers and ask questions like this, here's one of them: https://discord.gg/solana.
Thanks for you understanding on this and let me know if you run into any more Metaboss issues.
from metaboss.
Oh, I just realized the first creator in the creators vector is the candy machine ID! This is based on the single NFT I have looked up. I may have just answered my own question.
from metaboss.
Yeah, my variable naming on this is not great so I can understand how it might be confusing. What's happening here is that get_program_accounts
is querying the token-metadata
program to find all the metadata accounts and then filtering by doing a memcmp with an offset that puts it into the creators array. You can see the Metadata
and Data
account layout here: https://github.com/metaplex-foundation/metaplex-program-library/blob/5c7a15d283776cc36c85456a0d0804ab79cdf02b/token-metadata/program/src/state.rs#L81
from metaboss.
Thanks for the help! I really appreciate it.
from metaboss.
Hey Samuel, I want to reopen this to ask a related question.
I'm trying to write a Solana program that will only process transactions coming from Token holders of a specific NFT collection. What I'm trying to figure out is how to validate that the transactions are in fact generated by holders of the NFT collection. This is how I'm planning to do that:
- Have the transaction contain the associated Token Account of the user which holds the NFT (i.e the account that has balance = 1 for some particular Mint account)
- Have the user sign the transaction using the wallet that owns the associated Token Account that holds the NFT
- Then the Solana program verifies the signature of the transaction using the public key in the 'owner' field of the associated Token Account and it also verifies that the balance of the Token Account = 1.
The crucial piece of validation I'm missing is verifying that the Mint Account linked to the associated Token Account is a part of the NFT collection I'm targeting.
This is where the candy machine ID comes in. I think that by simply verifying that the Mint account has the candy machine ID in its creators array then that proves that the associated token Account does belong to the NFT collection I'm targeting.
Does this sound like a good approach to this problem? Or am I totally off and opening myself to all kinds of security risks?
Thanks again for your time!
from metaboss.
Related Issues (20)
- Fix `mint_next_edition` logic HOT 1
- Token Metadata | InvalidMintAuthority: Mint authority provided does not match the authority on the mint HOT 1
- Allow Metaboss to update Token-2022 Metadata/Accounts HOT 1
- [Feature Request]: command to create collection HOT 1
- HTTP status client error HOT 3
- Drop support for theindex.io HOT 2
- Error: "Action failed with error: failed to get account data" HOT 5
- Documentation outdated: `--json-file` -> `--new-uris-file` HOT 1
- Documentation: Wrong flag used HOT 1
- Not runig on Ubuntu 23.10 HOT 5
- Issue Minting and Updating HOT 1
- Getting error while updating metadata of NFT HOT 3
- Not able to update certain NFTs HOT 1
- While Updating URI getting error HOT 3
- help using on ledger HOT 1
- RPC response error -32002 HOT 6
- Issue after updated metaboss and running it on Arch Linux, v0.41.1 HOT 1
- unable to confirm transaction on pNFT transfer HOT 1
- Cargo error HOT 2
- Ubuntu: libssl.so.1.1: cannot access shared library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metaboss.