Created
February 13, 2023 13:22
-
-
Save kangsangsoo/83406acd8a1e3f0978a52bb03cc894e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.18; | |
contract A{ | |
uint public a = 3; | |
uint public b; | |
uint public c; | |
function first() public returns(uint) { | |
uint z = a; | |
assembly{ | |
sstore(1, z) | |
} | |
a = a - 1; | |
return 0; | |
} | |
function second() public returns(uint) { | |
uint z = a; | |
assembly{ | |
sstore(2, z) | |
} | |
a = a - 1; | |
return 0; | |
} | |
function inter(uint a, uint b) public { | |
} | |
function test() public { | |
inter(first(), second()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment