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
contract AsmArray { | |
uint256[] public arr; | |
/// @dev Push some dummy data to begin with. | |
constructor() { | |
arr.push(1); | |
arr.push(2); | |
} | |
/// @dev Function used to view the value of `arr[idx]`. |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.15; | |
contract AsmMapping { | |
mapping(uint256 => uint256) private _map; | |
/// @dev Set some dummy data to begin with. | |
constructor() { | |
_map[0] = 2; |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.15; | |
library Counters { | |
error IntegerUnderflow(); | |
struct Counter { | |
uint256 value; | |
} |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.16; | |
contract KekTest { | |
/// 22578 | |
function regHash(uint256 a, uint256 b) external pure returns (bytes32) { | |
return keccak256(abi.encodePacked(a, b)); | |
} |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.17; | |
import { ICity } from "./interfaces/ICity.sol"; | |
/// @title Inspired by the Hobo Wars daily event of city exploration. | |
/// @author ItsCuzzo | |
/// @dev Source: https://wiki.hobowars.com/index.php?title=Exploring | |
/// Memory layout per invoke, assumes the transaction succeeds. Numbers provided |
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
opcodes = { | |
0x00: 'STOP', | |
0x01: 'ADD', | |
0x02: 'MUL', | |
0x03: 'SUB', | |
0x04: 'DIV', | |
0x05: 'SDIV', | |
0x06: 'MOD', | |
0x07: 'SMOD', | |
0x08: 'ADDMOD', |