Open Resister-boy opened 6 months ago
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 https://sdk.mint.club/docs/sdk/network/token/create#onerror-optional
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 uploadMetadata
to the metadataUrl
function
I added the debugging
section so this could also help.
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.
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.
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
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})