Skip to main content
5 votes

API in Node.js for Solidity smart contract

We have created APIs in node.js very recently. You can take a look at this repo for reference - https://github.com/Imaginea/lms/blob/master/server/routes.js The UI talks to node.js middleware and ...
Sanchit's user avatar
  • 3,512
4 votes
Accepted

Show an event with nodejs

The logs are included in the transaction receipt but you can retrieve the transaction receipt only once it's mined. Depending on many factors (network congestion, gas price), a transaction can take a ...
Greg Jeanmart's user avatar
4 votes

PHP and wordpress

Ethereum comes up with a javascript API called - Web3 Brief description - To make your app work on Ethereum, you can use the web3 object provided by the web3.js library. Under the hood it ...
Sanchit's user avatar
  • 3,512
2 votes

Etherscan API no decimals separator

Most ERC20 tokens should follow the pattern of using 18 decimal places for their token. If your token is using a special value, you can either hard code that, or use other APIs to retrieve that ...
Shawn Tabrizi's user avatar
2 votes
Accepted

How can I execute deployed contract functions using API?

Once you deploy the contract you can easily interact with the that contract if you have contract address and ABI. But the main point is that you must have account address. Account address means that ...
Gopal ojha's user avatar
  • 2,249
2 votes

How to add a file to IPFS using the API?

Adding a new answer as it is rather unrelated from the previous one. Massive thanks to Vaibhav Saini who was supporting me on GitHub and IPFS forum. It's relatively simple, of course you can ...
Mars Robertson's user avatar
2 votes
Accepted

Is there data a data difference between the Uniswap v3 Subgraph and smart contract queries?

Collecting data from smart contracts can a cumbersome work, especially when you have a factory contract. Graph is used to make that task easier and reduce the number of requests sent to a node. The ...
Donut's user avatar
  • 547
2 votes
Accepted

Query each struct of a Mapping vs looping getter function for front-end?

Solidity doesn't currently support returning a mapping or a variable-sized list, so you would need to implement a getter function as you described that takes an index. The approach I think you're ...
Paul Pham's user avatar
  • 638
1 vote

Do smart-contracts work as APIs?

Read operations you can put behind a regular API as you get the result instantly. As for write operations, you can expose an API which has something like "initiateFunctionA" and another operation ...
Lauri Peltonen's user avatar
1 vote
Accepted

How can I check the provider status ? if testRPC connected or not?

Here is the answer for that issue: router.get('/cbn/provider-status', ctx => { ctx.body = {"status":web3.isConnected()} })
Tarik EN-NAKDI's user avatar
1 vote
Accepted

Is there any API available to get transaction history from rinkeby test network?

If you want to get the token balance of any address you can check this https://rinkeby.tokenbalance.com/token/0x53576813682009a4D35495e18f039067618B3e27/0x41cb3ec3f126f7705aaf3ba996d96179775b9393 ...
Sumit Patel's user avatar
1 vote

How to add a file to IPFS using the API?

Try this one: https://github.com/linonetwo/ipfs-uploader-browser export default class FileUploadInput extends Component { static propTypes = { readAs: PropTypes.oneOf(['readAsDataURL', '...
林东吴's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible