Skip to content

Instantly share code, notes, and snippets.

@kangsangsoo
Created February 13, 2023 13:22
Show Gist options
  • Save kangsangsoo/83406acd8a1e3f0978a52bb03cc894e4 to your computer and use it in GitHub Desktop.
Save kangsangsoo/83406acd8a1e3f0978a52bb03cc894e4 to your computer and use it in GitHub Desktop.
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