Git Product home page Git Product logo

ecommerce-hello-world's People

Contributors

gabe-hernandez-tron avatar ujwalbattar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ecommerce-hello-world's Issues

UnhandledPromiseRejectionWarning

I was following the instructions on readme. Everything went well until i run

tronbox migrate --reset --network shasta

it prints:

UnhandledPromiseRejectionWarning: Error: Invalid URL provided to HttpProvider at new e (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\tronwrap\tronweb\dist\TronWeb.node.js:1:16497) at Object.create (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-provider\index.js:70:1) at Config.get [as provider] (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-config\index.js:278:1) at provision (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-provisioner\index.js:4:1) at Resolver.require (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-resolver\index.js:34:1) at Object.lastCompletedMigration (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-migrate\index.js:266:1) at Object.needsMigrating (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-migrate\index.js:295:1) at runMigrations (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-core\lib\commands\migrate.js:94:1) at C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-core\lib\commands\migrate.js:125:1 at C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\truffle-core\lib\environment.js:65:1 at cb (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\tronwrap\index.js:146:1) at axios.get.then.catch.err (C:\Users\User\AppData\Roaming\npm\node_modules\tronbox\build\webpack:\packages\tronwrap\index.js:174:1) at process._tickCallback (internal/process/next_tick.js:68:7) (node:13704) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:13704) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can update contract?

Hello!
How i can update contract after production deploy for, for example, add new item or change price?

Thanks!

UnhandledPromiseRejectionWarning

I am learning how to deploy me first smart contarct, this this error is preventing to continue

tronbox version
Tronbox v2.7.14
Solidity v0.5.14 (tron-solc)

tronbox migrate --reset --nexwork shasta
Using network 'development'.

(node:341) UnhandledPromiseRejectionWarning: Error: Invalid URL provided to HttpProvider
at new e (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/node_modules/tronweb/dist/webpack:/src/lib/providers/HttpProvider.js:7:19)
at Object.create (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/build/components/Provider/index.js:1:1403)
at Config.get [as provider] (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/build/components/Config.js:1:6101)
at /home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/node_modules/@truffle/expect/index.js:4:18
at Array.forEach ()
at Object.options (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/node_modules/@truffle/expect/index.js:3:19)
at Object.run (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/build/components/Migrate/index.js:1:3283)
at /home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/build/lib/commands/migrate.js:1:1229
at Object.needsMigrating (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/build/components/Migrate/index.js:1:6092)
at runMigrations (/home/ganiular/.nvm/versions/node/v14.14.0/lib/node_modules/tronbox/build/lib/commands/migrate.js:1:1096)
(Use node --trace-warnings ... to show where the warning was created)
(node:341) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
(node:341) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

EComerce.sol is Obsolet

it can be updated to the latest version of tronbox so it can be compiled with solidity 0.5.4

Error: Invalid URL provided to HttpProvider

>tronbox.cmd migrate
Using network 'development'.
Error: Invalid URL provided to HttpProvider
    at new e (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\node_modules\tronweb\dist\webpack:\src\lib\providers\HttpProvider.js:7:19)
    at Object.create (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Provider\index.js:1:1403)
    at Config.get [as provider] (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Config.js:1:6101)
    at provision (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Provisioner.js:1:79)
    at Resolver.require (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Resolver\index.js:1:817)
    at Object.lastCompletedMigration (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Migrate\index.js:1:5491)
    at Object.needsMigrating (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Migrate\index.js:1:6117)
    at runMigrations (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\lib\commands\migrate.js:1:1096)
    at C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\lib\commands\migrate.js:1:1608
    at C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\lib\environment.js:1:1546
Error: Invalid URL provided to HttpProvider
    at new e (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\node_modules\tronweb\dist\webpack:\src\lib\providers\HttpProvider.js:7:19)
    at Object.create (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Provider\index.js:1:1403)
    at Config.get [as provider] (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Config.js:1:6101)
    at provision (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Provisioner.js:1:79)
    at Resolver.require (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Resolver\index.js:1:817)
    at Object.lastCompletedMigration (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Migrate\index.js:1:5491)
    at Object.needsMigrating (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\components\Migrate\index.js:1:6117)
    at runMigrations (C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\lib\commands\migrate.js:1:1096)
    at C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\lib\commands\migrate.js:1:1608
    at C:\Users\m\AppData\Roaming\npm\node_modules\tronbox\build\lib\environment.js:1:1546

UnhandledPromiseRejectionWarning: Error: Invalid URL provided to HttpProvider

λ tronbox.cmd migrate --reset
Using network 'development'.

(node:7588) UnhandledPromiseRejectionWarning: Error: Invalid URL provided to HttpProvider
at new e (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\node_modules\tronweb\dist\webpack:\src\lib\providers\HttpProvider.js:7:19)
at Object.create (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\build\components\Provider\index.js:1:1403)
at Config.get [as provider] (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\build\components\Config.js:1:6101)
at expected_keys.forEach.key (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\node_modules@truffle\expect\index.js:4:18)
at Array.forEach ()
at Object.options (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\node_modules@truffle\expect\index.js:3:19)
at Object.run (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\build\components\Migrate\index.js:1:3283)
at C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\build\lib\commands\migrate.js:1:1229
at Object.needsMigrating (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\build\components\Migrate\index.js:1:6092)
at runMigrations (C:\Users\suraj\AppData\Roaming\npm\node_modules\tronbox\build\lib\commands\migrate.js:1:1096)
(node:7588) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, o
r by rejecting a promise which was not handled with .catch(). (rejection id: 5)
(node:7588) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js
process with a non-zero exit code.

For your reference code from tronbox.js
module.exports = {
networks: {
development: {
// For trontools/quickstart docker image
privateKey: 'Your_private_key',
consume_user_resource_percent: 30,
fee_limit: 100000000,
fullNode: "http://127.0.0.1:8090",
solidityNode: "http://127.0.0.1:8091",
eventServer: "http://127.0.0.1:8092",
network_id: ""
},
shasta: {
privateKey: 'Your_private_key',
consume_user_resource_percent: 30,
fee_limit: 100000000,
fullNode: "https://api.shasta.trongrid.io",
solidityNode: "https://api.shasta.trongrid.io",
eventServer: "https://api.shasta.trongrid.io",
network_id: "
"
},
mainnet: {
// Don't put your private key here, pass it using an env variable, like:
// PK=da146374a75310b9666e834ee4ad0866d6f4035967bfc76217c5a495fff9f0d0 tronbox migrate --network mainnet
privateKey: process.env.PK,
consume_user_resource_percent: 30,
fee_limit: 100000000,
fullNode: "https://api.trongrid.io",
solidityNode: "https://api.trongrid.io",
eventServer: "https://api.trongrid.io",
network_id: "*"
}
}
};

ERROR: Invalid private key provided

hi

according to part 1 of your walkthrough
I maked a .env file in root of project with this content:
PK="my private key extracted from TronLink";

but in part 3 when I enter tronbox migrate --reset --network shasta in terminal get me this error:
ERROR: Invalid private key provided

now how can I solve this problem ?

Unable to deploy smart contract on Shasta testnet

I was following the instructions on readme. Everything went well until i run

tronbox migrate --reset --network shasta

It prints

Using network 'shasta'.

Running migration: 1_initial_migration.js
  Replacing Migrations...
  Migrations:
    (base58) TLszpcG8kXjW6yUtKWJLUn7djttCXqvyq4
    (hex) 4177ad22e56dece4268f647ba015f5c0d385f1e67c
Saving successful migration to network...
Saving artifacts...
Running migration: 2_deploy_contracts.js
  Deploying ECommerce...
ERROR: Contract ECommerce has not been deployed on the network.
For more details, check the transaction at:
https://api.shasta.trongrid.io/wallet/gettransactionbyid?value=635c20efee548376b67901165e4b08afc24802581c65f93f0a9d1a6c2bc858db
If the transaction above is empty, most likely, your address had no bandwidth/energy to deploy the contract.

I made a change to tronbox.js file. I commented fullNode, solidityNode, eventServer, and I uncommented fullHost variable.

I also checked the printed link. The link said my testnet account does not have enough energy.

For this issue, I found there should be no energy issue about shasta testnet. Can anybody help me with this error? Thanks.

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.