Skip to content

Precompiled Contracts

Every SKALE Chain comes with a set of precompiled contracts in addition to the precompiled contracts included with Ethereum (e.g ecrecover, sha256, modexp, etc.).

AddressFunctionSender Who May CallDescription
0x0AreadChunkAnyReads chunk from file from specific position with specific length
0x0BcreateFileFilestorage OnlyCreates an address for an empty file
0x0CuploadChunkFilestorage OnlyUploads 1MB chunk of data from specific position in specific file by file owner
0x0DgetFileSizeAnyReturns size of file
0x0EdeleteFileFilestorage OnlyDeletes file from filestorage system
0x0FcreateDirectoryFilestorage OnlyCreates directory in filestorage system
0x10deleteDirectoryFilestorage OnlyDeletes directory in filestorage system
0x11calculateFileHashAnyCalculates and writes SHA256 hash of file in same directory <NAME_OF_FILE>._hash
0x12logTextMessageAny
Logs a message:
  • 0 - Normal
  • 1 - Debug
  • 2 - Trace
  • 3 - Warning
  • 4 - Error
  • 5 - Fatal

Used for IMA SKALE Chain Testing

0x13getConfigVariableUint256AnyReturns SKALE Chain config uint256 for IMA SKALE Chain contracts. Used for reading BLS common public key
0x14getConfigVariableAddressAnyReturns SKALE Chain config address for IMA SKALE Chain testing
0x15getConfigVariableStringAnyReturns SKALE Chain config string for IMA SKALE Chain testing
0x16fnReserved0x16AnyReserved
0x16getConfigPermissionsFlagAnyReturns SKALE Chain config boolean for IMA SKALE Chain testing
0x18getBlockRandomAnyReturn a random number based on BLS threshold signature common coin of the current block
0x19getIMABLSPublicKeyAnyReturns relevant BLSPublicKey according to block timestamp