I want to develop a blockchain system with smart contract using NodeJs for blockchain and Solidity for smart contract, i Google'd this but i found no answer ?
actually, i developped a blockchain system using javascript and new langage for smart contract, but this langage doesn't contain a lot of instruction so using solidity will be very useful, i wonder if possible to user solidity on blockchain chains which are developped by javascript ?
And if there is any post contains a description of how using that. Thanks you in advance.
Yes you can, you use truffle
to compile to contract to JSON file and then import it to your Javascript code and use it.
https://www.trufflesuite.com/docs/truffle/getting-started/compiling-contracts
truffle compile
to generate your json fileconst your_contract = web3.eth.contract(contract.json.abi)
const contract = your_contract.at(<your_contract_address)
And then after that, you can use your contract's methods.
contract.<your_function>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With