Skip to content

Commit

Permalink
Merge pull request #3 from mangata-finance/rc/2.0.0
Browse files Browse the repository at this point in the history
chore: release 2.0.0
  • Loading branch information
devdanco authored Oct 12, 2023
2 parents 76ad4d3 + 19ab351 commit 5ea5ced
Show file tree
Hide file tree
Showing 7 changed files with 509 additions and 423 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node version and cache dependencies
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
cache: "yarn"

- name: Install deps
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node version and cache dependencies
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
cache: "yarn"

- name: Install deps
Expand All @@ -34,3 +34,12 @@ jobs:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}

- name: Merge main -> develop
uses: devmasx/merge-branch@master
with:
type: now
from_branch: main
target_branch: develop
message: Merge main into develop
github_token: ${{ secrets.TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
.idea/
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
# [2.0.0-rc.8](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.7...v2.0.0-rc.8) (2023-09-25)


### Bug Fixes

* tokenId typo ([d9b2c5c](https://github.com/mangata-finance/types-definitions/commit/d9b2c5c8b094cf6db6a28a26ec824b5f4f48e1f1))

# [2.0.0-rc.7](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2023-09-25)


### Features

* update rpc methods ([6939ce4](https://github.com/mangata-finance/types-definitions/commit/6939ce43934fcf4d13a8b973bc8ecf280af402dc))

# [2.0.0-rc.6](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2023-08-24)


### Bug Fixes

* update types ([4871fdf](https://github.com/mangata-finance/types-definitions/commit/4871fdf37d731b10b33c5a5ca4aa20647b15e0ca))

# [2.0.0-rc.5](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2023-08-23)


### Bug Fixes

* add enum ([ceed1a9](https://github.com/mangata-finance/types-definitions/commit/ceed1a9fd6408e7510722f0f4e36cd4d1865a8cd))

# [2.0.0-rc.4](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2023-08-21)


### Bug Fixes

* add Balance type ([9b22737](https://github.com/mangata-finance/types-definitions/commit/9b227378837715137cb113468bd0edc95586b740))

# [2.0.0-rc.3](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2023-08-21)


### Bug Fixes

* remove RpcResult type ([78e0ace](https://github.com/mangata-finance/types-definitions/commit/78e0acefed6ca8be244b8d24b97059630af8bfaf))

# [2.0.0-rc.2](https://github.com/mangata-finance/types-definitions/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2023-08-21)


### Features

* add NumberOrHex type ([6c6d712](https://github.com/mangata-finance/types-definitions/commit/6c6d7123b05763fd7944665d7c4dc4130dfdc297))

# [2.0.0-rc.1](https://github.com/mangata-finance/types-definitions/compare/v1.0.0...v2.0.0-rc.1) (2023-08-21)


### Features

* update types ([6787d0e](https://github.com/mangata-finance/types-definitions/commit/6787d0e2db98b1a7592e668038d7a561761d83d0))


### BREAKING CHANGES

* input and output types change to simplify rpc

# 1.0.0 (2023-07-03)


Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mangata-finance/type-definitions",
"version": "1.0.0",
"version": "2.0.0-rc.8",
"description": "Type definitions for Mangata Finance",
"type": "module",
"module": "./dist/index.js",
Expand All @@ -12,7 +12,7 @@
}
},
"engines": {
"node": ">=16.0.0"
"node": ">=18.0.0"
},
"license": "GPL-3.0",
"files": [
Expand All @@ -25,15 +25,15 @@
"keywords": [],
"author": "Michal",
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^19.0.3",
"semantic-release-export-data": "^1.0.1",
"tsup": "^6.7.0",
"typescript": "^5.1.6",
"yarn-add-no-save": "^1.0.3"
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"semantic-release": "19.0.3",
"semantic-release-export-data": "1.0.1",
"tsup": "7.2.0",
"typescript": "5.2.2",
"yarn-add-no-save": "1.0.3"
},
"peerDependencies": {
"@polkadot/types": "^10.7.3"
"@polkadot/types": "10.9.1"
}
}
62 changes: 23 additions & 39 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@ export const mTypes = {
seed: "ShufflingSeed",
count: "BlockNumber"
},
XYKRpcResult: {
price: "Balance"
},
RPCAmountsResult: {
firstAssetAmount: "Balance",
secondAssetAmount: "Balance"
},
VestingInfo: {
locked: "Balance",
perBlock: "Balance",
startingBlock: "BlockNumber"
RpcAssetMetadata: {
tokenId: "TokenId",
decimals: "u32",
name: "Vec<u8>",
symbol: "Vec<u8>"
},
TokenId: "u32",
VestingInfosWithLockedAt: {
vestingInfosWithLockedAt:
"Vec<(VestingInfo<Balance, BlockNumber>, Balance)>"
}
};

export const mRpc = {
Expand All @@ -52,7 +42,7 @@ export const mRpc = {
type: "Balance"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
calculate_sell_price: {
description:
Expand All @@ -71,7 +61,7 @@ export const mRpc = {
type: "Balance"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
get_burn_amount: {
description:
Expand All @@ -90,7 +80,7 @@ export const mRpc = {
type: "Balance"
}
],
type: "RPCAmountsResult<Balance>"
type: "(Balance,Balance)"
},
calculate_sell_price_id: {
description:
Expand All @@ -109,7 +99,7 @@ export const mRpc = {
type: "Balance"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
calculate_buy_price_id: {
description:
Expand All @@ -128,7 +118,7 @@ export const mRpc = {
type: "Balance"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
calculate_rewards_amount: {
description:
Expand All @@ -143,7 +133,7 @@ export const mRpc = {
type: "TokenId"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
calculate_balanced_sell_amount: {
description:
Expand All @@ -158,7 +148,7 @@ export const mRpc = {
type: "Balance"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
get_max_instant_unreserve_amount: {
description: "Instant unreserve amount",
Expand All @@ -172,7 +162,7 @@ export const mRpc = {
type: "TokenId"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
get_max_instant_burn_amount: {
description: "",
Expand All @@ -186,7 +176,7 @@ export const mRpc = {
type: "TokenId"
}
],
type: "XYKRpcResult<Balance>"
type: "Balance"
},
is_sell_asset_lock_free: {
description: "",
Expand Down Expand Up @@ -215,22 +205,16 @@ export const mRpc = {
}
],
type: "Option<bool>"
}
},
vesting: {
getVestingLockedAt: {
},
get_tradeable_tokens: {
description: "",
params: [
{
name: "who",
type: "AccountId"
},
{
name: "token_id",
type: "TokenId"
}
],
type: "VestingInfosWithLockedAt<Balance, BlockNumber>"
params: [],
type: "Vec<RpcAssetMetadata<TokenId>>"
},
get_liq_tokens_for_trading: {
description: "",
params: [],
type: "Vec<TokenId>"
}
}
};
Expand Down
Loading

0 comments on commit 5ea5ced

Please sign in to comment.