aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-07-04 03:17:46 +0800
committerkumavis <aaron@kumavis.me>2018-07-04 03:17:46 +0800
commit2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382 (patch)
treed8631888bd99fd452fc9104c4112c1d7d2ff7a57 /test
parentb75abfac60c1fa1d023237e7e3609580cce1a2d3 (diff)
downloadtangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.tar
tangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.tar.gz
tangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.tar.bz2
tangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.tar.lz
tangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.tar.xz
tangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.tar.zst
tangerine-wallet-browser-2b2cd87e2d6e93dadb3ddd20ebf854ab6f2d2382.zip
test - e2e - contract test - add logs
Diffstat (limited to 'test')
-rw-r--r--test/e2e/beta/contract-test/contract.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/test/e2e/beta/contract-test/contract.js b/test/e2e/beta/contract-test/contract.js
index 19c29e5c1..84e11381f 100644
--- a/test/e2e/beta/contract-test/contract.js
+++ b/test/e2e/beta/contract-test/contract.js
@@ -31,23 +31,25 @@ The `piggybankContract` is compiled from:
var piggybankContract = web3.eth.contract([{"constant":false,"inputs":[{"name":"withdrawAmount","type":"uint256"}],"name":"withdraw","outputs":[{"name":"remainingBal","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]);
deployButton.addEventListener('click', function (event) {
-
+
var piggybank = piggybankContract.new(
{
- from: web3.eth.accounts[0],
- data: '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029',
+ from: web3.eth.accounts[0],
+ data: '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029',
gas: '4700000'
}, function (e, contract){
console.log(e, contract);
+ console.log('deployed!', contract);
if (typeof contract.address !== 'undefined') {
console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
console.log(`contract`, contract);
depositButton.addEventListener('click', function (event) {
- contract.deposit({ from: web3.eth.accounts[0], value: '0x29a2241af62c0000' }, function (result) {
- console.log(result)
- })
+ console.log('contract.deposit', { from: web3.eth.accounts[0], value: '0x29a2241af62c0000' })
+ contract.deposit({ from: web3.eth.accounts[0], value: '0x29a2241af62c0000' }, function (result) {
+ console.log(result)
+ })
})
withdrawButton.addEventListener('click', function (event) {
@@ -58,4 +60,4 @@ deployButton.addEventListener('click', function (event) {
}
})
-}) \ No newline at end of file
+})