-
Notifications
You must be signed in to change notification settings - Fork 2
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
mintclub.network("avalanchefuji").token('SuperSquad').create({...params}) returns undefined #1
Comments
could you please share the code you used? |
const mmValue = mintclub.network("avalanchefuji").nft('SuperSquad');
const createToken = async () => {
try {
const res = await mmValue.create({
name: 'SuperSquad',
reserveToken: {
address: '0x4200000000000000000000000000000000000006',
decimals: 18,
},
// Bonding curve data
curveData: {
curveType: 'EXPONENTIAL',
stepCount: 10, // how granular the curve is
maxSupply: 10_000, // NFT max supply
initialMintingPrice: 0.01, // starting price, 0.01 WETH
finalMintingPrice: 0.1, // ending price, 0.1 WETH
creatorAllocation: 100, // initial supply to the deployer
},
metadataUrl: 'https://api.filebase.io/v1/ipfs',
});
console.log('res', res);
} catch (e) {
console.log(e);
}
}; |
Note that create function can also return undefined if it runs into an error. You should use use the callback functions provided. The flow goes
If any of this fails, it will trigger onError and return undefined Also, from the code I can see that an invalid metadataUrl is provided. Please check the example code here |
These will also help You will want to pass the ipfs url passed from |
I added the |
Thank you, I will try this all. But there is another weird thing, when I choose 'base' for network, I work successfully while other case(means all chains except 'base') it does not work and returns undefiend for function create. I am wondering is there something difference. |
Do you have enough gas fees to cover the transaction? |
Yes, Of course. In most case, It does not request deploy token contract with out base. |
could you share the code? |
Sorry, It is same code, there is a only defference "avalanchefuji" to "base" |
did you try console logging in the onError function? |
Sorry, I never tried yet. I'll try it now |
did you figure it out? |
I just follow the official documentation but function create({...params}) returns undefined. We are planning build with mintclub-sdk how can i get returns Promise from function create({...params})
The text was updated successfully, but these errors were encountered: