Skip to content

Instantly share code, notes, and snippets.

@hrkrshnn
Created January 28, 2021 15:29
Show Gist options
  • Save hrkrshnn/259c206f19844f92d14e9909876d1ef1 to your computer and use it in GitHub Desktop.
Save hrkrshnn/259c206f19844f92d14e9909876d1ef1 to your computer and use it in GitHub Desktop.
pragma experimental SMTChecker;
contract A {
int public x;
event Ee(string);
function f() public virtual {
x = 1;
emit Ee(type(A).name);
}
}
contract B is A {
function f() public virtual override {
super.f();
x += 100;
emit Ee(type(B).name);
}
}
contract C is B {
function f() public virtual override {
super.f();
x += 10;
emit Ee(type(C).name);
}
}
contract D is B {
}
contract E is C,D {
function f() public override(C,B) {
super.f();
emit Ee(type(E).name);
}
}
@hrkrshnn
Copy link
Author

status true Transaction mined and execution succeed
transaction hash 0x77fe2a65b86cc414e35133f717a2afcdf36d7509913f78352db9fc704b4cfda5
from 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
to E.f() 0x9D7f74d0C41E726EC95884E0e97Fa6129e3b5E99
gas 3000000 gas
transaction cost 52648 gas
execution cost 31376 gas
hash 0x77fe2a65b86cc414e35133f717a2afcdf36d7509913f78352db9fc704b4cfda5
input 0x261...21ff0
decoded input {}
decoded output {}
logs [ { "from": "0x9D7f74d0C41E726EC95884E0e97Fa6129e3b5E99", "topic": "0xd97a67eb5edfd60dacfd0a99fa5975b9a3b9c6ac29583a2ac8f268079c527a57", "event": "Ee", "args": { "0": "A" } }, { "from": "0x9D7f74d0C41E726EC95884E0e97Fa6129e3b5E99", "topic": "0xd97a67eb5edfd60dacfd0a99fa5975b9a3b9c6ac29583a2ac8f268079c527a57", "event": "Ee", "args": { "0": "B" } }, { "from": "0x9D7f74d0C41E726EC95884E0e97Fa6129e3b5E99", "topic": "0xd97a67eb5edfd60dacfd0a99fa5975b9a3b9c6ac29583a2ac8f268079c527a57", "event": "Ee", "args": { "0": "C" } }, { "from": "0x9D7f74d0C41E726EC95884E0e97Fa6129e3b5E99", "topic": "0xd97a67eb5edfd60dacfd0a99fa5975b9a3b9c6ac29583a2ac8f268079c527a57", "event": "Ee", "args": { "0": "E" } } ]
value 0 wei

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment