Skip to content

Commit

Permalink
Merge branch 'master' into 971-mayachain-amm-approve
Browse files Browse the repository at this point in the history
  • Loading branch information
0xp3gasus committed Jan 15, 2024
2 parents dba0302 + 99c9620 commit d675cb6
Show file tree
Hide file tree
Showing 47 changed files with 1,973 additions and 1,164 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,23 @@ jobs:
run: yarn test

- name: Create release pull request or publish to npm
id: changesets
uses: changesets/action@v1
with:
version: yarn increase-packages
publish: yarn changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Prepare notification for Discord
id: prepare-notification
if: steps.changesets.outputs.published == 'true'
run: yarn notification:prepare ${{ toJSON(steps.changesets.outputs.publishedPackages) }}

- name: Send discord notification
if: steps.prepare-notification.outputs.success == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_EMBEDS: ${{ steps.prepare-notification.outputs.embeds }}
uses: Ilshidur/[email protected]
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["typescript", "javascript"],
"prettier.requireConfig": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/do-swap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ yarn doSend "MnemonicPhrase" mainnet 1 8 THOR.RUNE thorxxxx +:thor.rune:mayaxxxx
### Do streaming swap

executes a transfer of an asset from your wallet to another address minimizing slippage
`yarn doStreamingSwap "MnemonicPhrase" stagenet|mainnet assetsAmount decimals fromString toString streamingInterval streamingQuantity`
`yarn doStreamingSwap "MnemonicPhrase" stagenet|mainnet assetsAmount decimals fromString toString streamingInterval streamingQuantity [affiliateAddress] [affiliate percent]`

streamingInterval: The maximum interval for swaps that involve L1 assets (such as BTC, ETH) is restricted by the limitation of the maximum duration for a swap; currently, this limitation is 24 hours.

Expand Down
4 changes: 2 additions & 2 deletions examples/do-swap/doStreamingSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ const doStreamingSwap = async (tcAmm: ThorchainAMM, wallet: Wallet, network: Net
wallet,
walletIndex: 0,
}
const affiliateAddress = process.argv[8]
const affiliateAddress = process.argv[10]
if (affiliateAddress) {
const affiliateFeeBasisPoints = Number(process.argv[9])
const affiliateFeeBasisPoints = Number(process.argv[11])
swapParams.affiliateAddress = affiliateAddress
swapParams.affiliateBps = affiliateFeeBasisPoints
}
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"e2e": "lerna run e2e",
"lint": "lerna run lint",
"update-packages": "yarn changeset",
"increase-packages": "yarn changeset version"
"increase-packages": "yarn changeset version",
"notification:prepare": "ts-node scripts/notification"
},
"husky": {
"hooks": {
Expand All @@ -26,6 +27,7 @@
"crypto-js": "4.2.0"
},
"devDependencies": {
"@actions/core": "1.10.0",
"@changesets/cli": "2.27.1",
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-json": "^6.0.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/xchain-mayachain-amm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.0.1

### Patch Changes

- Updated dependencies [9229e99]
- @xchainjs/xchain-mayachain-query@0.1.6
- @xchainjs/xchain-mayamidgard@0.1.1
- @xchainjs/xchain-mayanode@0.1.3

## 1.0.0

### Major Changes
Expand Down
12 changes: 7 additions & 5 deletions packages/xchain-mayachain-amm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xchainjs/xchain-mayachain-amm",
"version": "1.0.0",
"version": "1.0.1",
"description": "module that exposes estimating & swapping cryptocurrency assets on mayachain",
"keywords": [
"MAYAChain",
Expand Down Expand Up @@ -49,10 +49,11 @@
"@xchainjs/xchain-cosmos-sdk": "^0.1.6",
"@xchainjs/xchain-crypto": "^0.3.1",
"@xchainjs/xchain-dash": "^0.2.9",
"@xchainjs/xchain-mayanode": "^0.1.2",
"@xchainjs/xchain-mayanode": "^0.1.3",
"@xchainjs/xchain-mayachain-query": "^0.1.6",
"@xchainjs/xchain-evm": "^0.4.4",
"@xchainjs/xchain-mayachain": "^0.2.14",
"@xchainjs/xchain-mayamidgard": "^0.1.0",
"@xchainjs/xchain-mayamidgard": "^0.1.1",
"@xchainjs/xchain-thorchain": "^0.28.17",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo": "^0.1.2",
Expand All @@ -75,10 +76,11 @@
"@xchainjs/xchain-cosmos-sdk": "^0.1.6",
"@xchainjs/xchain-crypto": "^0.3.1",
"@xchainjs/xchain-dash": "^0.2.9",
"@xchainjs/xchain-mayanode": "^0.1.2",
"@xchainjs/xchain-mayanode": "^0.1.3",
"@xchainjs/xchain-mayachain-query": "^0.1.6",
"@xchainjs/xchain-evm": "^0.4.4",
"@xchainjs/xchain-mayachain": "^0.2.14",
"@xchainjs/xchain-mayamidgard": "^0.1.0",
"@xchainjs/xchain-mayamidgard": "^0.1.1",
"@xchainjs/xchain-thorchain": "^0.28.17",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo": "^0.1.2",
Expand Down
9 changes: 9 additions & 0 deletions packages/xchain-mayachain-query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.6

### Patch Changes

- 9229e99: Update apis to the latest specs
- Updated dependencies [9229e99]
- @xchainjs/xchain-mayanode@0.1.3
- @xchainjs/xchain-mayamidgard-query@0.1.5

## 0.1.5

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/xchain-mayachain-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xchainjs/xchain-mayachain-query",
"version": "0.1.5",
"version": "0.1.6",
"license": "MIT",
"description": "Mayachain query module that is responsible for estimating swap calculations and add/remove liquidity for thorchain",
"keywords": [
Expand Down Expand Up @@ -34,17 +34,17 @@
},
"devDependencies": {
"@xchainjs/xchain-client": "^0.16.1",
"@xchainjs/xchain-mayamidgard-query": "^0.1.4",
"@xchainjs/xchain-mayanode": "^0.1.2",
"@xchainjs/xchain-mayamidgard-query": "^0.1.5",
"@xchainjs/xchain-mayanode": "^0.1.3",
"@xchainjs/xchain-util": "^0.13.0",
"axios": "^1.3.6",
"axios-retry": "^3.2.5",
"bignumber.js": "^9.0.0"
},
"peerDependencies": {
"@xchainjs/xchain-client": "^0.16.1",
"@xchainjs/xchain-mayamidgard-query": "^0.1.4",
"@xchainjs/xchain-mayanode": "^0.1.2",
"@xchainjs/xchain-mayamidgard-query": "^0.1.5",
"@xchainjs/xchain-mayanode": "^0.1.3",
"@xchainjs/xchain-util": "^0.13.0",
"axios": "^1.3.6",
"axios-retry": "^3.2.5",
Expand Down
2 changes: 0 additions & 2 deletions packages/xchain-mayachain-query/src/mayachain-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export class MayachainQuery {
fromAsset,
destinationAsset,
amount,
fromAddress,
destinationAddress,
toleranceBps,
affiliateBps,
Expand All @@ -76,7 +75,6 @@ export class MayachainQuery {
fromAssetString,
toAssetString,
inputAmount.toNumber(),
fromAddress,
destinationAddress,
toleranceBps,
affiliateBps,
Expand Down
2 changes: 0 additions & 2 deletions packages/xchain-mayachain-query/src/utils/mayanode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class Mayanode {
fromAsset: string,
toAsset: string,
amount: number,
fromAddress?: string,
destinationAddress?: string,
toleranceBps?: number,
affiliateBps?: number,
Expand All @@ -81,7 +80,6 @@ export class Mayanode {
toAsset,
amount,
destinationAddress,
fromAddress,
toleranceBps,
affiliateBps,
affiliate,
Expand Down
7 changes: 7 additions & 0 deletions packages/xchain-mayamidgard-query/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.1.5

### Patch Changes

- Updated dependencies [9229e99]
- @xchainjs/xchain-mayamidgard@0.1.1

## 0.1.4

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/xchain-mayamidgard-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xchainjs/xchain-mayamidgard-query",
"version": "0.1.4",
"version": "0.1.5",
"license": "MIT",
"description": "Module that is responsible for get data from Mayachain Midgard API",
"keywords": [
Expand Down Expand Up @@ -33,15 +33,15 @@
},
"devDependencies": {
"@xchainjs/xchain-client": "^0.16.1",
"@xchainjs/xchain-mayamidgard": "^0.1.0",
"@xchainjs/xchain-mayamidgard": "^0.1.1",
"@xchainjs/xchain-util": "^0.13.1",
"axios": "^1.3.6",
"axios-retry": "^3.2.5",
"bignumber.js": "^9.0.0"
},
"peerDependencies": {
"@xchainjs/xchain-client": "^0.16.1",
"@xchainjs/xchain-mayamidgard": "^0.1.0",
"@xchainjs/xchain-mayamidgard": "^0.1.1",
"@xchainjs/xchain-util": "^0.13.1",
"axios": "^1.3.6",
"axios-retry": "^3.2.5",
Expand Down
6 changes: 6 additions & 0 deletions packages/xchain-mayamidgard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.1

### Patch Changes

- 9229e99: Update apis to the latest specs

## v0.1.0 (2023-11-24)

### Update
Expand Down
2 changes: 1 addition & 1 deletion packages/xchain-mayamidgard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xchainjs/xchain-mayamidgard",
"version": "0.1.0",
"version": "0.1.1",
"license": "MIT",
"description": "Midgard module that exposes all midgard functions used by Mayachain using openapi-generator-cli",
"keywords": [
Expand Down
Loading

0 comments on commit d675cb6

Please sign in to comment.