2021-02-18 18:33:05 +00:00
|
|
|
contract Other {
|
|
|
|
constructor() payable {
|
|
|
|
}
|
|
|
|
function getAddress() public returns (address) {
|
|
|
|
return address(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
contract ClientReceipt {
|
|
|
|
Other other;
|
|
|
|
constructor() payable {
|
|
|
|
other = new Other{value:500}();
|
|
|
|
}
|
|
|
|
function getAddress() public returns (address) {
|
|
|
|
return other.getAddress();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
|
|
|
// constructor(), 2000 wei ->
|
2023-04-26 11:03:17 +00:00
|
|
|
// gas irOptimized: 171859
|
|
|
|
// gas legacy: 230026
|
|
|
|
// gas legacyOptimized: 173877
|
2021-02-18 18:33:05 +00:00
|
|
|
// balance -> 1500
|
|
|
|
// gas irOptimized: 191881
|
|
|
|
// gas legacy: 235167
|
|
|
|
// gas legacyOptimized: 180756
|
2022-09-16 13:53:19 +00:00
|
|
|
// getAddress() -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a
|
|
|
|
// balance: 0x137aa4dfc0911524504fcd4d98501f179bc13b4a -> 500
|