📜 Convenient Ethereum smart contract library for Javascript.
Include the library.
const ethane = require("ethane");
Set the web3
provider
ethane.provider = web3.currentProvider;
Add your contract
const Account = ethane.contract(
abi: /* contract abi */,
bin: /* contract binary */
);
Create an instance to interface with a live contract
const account = Account.at("0x4780e332579dd6c885fbd66ae8166b103b016ef7");
or
Create a new instance of your contract altogether
const account = await Account.new();
Run a method!
Ethane automatically uses call
for constant
functions and sendTransaction
otherwise.
console.log(await account.getName());
Monty