Module instruction Copy item path Source AbsOperation The implementation of the binary operation. AbsWrappedOperation The implementation of the binary operation. AddOperation The implementation of the binary operation. AddWrappedOperation The implementation of the binary operation. AndOperation The implementation of the binary operation. AssertInstruction Asserts an operation on two operands. Async Invokes the asynchronous call on the operands, producing a future. Call Calls the operands into the declared type.
i.e. call transfer r0.owner 0u64 r1.amount into r1 r2;
CastOperation Casts the operands into the declared type. CommitInstruction Commits the operand into the declared type. DivOperation The implementation of the binary operation. DivWrappedOperation The implementation of the binary operation. DoubleOperation The implementation of the binary operation. GreaterThanOperation The implementation of the binary operation. GreaterThanOrEqualOperation The implementation of the binary operation. HashInstruction Hashes the operand into the declared type. InvOperation The implementation of the binary operation. IsInstruction Computes an equality operation on two operands, and stores the outcome in destination
. LessThanOperation The implementation of the binary operation. LessThanOrEqualOperation The implementation of the binary operation. Literals ModuloOperation The implementation of the binary operation. MulOperation The implementation of the binary operation. MulWrappedOperation The implementation of the binary operation. NandOperation The implementation of the binary operation. NegOperation The implementation of the binary operation. NorOperation The implementation of the binary operation. NotOperation The implementation of the binary operation. OrOperation The implementation of the binary operation. PowOperation The implementation of the binary operation. PowWrappedOperation The implementation of the binary operation. RemOperation The implementation of the binary operation. RemWrappedOperation The implementation of the binary operation. ShlOperation The implementation of the binary operation. ShlWrappedOperation The implementation of the binary operation. ShrOperation The implementation of the binary operation. ShrWrappedOperation The implementation of the binary operation. SignVerify Computes whether signature
is valid for the given address
and message
. SquareOperation The implementation of the binary operation. SquareRootOperation The implementation of the binary operation. SubOperation The implementation of the binary operation. SubWrappedOperation The implementation of the binary operation. TernaryOperation The implementation of the binary operation. XorOperation The implementation of the binary operation. CallOperator The operator references a function name or closure name. CastType The type of the cast operation. Instruction Opcode The Opcode
enum stores the mnemonic for the instruction. Operand The Operand
enum represents the options for an operand in an instruction.
This enum is designed to for instructions such as add {Register} {Literal} into {Register}
. Operation Abs Compute the absolute value of first
, checking for overflow/underflow, and storing the outcome in destination
. AbsWrapped Compute the absolute value of first
, wrapping around at the boundary of the type, and storing the outcome in destination
. Add Adds first
with second
, storing the outcome in destination
. AddWrapped Adds first
with second
, wrapping around at the boundary of the type, and storing the outcome in destination
. And Performs a bitwise and
on first
and second
, storing the outcome in destination
. AssertEq Asserts two operands are equal to each other. AssertNeq Asserts two operands are not equal to each other. BinaryLiteral A binary literal operation. Cast The cast
instruction. CastLossy The cast.lossy
instruction. CommitBHP256 BHP256 is a collision-resistant function that processes inputs in 256-bit chunks. CommitBHP512 BHP512 is a collision-resistant function that processes inputs in 512-bit chunks. CommitBHP768 BHP768 is a collision-resistant function that processes inputs in 768-bit chunks. CommitBHP1024 BHP1024 is a collision-resistant function that processes inputs in 1024-bit chunks. CommitPED64 Pedersen64 is a collision-resistant function that processes inputs in 64-bit chunks. CommitPED128 Pedersen128 is a collision-resistant function that processes inputs in 128-bit chunks. Div Divides first
by second
, storing the outcome in destination
. DivWrapped Divides first
by second
, wrapping around at the boundary of the type, storing the outcome in destination
. Double Doubles first
, storing the outcome in destination
. GreaterThan Computes whether first
is greater than second
as a boolean, storing the outcome in destination
. GreaterThanOrEqual Computes whether first
is greater than or equal to second
as a boolean, storing the outcome in destination
. HashBHP256 BHP256 is a collision-resistant hash function that processes inputs in 256-bit chunks. HashBHP512 BHP512 is a collision-resistant hash function that processes inputs in 512-bit chunks. HashBHP768 BHP768 is a collision-resistant hash function that processes inputs in 768-bit chunks. HashBHP1024 BHP1024 is a collision-resistant hash function that processes inputs in 1024-bit chunks. HashKeccak256 Keccak256 is a cryptographic hash function that outputs a 256-bit digest. HashKeccak384 Keccak384 is a cryptographic hash function that outputs a 384-bit digest. HashKeccak512 Keccak512 is a cryptographic hash function that outputs a 512-bit digest. HashManyPSD2 Poseidon2 is a cryptographic hash function that processes inputs in 2-field chunks. HashManyPSD4 Poseidon4 is a cryptographic hash function that processes inputs in 4-field chunks. HashManyPSD8 Poseidon8 is a cryptographic hash function that processes inputs in 8-field chunks. HashPED64 Pedersen64 is a collision-resistant hash function that processes inputs in 64-bit chunks. HashPED128 Pedersen128 is a collision-resistant hash function that processes inputs in 128-bit chunks. HashPSD2 Poseidon2 is a cryptographic hash function that processes inputs in 2-field chunks. HashPSD4 Poseidon4 is a cryptographic hash function that processes inputs in 4-field chunks. HashPSD8 Poseidon8 is a cryptographic hash function that processes inputs in 8-field chunks. HashSha3_256 SHA3-256 is a cryptographic hash function that outputs a 256-bit digest. HashSha3_384 SHA3-384 is a cryptographic hash function that outputs a 384-bit digest. HashSha3_512 SHA3-512 is a cryptographic hash function that outputs a 512-bit digest. Inv Computes the multiplicative inverse of first
, storing the outcome in destination
. IsEq Computes whether first
equals second
as a boolean, storing the outcome in destination
. IsNeq Computes whether first
does not equals second
as a boolean, storing the outcome in destination
. LessThan Computes whether first
is less than second
as a boolean, storing the outcome in destination
. LessThanOrEqual Computes whether first
is less than or equal to second
as a boolean, storing the outcome in destination
. Modulo Computes the result of first
mod second
, storing the outcome in the destination. Mul Multiplies first
and second
, storing the outcome in destination
. MulWrapped Multiplies first
and second
, wrapping around at the boundary of the type, storing the outcome in destination
. Nand Returns false
if first
and second
are true
, storing the outcome in destination
. Neg Negates first
, storing the outcome in destination
. Nor Returns true
if neither first
nor second
is true
, storing the outcome in destination
. Not Flips each bit in the representation of first
, storing the outcome in destination
. Or Performs a bitwise or
on first
and second
, storing the outcome in destination
. Pow Raises first
to the power of second
, storing the outcome in destination
. PowWrapped Raises first
to the power of second
, wrapping around at the boundary of the type, storing the outcome in destination
. Rem Divides first
by second
, storing the remainder in destination
. RemWrapped Divides first
by second
, wrapping around at the boundary of the type, storing the remainder in destination
. Shl Shifts first
left by second
bits, storing the outcome in destination
. ShlWrapped Shifts first
left by second
bits, continuing past the boundary of the type, storing the outcome in destination
. Shr Shifts first
right by second
bits, storing the outcome in destination
. ShrWrapped Shifts first
right by second
bits, continuing past the boundary of the type, storing the outcome in destination
. Square Squares first
, storing the outcome in destination
. SquareRoot Computes the square root of first
, storing the outcome in destination
. Sub Computes first - second
, storing the outcome in destination
. SubWrapped Computes first - second
, wrapping around at the boundary of the type, and storing the outcome in destination
. Ternary Selects first
, if condition
is true, otherwise selects second
, storing the result in destination
. TernaryLiteral A ternary literal operation. UnaryLiteral A unary literal operation. Xor Performs a bitwise xor
on first
and second
, storing the outcome in destination
.