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.).
| Address | Function | Sender Who May Call | Description |
|---|---|---|---|
| 0x0A | readChunk | Any | Reads chunk from file from specific position with specific length |
| 0x0B | createFile | Filestorage Only | Creates an address for an empty file |
| 0x0C | uploadChunk | Filestorage Only | Uploads 1MB chunk of data from specific position in specific file by file owner |
| 0x0D | getFileSize | Any | Returns size of file |
| 0x0E | deleteFile | Filestorage Only | Deletes file from filestorage system |
| 0x0F | createDirectory | Filestorage Only | Creates directory in filestorage system |
| 0x10 | deleteDirectory | Filestorage Only | Deletes directory in filestorage system |
| 0x11 | calculateFileHash | Any | Calculates and writes SHA256 hash of file in same directory <NAME_OF_FILE>._hash |
| 0x12 | logTextMessage | Any | Logs a message:
Used for IMA SKALE Chain Testing |
| 0x13 | getConfigVariableUint256 | Any | Returns SKALE Chain config uint256 for IMA SKALE Chain contracts. Used for reading BLS common public key |
| 0x14 | getConfigVariableAddress | Any | Returns SKALE Chain config address for IMA SKALE Chain testing |
| 0x15 | getConfigVariableString | Any | Returns SKALE Chain config string for IMA SKALE Chain testing |
| 0x16 | fnReserved0x16 | Any | Reserved |
| 0x16 | getConfigPermissionsFlag | Any | Returns SKALE Chain config boolean for IMA SKALE Chain testing |
| 0x18 | getBlockRandom | Any | Return a random number based on BLS threshold signature common coin of the current block |
| 0x19 | getIMABLSPublicKey | Any | Returns relevant BLSPublicKey according to block timestamp |