forked from argotorg/fe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathops.fe
More file actions
113 lines (106 loc) · 4.75 KB
/
Copy pathops.fe
File metadata and controls
113 lines (106 loc) · 4.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/// Low-level EVM builtins exposed as `extern` functions.
///
/// Most functions in this module are internal to `std`; higher-level access is
/// provided via `std::evm::effects`. Public functions expose pure raw EVM
/// operations for low-level code that needs an exact opcode shape.
extern {
// -------------------------------------------------------------------------
// Memory
// -------------------------------------------------------------------------
pub(ingot) fn mload(_: u256) -> u256
pub(ingot) fn mstore(addr: u256, value: u256)
pub(ingot) fn mstore8(addr: u256, value: u8)
pub(ingot) fn msize() -> u256
// -------------------------------------------------------------------------
// Storage
// -------------------------------------------------------------------------
pub(ingot) fn sload(_: u256) -> u256
pub(ingot) fn sstore(slot: u256, value: u256)
// -------------------------------------------------------------------------
// Calldata / returndata
// -------------------------------------------------------------------------
pub(ingot) fn calldataload(_: u256) -> u256
pub(ingot) fn calldatacopy(dest: u256, offset: u256, len: u256)
pub(ingot) fn calldatasize() -> u256
pub(ingot) fn returndatacopy(dest: u256, offset: u256, len: u256)
pub(ingot) fn returndatasize() -> u256
// -------------------------------------------------------------------------
// Code / hashing
// -------------------------------------------------------------------------
pub(ingot) fn codecopy(dest: u256, offset: u256, len: u256)
pub(ingot) fn codesize() -> u256
pub(ingot) fn extcodecopy(addr: u256, dest: u256, offset: u256, len: u256)
pub(ingot) fn extcodesize(_ addr: u256) -> u256
pub(ingot) fn extcodehash(_ addr: u256) -> u256
pub(ingot) fn keccak256(offset: u256, len: u256) -> u256
pub(ingot) const fn addmod(_ a: u256, _ b: u256, m: u256) -> u256
pub(ingot) const fn mulmod(_ a: u256, _ b: u256, m: u256) -> u256
pub fn byte(pos: u256, value: u256) -> u256
pub fn signextend(byte: u256, value: u256) -> u256
// -------------------------------------------------------------------------
// Environment
// -------------------------------------------------------------------------
pub(ingot) fn address() -> u256
pub(ingot) fn caller() -> u256
pub(ingot) fn callvalue() -> u256
pub(ingot) fn origin() -> u256
pub(ingot) fn gasprice() -> u256
pub(ingot) fn coinbase() -> u256
pub(ingot) fn balance(_ addr: u256) -> u256
pub(ingot) fn timestamp() -> u256
pub(ingot) fn number() -> u256
pub(ingot) fn prevrandao() -> u256
pub(ingot) fn gaslimit() -> u256
pub(ingot) fn chainid() -> u256
pub(ingot) fn basefee() -> u256
pub(ingot) fn selfbalance() -> u256
pub(ingot) fn blockhash(_: u256) -> u256
pub(ingot) fn blobhash(_ index: u256) -> u256
pub(ingot) fn blobbasefee() -> u256
pub(ingot) fn gas() -> u256
// -------------------------------------------------------------------------
// Calls / create
// -------------------------------------------------------------------------
pub(ingot) fn call(
gas: u256,
addr: u256,
value: u256,
args_offset: u256,
args_len: u256,
ret_offset: u256,
ret_len: u256,
) -> u256
pub(ingot) fn staticcall(
gas: u256,
addr: u256,
args_offset: u256,
args_len: u256,
ret_offset: u256,
ret_len: u256,
) -> u256
pub(ingot) fn delegatecall(
gas: u256,
addr: u256,
args_offset: u256,
args_len: u256,
ret_offset: u256,
ret_len: u256,
) -> u256
pub(ingot) fn create(value: u256, offset: u256, len: u256) -> u256
pub(ingot) fn create2(value: u256, offset: u256, len: u256, salt: u256) -> u256
// -------------------------------------------------------------------------
// Logs
// -------------------------------------------------------------------------
pub(ingot) fn log0(offset: u256, len: u256)
pub(ingot) fn log1(offset: u256, len: u256, topic0: u256)
pub(ingot) fn log2(offset: u256, len: u256, topic0: u256, topic1: u256)
pub(ingot) fn log3(offset: u256, len: u256, topic0: u256, topic1: u256, topic2: u256)
pub(ingot) fn log4(offset: u256, len: u256, topic0: u256, topic1: u256, topic2: u256, topic3: u256)
// -------------------------------------------------------------------------
// Control flow
// -------------------------------------------------------------------------
pub(ingot) fn revert(offset: u256, len: u256) -> !
pub(ingot) fn return_data(offset: u256, len: u256) -> !
pub(ingot) fn selfdestruct(_: u256) -> !
pub(ingot) fn stop() -> !
}