Skip to content

Commit

Permalink
Near-plugins integration (#178)
Browse files Browse the repository at this point in the history
* ft-locker: replace `admin_controlled` with near plugins

* Token factory: replace `admin_controlled` with near plugins

* Exclude owner and self from pause

* Bridge token:  replace `admin_controlled` with near plugins

* Fix set owner of the bridge-token

* Bridge token: check predecessor account on init

* Update wasm builds

* Factory: update near plugins

* Ft connector: update near plugins

* Fix tests

* Revert changes

* Fix token locker tests

* Update contracts builds

* Make the bridge token upgradable

* Fix access role

* Bump contracts versions

* Use `tokio::test` for integration tests

* Fix `version()` method

* Fix upgrade & pause withdraw

* Add tests for upgrade from `0.1.6`

* Update contracts builds

* Update `near-plugins`

* Use batch to upgrade and migrate the tokens

* Remove `Upgradable` plugin & Add `DAO` role

* Remove `migrate_icon` feature

* Don't assign `owner_pk` on deploying new tokens

* Remove `Upgradable` plugin & Add `DAO` role

* Update contracts builds

* Re-add upgradable & bump rust version

* Minor improvments

* Downgrade toolchain version

* Update contracts build

* add comment

* update wasm

* Use dynamic amount of gas

* Update contracts builds

---------

Co-authored-by: Olga Kunyavskaya <[email protected]>
  • Loading branch information
karim-en and olga24912 authored Oct 5, 2023
1 parent e77bb9f commit 59f5fbe
Show file tree
Hide file tree
Showing 22 changed files with 1,649 additions and 1,169 deletions.
141 changes: 6 additions & 135 deletions bridge-common/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions bridge-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
eth-types = { git = "https://github.com/near/rainbow-bridge", rev = "67966a151122815039f07b02065ab3a2bba09804" }
admin-controlled = { git = "https://github.com/near/rainbow-bridge", rev = "67966a151122815039f07b02065ab3a2bba09804" }
eth-types = { git = "https://github.com/near/rainbow-bridge", rev = "4b24cbd5a6e098fd8a9cd24fbb194fa8e0fc51e4", default-features = false}
ethabi = "12.0.0"
near-sdk = "4.0.0"
tiny-keccak = "1.4.0"
Expand Down
3 changes: 0 additions & 3 deletions bridge-common/src/prover.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::convert::From;

use admin_controlled::Mask;
use eth_types::*;
use ethabi::param_type::Writer;
use ethabi::{Event, EventParam, Hash, Log, ParamType, RawLog, Token};
Expand All @@ -14,8 +13,6 @@ pub type EthAddress = [u8; 20];

pub const NO_DEPOSIT: Balance = 0;

pub const PAUSE_DEPOSIT: Mask = 1 << 1;

/// Gas to call verify_log_entry on prover.
pub const VERIFY_LOG_ENTRY_GAS: Gas = Gas(Gas::ONE_TERA.0 * 50);

Expand Down
Loading

0 comments on commit 59f5fbe

Please sign in to comment.