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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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()}
})
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
...
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', '...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
api-design × 22web3js × 6
javascript × 4
nodejs × 4
solidity × 3
wallets × 2
etherscan × 2
ethereumjs × 2
testrpc × 2
rinkeby × 2
android × 2
ios × 2
go-ethereum × 1
contract-development × 1
truffle × 1
transactions × 1
blockchain × 1
contract-design × 1
erc-20 × 1
metamask × 1
events × 1
json-rpc × 1
uniswap × 1
arrays × 1
erc-721 × 1