How to create tokens in smart contracts from node.js?

0 votes

I have followed a tutorial to deploy a contract with a certain number of tokens However, I want to list tokens, create tokens, and delete tokens from a node.js project. I don't really understand how this can be done since it costs gas/ether to communicate with the Ethereum blockchain.

Is it possible to initiate actions in the blockchain from "off-chain" projects? Can I use web3 or truffle for this purpose? I imagine that it might be possible to just store a lot of ether on an account and then just tell the smart contract to use ether from this account to update tokens in the smart contract?

Jun 26, 2018 in Blockchain by Johnathon
• 9,090 points
185 views

1 answer to this question.

0 votes

Any modification to the Ethereum Blockchain will cost you gas, so yeah creating new coins will cost you money. Listing them is free, you have the ability, throught web3, to list informations about blocks, accounts or smart contracts. So if you want to list coins, you can make a scraper that goes through all the Blockchain and detects ERC20 Contracts (take a look at how EVM bytecode works and how you can identify specific methods defined in protocols like ERC20 only from the bytecode) for free. Remember: Only state alteration costs gas !

answered Jun 26, 2018 by Shashank
• 10,350 points

Related Questions In Blockchain

0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,090 points
501 views
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 5, 2018 in Blockchain by ariaholic
• 7,340 points
62 views
0 votes
1 answer
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,810 points
188 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,620 points
180 views
0 votes
1 answer
0 votes
1 answer

Solidity geth: Error encountered during contract execution [Bad instruction]

recipes is a dynamic storage array. You need ...READ MORE

answered Oct 15, 2018 in Blockchain by Omkar
• 68,480 points
119 views
+1 vote
1 answer

How is it possible to achieve privacy and confidentiality in smart contracts??

Any contract code written on the blockchain ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,350 points

edited Aug 7, 2018 by Omkar 129 views
0 votes
1 answer

How can I retrieve to and from address in transaction directly from blockchain?

The spending conditions, i.e., who is able ...READ MORE

answered Jul 11, 2018 in Blockchain by Shashank
• 10,350 points
90 views