From 1319fb40bb30284ae79daf0b71ddeb49802b4e84 Mon Sep 17 00:00:00 2001 From: Anton Lykhoyda Date: Thu, 5 Sep 2024 16:35:56 +0200 Subject: [PATCH] fixes --- .../evm-to-evm-fungible-transfer/src/transfer.ts | 5 +++-- .../.env.sample | 2 +- .../src/transfer.ts | 2 -- yarn.lock | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/examples/evm-to-evm-fungible-transfer/src/transfer.ts b/examples/evm-to-evm-fungible-transfer/src/transfer.ts index 371f6718f..69e3d33e9 100644 --- a/examples/evm-to-evm-fungible-transfer/src/transfer.ts +++ b/examples/evm-to-evm-fungible-transfer/src/transfer.ts @@ -43,6 +43,7 @@ export async function erc20Transfer(): Promise { sourceNetworkProvider: web3Provider as unknown as Eip1193Provider, resource: RESOURCE_ID, amount: BigInt(1) * BigInt(1e18), + destinationAddress: destinationAddress, recipientAddress: destinationAddress, sourceAddress, }; @@ -55,7 +56,7 @@ export async function erc20Transfer(): Promise { const response = await wallet.sendTransaction(approval); await response.wait(); console.log( - `Approved, transaction: ${getTxExplorerUrl({ txHash: response.hash, chainId: SEPOLIA_CHAIN_ID })}` + `Approved, transaction: ${getTxExplorerUrl({ txHash: response.hash, chainId: SEPOLIA_CHAIN_ID })}`, ); } @@ -63,7 +64,7 @@ export async function erc20Transfer(): Promise { const response = await wallet.sendTransaction(transferTx); await response.wait(); console.log( - `Depositted, transaction: ${getSygmaScanLink(response.hash, process.env.SYGMA_ENV)}` + `Depositted, transaction: ${getSygmaScanLink(response.hash, process.env.SYGMA_ENV)}`, ); } diff --git a/examples/evm-to-substrate-fungible-transfer/.env.sample b/examples/evm-to-substrate-fungible-transfer/.env.sample index 033dfe86b..383a13dc8 100644 --- a/examples/evm-to-substrate-fungible-transfer/.env.sample +++ b/examples/evm-to-substrate-fungible-transfer/.env.sample @@ -1,3 +1,3 @@ PRIVATE_KEY="" -SOURCE_EVM_RPC_URL="TANGLE_RPC_URL_HERE" +SOURCE_EVM_RPC_URL="SEPOLIA_RPC_URL_HERE" SYGMA_ENV="testnet" \ No newline at end of file diff --git a/examples/evm-to-substrate-fungible-transfer/src/transfer.ts b/examples/evm-to-substrate-fungible-transfer/src/transfer.ts index 6bd7288ef..07cddaafa 100644 --- a/examples/evm-to-substrate-fungible-transfer/src/transfer.ts +++ b/examples/evm-to-substrate-fungible-transfer/src/transfer.ts @@ -1,5 +1,4 @@ import type { Eip1193Provider } from "@buildwithsygma/core"; -import { Environment } from "@buildwithsygma/core"; import { createEvmFungibleAssetTransfer } from "@buildwithsygma/evm"; import dotenv from "dotenv"; import { Wallet, providers } from "ethers"; @@ -43,7 +42,6 @@ export async function erc20Transfer(): Promise { resource: RESOURCE_ID, amount: BigInt(1) * BigInt(1e18), destinationAddress: destinationAddress, - environment: (process.env.SYGMA_ENV as Environment) || Environment.TESTNET, sourceAddress: sourceAddress, }; diff --git a/yarn.lock b/yarn.lock index 6fbc6950c..6477fb165 100644 --- a/yarn.lock +++ b/yarn.lock @@ -476,6 +476,22 @@ __metadata: languageName: unknown linkType: soft +"@buildwithsygma/evm-to-evm-non-fungible-transfer-example@workspace:examples/evm-to-evm-non-fungible-transfer": + version: 0.0.0-use.local + resolution: "@buildwithsygma/evm-to-evm-non-fungible-transfer-example@workspace:examples/evm-to-evm-non-fungible-transfer" + dependencies: + "@buildwithsygma/core": "workspace:^" + "@buildwithsygma/evm": "workspace:^" + dotenv: "npm:^16.3.1" + eslint: "npm:8" + ethers: "npm:5.7.2" + ts-node: "npm:10.9.1" + tsx: "npm:^4.15.4" + typescript: "npm:5.0.4" + web3-providers-http: "npm:1.10.4" + languageName: unknown + linkType: soft + "@buildwithsygma/evm-to-substrate-fungible-transfer-example@workspace:examples/evm-to-substrate-fungible-transfer": version: 0.0.0-use.local resolution: "@buildwithsygma/evm-to-substrate-fungible-transfer-example@workspace:examples/evm-to-substrate-fungible-transfer"