Skip to content

Commit

Permalink
v13.13.0: adds base uniswap v2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Dec 9, 2024
1 parent 1fb1ff0 commit ca79d8c
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 30 deletions.
2 changes: 1 addition & 1 deletion dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script crossorigin src="https://unpkg.com/@depay/[email protected]"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-tokens@10"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/[email protected]"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-exchanges@13.11.0"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-exchanges@13.13.0"></script>
<script src="tmp/index.dev.js"></script>
<link rel="stylesheet" href="https://unpkg.com/bootstrap@4/dist/css/bootstrap.css">
<style>
Expand Down
24 changes: 24 additions & 0 deletions examples/base.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,27 @@ let transaction = await route.getTransaction()
const wallet = (await Web3Wallets.getWallets())[0]
wallet.sendTransaction(transaction)
```

# via Uniswap v2

```javascript
let routes = await Web3Payments.route({
accept: [
{
blockchain: 'base',
token: '0x2dc90fa3a0f178ba4bee16cac5d6c9a5a7b4c6cb', // DRINK
amount: 1,
toAddress: '0x08B277154218CCF3380CAE48d630DA13462E3950'
}
],
from: {
base: '0x317D875cA3B9f8d14f960486C0d1D1913be74e90',
}
})

let route = routes[1]
let transaction = await route.getTransaction()

const wallet = (await Web3Wallets.getWallets())[0]
wallet.sendTransaction(transaction)
```
6 changes: 3 additions & 3 deletions package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-payments-evm",
"moduleName": "Web3Payments",
"version": "13.12.10",
"version": "13.13.0",
"description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand All @@ -27,8 +27,8 @@
"dependencies": {},
"peerDependencies": {
"@depay/web3-assets-evm": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-exchanges-evm": "^13.11.0",
"@depay/web3-blockchains": "^9.7.5",
"@depay/web3-exchanges-evm": "^13.13.0",
"@depay/web3-tokens-evm": "^10.4.3",
"ethers": "^5.7.1"
},
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-payments",
"moduleName": "Web3Payments",
"version": "13.12.10",
"version": "13.13.0",
"description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -38,8 +38,8 @@
"peerDependencies": {
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-assets": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-exchanges": "^13.11.0",
"@depay/web3-blockchains": "^9.7.5",
"@depay/web3-exchanges": "^13.13.0",
"@depay/web3-tokens": "^10.4.3",
"decimal.js": "^10.4.3",
"ethers": "^5.7.1"
Expand All @@ -56,13 +56,13 @@
"@depay/web3-assets": "^7.4.1",
"@depay/web3-assets-evm": "^7.4.1",
"@depay/web3-assets-solana": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-blockchains": "^9.7.5",
"@depay/web3-client": "^10.19.2",
"@depay/web3-client-evm": "^10.19.2",
"@depay/web3-client-solana": "^10.19.2",
"@depay/web3-exchanges": "^13.11.0",
"@depay/web3-exchanges-evm": "^13.11.0",
"@depay/web3-exchanges-solana": "^13.11.0",
"@depay/web3-exchanges": "^13.13.0",
"@depay/web3-exchanges-evm": "^13.13.0",
"@depay/web3-exchanges-solana": "^13.13.0",
"@depay/web3-mock": "^14.19.1",
"@depay/web3-tokens": "^10.4.3",
"@depay/web3-tokens-evm": "^10.4.3",
Expand Down
6 changes: 3 additions & 3 deletions package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-payments-solana",
"moduleName": "Web3Payments",
"version": "13.12.10",
"version": "13.13.0",
"description": "JavaScript library to scan crypto wallets for liquefiable assets and perform cost-effective, auto-converted payments on-chain.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand All @@ -28,8 +28,8 @@
"peerDependencies": {
"@depay/solana-web3.js": "^1.26.0",
"@depay/web3-assets-solana": "^7.4.1",
"@depay/web3-blockchains": "^9.6.9",
"@depay/web3-exchanges-solana": "^13.11.0",
"@depay/web3-blockchains": "^9.7.5",
"@depay/web3-exchanges-solana": "^13.13.0",
"@depay/web3-tokens-solana": "^10.4.3",
"ethers": "^5.7.1",
"decimal.js": "^10.4.3"
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1223,10 +1223,10 @@
resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-9.6.5.tgz#29557ccbd352bbbb8218af34b422e6f3a4df4e73"
integrity sha512-rxqLr29Zo2cfClgE7JmViollzE1i154ORF89j7zO7RMbn1E8hXJXJ6aRDuA8ArtH+f17buu91865RYoXTZZzdQ==

"@depay/web3-blockchains@^9.6.9":
version "9.7.0"
resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-9.7.0.tgz#653655b8153165dc6626fa67762420506485283e"
integrity sha512-UzNXg4WbHHXLAa58VA6f5oq4OHXDEXIn1bigfWqAbe0jKWJR36QXLWDZsm4ufoC3ExyXOiOVyNfKOSnJ0xdTww==
"@depay/web3-blockchains@^9.7.5":
version "9.7.5"
resolved "https://registry.yarnpkg.com/@depay/web3-blockchains/-/web3-blockchains-9.7.5.tgz#a99f81dc502a8a397e7b1172364fdef5019ea4f5"
integrity sha512-Nhte6p1mYolqe58JS3Gt3ebn1/xsMMzytNhHk6BK/rpCeqTwX2WyeaYeTAHXNn0sm99hlZM4Qf2Vo4BeZUKOLw==

"@depay/web3-client-evm@^10.19.2":
version "10.19.2"
Expand All @@ -1243,20 +1243,20 @@
resolved "https://registry.yarnpkg.com/@depay/web3-client/-/web3-client-10.19.2.tgz#e8de1dcf4432597dab2a40362401586f7c48a112"
integrity sha512-i3ryYA5CCU+f0T/rOZcJpYo9vrqFC2KZnd9T6Oj1j7DiYb5boKw///z6/dbBtd1g8Gww8i/9lC9ouWGBxmKXJA==

"@depay/web3-exchanges-evm@^13.11.0":
version "13.11.0"
resolved "https://registry.yarnpkg.com/@depay/web3-exchanges-evm/-/web3-exchanges-evm-13.11.0.tgz#5914de87be57d19a34811fd5efe9dcb3fc41e0bb"
integrity sha512-2Nd+tigt9IpJO22jnt/TmG4qZnc9GHBVpug/71kMVNZqraNEhTSY73ma98BIhWrigjNjBxpXiHOVkVq6G1F0AA==
"@depay/web3-exchanges-evm@^13.13.0":
version "13.13.0"
resolved "https://registry.yarnpkg.com/@depay/web3-exchanges-evm/-/web3-exchanges-evm-13.13.0.tgz#3901b3772f47a6e8aeb3e861cf43ef76e6ae8cc9"
integrity sha512-BS8sgVcejkCuKwAFU0MN8Bg/hRGi0Sg+P+cpo/sSYjkZAG7CLfvUWDOUewrjFRE1qxRGlpi8VOShA+KI6tDVGw==

"@depay/web3-exchanges-solana@^13.11.0":
version "13.11.0"
resolved "https://registry.yarnpkg.com/@depay/web3-exchanges-solana/-/web3-exchanges-solana-13.11.0.tgz#908bb9d57e6c4bd1a27db41d77acb312ac01fcbb"
integrity sha512-ppBra+WB8pfUnrfDfbyTYMhLsKmqx0d3bJIaSwZjbFjG2HahHu77BN0oa1VikaOGn2EwuGoOnrOc/hHUy/LADA==
"@depay/web3-exchanges-solana@^13.13.0":
version "13.13.0"
resolved "https://registry.yarnpkg.com/@depay/web3-exchanges-solana/-/web3-exchanges-solana-13.13.0.tgz#7f6af4e57ebd5a8006acbef8397e22500de8d4d2"
integrity sha512-gHzPb5zQre8Z1w7sX8du7Z/C65KDxx39MSAU6J6AUW/L4of/QLAYdohA2pefxS4vjB83mJsWOJXqKUMX2SNo3A==

"@depay/web3-exchanges@^13.11.0":
version "13.11.0"
resolved "https://registry.yarnpkg.com/@depay/web3-exchanges/-/web3-exchanges-13.11.0.tgz#5c02fecb8de550b39a899901a33ebed379e0a10a"
integrity sha512-eZTiI8rvAIk8TvlClDpuCQYEWa49vi0Izi7WbSDibyxS3WkEl1KFQSPgUZ7XH+eRxgBO6eWWeEk4KGGsoiZnuQ==
"@depay/web3-exchanges@^13.13.0":
version "13.13.0"
resolved "https://registry.yarnpkg.com/@depay/web3-exchanges/-/web3-exchanges-13.13.0.tgz#f99ba4ec7e04e3b77bb96e66e52bf468be55a16b"
integrity sha512-z9957vm0f1H6fnEF6XxTqBxX3tEbPVwKupRhJRmbaY60jRZZ5q120d75ZFnxxEtwPdbpvKjKiX+11Fv+KdHQBw==

"@depay/web3-mock@^14.19.1":
version "14.19.1"
Expand Down

0 comments on commit ca79d8c

Please sign in to comment.