forked from cerc-io/laconicd-deprecated
7c7f3f02bb
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
26 lines
517 B
Solidity
26 lines
517 B
Solidity
pragma solidity 0.5.17;
|
|
|
|
contract Inner {
|
|
event TestEvent(uint256);
|
|
function test() public returns (uint256) {
|
|
emit TestEvent(42);
|
|
return 42;
|
|
}
|
|
}
|
|
|
|
contract TestMessageCall {
|
|
Inner _inner;
|
|
constructor() public {
|
|
_inner = new Inner();
|
|
}
|
|
|
|
// benchmarks
|
|
function benchmarkMessageCall(uint iterations) public returns (uint256) {
|
|
uint256 n = 0;
|
|
for (uint i=0; i < iterations; i++) {
|
|
n += _inner.test();
|
|
}
|
|
return n;
|
|
}
|
|
}
|