How to call smart contract methods from transactions?

0 votes
I want to know how I can call smart contract written in solidity methods from transactions using java or web3.
Aug 13, 2018 in Blockchain by digger
• 27,630 points
37 views

1 answer to this question.

0 votes

You can do this using a wrapper. To build a wrapper use the following code:

solc YourSmartContract.sol --bin --abi --optimize -o ./

web3j solidity generate YourSmartContract.bin YourSmartContract.abi -o /path/to/yourSrc/main/java -p your.application.id

After this, a java file will be created and then you can call the commands.

answered Aug 13, 2018 by slayer
• 29,050 points
Hi, I tried this but I am getting many syntax errors.
Yes, I have this feedback from many. It works fine on my system. Maybe the errors are because of different versions. Fixing these errors manually will make it work.

Related Questions In Blockchain

0 votes
1 answer

How is a request sent from an app to a smart contract?

Yes, the contract is distributed by every node ...READ MORE

answered Jun 4, 2018 in Blockchain by Perry
• 17,010 points
44 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
45 views
0 votes
1 answer

How connect library to smart contract from external resources?

pragma solidity ^0.4.0; import "github.com/OpenZeppelin/zeppelin-solidity/contracts/math/SafeMath.sol"; contract MathExtended { ...READ MORE

answered Sep 26, 2018 in Blockchain by digger
• 27,630 points
21 views
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,790 points
126 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to store photos in Hyperledger smart contract?

To do this, you need to represent ...READ MORE

answered Jul 9, 2018 in Blockchain by slayer
• 29,050 points
61 views