Skip to content

Commit

Permalink
2.2.0: Change comission 0.05%->0.01%
Browse files Browse the repository at this point in the history
  • Loading branch information
Usn Zorro committed Jul 5, 2022
1 parent 56eb113 commit bde5d8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2018"
name = "usn"
version = "2.1.0"
version = "2.2.0"

[lib]
crate-type = ["cdylib"]
Expand Down
39 changes: 2 additions & 37 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,43 +942,8 @@ impl Contract {
#[init(ignore_state)]
#[private]
pub fn migrate() -> Self {
#[derive(BorshDeserialize, BorshSerialize)]
pub struct OldContract {
owner_id: AccountId,
proposed_owner_id: AccountId,
guardians: UnorderedSet<AccountId>,
token: FungibleTokenFreeStorage,
metadata: LazyOption<FungibleTokenMetadata>,
black_list: LookupMap<AccountId, BlackListStatus>,
status: ContractStatus,
oracle: Oracle,
spread: Spread,
commission: Commission,
treasury: LazyOption<TreasuryData>,
usn2near: VolumeHistory,
near2usn: VolumeHistory,
best_rate: MinMaxRate,
}

let contract: OldContract = env::state_read().expect("Contract is not initialized");

Self {
owner_id: contract.owner_id.clone(),
proposed_owner_id: contract.owner_id,
guardians: contract.guardians,
token: contract.token,
metadata: contract.metadata,
black_list: contract.black_list,
status: contract.status,
oracle: contract.oracle,
spread: contract.spread,
commission: contract.commission,
treasury: contract.treasury,
usn2near: contract.usn2near,
near2usn: contract.near2usn,
best_rate: contract.best_rate,
stable_treasury: StableTreasury::new(StorageKey::StableTreasury),
}
let contract: Contract = env::state_read().expect("Contract is not initialized");
contract
}

fn abort_if_pause(&self) {
Expand Down

0 comments on commit bde5d8f

Please sign in to comment.