implement address and msg.sender

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Cyrill Leutwiler
2024-05-08 16:09:23 +02:00
parent f80a96059d
commit ea63991617
14 changed files with 114 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract Baseline {
function baseline() public payable {}
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract Block {
function timestamp() public view returns (uint ret) {
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract Computation {
function triangle_number(int64 n) public pure returns (int64 sum) {
+13
View File
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8;
contract Context {
function address_this() public view returns (address ret) {
ret = address(this);
}
function caller() public view returns (address ret) {
ret = msg.sender;
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
pragma solidity ^0.8;
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.0.0/contracts/token/ERC20/IERC20.sol
interface IERC20 {
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
pragma solidity ^0.8;
// https://medium.com/coinmonks/fibonacci-in-solidity-8477d907e22a
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract MSize {
uint[] public data;
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract Value {
function value() public payable returns (uint ret) {
+1 -1
View File
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract Flipper {
bool coin;
+1 -1
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
pragma solidity ^0.8;
contract MStore8 {
function mStore8(uint value) public pure returns (uint256 word) {