Skip to content

Commit

Permalink
Merge pull request #44 from setheum-js/patch-airdrop
Browse files Browse the repository at this point in the history
Patch airdrop
  • Loading branch information
balqaasem authored Mar 17, 2022
2 parents 526158b + 938a210 commit cd9ec04
Show file tree
Hide file tree
Showing 21 changed files with 153 additions and 124 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,11 @@ Changes: **Full Changelog**: https://github.com/setheum-js/setheum.js/compare/v3

- Update latest Setheum types
- Update to setheum v1.0.0 spec

## 3.3.1 Mar 17, 2021

Changes: **Full Changelog**: https://github.com/setheum-js/setheum.js/compare/v3.3.0...v3.3.1

- Update latest chain types
- Update chain metadata
- Update to the latest setheum v1.0.0 spec
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"HuangLeiWan. <[email protected]>"
],
"license": "Apache-2",
"version": "3.3.0",
"version": "3.3.1",
"private": true,
"engines": {
"yarn": "^1.22.10"
Expand Down
4 changes: 2 additions & 2 deletions packages/api-derive/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/api-derive",
"version": "3.3.0",
"version": "3.3.1",
"description": "Additional polkadot.js derives for Setheum Network",
"main": "index.js",
"author": "Setheum Labs",
Expand All @@ -15,7 +15,7 @@
},
"homepage": "https://github.com/setheum-js/setheum.js",
"dependencies": {
"@setheum.js/types": "3.3.0",
"@setheum.js/types": "3.3.1",
"@babel/runtime": "^7.10.2",
"@open-web3/orml-types": "^1.0.2-0",
"@polkadot/api-derive": "^7.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/api",
"version": "3.3.0",
"version": "3.3.1",
"description": "Setheum JS API",
"main": "index.js",
"author": "Setheum Developers",
Expand All @@ -15,8 +15,8 @@
},
"homepage": "https://github.com/setheum-js/setheum.js",
"dependencies": {
"@setheum.js/api-derive": "3.3.0",
"@setheum.js/types": "3.3.0",
"@setheum.js/api-derive": "3.3.1",
"@setheum.js/types": "3.3.1",
"@babel/runtime": "^7.10.2",
"@open-web3/orml-api-derive": "^1.0.2-0",
"@polkadot/api": "^7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-util/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/app-util",
"version": "3.3.0",
"version": "3.3.1",
"description": "Utilities to work with Setheum Network",
"author": "Setheum Labs",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/sdk-core",
"version": "3.3.0",
"version": "3.3.1",
"description": "The core of the Setheum Network SDK in Javascript",
"main": "index.js",
"author": "Setheum Labs",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-loan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/sdk-loan",
"version": "3.3.0",
"version": "3.3.1",
"description": "the loan sub module in Setheum Network sdk",
"main": "index.js",
"author": "Setheum Labs",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/sdk-swap",
"version": "3.3.0",
"version": "3.3.1",
"description": "The swap (DEX - SetSwap) sub module in SetheumJS SDK",
"main": "index.js",
"author": "Setheum Labs",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/sdk-wallet",
"version": "3.3.0",
"version": "3.3.1",
"description": "The Setheum wallet JS SDK for Setheum Network",
"main": "index.js",
"author": "Setgheum Labs",
Expand Down
6 changes: 3 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/sdk",
"version": "3.3.0",
"version": "3.3.1",
"description": "Setheum JS SDK - Setheum SDK for JavaScript",
"main": "index.js",
"author": "Setheum Developers",
Expand All @@ -15,8 +15,8 @@
},
"homepage": "https://github.com/setheum-js/setheum.js",
"dependencies": {
"@setheum.js/api": "3.1.0",
"@setheum.js/type-definitions": "3.1.0",
"@setheum.js/api": "3.3.1",
"@setheum.js/type-definitions": "3.3.1",
"@polkadot/api": "^7.1.1",
"@polkadot/types": "^7.1.1",
"@types/events": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/type-definitions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/type-definitions",
"version": "3.3.0",
"version": "3.3.1",
"description": "Polkadot.js type definations for Setheum Network",
"main": "index.js",
"author": "Setheum Labs",
Expand Down
6 changes: 6 additions & 0 deletions packages/type-definitions/src/json/types.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down
42 changes: 42 additions & 0 deletions packages/type-definitions/src/json/typesBundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down Expand Up @@ -735,6 +741,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down Expand Up @@ -1037,6 +1049,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down Expand Up @@ -1339,6 +1357,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down Expand Up @@ -1636,6 +1660,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down Expand Up @@ -1933,6 +1963,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down Expand Up @@ -2230,6 +2266,12 @@
"ExchangeRate": "FixedU128",
"Rate": "FixedU128",
"Ratio": "FixedU128",
"SwapLimit": {
"_enum": {
"ExactSupply": "(Balance, Balance)",
"ExactTarget": "(Balance, Balance)"
}
},
"VestingSchedule": {
"start": "BlockNumber",
"period": "BlockNumber",
Expand Down
8 changes: 7 additions & 1 deletion packages/type-definitions/src/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ export default {
Price: 'FixedU128',
ExchangeRate: 'FixedU128',
Rate: 'FixedU128',
Ratio: 'FixedU128'
Ratio: 'FixedU128',
SwapLimit: {
_enum: {
ExactSupply: '(Balance, Balance)',
ExactTarget: '(Balance, Balance)'
}
},
}
};
4 changes: 2 additions & 2 deletions packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@setheum.js/types",
"version": "3.3.0",
"version": "3.3.1",
"description": "Polkadot.js type definations for Setheum Network",
"main": "index.js",
"author": "Setheum Labs",
Expand All @@ -19,7 +19,7 @@
},
"homepage": "https://github.com/setheum-js/setheum.js",
"dependencies": {
"@setheum.js/type-definitions": "3.3.0",
"@setheum.js/type-definitions": "3.3.1",
"@babel/runtime": "^7.10.2",
"@open-web3/api-mobx": "^1.0.2-0",
"@open-web3/orml-types": "^1.0.2-0",
Expand Down
74 changes: 15 additions & 59 deletions packages/types/src/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,49 +18,6 @@ import type { ExchangeRate, Rate, Ratio } from '@setheum.js/types/interfaces/sup

declare module '@polkadot/api-base/types/consts' {
export interface AugmentedConsts<ApiType extends ApiTypes> {
airDrop: {
/**
* The Airdrop module pallet id, keeps airdrop funds.
**/
fundingOrigin: AccountId & AugmentedConst<ApiType>;
/**
* The Dinar (DNAR) currency id.
*
**/
getDinarCurrencyId: CurrencyId & AugmentedConst<ApiType>;
/**
* HighEnd LaunchPad (HELP) currency id. (LaunchPad Token)
*
**/
getHelpCurrencyId: CurrencyId & AugmentedConst<ApiType>;
/**
* Native Setheum (SETM) currency id. [P]Pronounced "set M" or "setem"
*
**/
getNativeCurrencyId: CurrencyId & AugmentedConst<ApiType>;
/**
* Serp (SERP) currency id.
*
**/
getSerpCurrencyId: CurrencyId & AugmentedConst<ApiType>;
/**
* The SetDollar (SETUSD) currency id
**/
getSetUSDId: CurrencyId & AugmentedConst<ApiType>;
/**
* The Airdrop module pallet id, keeps airdrop funds.
**/
palletId: PalletId & AugmentedConst<ApiType>;
/**
* Setter (SETR) currency id
*
**/
setterCurrencyId: CurrencyId & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
auctionManager: {
/**
* When the total duration of the auction exceeds this soft cap, push
Expand All @@ -71,12 +28,6 @@ declare module '@polkadot/api-base/types/consts' {
* The extended time for the auction to end after each successful bid
**/
auctionTimeToClose: BlockNumber & AugmentedConst<ApiType>;
/**
* The default parital path list for DEX to directly take auction,
* Note: the path is parital, the whole swap path is collateral currency id concat
* the partial path. And the list is sorted, DEX try to take auction by order.
**/
defaultSwapParitalPathList: Vec<Vec<CurrencyId>> & AugmentedConst<ApiType>;
/**
* The stable currency id
**/
Expand Down Expand Up @@ -183,6 +134,11 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
cdpEngine: {
/**
* The alternative swap path joint list, which can be concated to
* alternative swap path when cdp treasury swap collateral to stable.
**/
alternativeSwapPathJointList: Vec<Vec<CurrencyId>> & AugmentedConst<ApiType>;
/**
* The list of valid collateral currency types
**/
Expand All @@ -199,12 +155,6 @@ declare module '@polkadot/api-base/types/consts' {
* The default liquidation ratio for all collateral types of CDP
**/
defaultLiquidationRatio: Ratio & AugmentedConst<ApiType>;
/**
* The default parital path list for CDP engine to swap collateral to stable,
* Note: the path is parital, the whole swap path is collateral currency id concat
* the partial path. And the list is sorted, CDP engine trys to swap stable by order.
**/
defaultSwapParitalPathList: Vec<Vec<CurrencyId>> & AugmentedConst<ApiType>;
/**
* Stablecoin currency id
**/
Expand All @@ -230,6 +180,11 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
cdpTreasury: {
/**
* The alternative swap path joint list, which can be concated to
* alternative swap path when cdp treasury swap collateral to stable.
**/
alternativeSwapPathJointList: Vec<Vec<CurrencyId>> & AugmentedConst<ApiType>;
/**
* Stablecoin currency id
**/
Expand Down Expand Up @@ -564,6 +519,11 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
serpTreasury: {
/**
* The alternative swap path joint list, which can be concated to
* alternative swap path when SERP-Treasury swaps for buyback.
**/
alternativeSwapPathJointList: Vec<Vec<CurrencyId>> & AugmentedConst<ApiType>;
/**
* CDP-Treasury account for processing serplus funds
* CDPTreasury account.
Expand Down Expand Up @@ -603,10 +563,6 @@ declare module '@polkadot/api-base/types/consts' {
* A duration period of inflation injection.
**/
stableCurrencyInflationPeriod: BlockNumber & AugmentedConst<ApiType>;
/**
* The limit for length of trading path
**/
tradingPathLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
Expand Down
Loading

0 comments on commit cd9ec04

Please sign in to comment.