1.0.0-beta6 • Published 7 years ago
ethereum-sandbox-helper v1.0.0-beta6
Ethereum Sandbox Helper
A helper for a tesing with Ethereum Sandbox.
Installation
$ npm install ethereum-sandbox-helper
Usage
helper.compile(dir, files)
Compiles specified sol-files in the dir
. Throws an array of errors in case of compilation errors.
var compiled = helper.compile('contracts', ['contract.sol']);
The function uses solc-js under the hood and returns a provided array.
helper.waitForReceipt(web3, txHash, cb)
Waits for a receipt of the transaction with the provided transaction hash (txHash
).
helper.waitForReceipt(sandbox.web3, txHash, function(err, receipt) {
if (err) return done(err);
console.log(receipt.logs);
done();
});
helper.waitForSandboxReceipt(web3, txHash, cb)
Waits for a sandbox receipt of the transaction with the provided transaction hash (txHash
). Sandbox receipt has a return value of called function.
helper.waitForSandboxReceipt(sandbox.web3, txHash, function(err, receipt) {
if (err) return done(err);
console.log(receipt.returnValue);
done();
});
1.0.0-beta6
7 years ago
1.0.0-beta5
8 years ago
1.0.0-beta4
8 years ago
1.0.0-beta3
8 years ago
1.0.0-beta2
8 years ago
1.0.0-beta1
8 years ago