Skip to content

Commit

Permalink
Merge pull request #13 from OffchainLabs/footprint-precompile
Browse files Browse the repository at this point in the history
Add stylus programSize and programMemoryFootprint precompiles
  • Loading branch information
rachel-bousfield authored Sep 6, 2023
2 parents 60d71ca + d5ce093 commit f291b58
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/precompiles/ArbWasm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ interface ArbWasm {
// @return version the program version (0 for EVM contracts)
function programVersion(address program) external view returns (uint16 version);

// @notice gets the uncompressed size of the program at the given address in bytes
// @return size the size of the program in bytes rounded up to a multiple of 512
function programSize(address program) external view returns (uint32 size);

// @notice gets the memory footprint of the program at the given address in pages
// @return footprint the memory footprint of program in pages
function programMemoryFootprint(address program) external view returns (uint16 footprint);

// @notice gets the conversion rate between gas and ink
// @return price the amount of ink 1 gas buys
function inkPrice() external view returns (uint32 price);
Expand Down

0 comments on commit f291b58

Please sign in to comment.