Hi,
I am unable to get ‘Simple ERC777 token example’ to work properly. I get error messages “Warning: Could not decode event!”. Plus tests output says no events found.
Code to reproduce
I have not changed the code to Simple ERC777 token example
So can use that code to reproduce.
Environment
OpenZeppelin v4.1.0
Truffle v5.3.6
npm 6.14.4
Solidity 0.8.0
Ganache v2.5.4
I also deployed to Kovan testnet
Same errors on both Windows 10 and Ubuntu 20.04 machines
When I run truffle test --show-events
Contract: Simple777Recipient
- sends to a contract from an externally-owned account
Events emitted during test:
---------------------------
Warning: Could not decode event!
Warning: Could not decode event!
IERC777.Minted(
operator: <indexed> 0x06C88a93492Fb6A1B6F2F200Db4C482Eca300F18 (type: address),
to: <indexed> 0x06C88a93492Fb6A1B6F2F200Db4C482Eca300F18 (type: address),
amount: 10000000000000000000000 (type: uint256),
data: hex'' (type: bytes),
operatorData: hex'' (type: bytes)
)
IERC20.Transfer(
from: <indexed> 0x0000000000000000000000000000000000000000 (type: address),
to: <indexed> 0x06C88a93492Fb6A1B6F2F200Db4C482Eca300F18 (type: address),
value: 10000000000000000000000 (type: uint256)
The tests report back that the events are not found…
- Contract: Simple777Recipient
sends to a contract from an externally-owned account:No ‘DoneStuff’ events found
- expected - actual-false
+trueat inLogs (node_modules/@openzeppelin/test-helpers/src/expectEvent.js:51:32)
at Function.inTransaction (node_modules/@openzeppelin/test-helpers/src/expectEvent.js:97:10)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context. (test/Simple777Recipient.test.js:21:5)
- Contract: Simple777Sender
sends from an externally-owned account:No ‘DoneStuff’ events found
- expected - actual-false
+trueat inLogs (node_modules/@openzeppelin/test-helpers/src/expectEvent.js:51:32)
at Function.inTransaction (node_modules/@openzeppelin/test-helpers/src/expectEvent.js:97:10)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context. (test/Simple777Sender.test.js:26:5)
.
.
This is from my truffle-config.js
development: {
host: "localhost",
port: 7545,
network_id: "5777"
},
kovan: {
provider: () => {
return new HDWalletProvider(mnemonic, 'wss://kovan.infura.io/ws/v3/' + INFURA_API_KEY)
},
network_id: '42
gas: 4465030,
gasPrice: 45000000000,
skipDryRun: true,
networkCheckTimeout: 1000000000,
timeoutBlocks: 2000,
},
How to fix this ‘Warning: Could not decode event!’ and why no events are found?
Thanks.
Jules