You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
[x ] I've asked for help in the Truffle Gitter before filing this issue.
Issue
events field is always empty in deployed contract's json file.
Steps to Reproduce
Open any contract and define an event there
in my case I simply use the TutorialToken example like this. This token contract has multiple events defined in its dependency
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
contract TutorialToken is ERC20 {
string public name = "TutorialToken";
string public symbol = "TT";
uint8 public decimals = 2;
uint public INITIAL_SUPPLY = 12000;
constructor() public {
_mint(msg.sender, INITIAL_SUPPLY);
}
}
Deploy this contract in truffle develop
truffle develop
compile
migrate
Exam the build/contracts/TutroialToken.json file. Under networks section, I see the following
"networks": {
"5777": {
"events": {},
.....
RE-deploy the same contract in truffle develop
migrate --reset
Now exam the same TutroialToken.json file, the events are populated.
Expected Behavior
The events section should not be empty {} after the first deployment. It should not require another deployment to make it show up.
@fainashalts truffle-contract has the events porperties, but the events properties is the function which calculates events' signature. Therefore, networks.events is empty until contract calls the events property.
Issue
events field is always empty in deployed contract's json file.
Steps to Reproduce
in my case I simply use the TutorialToken example like this. This token contract has multiple events defined in its dependency
Now exam the same TutroialToken.json file, the events are populated.
Expected Behavior
The events section should not be empty {} after the first deployment. It should not require another deployment to make it show up.
Environment
Truffle v5.0.27 (core: 5.0.27)
Solidity - 0.4.24 (solc-js)
Node v10.15.0
The text was updated successfully, but these errors were encountered: