Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fee integration #213

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
2c80d84
ft-locker: replace `admin_controlled` with near plugins
karim-en Nov 4, 2022
a9be4d5
Token factory: replace `admin_controlled` with near plugins
karim-en Nov 6, 2022
85b5840
Exclude owner and self from pause
karim-en Nov 7, 2022
a59801b
Bridge token: replace `admin_controlled` with near plugins
karim-en Nov 7, 2022
15a3d94
Fix set owner of the bridge-token
karim-en Nov 8, 2022
dd236ca
Bridge token: check predecessor account on init
karim-en Nov 24, 2022
ea77f59
Update wasm builds
karim-en Nov 25, 2022
2376936
Factory: update near plugins
karim-en Mar 23, 2023
c66cd39
Ft connector: update near plugins
karim-en Mar 23, 2023
1688478
Fix tests
karim-en Mar 28, 2023
7377701
Revert changes
karim-en Mar 28, 2023
3305531
Fix token locker tests
karim-en Mar 28, 2023
bf96fdc
Update contracts builds
karim-en Mar 28, 2023
d62d113
Make the bridge token upgradable
karim-en Apr 28, 2023
47e7b73
Fix access role
karim-en Apr 28, 2023
0739ab2
WIP: Added fee-integration for 'deposit' and 'withdraw'dd of bridge t…
UrAvgDeveloper May 1, 2023
679eb6d
Bump contracts versions
karim-en May 1, 2023
b1a4f21
Use `tokio::test` for integration tests
karim-en May 1, 2023
309b510
Fix `version()` method
karim-en May 1, 2023
5fffd1f
Fix upgrade & pause withdraw
karim-en May 2, 2023
803c8ca
Add tests for upgrade from `0.1.6`
karim-en May 2, 2023
b04a460
fixed deposit
UrAvgDeveloper May 2, 2023
aeb2fc1
changed fee percentage to u128 with 6 decimal precision
UrAvgDeveloper May 2, 2023
7263ba0
changed macros to build
UrAvgDeveloper May 2, 2023
b81d5f9
changed storage keys for unordered maps
UrAvgDeveloper May 2, 2023
e5fd4b8
WIP: Added integration tests for deposits with fee-deduction and with…
UrAvgDeveloper May 2, 2023
763f98f
added fee for withdraw
UrAvgDeveloper May 2, 2023
df095bd
added fee transfer to bridge token factory
UrAvgDeveloper May 3, 2023
1445512
fixed minting logic for fee
UrAvgDeveloper May 3, 2023
1bc283c
fixed fee amount
UrAvgDeveloper May 3, 2023
a5b59c5
added const for aurora id
UrAvgDeveloper May 3, 2023
7472264
Added integration tests for deposits and withdraw of tokens with fee
UrAvgDeveloper May 3, 2023
a446d81
Update contracts builds
karim-en May 3, 2023
3a0e884
added fee claiming
UrAvgDeveloper May 4, 2023
545e89a
Added integration tests for fee-claim
UrAvgDeveloper May 4, 2023
d2a221f
created separate file for fee integration test
UrAvgDeveloper May 4, 2023
08a4429
resolving merge conflicts
UrAvgDeveloper May 4, 2023
a5e7322
resolving merge conflicts
UrAvgDeveloper May 4, 2023
83383a0
added finish withdraw unit test
UrAvgDeveloper May 4, 2023
7684b50
Added check for aurora silos in finish_withdraw
UrAvgDeveloper May 5, 2023
ae26ff0
added fees as per silo
UrAvgDeveloper May 11, 2023
a7327e1
Added feature for withdraw-fee as per-silo-per-token with unit tests
UrAvgDeveloper May 16, 2023
1537c6e
Minor upgradation
UrAvgDeveloper May 16, 2023
c326347
CI-Fix
UrAvgDeveloper Jun 19, 2023
1dc8221
CI-Fix: bridge_token_factory
UrAvgDeveloper Jun 19, 2023
4f11c1a
Added readme for fee-integration implementation for bridge-token-factory
UrAvgDeveloper Jun 28, 2023
6a7df35
Fixed PR-comments(1)
UrAvgDeveloper Jun 30, 2023
e53607f
Fixed PR-comments(2)
UrAvgDeveloper Jun 30, 2023
2e8a52d
combined fee-bounds with fee-percentage
UrAvgDeveloper Jul 5, 2023
965d700
added a separate method to return fee-amount
UrAvgDeveloper Jul 5, 2023
382d2c2
Refactor the fee calculation
karim-en Jul 5, 2023
28fde19
Update contract builds
karim-en Jul 5, 2023
cce1ee1
Refactor the fee per silo implementation
karim-en Jul 6, 2023
7e8edb3
Update contracts builds
karim-en Jul 6, 2023
23b891a
Implement migration
karim-en Jul 6, 2023
338114e
Update contracts build
karim-en Jul 6, 2023
bf39452
Fix `upgrade` test
karim-en Jul 6, 2023
13509de
Add `EthAddressHex` type
karim-en Jul 11, 2023
feff748
Fix storage deposit on minting fee
karim-en Jul 12, 2023
fd067ba
Update contract builds
karim-en Jul 12, 2023
6df985a
Improve naming
karim-en Jul 12, 2023
4f89055
Refactor silo fee logic
karim-en Jul 12, 2023
3f5295c
Move the fee to separate file
karim-en Jul 12, 2023
1b1d3fd
Change storage deposit logic
karim-en Jul 12, 2023
73b7eec
Update contract build
karim-en Jul 12, 2023
b5e552f
Update bridge-token-factory/src/types.rs
karim-en Jul 13, 2023
5c69b52
Fix `claim_fee`
karim-en Jul 17, 2023
bc39b1f
Remove storage deposit from the set fee methods
karim-en Jul 17, 2023
a6395e9
Handle fee overflow
karim-en Jul 17, 2023
9a9e29d
Add description for storage fields
karim-en Jul 18, 2023
03b5b59
Fix tests
karim-en Jul 18, 2023
849520f
Update readme
karim-en Jul 18, 2023
f4058da
Add unset methods
karim-en Jul 18, 2023
6acd999
Remove `FeeBounds` type
karim-en Jul 20, 2023
6007c21
Make calculate fee methods public
karim-en Jul 24, 2023
f13658a
Improve unwrap
karim-en Jul 31, 2023
a99f8ff
Fix test
karim-en Aug 1, 2023
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
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