diff options
Diffstat (limited to 'test/e2e/beta/contract-test')
-rw-r--r-- | test/e2e/beta/contract-test/contract.js | 5 | ||||
-rw-r--r-- | test/e2e/beta/contract-test/index.html | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/e2e/beta/contract-test/contract.js b/test/e2e/beta/contract-test/contract.js index 8af008dce..51891ea21 100644 --- a/test/e2e/beta/contract-test/contract.js +++ b/test/e2e/beta/contract-test/contract.js @@ -50,15 +50,20 @@ deployButton.addEventListener('click', async function (event) { console.log(`contract`, contract) + document.getElementById('contractStatus').innerHTML = 'Deployed' + depositButton.addEventListener('click', function (event) { + document.getElementById('contractStatus').innerHTML = 'Deposit initiated' contract.deposit({ from: web3.eth.accounts[0], value: '0x3782dace9d900000' }, function (result) { console.log(result) + document.getElementById('contractStatus').innerHTML = 'Deposit completed' }) }) withdrawButton.addEventListener('click', function (event) { contract.withdraw('0xde0b6b3a7640000', { from: web3.eth.accounts[0] }, function (result) { console.log(result) + document.getElementById('contractStatus').innerHTML = 'Withdrawn' }) }) } diff --git a/test/e2e/beta/contract-test/index.html b/test/e2e/beta/contract-test/index.html index 0d63fd940..f6e6f44c7 100644 --- a/test/e2e/beta/contract-test/index.html +++ b/test/e2e/beta/contract-test/index.html @@ -10,6 +10,9 @@ <button id="depositButton">Deposit</button> <button id="withdrawButton">Withdraw</button> </div> + <div id="contractStatus" style="display: flex; font-size: 1rem;"> + Not yet deployed + </div> </div> <div style="display: flex; flex-flow: column;"> <div style="display: flex; font-size: 1.25rem;">Send eth</div> |