Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
305 changes: 305 additions & 0 deletions docs/Architecture.html

Large diffs are not rendered by default.

234 changes: 234 additions & 0 deletions docs/ChainSpec/README.html

Large diffs are not rendered by default.

483 changes: 483 additions & 0 deletions docs/ChainSpec/Transactions.html

Large diffs are not rendered by default.

286 changes: 286 additions & 0 deletions docs/DataStructures/AccessKey.html

Large diffs are not rendered by default.

335 changes: 335 additions & 0 deletions docs/DataStructures/Account.html

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions docs/DataStructures/README.html

Large diffs are not rendered by default.

234 changes: 234 additions & 0 deletions docs/DataStructures/Transaction.html

Large diffs are not rendered by default.

425 changes: 425 additions & 0 deletions docs/Economics/README.html

Large diffs are not rendered by default.

371 changes: 371 additions & 0 deletions docs/GenesisConfig/ExtCostsConfig.html

Large diffs are not rendered by default.

308 changes: 308 additions & 0 deletions docs/GenesisConfig/GenesisConfig.html

Large diffs are not rendered by default.

256 changes: 256 additions & 0 deletions docs/GenesisConfig/RuntimeConfig.html

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig.html

Large diffs are not rendered by default.

244 changes: 244 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig/AccessKeyCreationConfig.html

Large diffs are not rendered by default.

265 changes: 265 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig/ActionCreationConfig.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig/DataReceiptCreationConfig.html

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig/Fee.html

Large diffs are not rendered by default.

238 changes: 238 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig/Fraction.html

Large diffs are not rendered by default.

250 changes: 250 additions & 0 deletions docs/GenesisConfig/RuntimeFeeConfig/StorageUsageConfig.html

Large diffs are not rendered by default.

272 changes: 272 additions & 0 deletions docs/GenesisConfig/VMConfig.html

Large diffs are not rendered by default.

238 changes: 238 additions & 0 deletions docs/README.html

Large diffs are not rendered by default.

395 changes: 395 additions & 0 deletions docs/RuntimeSpec/Actions.html

Large diffs are not rendered by default.

285 changes: 285 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/BindingsSpec.html

Large diffs are not rendered by default.

388 changes: 388 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/ContextAPI.html

Large diffs are not rendered by default.

278 changes: 278 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/EconomicsAPI.html

Large diffs are not rendered by default.

281 changes: 281 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/MathAPI.html

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/MiscellaneousAPI.html

Large diffs are not rendered by default.

588 changes: 588 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/PromisesAPI.html

Large diffs are not rendered by default.

295 changes: 295 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/RegistersAPI.html

Large diffs are not rendered by default.

407 changes: 407 additions & 0 deletions docs/RuntimeSpec/Components/BindingsSpec/TrieAPI.html

Large diffs are not rendered by default.

236 changes: 236 additions & 0 deletions docs/RuntimeSpec/Components/Components.html

Large diffs are not rendered by default.

363 changes: 363 additions & 0 deletions docs/RuntimeSpec/Components/RuntimeCrate.html

Large diffs are not rendered by default.

304 changes: 304 additions & 0 deletions docs/RuntimeSpec/FunctionCall.html

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions docs/RuntimeSpec/README.html

Large diffs are not rendered by default.

440 changes: 440 additions & 0 deletions docs/RuntimeSpec/Receipts.html

Large diffs are not rendered by default.

340 changes: 340 additions & 0 deletions docs/RuntimeSpec/Scenarios/CrossContractCall.html

Large diffs are not rendered by default.

328 changes: 328 additions & 0 deletions docs/RuntimeSpec/Scenarios/FinancialTransaction.html

Large diffs are not rendered by default.

239 changes: 239 additions & 0 deletions docs/RuntimeSpec/Scenarios/Scenarios.html

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions docs/RuntimeSpec/Transactions.html

Large diffs are not rendered by default.

237 changes: 237 additions & 0 deletions docs/Standards/README.html

Large diffs are not rendered by default.

482 changes: 482 additions & 0 deletions docs/Standards/Tokens/FungibleToken.html

Large diffs are not rendered by default.

237 changes: 237 additions & 0 deletions docs/Terminology.html

Large diffs are not rendered by default.

238 changes: 238 additions & 0 deletions docs/index.html

Large diffs are not rendered by default.

4,028 changes: 4,028 additions & 0 deletions docs/print.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/searchindex.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/searchindex.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions specs/RuntimeSpec/Components/Precompiles/EVM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EVM pre-compile

This provides interface and details of the implementing EVM pre-compile.
See more details about pre-compiles in [FunctionCall section](../../FunctionCall.md#pre-compiled-contracts).

## Details

TBD

### Pre-compiles inside EVM

There are a list of pre-compiles in EVM that provide an interface to native functions.
7 changes: 7 additions & 0 deletions specs/RuntimeSpec/Components/Precompiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Precompiles

See more details about pre-compiles in [FunctionCall section](../../FunctionCall.md#pre-compiled-contracts).

Available pre-compiles:
- 0x0: No Op contract
- 0x1: [Ethereum Virtual Machine](./EVM.md)
13 changes: 13 additions & 0 deletions specs/RuntimeSpec/FunctionCall.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ During execution, VM does the following:
- sets the return data
- creates new receipts through [PromisesAPI](Components/BindingsSpec/PromisesAPI.md)

## Pre-compiled contracts

Pre-compiled contracts ("pre-compiles") are contracts that are natively built within the client's binary.

They are identified by special `code_hash` in `Account` structure.
When `FunctionCall` is executed, first it's checked if the account's `code_hash` is in the matching pre-compiles codes. Then instead of WASM, given pre-compile will be used.

Pre-compiles should initialize with `default` and have two public function calls:
- `function_call(&mut self, method_name: String, args: &[u8])` to execute a function call that might change state.
- `view_call(&self, method_name: String, args: &[u8])` to run a view call.

[See full list of pre-compiles](./Components/Precompiles/README.md)

## Output

The output of the `FunctionCall`:
Expand Down
2 changes: 2 additions & 0 deletions specs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
- [Economics API](RuntimeSpec/Components/BindingsSpec/EconomicsAPI.md)
- [Math API](RuntimeSpec/Components/BindingsSpec/MathAPI.md)
- [Miscellaneous API](RuntimeSpec/Components/BindingsSpec/MiscellaneousAPI.md)
- [Pre-compiles](RuntimeSpec/Components/Precompiles/README.md)
- [EVM](RuntimeSpec/Components/Precompiles/EVM.md)
- [GenesisConfig](GenesisConfig/GenesisConfig.md)
- [RuntimeConfig](GenesisConfig/RuntimeConfig.md)
- [RuntimeFeeConfig](GenesisConfig/RuntimeFeeConfig.md)
Expand Down