laconicd-deprecated/tests/solidity/suites/storage/contracts/EventTest.sol
Yijia Su fa77bae105
tests: refactor solidity test cases (#249)
* Refactor

* add script to run all tests

* Spawn ethermintd in node script

* Update README

* kill process when test finished

* add new test case

* add yarn.lock inside tests to be tracked
2021-07-12 05:22:20 -04:00

37 lines
680 B
Solidity

// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract EventTest {
uint256 number;
event ValueStored1(
uint value1
);
event ValueStored2(
string msg,
uint value1
);
event ValueStored3(
string msg,
uint indexed value1,
uint value2
);
function store(uint256 num) public {
number = num;
}
function storeWithEvent(uint256 num) public {
number = num;
emit ValueStored1(num);
emit ValueStored2("TestMsg", num);
emit ValueStored3("TestMsg", num, num);
}
}