Giter Site home page Giter Site logo

aptos-nft-mint's Issues

Candy machine not initialized

All process is successfully completed until the front end. There is an initialization issue, thus there are some bugs on frontend.
image

It gives that error on console. I think there is an issue about
Candy machine not initialized on given address for chain dev

Edit: It seems the issue about contract address.

What should I type for CONTRACT_ADDRESS in candyMachineInfo.js and constants.py files?

CONTRACT_ADDRESS variable in constants.py

Hello. I just need a little help where with where you are getting the contract address from. I see it in the CONTRACT_ADDRESS variable in constants.py before the contract launch. So far it seems to be different from the Public key

"Move abort in 0x1::simple_map: EKEY_ALREADY_EXISTS(0x10001)"

An error occured while uploading batch from 495 to 500
{"version":"30594852","hash":"0x4519238330f131fda8300b8dc5d2980a005768212ab1d85d3fad3cb9e9b611bc","state_change_hash":"0x56460ce59c5602071ffa69d3f4683a1fe6d5d86e98938d64c25fdd696481c396","event_root_hash":"0x414343554d554c41544f525f504c414345484f4c4445525f4841534800000000","state_checkpoint_hash":null,"gas_used":"9152","success":false,"vm_status":"Move abort in 0x1::simple_map: EKEY_ALREADY_EXISTS(0x10001): Map key already exists","accumulator_root_hash":"0xbc17c2a8a237a1f3470b2ca02a4e99aa158caf8271af18b441dcd1dd808d45da","changes":[{"address":"0x9c03293abf22334e1f15241b74a3b3adacab4e66a49379a24840d7923867fa08","state_key_hash":"0x9e894d1cd39ed8ca3dab969614055004b6db6f2db15d2a626ee56d7a41ad5f52","data":{"type":"0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>","data":{"coin":{"value":"66510400"},"deposit_events":{"counter":"1","guid":{"id":{"addr":"0x9c03293abf22334e1f15241b74a3b3adacab4e66a49379a24840d7923867fa08","creation_num":"2"}}},"frozen":false,"withdraw_events":{"counter":"0","guid":{"id":{"addr":"0x9c03293abf22334e1f15241b74a3b3adacab4e66a49379a24840d7923867fa08","creation_num":"3"}}}}},"type":"write_resource"},{"address":"0x9c03293abf22334e1f15241b74a3b3adacab4e66a49379a24840d7923867fa08","state_key_hash":"0xf62aa4484d96f208c8526e825fffccf15da9093a4a190cc53211464a948c9ec8","data":{"type":"0x1::account::Account","data":{"authentication_key":"0x9c03293abf22334e1f15241b74a3b3adacab4e66a49379a24840d7923867fa08"

Any idea?

Arweave upload fails randomly

When I'm creating a collection using the Arweave storage, every once in a while it fails with this error:

uploading file: /mnt/c/Users/user/Documents/nft-assets/images/147.png of format: png
Traceback (most recent call last):
  File "cli.py", line 20, in <module>
    candy_machine.create()
  File "/mnt/c/Dev/AptosNFTMint/script/src/candy_machine.py", line 127, in create
    if not util.uploadFolder():
  File "/mnt/c/Dev/AptosNFTMint/script/src/util.py", line 300, in uploadFolder
    elif _STORAGE_SOLUTION == "arweave": return uploadFolderToArweave()
  File "/mnt/c/Dev/AptosNFTMint/script/src/util.py", line 277, in uploadFolderToArweave
    tx.sign()
  File "/home/user/.local/lib/python3.8/site-packages/arweave/arweave_lib.py", line 192, in sign
    data_to_sign = self.get_signature_data()
  File "/home/user/.local/lib/python3.8/site-packages/arweave/arweave_lib.py", line 204, in get_signature_data
    self.reward = self.get_reward(self.data_size, target_address=self.target if len(self.target) > 0 else None)
  File "/home/user/.local/lib/python3.8/site-packages/arweave/arweave_lib.py", line 178, in get_reward
    return reward
UnboundLocalError: local variable 'reward' referenced before assignment

ON TESTNET RUN FAIL

when i change mode = testnet
and run run fail
Screen Shot 2022-11-10 at 18 04 25
how can i fixed ?
help me!! thanks!!

Whitelist it s still available in public sale

I m getting this error even if i m in public sale and i update the WL file with an empty one.

Move abort 0x6 in 0x481efbf0c3cbec627b5f5674287d4ae6ee770da5949dcfe698a8520108236a33::candy_machine_v2 (EACCOUNT_NO_MINT_PERMISSION)

"presaleMintTime": 1666878751,
"publicMintTime": 1666972351,

Publish the site online

I have now set up the whole page and it works in npm run dev I have uploaded the mint-site to github and then trying to publish the app on Vercel. I am getting a lot of errors and the page are not showing. What am I doing wrong?

have search for a whole day but got stuck here atm, really thank full for help 💯
Screenshot 2022-10-30 at 16 58 21

Error in creating the Candy Machine

=== Creating Candy Machine ===
Traceback (most recent call last):
File "C:\work\Aptos-NFT-Mint-public\script\src\cli.py", line 19, in
candy_machine.create()
File "C:\work\Aptos-NFT-Mint-public\script\src\candy_machine.py", line 119, in create
self.createCandyMachine()
File "C:\work\Aptos-NFT-Mint-public\script\src\candy_machine.py", line 140, in createCandyMachine
txn_hash = self.rest_client.create_candy_machine(self.account)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Aptos-NFT-Mint-public\script\src\client.py", line 56, in create_candy_machine
signed_transaction = self.create_single_signer_bcs_transaction(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\work\Aptos-NFT-Mint-public\script\src\client.py", line 42, in create_single_signer_bcs_transaction
signature = sender.sign(raw_transaction.keyed())
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aptos_sdk\transactions.py", line 89, in keyed
self.serialize(ser)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\aptos_sdk\transactions.py", line 115, in serialize
self.payload.serialize(serializer)
File "C:\work\Aptos-NFT-Mint-public\script\src\transactions.py", line 105, in serialize
self.value.serialize(serializer)
File "C:\work\Aptos-NFT-Mint-public\script\src\transactions.py", line 62, in serialize
serializer.sequence(self.args, Serializer.bytes)
^^^^^^^^^^^^^^^^
AttributeError: type object 'Serializer' has no attribute 'bytes'

AssertionError

image

anyone knows how to fix it??
I tried to create candymachine on devnet

Mint turning

image
Hello There,
Mint not working. When i trying minting , i see circle turning... What is Problem.

And how i can find CONTRACT_ADDRESS ????
image

error please help

File "/root/AptosNFTMint/script/src/cli.py", line 15, in 

    create_candy_machine.create()

  File "/root/AptosNFTMint/script/src/create_candy_machine.py", line 134, in create

    uploadNftsToCm(_ASSET_FOLDER, _COLLECTION_NAME, _METADATA_FOLDER, _ROYALTY_POINTS_DENOMINATOR, _ROYALTY_POINTS_NUMERATOR, alice, rest_client)

  File "/root/AptosNFTMint/script/src/create_candy_machine.py", line 252, in uploadNftsToCm

    with open(metadataFilePath) as metadata_file:

FileNotFoundError: [Errno 2] No such file or directory: '/root/AptosNFTMint/metadata/10.json' 

Help

Could you can share your smart contract move.

Getting account not found error when trying to mint

What is CONTRACT_ADDRESS supposed to be set to? that is set in /Aptos-NFT-Mint/mint-site/helpers/candyMachineInfo.js
and /Aptos-NFT-Mint/script/src/constants.py ?

Am I understanding correctly that candyMachineAddress in /Aptos-NFT-Mint/mint-site/helpers/candyMachineInfo.js should be set to the Candy Machine Account Public Key?

Not returning Candy Machine ID

After successful uploads of the images and metadata, returns with

=== Preparing Candy Machine account === and does not return the candy machine ID

Anyone else experiencing this?

metadataUri & not enough funds in account errors

My problem is basically that i succesfuly uploaded my assets trough pinata, as the ipfs links to the images works proplerly, but at the time of trying to reupload my metadata, it pops up the next error:

=== Uploading NFT ===
Traceback (most recent call last):
File "C:\Users\xxx\yyyyyy\Aptos-NFT-Mint\script\src\cli.py", line 24, in
candy_machine.retryFailedUploads()
File "C:\Users\xxx\yyyyyy\Aptos-NFT-Mint\script\src\candy_machine.py", line 275, in retryFailedUploads
self.uploadNftsToCm()
File "C:\Users\xxx\yyyyyy\Aptos-NFT-Mint\script\src\candy_machine.py", line 223, in uploadNftsToCm
tmp_metadata_uri = uriInfo["metadata_uri"]
KeyError: 'metadata_uri'

In addition, if I try to do it by creating a CM with the same CM address, it pop up a different error:

Traceback (most recent call last):
File "C:\Users\xxx\yyyyyy\Aptos-NFT-Mint\script\src\cli.py", line 20, in
candy_machine.create()
File "C:\Users\xxx\yyyyyy\Aptos-NFT-Mint\script\src\candy_machine.py", line 122, in create
self.prepareAccount()
File "C:\Users\xxx\yyyyyy\Aptos-NFT-Mint\script\src\candy_machine.py", line 78, in prepareAccount
raise Exception("Not enough funds in account")
Exception: Not enough funds in account

What is causing my problem?, thanks in advance.

UPDATING COVER IMAGE

If I successfully updated all the nfts, and didn't load the cover, how do I fix this? I want my cover to be visible on topaz. that's the code I tried to upload the cover with, unsuccessfully

def update_cover():
cover_uri = uploadToIpfs(_ASSET_FOLDER + '/cover.png')
txn_hash = rest_client.update_cover(
cmAccount, cover_uri
)
rest_client.wait_for_transaction(txn_hash)
print("\n Success, cover is set to:: " + cover_uri + " txn hash: " + txn_hash)

json.decoder.JSONDecodeError: Invalid \escape: line 18 column 24 (char 536)

python cli.py
Traceback (most recent call last):
File "\aptos\aptosnftmint\script\src\cli.py", line 2, in
import create_candy_machine
File "\aptos\aptosnftmint\script\src\create_candy_machine.py", line 12, in
import util
File "\aptos\aptosnftmint\script\src\util.py", line 21, in
config = json.load(f)
File "C:\Python310\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "C:\Python310\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python310\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 18 column 24 (char 536)

KeyError while uploading NFTs

=== Uploading NFT ===
Traceback (most recent call last):
File "G:\tutorial\aptos\script\src\cli.py", line 20, in
candy_machine.create()
File "G:\tutorial\aptos\script\src\candy_machine.py", line 133, in create
self.uploadNftsToCm()
File "G:\tutorial\aptos\script\src\candy_machine.py", line 223, in uploadNftsToCm
tmp_metadata_uri = uriInfo["metadata_uri"]
KeyError: 'metadata_uri'

fixed

% python3 cli.py
Mode: dev

=== Upload assets to storage solution ===
Continuing previous storage upload...
Files that failed to upload: []
All images were uploaded successfully

=== Preparing Candy Machine account ===
Candy machine addresses are already filled in config.json.
Public key: 0xbf4281db6dfb8ab4a0c9a606f3354103044917a1731fdcc276d2edf236fb5194

Private key: 0x1ca84fbba45513994a0b8419af209f99c83820a89108d760913da402f306da87

Balance: 300000000


=== Creating Candy Machine ===

 Success, txn hash: 0x4c9b87ca04702b28d6ff9ec6c125f760f016067663d0c066c3e71292039ed6d1

=== Creating Collection ===

 Success, txn hash: 0x77e1d3be91086234ab5e6cc05379838643d33657d22de1eefefd15b4eb307918

=== Setting presale mint time ===

 Success, presale mint time is set to: 1973-03-03 13:46:40 txn hash: 0x86c71337d907b73f413f2b421a5a092200736dad4ec99ba435b39e9210a301ed

=== Setting public mint time ===

 Success, public mint time is set to: 1973-03-03 13:46:40 txn hash: 0x6c8a9cf638440ea1b2bd935f031973f16fbe5768aa5af1dca8669466a2828e54

=== Uploading NFT ===
Traceback (most recent call last):
  File "/Users/Shared/AptosNFTMint/script/src/cli.py", line 15, in <module>
    create_candy_machine.create()
  File "/Users/Shared/AptosNFTMint/script/src/create_candy_machine.py", line 134, in create
    uploadNftsToCm(_ASSET_FOLDER, _COLLECTION_NAME, _METADATA_FOLDER, _ROYALTY_POINTS_DENOMINATOR, _ROYALTY_POINTS_NUMERATOR, alice, rest_client)
  File "/Users/Shared/AptosNFTMint/script/src/create_candy_machine.py", line 252, in uploadNftsToCm
    with open(metadataFilePath) as metadata_file:
FileNotFoundError: [Errno 2] No such file or directory: 'Users/shared/AptosNFTMint/assets/metadata/8.json'

but I have this file in folder metadata/8.json

candy machine creation error

Hi,
=== Verifying assets and metadata ===
=== Upload assets to storage solution ===
Continuing previous storage upload...
Files that failed to upload: []
All images were uploaded successfully
=== Creating Candy Machine ===
Traceback (most recent call last):
File "C:\apt\AptosNFTMint\script\src\cli.py", line 19, in
candy_machine.create()
File "C:\apt\AptosNFTMint\script\src\candy_machine.py", line 119, in create
self.createCandyMachine()
File "C:\apt\AptosNFTMint\script\src\candy_machine.py", line 141, in createCandyMachine
self.rest_client.wait_for_transaction(txn_hash)
File "C:\Python311\Lib\site-packages\aptos_sdk\client.py", line 171, in wait_for_transaction
assert (
AssertionError: {"version":"44301869","hash":"0x014bc0edbf...gas_used":"150","success":false,"vm_status":"Transaction Executed and Committed with Error LINKER_ERROR","accumulator_root_hash":"0...

What is the problem?
Thanks,

Move abort in 0x5ac985f1fe40c5121eb33699952ce8a79b1d1cb7438709dbd1da8e840a04fbee::candy_machine_v2: 0x8

Issue: Can't mint on your site.
How to reproduce: Try minting on the site

Payload:

{
    "sender": {
        "address": "0xed423a126522a66fcf0ef9568b18b048f6bb9c94afddebc7f9d0cf5744de29da"
    },
    "sequence_number": 9,
    "payload": {
        "value": {
            "module_name": {
                "address": {
                    "address": "0x5ac985f1fe40c5121eb33699952ce8a79b1d1cb7438709dbd1da8e840a04fbee"
                },
                "name": {
                    "value": "candy_machine_v2"
                }
            },
            "function_name": {
                "value": "mint_tokens"
            },
            "ty_args": [],
            "args": [
                "0x30957ce23fa2e31cb10766e27e950cf8aa2245e3273f2e18b2ef84ad4870cd9e",
                "0x1154657374436f6c6c656374696f6e313031",
                "0x100000000000000"
            ]
        }
    },
    "max_gas_amount": 924,
    "gas_unit_price": 100,
    "expiration_timestamp_secs": 1666209964,
    "chain_id": {
        "value": 34
    }
}

Maybe due to the max supply? Sender account have 2 minted nfts already. Cannot see tokens under account explorer is giving 500 so I can't see max supply of collection

image_uris.json error caused by paths used

I would suggest this edit to the docs for accuracy and the ease of use of future devs:

Changing

"collection": {
"assetDir": "the Assets folder path you created above, eg: /User/ftm/Assets",
"metadataDir": "the metadata folder path you created above, eg: /User/ftm/Assets",

To

"collection": {
"assetDir": "the Images folder path you created above, eg: /User/ftm/Assets/Images",
"metadataDir": "the metadata folder path you created above, eg: /User/ftm/Assets/metadata",

help for new community

hwllo sir i want to lean and mint nft project but i am new hee i watch your video on youtube sir please create step by step video for our lab please sir

Can not set mintFee less than 1

My config

"collection": {
        "assetDir": "/home/hieptran/Projects/Aptos-NFT-Mint/assets/images",
        "metadataDir": "/home/hieptran/Projects/Aptos-NFT-Mint/assets/metadata",
        "collectionName": "Latte NFT v2",
        "collectionDescription": "Latte NFT v2",
        "collectionCover": "",
        "collectionSize": 9,
        "maxMintPerWallet": 9,
        "mintFee": 0.9,
        "royalty_points_denominator": 1000,
        "royalty_points_numerator": 100,
        "presaleMintTime": 100000000,
        "publicMintTime": 100000000,
        "whitelistDir": "/home/hieptran/Projects/Aptos-NFT-Mint/assets/whitelist"
    }

Mint site http://localhost:3000/:
mint-site-2

candmachinehelper problem

This library really drove me crazy. It says publicsale:undifined and aptos shows as NaN and the mint key is not active. Where does the candymachine address in CandyMachineInfo.js come from?

mint site errors

image
Why cant I see mint time?
Test mint is ok, but what is the mint error?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.