Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,43 @@ TON_TOKEN_AMOUNT=10000
TON_TRANSFER_TX='6f97ca02d8f20151210ca2bef32340804214e4f74eebf6a9edf13b727ac2527e'
TON_TOKEN_TRANSFER_TX='e007ce43b116fd283364527c29411eb0cece2a49df776bf1990f2117747f3e2c'
TON_NFT_TRANSFER_TX='75f3029eaa33a56673fb4a3a449d972dd6af16e6f2f91ca9273c76bf9ad860f4'
#TON
#TON

#SUI
# Assets
SUI_COIN_TRANSFER_TEST_IS_ACTIVE=false
SUI_TOKEN_TRANSFER_TEST_IS_ACTIVE=false
SUI_TOKEN_APPROVE_TEST_IS_ACTIVE=false
SUI_TOKEN_TRANSFER_FROM_TEST_IS_ACTIVE=false
SUI_NFT_TRANSACTION_TEST_IS_ACTIVE=false
SUI_TRANSACTION_LISTENER_TEST_IS_ACTIVE=false

SUI_COIN_BALANCE_TEST_AMOUNT=100
SUI_TOKEN_BALANCE_TEST_AMOUNT=10
SUI_NFT_BALANCE_TEST_AMOUNT=1
SUI_TRANSFER_TEST_AMOUNT=0.001
SUI_TOKEN_TRANSFER_TEST_AMOUNT=1
SUI_TOKEN_APPROVE_TEST_AMOUNT=10

SUI_BALANCE_TEST_ADDRESS='0xd4a5e15e39bed8eb14a87459e2cb43fcec3c0653002e5a9c31320ba8964b6052'
SUI_SENDER_PRIVATE_KEY='suiprivkey1qrcamlu07sa6jwv9j8f7ranaq20qgak8tphs6lycpr02qtuuvgsty2qfauw'
SUI_RECEIVER_PRIVATE_KEY='suiprivkey1qqek0d9vkssedsyh5uyjug3dpyplcur7fhgqgwmxemypm8nvlpr9xtpym5z'
SUI_SENDER_TEST_ADDRESS='0xd68cb1e0d64372021cd6fd54940d213c939d16cd4667bba507df880f1e17c78b'
SUI_RECEIVER_TEST_ADDRESS='0xda4558a29f4c2dd54d3fbcaf66b22eea73772dd893ebfccc973609d3457cddfd'
SUI_TOKEN_TYPE_ADDRESS='0xdb2062063e6756bb0c39c1c4a208a8b341f2241d941621ee5c52f00b13e4cb46::Test_USDC::TEST_USDC'
SUI_NFT_TYPE_ADDRESS='0xd324a3ddcd34338b978a02b17407781bfc17cb0b432c38c2e60033522a5e4045::Test_NFT::TEST_NFT'
SUI_NFT_OBJECT_ID='0x57f764ca497379aca2553ceaccd319194d8057999554a0d0c0e99805f1d0eb9d'
# Assets

# Models
SUI_MODEL_NFT_OBJECT_ID='0x2bf1cca46dd55dcc2daa021cd6c0adf1cf3b705b0ec20158429d672db77a00ee'
SUI_MODEL_TOKEN_AMOUNT=10
SUI_MODEL_COIN_AMOUNT=50

SUI_MODEL_TEST_SENDER='0xd68cb1e0d64372021cd6fd54940d213c939d16cd4667bba507df880f1e17c78b'
SUI_MODEL_TEST_RECEIVER='0xd4a5e15e39bed8eb14a87459e2cb43fcec3c0653002e5a9c31320ba8964b6052'

SUI_TRANSFER_TX='22exMwAKinLgGjd9RqawzYmFb7XUhLnvGWXsLFXgBYRH'
SUI_TOKEN_TRANSFER_TX='3EnacLHhd3Qr3gTv3wENH1etrKLvJUSjxYqPniB1ENnA'
SUI_NFT_TRANSFER_TX='AFHLJoEsLjGfBf668SGsAUtiHXtrFywG2xWHareVBbWe'
#SUI
2 changes: 1 addition & 1 deletion packages/networks/bitcoin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/bitcoin",
"version": "0.4.18",
"version": "0.4.20",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down
18 changes: 9 additions & 9 deletions packages/networks/boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/boilerplate",
"version": "0.1.0",
"version": "0.4.20",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand All @@ -10,21 +10,21 @@
"exports": {
".": {
"import": {
"default": "./dist/index.es.js",
"types": "./dist/browser/index.d.ts"
"types": "./dist/browser/index.d.ts",
"default": "./dist/index.es.js"
},
"require": {
"default": "./dist/index.cjs",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
}
},
"./node": {
"default": "./dist/index.cjs",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
},
"./browser": {
"default": "./dist/index.es.js",
"types": "./dist/browser/index.d.ts"
"types": "./dist/browser/index.d.ts",
"default": "./dist/index.es.js"
}
},
"typesVersions": {
Expand Down
3 changes: 1 addition & 2 deletions packages/networks/evm-chains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/evm-chains",
"version": "0.4.18",
"version": "0.4.20",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down Expand Up @@ -82,7 +82,6 @@
"@web3modal/core": "4.1.11",
"@web3modal/ethers": "4.1.11",
"@web3modal/scaffold-utils": "4.1.11",
"axios": "^1.6.8",
"ethers": "^6.13.4",
"viem": "^2.21.43"
}
Expand Down
73 changes: 0 additions & 73 deletions packages/networks/evm-chains/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/networks/evm-chains/src/browser/Wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const rejectMap = (error: any, reject: (a: any) => any): any => {

const errorMessage = String(error.message ?? '')
if (
errorMessage === 'Not supported chainId' ||
errorMessage.includes('chain ID') ||
errorMessage.includes('Not supported chainId') ||
errorMessage.includes('networkConfigurationId') ||
errorMessage.includes('The Provider is not connected to the requested chain.')
) {
Expand Down
8 changes: 3 additions & 5 deletions packages/networks/evm-chains/src/browser/adapters/switcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ export const switcher = async (wallet: EIP1193Provider, provider?: Provider): Pr
reject(error)
})
} else {
if (
(typeof error === 'object' ? error : {}).message.includes(
'wallet_switchEthereumChain'
) === true
) {
const message =
typeof error === 'object' ? String(error?.message ?? '') : ''
if (message.includes('wallet_switchEthereumChain')) {
return
}
reject(error)
Expand Down
15 changes: 3 additions & 12 deletions packages/networks/evm-chains/src/services/Provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import axios from 'axios'
import { Ethers } from './Ethers'
import {
ErrorTypeEnum,
Expand All @@ -7,6 +6,7 @@ import {
} from '@multiplechain/types'

import { checkWebSocket } from '@multiplechain/utils'
import { JsonRpcProvider } from 'ethers'

export interface EvmNetworkConfigInterface extends NetworkConfigInterface {
id: number
Expand Down Expand Up @@ -74,17 +74,8 @@ export class Provider implements ProviderInterface<EvmNetworkConfigInterface> {
*/
async checkRpcConnection(url?: string): Promise<boolean | Error> {
try {
const response = await axios.post(url ?? this.network.rpcUrl, {
jsonrpc: '2.0',
method: 'eth_blockNumber',
params: [],
id: 1
})

if (response.status !== 200) {
return new Error(response.statusText + ': ' + JSON.stringify(response.data))
}

const rpc = new JsonRpcProvider(url ?? this.network.rpcUrl ?? '')
await rpc.getBlockNumber()
return true
} catch (error) {
return error as any
Expand Down
5 changes: 2 additions & 3 deletions packages/networks/solana/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiplechain/solana",
"version": "0.4.18",
"version": "0.4.20",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.es.js",
Expand Down Expand Up @@ -87,7 +87,6 @@
"@solana/wallet-adapter-trust": "^0.1.13",
"@solana/wallet-adapter-walletconnect": "^0.1.16",
"@solana/web3.js": "^1.91.8",
"@walletconnect/types": "^2.17.2",
"axios": "^1.6.8"
"@walletconnect/types": "^2.17.2"
}
}
3 changes: 0 additions & 3 deletions packages/networks/solana/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading