0.10
Simplified the unit testing syntax and added new convenience helpers.
You can now use the etherlime accounts directly in the unit tests from the deployed object. It now has all the methods of the smart contract and you can easily specify non-deployer account to execute the given method.
const deployer = new etherlime.EtherlimeGanacheDeployer();
const contractWrapper = await deployer.deploy(SomeContract);
const tx = await contractWrapper.from(0 /* could be string address or ethers.Wallet instance*/).someFunction(params);
const result = await contractWrapper.verboseWaitForTransaction(tx);
Added additional convenience method for wrapping of deployed contracts by address etherlime.ContractAt(contract, contractAddress, [wallet], [providerOrPort])
ContractAt
will wire up an instance of the wrapper connected to etherlime ganache on the default port and default account. Optionally you can provide an wallet and port to connect to etherlime ganache. Alternatively if you want to connect to another provider you can pass it as last parameter, but then you must pass wallet
too.
const deployedContract = etherlime.ContractAt(ContractDescriptor, deployedContractAddress);
const tx = await deployedContract.someMethod(randomParam);
const result = await deployedContract.verboseWaitForTransaction(tx);