Skip to content

Commit

Permalink
Revert evm to substrate example changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetrun5 committed Jul 26, 2023
1 parent ca0bd82 commit 1efaf07
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/evm-to-substrate-fungible-transfer/src/transfer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EVMAssetTransfer } from "@buildwithsygma/sygma-sdk-core";
import { EVMAssetTransfer, Environment } from "@buildwithsygma/sygma-sdk-core";
import { Wallet, providers } from "ethers";
import dotenv from "dotenv";

Expand All @@ -9,22 +9,22 @@ if (!privateKey) {
throw new Error("Missing environment variable: PRIVATE_KEY");
}

const PHALA_CHAIN_ID = 5233;
const DESTINATION_ADDRESS = "5F9ieYGtprgak4BBgBeBm7E1rrp45BsoimAFBcX15f7Szs77";
const ROCOCO_PHALA_CHAIN_ID = 5231;
const DESTINATION_ADDRESS = "5CDQJk6kxvBcjauhrogUc9B8vhbdXhRscp1tGEUmniryF1Vt";
const RESOURCE_ID =
"0x0000000000000000000000000000000000000000000000000000000000000001";
"0x0000000000000000000000000000000000000000000000000000000000001000";

export async function erc20Transfer(): Promise<void> {
const provider = new providers.JsonRpcProvider(
"https://mainnet.infura.io/v3/d6a17d5f758c4725add01ff97522e0c1"
"https://rpc.goerli.eth.gateway.fm/"
);
const wallet = new Wallet(privateKey, provider);
const assetTransfer = new EVMAssetTransfer();
await assetTransfer.init(provider);
await assetTransfer.init(provider, Environment.TESTNET);

const transfer = assetTransfer.createFungibleTransfer(
await wallet.getAddress(),
PHALA_CHAIN_ID,
ROCOCO_PHALA_CHAIN_ID,
DESTINATION_ADDRESS,
RESOURCE_ID,
"5000000000000000000" // 18 decimal places
Expand Down

0 comments on commit 1efaf07

Please sign in to comment.