Expand description
Code for compiling solidity smart contracts for testing purposes.
Functions§
- compile_
solidity_ contract - Compiles a Solidity contract and returns the bytecode of the named contract.
- compile_
solidity_ contract_ with_ options - Compiles a Solidity contract with the given optimizer settings, returning the contract’s bytecode.
- get_
bytecode - Compiles the given Solidity source code and returns the bytecode of the named contract.
- get_
evm_ contract_ path - Compiles a Solidity example and writes it to a temporary EVM module file, returning its path.
- load_
solidity_ example - Reads a Solidity file, detects its contract name, and returns the compiled bytecode.
- load_
solidity_ example_ by_ name - Reads a Solidity file and returns the compiled bytecode of the contract with the given name.
- read_
evm_ address_ entry - Reads an
Addressfrom the last 20 bytes of a 32-byte EVM word encoded as a JSON byte array. - read_
evm_ u64_ entry - Reads a
u64from the last 8 bytes of a 32-byte EVM word encoded as a JSON byte array. - read_
evm_ u256_ entry - Reads a
U256from a 32-byte EVM word encoded as a JSON byte array. - temporary_
write_ evm_ module - Writes an EVM module to a temporary file, returning its path and the owning temporary directory.
- value_
to_ vec_ u8 - Converts a JSON array of byte values into a vector of bytes.