Skip to content

Commit 01c4642

Browse files
committed
v14.0.0: svm package and minor updates
1 parent 899a84f commit 01c4642

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+19665
-9937
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-node@v2
1212
with:
13-
node-version: '16.x'
13+
node-version: '18.x'
1414
- name: Cache node modules
1515
uses: actions/cache@v2
1616
env:

.github/workflows/publish-evm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# Setup .npmrc file to publish to npm
1313
- uses: actions/setup-node@v2
1414
with:
15-
node-version: '16.x'
15+
node-version: '18.x'
1616
registry-url: 'https://registry.npmjs.org'
1717

1818
- run: mv package.evm.json package.json
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish SOLANA
1+
name: Publish SVM
22

33
on:
44
release:
@@ -12,10 +12,10 @@ jobs:
1212
# Setup .npmrc file to publish to npm
1313
- uses: actions/setup-node@v2
1414
with:
15-
node-version: '16.x'
15+
node-version: '18.x'
1616
registry-url: 'https://registry.npmjs.org'
1717

18-
- run: mv package.solana.json package.json
18+
- run: mv package.svm.json package.json
1919

2020
- run: yarn install
2121

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
# Setup .npmrc file to publish to npm
1313
- uses: actions/setup-node@v2
1414
with:
15-
node-version: '16.x'
15+
node-version: '18.x'
1616
registry-url: 'https://registry.npmjs.org'
1717
- run: npm install
1818

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-node@v2
1212
with:
13-
node-version: '16.x'
13+
node-version: '18.x'
1414
- name: Cache node modules
1515
uses: actions/cache@v2
1616
env:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ Gnosis:
125125
126126
In case you want to use and package only specific platforms, use the platform-specific package:
127127
128-
### EVM platform specific packaging
128+
### EVM (Ethereum Virtual Machine) platform specific packaging
129129
130130
```javascript
131131
import Exchanges from '@depay/web3-exchanges-evm'
132132
```
133133
134-
### Solana platform specific packaging
134+
### SVM (Solana Virtual Machine) platform specific packaging
135135
136136
```javascript
137-
import Exchanges from '@depay/web3-exchanges-solana'
137+
import Exchanges from '@depay/web3-exchanges-svm'
138138
```
139139
140140
## Data Structures

dev.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<script src="https://cdnjs.cloudflare.com/ajax/libs/ethers/5.7.1/ethers.umd.min.js" type="application/javascript"></script>
1010
<script crossorigin src="https://unpkg.com/decimal.js@10"></script>
1111
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/solana-web3.js@1/dist/umd/index.js"></script>
12-
<script crossorigin src="https://unpkg.com/@depay/web3-blockchains@9.7.8"></script>
13-
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-client@10/dist/umd/index.js"></script>
14-
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-tokens@10.4.4/dist/umd/index.js"></script>
12+
<script crossorigin src="https://unpkg.com/@depay/web3-blockchains@9"></script>
13+
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-client@11/dist/umd/index.js"></script>
14+
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-tokens@11/dist/umd/index.js"></script>
1515
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/walletconnect-v2@2"></script>
16-
<script crossorigin src="https://unpkg.com/@depay/web3-wallets@17"></script>
16+
<script crossorigin src="https://unpkg.com/@depay/web3-wallets@18"></script>
1717
<script src="tmp/index.dev.js"></script>
1818
</head>
1919
<body>

dist/esm/index.evm.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function _optionalChain$8(ops) { let lastAccessLHS = undefined; let value = ops[
4343

4444
let supported = ['ethereum', 'bsc', 'polygon', 'solana', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
4545
supported.evm = ['ethereum', 'bsc', 'polygon', 'fantom', 'arbitrum', 'avalanche', 'gnosis', 'optimism', 'base', 'worldchain'];
46-
supported.solana = ['solana'];
46+
supported.svm = ['solana'];
4747

4848
const DEFAULT_SLIPPAGE = '0.5'; // percent
4949

@@ -159,7 +159,7 @@ const calculateAmountsWithSlippage = async ({
159159
if(amountOutMinInput || amountOutInput) {
160160
if(supported.evm.includes(exchange.blockchain || blockchain)) {
161161
amountIn = amountInMax = await calculateAmountInWithSlippage({ exchange, blockchain, pools, exchangePath, amountIn, amountOut: (amountOutMinInput || amountOut) });
162-
} else if(supported.solana.includes(exchange.blockchain || blockchain)){
162+
} else if(supported.svm.includes(exchange.blockchain || blockchain)){
163163
let amountsWithSlippage = [];
164164
await Promise.all(exchangePath.map((step, index)=>{
165165
if(index != 0) {
@@ -173,7 +173,7 @@ const calculateAmountsWithSlippage = async ({
173173
amountIn = amountInMax = amounts[0];
174174
}
175175
} else if(amountInMaxInput || amountInInput) {
176-
if(supported.solana.includes(exchange.blockchain || blockchain)){
176+
if(supported.svm.includes(exchange.blockchain || blockchain)){
177177
let amountsWithSlippage = [];
178178
await Promise.all(exchangePath.map((step, index)=>{
179179
if(index !== 0 && index < exchangePath.length-1) {

0 commit comments

Comments
 (0)