Environment
My package.json looks like this:
{
"dependencies": {
"@openzeppelin/cli": "^2.8.2",
"@openzeppelin/test-helpers": "^0.5.6",
"@openzeppelin/truffle-upgrades": "^1.0.2",
"@openzeppelin/upgrades": "^2.8.0",
"@truffle/hdwallet-provider": "^1.0.43",
"dotenv": "^8.2.0",
"truffle": "^5.1.43",
"web3": "^1.3.0"
},
"devDependencies": {
"@openzeppelin/contracts": "^3.1.0",
"@openzeppelin/test-environment": "^0.1.4",
"chai": "^4.2.0",
"husky": "^4.3.0",
"mocha": "^8.1.3",
"solhint": "^3.2.0",
"verify-on-etherscan": "^1.2.1"
},
Details
I am trying to test a contract where I want to make multiple transactions in the same block to setup some state of the contract. In ganache, you can stop the block mining and send the transactions, then resume mining. How do I do this with openzeppelin?
In my current tests, every transaction is incrementing the block number by 1. An example would be the following:
await this.contract.deposit(depositAmount, { from: account });
await this.contract.deposit(depositAmount, { from: account2 });
In the current system, these two transactions happen in 2 blocks. I’m trying to force them to be in the same block. Any ideas?
