accounts count increased to 10

pull/7/head
aniket-engg 5 years ago committed by Aniket
parent 37b83eaf0e
commit 28e8c1f8b1
  1. 13
      remix-simulator/src/methods/accounts.js
  2. 8
      remix-tests/tests/various_sender/sender_and_value_test.sol

@ -7,7 +7,18 @@ const Accounts = function (executionContext) {
this.web3 = new Web3() this.web3 = new Web3()
this.executionContext = executionContext this.executionContext = executionContext
// TODO: make it random and/or use remix-libs // TODO: make it random and/or use remix-libs
this.accountsList = [this.web3.eth.accounts.create(['abcd']), this.web3.eth.accounts.create(['ef12']), this.web3.eth.accounts.create(['ef34'])] this.accountsList = [
this.web3.eth.accounts.create(['abcd']),
this.web3.eth.accounts.create(['ef12']),
this.web3.eth.accounts.create(['ef34']),
this.web3.eth.accounts.create(['ab12']),
this.web3.eth.accounts.create(['ab34']),
this.web3.eth.accounts.create(['cd12']),
this.web3.eth.accounts.create(['cd34']),
this.web3.eth.accounts.create(['bcde']),
this.web3.eth.accounts.create(['cdef']),
this.web3.eth.accounts.create(['1234'])
]
this.accounts = {} this.accounts = {}
this.accountsKeys = {} this.accountsKeys = {}

@ -9,11 +9,11 @@ contract SenderAndValueTest {
Assert.equal(msg.sender, TestsAccounts.getAccount(1), "wrong sender in checkSenderIs1"); Assert.equal(msg.sender, TestsAccounts.getAccount(1), "wrong sender in checkSenderIs1");
} }
/// #sender: account-0 /// #sender: account-9
/// #value: 10 /// #value: 10
function checkSenderIs0AndValueis10 () public payable{ function checkSenderIs9AndValueis10 () public payable{
Assert.equal(msg.sender, TestsAccounts.getAccount(0), "wrong sender in checkSenderIs0AndValueis10"); Assert.equal(msg.sender, TestsAccounts.getAccount(9), "wrong sender in checkSenderIs9AndValueis10");
Assert.equal(msg.value, 10, "wrong value in checkSenderIs0AndValueis10"); Assert.equal(msg.value, 10, "wrong value in checkSenderIs9AndValueis10");
} }
/// #value: 100 /// #value: 100

Loading…
Cancel
Save