Skip to content

Commit

Permalink
Add new methods to readme, update commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Usn Zorro committed Aug 30, 2022
1 parent b914c2c commit c6ebc6b
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ cargo test
## Run integration tests

```bash
npm run build
npm run deploy
npm run test
npm test
```

## Manual testing on the Testnet
Expand Down Expand Up @@ -116,17 +114,17 @@ Deposit and withdraw

```bash
# Send USDT, mint USN.
near call usdt.fakes.testnet ft_transfer_call --args '{"receiver_id": "usdn.testnet", "amount": "1000000", "msg": ""}' --accountId alice.testnet --amount 0.000000000000000000000001 --gas 100000000000000
near call usdt.fakes.testnet ft_transfer_call --args '{"receiver_id": "usdn.testnet", "amount": "1000000", "msg": ""}' --accountId alice.testnet --depositYocto 1 --gas 100000000000000

# Burn USN, withdraw USDT.
near call usdn.testnet withdraw --args '{"amount": "999500000000000000"}' --accountId alice.testnet --amount 0.000000000000000000000001 --gas 100000000000000
near call usdn.testnet withdraw --args '{"amount": "999500000000000000"}' --accountId alice.testnet --depositYocto 1 --gas 100000000000000
```

# DAO

## Upgrade the contract via Upgrade Proposal

1. Download `usn.mainnet.wasm` from https://github.com/binary-star-near/usn/releases
1. Download `usn.mainnet.wasm` from https://github.com/DecentralBankDAO/usn/releases
2. Create an upgrade proposal:
```bash
sputnikdao proposal upgrade usn.mainnet.wasm usn --daoAcc decentralbank --accountId alice.near --network mainnet
Expand Down Expand Up @@ -155,6 +153,7 @@ pub fn blacklist_status(&self, account_id: &AccountId) -> BlackListStatus;
pub fn owner(&self);
pub fn treasury(&self) -> Vec<(AccountId, StableInfo)>;
pub fn commission(&self) -> CommissionOutput;
pub fn commission_rate(&self, asset_id: &AccountId) -> CommissionRate;
```

## NEP-141 (ERC-20)
Expand Down Expand Up @@ -201,13 +200,24 @@ pub fn remove_from_blacklist(&mut self, account_id: &AccountId);
pub fn destroy_black_funds(&mut self, account_id: &AccountId);
pub fn pause(&mut self);
pub fn resume(&mut self);
pub fn set_owner(&mut self, owner_id: AccountId);
pub fn extend_guardians(&mut self, guardians: Vec<AccountId>);
pub fn remove_guardians(&mut self, guardians: Vec<AccountId>);
pub fn add_stable_asset(&mut self, asset_id: &AccountId, decimals: u8);
pub fn enable_stable_asset(&mut self, asset_id: &AccountId);
pub fn disable_stable_asset(&mut self, asset_id: &AccountId);
pub fn transfer_commission(&mut self, account_id: AccountId, amount: U128);
pub fn set_commission_rate(&mut self, asset_id: &AccountId, rate: CommissionRate)
pub fn stake(&self, amount: U128, pool_id: AccountId) -> Promise;
pub fn unstake(&self, amount: U128, pool_id: AccountId) -> Promise;
pub fn unstake_all(&self, pool_id: AccountId) -> Promise;
pub fn withdraw_all(&self, pool_id: AccountId) -> Promise;
```
## Ownership change
```rust
pub fn propose_new_owner(&mut self, proposed_owner_id: AccountId);
pub fn accept_ownership(&mut self);
```
## Upgradability
Expand Down

0 comments on commit c6ebc6b

Please sign in to comment.