aws-samples / simple-nft-marketplace

This project provides sample codes to build a simple NFT marketplace with Amazon Managed Blockchain.
MIT No Attribution
95 stars 48 forks source link

Insufficient funds #47

Closed anespo closed 1 year ago

anespo commented 1 year ago

I followed the full documentation and after the stack deployed I saw Checking ETH balance for address 0x083bF8ec0bA1d508b03E1815870968F98A32114e ETH balance for 0x083bF8ec0bA1d508xyzE1815870968F98A32114e is 0. Sleeping for 5 seconds before checking again ETH balance for 0x083bF8ec0bA1d508xyzE1815870968F98A32114e is 0. Sleeping for 5 seconds before checking again ETH balance for 0x083bF8ec0bA1d508xyzE1815870968F98A32114e is 0. Sleeping for 5 seconds before checking again ETH balance for 0x083bF8ec0bA1d508xyzE1815870968F98A32114e is 0. Sleeping for 5 seconds before checking again

I made the decision to do it manually but I have this issue npx hardhat run --network amb scripts/deploy-amb.js You are using a version of Node.js that is not supported by Hardhat, and it may work incorrectly, or not work at all.

Please, make sure you are using a supported version of Node.js.

To learn more about which versions of Node.js are supported go to https://hardhat.org/nodejs-versions Adding https:// prefix to AMB_HTTP_ENDPOINT Adding https:// prefix to AMB_HTTP_ENDPOINT

/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/web3-core-helpers/lib/errors.js:28 var err = new Error('Returned error: ' + message); ^ Error: Returned error: insufficient funds for gas * price + value at Object.ErrorResponse (/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/web3-core-helpers/lib/errors.js:28:19) at /Users/myuser/projects/simple-nft-marketplace/contract/node_modules/web3-core-requestmanager/lib/index.js:300:36 at XMLHttpRequest.request.onreadystatechange (/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/@aws/web3-http-provider/index.js:45:9) at XMLHttpRequest.dispatchEvent (/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/xhr2/lib/xhr2.js:76:20) at XMLHttpRequest._setReadyState (/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/xhr2/lib/xhr2.js:422:14) at XMLHttpRequest._onHttpResponseEnd (/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/xhr2/lib/xhr2.js:616:14) at IncomingMessage. (/Users/myuser/projects/simple-nft-marketplace/contract/node_modules/xhr2/lib/xhr2.js:568:23) at IncomingMessage.emit (node:events:525:35) at IncomingMessage.emit (node:domain:489:12) at endReadableNT (node:internal/streams/readable:1359:12) at processTicksAndRejections (node:internal/process/task_queues:82:21)

Can you help me please?

YRIDZE commented 1 year ago

It seems to me that you should top up your wallet with test ethers, so that you have enough to make transactions.

update: previously it helped me just to refill the account, but now the same error...

anespo commented 1 year ago

It seems to me that you should top up your wallet with test ethers, so that you have enough to make transactions.

update: previously it helped me just to refill the account, but now the same error...

That's correct I refilled several times but I have got the same error all time.

ryansonshine commented 1 year ago

@anespo

  1. Which network are you running your AMB node on?
  2. Which network is the faucet you're using distributing ETH on?
anespo commented 1 year ago

Hi @ryansonshine ,

my AMB is in AWS and the faucet got from https://faucet.rinkeby.io/

Thanks

ryansonshine commented 1 year ago

@anespo ,

Your AMB node runs in a specific test network. If you're using the cdk script provided in this repository, this is the ropsten network. The faucet you're using is for the rinkeby network, so no ETH is being loaded onto the wallet you're using since they're on separate networks. If you wanted to test this out, you'd have to find a Ropsten faucet, however, I'm not sure if there are many left.

We currently have an issue (#40) open to upgrade the CDK code to use the Goerli network, once this is complete it'll be easier to find a faucet to use.

See more details on Ethereum networks here.

ryansonshine commented 1 year ago

The repository has now been updated to use the Goerli network. @anespo , redeploy with the new CDK configuration and use a Goerli faucet as specified in the updated instructions and you should be all set.

anespo commented 1 year ago

The repository has now been updated to use the Goerli network. @anespo , redeploy with the new CDK configuration and use a Goerli faucet as specified in the updated instructions and you should be all set.

Thank you Ryan.