-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement generational storage (#87)
* Base precompile code between connectors (#73) * Base precompile code between connectors * Handle errors and validate input * Use proper result * Document `aurora encode-address` usage. * Cache cargo artifacts between CI runs. (#92) * Address comments from audit. (#86) * Validate register length in `read_input_arr20()` * Only read register length in `Engine::get_code_size` * Add `read_input_borsh()` * Ensure `method.args.len() == args_decoded.len()` * Ensure register size is 8 in `read_u64` * Use constant to specify the register ID used in `read_input()` * Reduce size of `cargo cache` in CI. (#95) * Define a `Wei` newtype for balances. (#96) * Fix evm-bully builds after recent refactoring. (#100) * Refactor `Engine::get_state` to return a `Result`. (#99) * Ensure that `Cargo.lock` in the repo is valid. (#101) * Remove unneeded nightly feature. (#102) * Implement BC generational storage. * fix address input * remove note * put key on the end of the storage key * remove pub from methods * Dispatch precompiles on the full address. (#107) * Support state migration on upgrade. (#103) * Implement the ETH connector. (#59) * Move when to call `set_generation` * Fix arg Co-authored-by: Marcelo Fornet <mfornet94@gmail.com> Co-authored-by: Arto Bendiken <arto@aurora.dev> Co-authored-by: Michael Birch <michael@near.org> Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com> Co-authored-by: Evgeny Ukhanov <mrlsd@ya.ru>
- Loading branch information
1 parent
aaf1ed9
commit d67b59e
Showing
45 changed files
with
5,452 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
# Rust artifacts | ||
/*.wasm | ||
/target/ | ||
etc/state-migration-test/target/ | ||
|
||
node_modules/ | ||
artifacts/ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# ETH connector | ||
|
||
## Build | ||
1. For production set in the Makefile | ||
``` | ||
FEATURES = contract | ||
``` | ||
1.1. For **development and testing** set in the Makefile | ||
``` | ||
FEATURES = contract,integration-test | ||
``` | ||
2. Build release: `$ make release` | ||
3. Run tests: `$ cargo test` | ||
4. Deploying process is common for Aurora itself. Please reference [README.md](../README.md) | ||
## Initialize eth-conenctor | ||
With `near-cli` run: | ||
``` | ||
$ near call <NEAR_ACC> new_eth_connector '{"prover_account": "<PROVER_NEAR_ACCOUNT>", "eth_custodian_address": "<ETH_ADDRESS>"}' --account-id <NEAR_ACC> | ||
|
||
``` | ||
## ETH connector specific methods | ||
* new_eth_connector (call once) | ||
* deposit (mutable) | ||
* withdraw (mutable, payable) | ||
* finish_deposit_near (private, mutable) | ||
* ft_total_supply (view) | ||
* ft_total_supply_near (view) | ||
* ft_total_supply_eth (view) | ||
* ft_balance_of (view) | ||
* ft_balance_of_eth (view) | ||
* ft_transfer (mutable, payable) | ||
* ft_resolve_transfer (private, mutable) | ||
* ft_transfer_call (mutable, payable) | ||
* ft_on_transfer (private, mutable) | ||
* storage_deposit (mutable) | ||
* storage_withdraw (mutable, payable) | ||
* storage_balance_of (view) | ||
## Ethereum specific flow | ||
Follow by [this instruction](https://github.com/aurora-is-near/eth-connector/blob/master/README.md). |
Oops, something went wrong.