|
@@ -6,6 +6,7 @@ pub struct AssemblyBuiltinPrototype {
|
|
|
pub no_returns: u8,
|
|
pub no_returns: u8,
|
|
|
pub doc: &'static str,
|
|
pub doc: &'static str,
|
|
|
pub ty: AssemblyBuiltInFunction,
|
|
pub ty: AssemblyBuiltInFunction,
|
|
|
|
|
+ pub stops_execution: bool,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// The enums declaration order should match that of the static vector containing the builtins
|
|
// The enums declaration order should match that of the static vector containing the builtins
|
|
@@ -96,6 +97,7 @@ static UNSUPPORTED_BUILTINS: phf::Set<&'static str> = phf_set! {
|
|
|
"linkersymbol", "memoryguard"
|
|
"linkersymbol", "memoryguard"
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+/// Checks if bultin function is unsupported
|
|
|
pub(crate) fn assembly_unsupported_builtin(name: &str) -> bool {
|
|
pub(crate) fn assembly_unsupported_builtin(name: &str) -> bool {
|
|
|
UNSUPPORTED_BUILTINS.contains(name)
|
|
UNSUPPORTED_BUILTINS.contains(name)
|
|
|
}
|
|
}
|
|
@@ -179,11 +181,13 @@ static BUILTIN_ASSEMBLY_FUNCTIONS: phf::Map<&'static str, AssemblyBuiltInFunctio
|
|
|
"gaslimit" => AssemblyBuiltInFunction::GasLimit,
|
|
"gaslimit" => AssemblyBuiltInFunction::GasLimit,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+/// Retrieved the builtin function type from an identifier name
|
|
|
pub fn parse_builtin_keyword(keyword: &str) -> Option<&AssemblyBuiltInFunction> {
|
|
pub fn parse_builtin_keyword(keyword: &str) -> Option<&AssemblyBuiltInFunction> {
|
|
|
BUILTIN_ASSEMBLY_FUNCTIONS.get(keyword)
|
|
BUILTIN_ASSEMBLY_FUNCTIONS.get(keyword)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
impl AssemblyBuiltInFunction {
|
|
impl AssemblyBuiltInFunction {
|
|
|
|
|
+ /// Retrieve the prototype from the enum type
|
|
|
pub(crate) fn get_prototype_info(self) -> &'static AssemblyBuiltinPrototype {
|
|
pub(crate) fn get_prototype_info(self) -> &'static AssemblyBuiltinPrototype {
|
|
|
let index = self as usize;
|
|
let index = self as usize;
|
|
|
&ASSEMBLY_BUILTIN[index]
|
|
&ASSEMBLY_BUILTIN[index]
|
|
@@ -200,6 +204,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "Stop execution",
|
|
doc: "Stop execution",
|
|
|
ty: AssemblyBuiltInFunction::Stop,
|
|
ty: AssemblyBuiltInFunction::Stop,
|
|
|
|
|
+ stops_execution: true,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "add",
|
|
name: "add",
|
|
@@ -207,6 +212,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "add(x, y) returns x + y",
|
|
doc: "add(x, y) returns x + y",
|
|
|
ty: AssemblyBuiltInFunction::Add,
|
|
ty: AssemblyBuiltInFunction::Add,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "sub",
|
|
name: "sub",
|
|
@@ -214,6 +220,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "sub(x, y) returns x - y",
|
|
doc: "sub(x, y) returns x - y",
|
|
|
ty: AssemblyBuiltInFunction::Sub,
|
|
ty: AssemblyBuiltInFunction::Sub,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "mul",
|
|
name: "mul",
|
|
@@ -221,6 +228,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "mul(x, y) returns x*y",
|
|
doc: "mul(x, y) returns x*y",
|
|
|
ty: AssemblyBuiltInFunction::Mul,
|
|
ty: AssemblyBuiltInFunction::Mul,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "div",
|
|
name: "div",
|
|
@@ -228,6 +236,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "div(x, y) returns x/y or 0 if y == 0",
|
|
doc: "div(x, y) returns x/y or 0 if y == 0",
|
|
|
ty: AssemblyBuiltInFunction::Div,
|
|
ty: AssemblyBuiltInFunction::Div,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "sdiv",
|
|
name: "sdiv",
|
|
@@ -235,6 +244,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "sdiv(x, y) returns x/y or 0 if y==0. Used for signed numbers in two's complement",
|
|
doc: "sdiv(x, y) returns x/y or 0 if y==0. Used for signed numbers in two's complement",
|
|
|
ty: AssemblyBuiltInFunction::SDiv,
|
|
ty: AssemblyBuiltInFunction::SDiv,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "mod",
|
|
name: "mod",
|
|
@@ -242,6 +252,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "mod(x, y) returns x % y or 0 if y == 0",
|
|
doc: "mod(x, y) returns x % y or 0 if y == 0",
|
|
|
ty: AssemblyBuiltInFunction::Mod,
|
|
ty: AssemblyBuiltInFunction::Mod,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "smod",
|
|
name: "smod",
|
|
@@ -249,6 +260,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "smod(x, y) returns x % y or 0 if y == 0. Used for signed numbers in two's complement",
|
|
doc: "smod(x, y) returns x % y or 0 if y == 0. Used for signed numbers in two's complement",
|
|
|
ty: AssemblyBuiltInFunction::SMod,
|
|
ty: AssemblyBuiltInFunction::SMod,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "exp",
|
|
name: "exp",
|
|
@@ -256,6 +268,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "exp(x, y) returns x to the power of y",
|
|
doc: "exp(x, y) returns x to the power of y",
|
|
|
ty: AssemblyBuiltInFunction::Exp,
|
|
ty: AssemblyBuiltInFunction::Exp,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "not",
|
|
name: "not",
|
|
@@ -263,6 +276,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "not(x): bitwise \"not\" of x (every bit is negated)",
|
|
doc: "not(x): bitwise \"not\" of x (every bit is negated)",
|
|
|
ty: AssemblyBuiltInFunction::Not,
|
|
ty: AssemblyBuiltInFunction::Not,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "lt",
|
|
name: "lt",
|
|
@@ -270,6 +284,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "lt(x, y) returns 1 if x < y, 0 otherwise",
|
|
doc: "lt(x, y) returns 1 if x < y, 0 otherwise",
|
|
|
ty: AssemblyBuiltInFunction::Lt,
|
|
ty: AssemblyBuiltInFunction::Lt,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "gt",
|
|
name: "gt",
|
|
@@ -277,6 +292,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "gt(x, y) returns 1 if x > y, 0 otherwise",
|
|
doc: "gt(x, y) returns 1 if x > y, 0 otherwise",
|
|
|
ty: AssemblyBuiltInFunction::Gt,
|
|
ty: AssemblyBuiltInFunction::Gt,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "slt",
|
|
name: "slt",
|
|
@@ -284,6 +300,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "slt(x, y) returns 1 if x > y, 0 otherwise. Used for signed numbers in two's complement",
|
|
doc: "slt(x, y) returns 1 if x > y, 0 otherwise. Used for signed numbers in two's complement",
|
|
|
ty: AssemblyBuiltInFunction::Slt,
|
|
ty: AssemblyBuiltInFunction::Slt,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "sgt",
|
|
name: "sgt",
|
|
@@ -291,6 +308,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "sgt(x, y) returns 1 if x > y, 0 otherwise. Used for signed numbers in two's complement",
|
|
doc: "sgt(x, y) returns 1 if x > y, 0 otherwise. Used for signed numbers in two's complement",
|
|
|
ty: AssemblyBuiltInFunction::Sgt,
|
|
ty: AssemblyBuiltInFunction::Sgt,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "eq",
|
|
name: "eq",
|
|
@@ -298,6 +316,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "eq(x, y) returns 1 if x == y, 0 otherwise",
|
|
doc: "eq(x, y) returns 1 if x == y, 0 otherwise",
|
|
|
ty: AssemblyBuiltInFunction::Eq,
|
|
ty: AssemblyBuiltInFunction::Eq,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "iszero",
|
|
name: "iszero",
|
|
@@ -305,6 +324,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "iszero(x) returns 1 if x == 0, 0 otherwise",
|
|
doc: "iszero(x) returns 1 if x == 0, 0 otherwise",
|
|
|
ty: AssemblyBuiltInFunction::IsZero,
|
|
ty: AssemblyBuiltInFunction::IsZero,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "and",
|
|
name: "and",
|
|
@@ -312,6 +332,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "and(x, y) returns the bitwise \"and\" between x and y",
|
|
doc: "and(x, y) returns the bitwise \"and\" between x and y",
|
|
|
ty: AssemblyBuiltInFunction::And,
|
|
ty: AssemblyBuiltInFunction::And,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "or",
|
|
name: "or",
|
|
@@ -319,6 +340,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "or(x, y) returns the bitwise \"or\" between x and y",
|
|
doc: "or(x, y) returns the bitwise \"or\" between x and y",
|
|
|
ty: AssemblyBuiltInFunction::Or,
|
|
ty: AssemblyBuiltInFunction::Or,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "xor",
|
|
name: "xor",
|
|
@@ -326,6 +348,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "xor(x, y) returns the bitwise \"xor\" between x and y",
|
|
doc: "xor(x, y) returns the bitwise \"xor\" between x and y",
|
|
|
ty: AssemblyBuiltInFunction::Xor,
|
|
ty: AssemblyBuiltInFunction::Xor,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "byte",
|
|
name: "byte",
|
|
@@ -333,6 +356,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "byte(n, x) returns the nth byte of x, where the most significant byt is the 0th",
|
|
doc: "byte(n, x) returns the nth byte of x, where the most significant byt is the 0th",
|
|
|
ty: AssemblyBuiltInFunction::Byte,
|
|
ty: AssemblyBuiltInFunction::Byte,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "shl",
|
|
name: "shl",
|
|
@@ -340,6 +364,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "shl(x, y) returns the logical shift left of y by x bits",
|
|
doc: "shl(x, y) returns the logical shift left of y by x bits",
|
|
|
ty: AssemblyBuiltInFunction::Shl,
|
|
ty: AssemblyBuiltInFunction::Shl,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "shr",
|
|
name: "shr",
|
|
@@ -347,6 +372,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "shr(x, y) returns the logical shift right of y by x bits",
|
|
doc: "shr(x, y) returns the logical shift right of y by x bits",
|
|
|
ty: AssemblyBuiltInFunction::Shr,
|
|
ty: AssemblyBuiltInFunction::Shr,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "sar",
|
|
name: "sar",
|
|
@@ -354,6 +380,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "signed arithmetic shift right y by x bits",
|
|
doc: "signed arithmetic shift right y by x bits",
|
|
|
ty: AssemblyBuiltInFunction::Sar,
|
|
ty: AssemblyBuiltInFunction::Sar,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "addmod",
|
|
name: "addmod",
|
|
@@ -361,6 +388,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "addmod(x, y, m) returns (x + y) % m or 0 if m == 0",
|
|
doc: "addmod(x, y, m) returns (x + y) % m or 0 if m == 0",
|
|
|
ty: AssemblyBuiltInFunction::AddMod,
|
|
ty: AssemblyBuiltInFunction::AddMod,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "mulmod",
|
|
name: "mulmod",
|
|
@@ -368,6 +396,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "mulmod(x, y, m) returns (x * y) % m or 0 if m == 0",
|
|
doc: "mulmod(x, y, m) returns (x * y) % m or 0 if m == 0",
|
|
|
ty: AssemblyBuiltInFunction::MulMod,
|
|
ty: AssemblyBuiltInFunction::MulMod,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "signextend",
|
|
name: "signextend",
|
|
@@ -375,6 +404,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "signextend(i, x) sign extends from (i*8+7)th bit counting from least significant",
|
|
doc: "signextend(i, x) sign extends from (i*8+7)th bit counting from least significant",
|
|
|
ty: AssemblyBuiltInFunction::SignExtend,
|
|
ty: AssemblyBuiltInFunction::SignExtend,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "keccak256",
|
|
name: "keccak256",
|
|
@@ -382,6 +412,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "keccak256(p, n) performs keccak(mem[p...(p+n)])",
|
|
doc: "keccak256(p, n) performs keccak(mem[p...(p+n)])",
|
|
|
ty: AssemblyBuiltInFunction::Keccak256,
|
|
ty: AssemblyBuiltInFunction::Keccak256,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "pc",
|
|
name: "pc",
|
|
@@ -389,6 +420,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the current position in code, i.e. the program counter",
|
|
doc: "Returns the current position in code, i.e. the program counter",
|
|
|
ty: AssemblyBuiltInFunction::Pc,
|
|
ty: AssemblyBuiltInFunction::Pc,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "pop",
|
|
name: "pop",
|
|
@@ -396,6 +428,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "pop(x) discard value x",
|
|
doc: "pop(x) discard value x",
|
|
|
ty: AssemblyBuiltInFunction::Pop,
|
|
ty: AssemblyBuiltInFunction::Pop,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "mload",
|
|
name: "mload",
|
|
@@ -403,6 +436,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "mload(p) returns mem[p...(p+32)]",
|
|
doc: "mload(p) returns mem[p...(p+32)]",
|
|
|
ty: AssemblyBuiltInFunction::MLoad,
|
|
ty: AssemblyBuiltInFunction::MLoad,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "mstore",
|
|
name: "mstore",
|
|
@@ -410,6 +444,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "mstore(p, v) stores v into mem[p...(p+32)]",
|
|
doc: "mstore(p, v) stores v into mem[p...(p+32)]",
|
|
|
ty: AssemblyBuiltInFunction::MStore,
|
|
ty: AssemblyBuiltInFunction::MStore,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "mstore8",
|
|
name: "mstore8",
|
|
@@ -417,6 +452,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "mstore8(p, v) stores (v & 0xff) into mem[p] (modified a single byte of v)",
|
|
doc: "mstore8(p, v) stores (v & 0xff) into mem[p] (modified a single byte of v)",
|
|
|
ty: AssemblyBuiltInFunction::MStore8,
|
|
ty: AssemblyBuiltInFunction::MStore8,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "sload",
|
|
name: "sload",
|
|
@@ -424,6 +460,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "sload(p) returns storage[p], i.e. memory on contract's storage",
|
|
doc: "sload(p) returns storage[p], i.e. memory on contract's storage",
|
|
|
ty: AssemblyBuiltInFunction::SLoad,
|
|
ty: AssemblyBuiltInFunction::SLoad,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "sstore",
|
|
name: "sstore",
|
|
@@ -431,6 +468,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "sstore(p) stores v into storage[p]",
|
|
doc: "sstore(p) stores v into storage[p]",
|
|
|
ty: AssemblyBuiltInFunction::SStore,
|
|
ty: AssemblyBuiltInFunction::SStore,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "msize",
|
|
name: "msize",
|
|
@@ -438,6 +476,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the size of memory, i.e largest accessed memory index",
|
|
doc: "Returns the size of memory, i.e largest accessed memory index",
|
|
|
ty: AssemblyBuiltInFunction::MSize,
|
|
ty: AssemblyBuiltInFunction::MSize,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "gas",
|
|
name: "gas",
|
|
@@ -445,6 +484,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns gas still available to execution",
|
|
doc: "Returns gas still available to execution",
|
|
|
ty: AssemblyBuiltInFunction::Gas,
|
|
ty: AssemblyBuiltInFunction::Gas,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "address",
|
|
name: "address",
|
|
@@ -452,6 +492,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the address of the current contract / execution context",
|
|
doc: "Returns the address of the current contract / execution context",
|
|
|
ty: AssemblyBuiltInFunction::Address,
|
|
ty: AssemblyBuiltInFunction::Address,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "balance",
|
|
name: "balance",
|
|
@@ -459,6 +500,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "balance(a) returns the wei balance at address a",
|
|
doc: "balance(a) returns the wei balance at address a",
|
|
|
ty: AssemblyBuiltInFunction::Balance,
|
|
ty: AssemblyBuiltInFunction::Balance,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "selfbalance",
|
|
name: "selfbalance",
|
|
@@ -466,6 +508,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the wei balance at the address of the current contract / execution context",
|
|
doc: "Returns the wei balance at the address of the current contract / execution context",
|
|
|
ty: AssemblyBuiltInFunction::SelfBalance,
|
|
ty: AssemblyBuiltInFunction::SelfBalance,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "caller",
|
|
name: "caller",
|
|
@@ -473,6 +516,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the call sender",
|
|
doc: "Returns the call sender",
|
|
|
ty: AssemblyBuiltInFunction::Caller,
|
|
ty: AssemblyBuiltInFunction::Caller,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "callvalue",
|
|
name: "callvalue",
|
|
@@ -480,6 +524,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the wei sent together with the current call",
|
|
doc: "Returns the wei sent together with the current call",
|
|
|
ty: AssemblyBuiltInFunction::CallValue,
|
|
ty: AssemblyBuiltInFunction::CallValue,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "calldataload",
|
|
name: "calldataload",
|
|
@@ -487,6 +532,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "calldataload(p) returns call data starting from position p (32 bytes)",
|
|
doc: "calldataload(p) returns call data starting from position p (32 bytes)",
|
|
|
ty: AssemblyBuiltInFunction::CallDataLoad,
|
|
ty: AssemblyBuiltInFunction::CallDataLoad,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "calldatasize",
|
|
name: "calldatasize",
|
|
@@ -494,6 +540,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the size of call data in bytes",
|
|
doc: "Returns the size of call data in bytes",
|
|
|
ty: AssemblyBuiltInFunction::CallDataSize,
|
|
ty: AssemblyBuiltInFunction::CallDataSize,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "calldatacopy",
|
|
name: "calldatacopy",
|
|
@@ -501,6 +548,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "calldatacopy(t, f, s) copies s bytes from calldata at position f to mem at position t",
|
|
doc: "calldatacopy(t, f, s) copies s bytes from calldata at position f to mem at position t",
|
|
|
ty: AssemblyBuiltInFunction::CallDataCopy,
|
|
ty: AssemblyBuiltInFunction::CallDataCopy,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "codesize",
|
|
name: "codesize",
|
|
@@ -508,6 +556,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the size of the current contract / execution context",
|
|
doc: "Returns the size of the current contract / execution context",
|
|
|
ty: AssemblyBuiltInFunction::CodeSize,
|
|
ty: AssemblyBuiltInFunction::CodeSize,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "codecopy",
|
|
name: "codecopy",
|
|
@@ -515,6 +564,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "codecopy(t, f, s) copies s bytes from code at position f to mem at position t",
|
|
doc: "codecopy(t, f, s) copies s bytes from code at position f to mem at position t",
|
|
|
ty: AssemblyBuiltInFunction::CodeCopy,
|
|
ty: AssemblyBuiltInFunction::CodeCopy,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "extcodesize",
|
|
name: "extcodesize",
|
|
@@ -522,6 +572,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "extcodesize(a) returns the size of the code at address a",
|
|
doc: "extcodesize(a) returns the size of the code at address a",
|
|
|
ty: AssemblyBuiltInFunction::ExtCodeSize,
|
|
ty: AssemblyBuiltInFunction::ExtCodeSize,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "extcodecopy",
|
|
name: "extcodecopy",
|
|
@@ -529,6 +580,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "extcodecopy(a, t, f, s) copies s bytes from code located at address a at position f to mem at position t",
|
|
doc: "extcodecopy(a, t, f, s) copies s bytes from code located at address a at position f to mem at position t",
|
|
|
ty: AssemblyBuiltInFunction::ExtCodeCopy,
|
|
ty: AssemblyBuiltInFunction::ExtCodeCopy,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "returndatasize",
|
|
name: "returndatasize",
|
|
@@ -536,6 +588,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the size of the last returndata",
|
|
doc: "Returns the size of the last returndata",
|
|
|
ty: AssemblyBuiltInFunction::ReturnDataSize,
|
|
ty: AssemblyBuiltInFunction::ReturnDataSize,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "returndatacopy",
|
|
name: "returndatacopy",
|
|
@@ -543,6 +596,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "returndatacopy(t, f, s) copy s bytes from return data at position f to mem at position t",
|
|
doc: "returndatacopy(t, f, s) copy s bytes from return data at position f to mem at position t",
|
|
|
ty: AssemblyBuiltInFunction::ReturnDataCopy,
|
|
ty: AssemblyBuiltInFunction::ReturnDataCopy,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "extcodehash",
|
|
name: "extcodehash",
|
|
@@ -550,6 +604,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "extcodehash(a) returns the code hash of address a",
|
|
doc: "extcodehash(a) returns the code hash of address a",
|
|
|
ty: AssemblyBuiltInFunction::ExtCodeHash,
|
|
ty: AssemblyBuiltInFunction::ExtCodeHash,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "create",
|
|
name: "create",
|
|
@@ -557,6 +612,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "create(v, p, n) creates new contract with code mem[p..(p+n)] and sends v wei. It returns the new address or 0 on error",
|
|
doc: "create(v, p, n) creates new contract with code mem[p..(p+n)] and sends v wei. It returns the new address or 0 on error",
|
|
|
ty: AssemblyBuiltInFunction::Create,
|
|
ty: AssemblyBuiltInFunction::Create,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "create2",
|
|
name: "create2",
|
|
@@ -564,6 +620,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "create2(v, p, n, s) new contract with code mem[p...(p+n)] at address keccak256(0xff . this . s . keccak256(mem[p...(p+n)]) and sends v wei.\n 0xff is a 1 byte value, 'this' is the current contract's address as a 20 byte value and 's' is a big endian 256-bit value. it returns 0 on error.",
|
|
doc: "create2(v, p, n, s) new contract with code mem[p...(p+n)] at address keccak256(0xff . this . s . keccak256(mem[p...(p+n)]) and sends v wei.\n 0xff is a 1 byte value, 'this' is the current contract's address as a 20 byte value and 's' is a big endian 256-bit value. it returns 0 on error.",
|
|
|
ty: AssemblyBuiltInFunction::Create2,
|
|
ty: AssemblyBuiltInFunction::Create2,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "call",
|
|
name: "call",
|
|
@@ -571,6 +628,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "call(g, a, v, in, insize, out, outsize) calls contract at address a with input mem[in...(in+insize)] providing f cas and v wei and outputs area mem[out...(out+outsize)]. It returns 0 on error and 1 on success",
|
|
doc: "call(g, a, v, in, insize, out, outsize) calls contract at address a with input mem[in...(in+insize)] providing f cas and v wei and outputs area mem[out...(out+outsize)]. It returns 0 on error and 1 on success",
|
|
|
ty: AssemblyBuiltInFunction::Call,
|
|
ty: AssemblyBuiltInFunction::Call,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "callcode",
|
|
name: "callcode",
|
|
@@ -578,6 +636,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Identical to call(g, a, v, in, insize, out, outsize), but only use the code from a and stay in the context of the current contract otherwise",
|
|
doc: "Identical to call(g, a, v, in, insize, out, outsize), but only use the code from a and stay in the context of the current contract otherwise",
|
|
|
ty: AssemblyBuiltInFunction::CallCode,
|
|
ty: AssemblyBuiltInFunction::CallCode,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "delegatecall",
|
|
name: "delegatecall",
|
|
@@ -585,6 +644,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Identical to 'callcode' but also keep caller and callvalue",
|
|
doc: "Identical to 'callcode' but also keep caller and callvalue",
|
|
|
ty: AssemblyBuiltInFunction::DelegateCall,
|
|
ty: AssemblyBuiltInFunction::DelegateCall,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "staticcall",
|
|
name: "staticcall",
|
|
@@ -592,6 +652,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Identical to call(g, a, 0, in, insize, out, outsize), but do not allow state modifications",
|
|
doc: "Identical to call(g, a, 0, in, insize, out, outsize), but do not allow state modifications",
|
|
|
ty: AssemblyBuiltInFunction::StaticCall,
|
|
ty: AssemblyBuiltInFunction::StaticCall,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "return",
|
|
name: "return",
|
|
@@ -599,6 +660,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "return(p, s) ends execution and returns data mem[p...(p+s)]",
|
|
doc: "return(p, s) ends execution and returns data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Return,
|
|
ty: AssemblyBuiltInFunction::Return,
|
|
|
|
|
+ stops_execution: true,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "revert",
|
|
name: "revert",
|
|
@@ -606,6 +668,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "revert(p, s) ends execution, reverts state changes and returns data mem[p...(p+s)]",
|
|
doc: "revert(p, s) ends execution, reverts state changes and returns data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Revert,
|
|
ty: AssemblyBuiltInFunction::Revert,
|
|
|
|
|
+ stops_execution: true,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "selfdestruct",
|
|
name: "selfdestruct",
|
|
@@ -613,6 +676,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "selfdestruct(a) ends execution, destroy current contract and sends funds to a",
|
|
doc: "selfdestruct(a) ends execution, destroy current contract and sends funds to a",
|
|
|
ty: AssemblyBuiltInFunction::SelfDestruct,
|
|
ty: AssemblyBuiltInFunction::SelfDestruct,
|
|
|
|
|
+ stops_execution: true,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "invalid",
|
|
name: "invalid",
|
|
@@ -620,6 +684,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "Ends execution with invalid instruction",
|
|
doc: "Ends execution with invalid instruction",
|
|
|
ty: AssemblyBuiltInFunction::Invalid,
|
|
ty: AssemblyBuiltInFunction::Invalid,
|
|
|
|
|
+ stops_execution: true,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "log0",
|
|
name: "log0",
|
|
@@ -627,6 +692,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "log(p, s): log without topics and data mem[p...(p+s)]",
|
|
doc: "log(p, s): log without topics and data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Log0,
|
|
ty: AssemblyBuiltInFunction::Log0,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "log1",
|
|
name: "log1",
|
|
@@ -634,6 +700,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "log1(p, s, t1): log with topic t1 and data mem[p...(p+s)]",
|
|
doc: "log1(p, s, t1): log with topic t1 and data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Log1,
|
|
ty: AssemblyBuiltInFunction::Log1,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "log2",
|
|
name: "log2",
|
|
@@ -641,6 +708,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "log2(p, s, t1, t2): log with topics t1, t2 and data mem[p...(p+s)]",
|
|
doc: "log2(p, s, t1, t2): log with topics t1, t2 and data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Log2,
|
|
ty: AssemblyBuiltInFunction::Log2,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "log3",
|
|
name: "log3",
|
|
@@ -648,6 +716,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "log3(p, s, t1, t2, t3): log with topics t1, t2, t3 and data mem[p...(p+s)]",
|
|
doc: "log3(p, s, t1, t2, t3): log with topics t1, t2, t3 and data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Log3,
|
|
ty: AssemblyBuiltInFunction::Log3,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "log4",
|
|
name: "log4",
|
|
@@ -655,6 +724,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 0,
|
|
no_returns: 0,
|
|
|
doc: "log4(p, s, t1, t2, t3, t4): log with topics t1, t2, t3, t4 with data mem[p...(p+s)]",
|
|
doc: "log4(p, s, t1, t2, t3, t4): log with topics t1, t2, t3, t4 with data mem[p...(p+s)]",
|
|
|
ty: AssemblyBuiltInFunction::Log4,
|
|
ty: AssemblyBuiltInFunction::Log4,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "chainid",
|
|
name: "chainid",
|
|
@@ -662,6 +732,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the ID of the executing chain",
|
|
doc: "Returns the ID of the executing chain",
|
|
|
ty: AssemblyBuiltInFunction::ChainId,
|
|
ty: AssemblyBuiltInFunction::ChainId,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "basefee",
|
|
name: "basefee",
|
|
@@ -669,6 +740,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Return the current block's base fee",
|
|
doc: "Return the current block's base fee",
|
|
|
ty: AssemblyBuiltInFunction::BaseFee,
|
|
ty: AssemblyBuiltInFunction::BaseFee,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "origin",
|
|
name: "origin",
|
|
@@ -676,6 +748,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the transaction sender",
|
|
doc: "Returns the transaction sender",
|
|
|
ty: AssemblyBuiltInFunction::Origin,
|
|
ty: AssemblyBuiltInFunction::Origin,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "gasprice",
|
|
name: "gasprice",
|
|
@@ -683,6 +756,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the gas price of the transaction",
|
|
doc: "Returns the gas price of the transaction",
|
|
|
ty: AssemblyBuiltInFunction::GasPrice,
|
|
ty: AssemblyBuiltInFunction::GasPrice,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "blockhash",
|
|
name: "blockhash",
|
|
@@ -690,6 +764,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "blockhash(b) return the hash of block #b - only valid for the last 256 executing block excluding current",
|
|
doc: "blockhash(b) return the hash of block #b - only valid for the last 256 executing block excluding current",
|
|
|
ty: AssemblyBuiltInFunction::BlockHash,
|
|
ty: AssemblyBuiltInFunction::BlockHash,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "coinbase",
|
|
name: "coinbase",
|
|
@@ -697,6 +772,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the current mining beneficiary",
|
|
doc: "Returns the current mining beneficiary",
|
|
|
ty: AssemblyBuiltInFunction::CoinBase,
|
|
ty: AssemblyBuiltInFunction::CoinBase,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "timestamp",
|
|
name: "timestamp",
|
|
@@ -704,6 +780,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the timestamp of the current block in seconds since the epoch",
|
|
doc: "Returns the timestamp of the current block in seconds since the epoch",
|
|
|
ty: AssemblyBuiltInFunction::Timestamp,
|
|
ty: AssemblyBuiltInFunction::Timestamp,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "number",
|
|
name: "number",
|
|
@@ -711,6 +788,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the current block's number",
|
|
doc: "Returns the current block's number",
|
|
|
ty: AssemblyBuiltInFunction::Number,
|
|
ty: AssemblyBuiltInFunction::Number,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "difficulty",
|
|
name: "difficulty",
|
|
@@ -718,6 +796,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the difficulty of the current block",
|
|
doc: "Returns the difficulty of the current block",
|
|
|
ty: AssemblyBuiltInFunction::Difficulty,
|
|
ty: AssemblyBuiltInFunction::Difficulty,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
AssemblyBuiltinPrototype{
|
|
AssemblyBuiltinPrototype{
|
|
|
name: "gaslimit",
|
|
name: "gaslimit",
|
|
@@ -725,6 +804,7 @@ static ASSEMBLY_BUILTIN: [AssemblyBuiltinPrototype; 76] =
|
|
|
no_returns: 1,
|
|
no_returns: 1,
|
|
|
doc: "Returns the current block's gas limit",
|
|
doc: "Returns the current block's gas limit",
|
|
|
ty: AssemblyBuiltInFunction::GasLimit,
|
|
ty: AssemblyBuiltInFunction::GasLimit,
|
|
|
|
|
+ stops_execution: false,
|
|
|
},
|
|
},
|
|
|
];
|
|
];
|
|
|
|
|
|