Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(evm): Added support for creating cross chain non fungible asset transfer transactions #460

Merged
merged 29 commits into from
Sep 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c222ac9
feat(evm)!: Added support for creating cross chain non fungible asse …
saadahmsiddiqui Aug 15, 2024
69eec79
Added test configuration for nonFungibleTransfer class and fixed buil…
saadahmsiddiqui Aug 15, 2024
be1bcd9
Added more tests for NonFungibleAssetTransfer class
saadahmsiddiqui Aug 15, 2024
0d26bfc
Fix lint errors in `@builwithsygma/utils` package
saadahmsiddiqui Aug 15, 2024
dcd19ad
fix tests
saadahmsiddiqui Aug 15, 2024
aa4f5a4
fix example
saadahmsiddiqui Aug 15, 2024
b5ebe36
fix current example and create non fungible example
saadahmsiddiqui Aug 20, 2024
12fe86d
chore: Added example for EVM ERC721 fungible transfer
saadahmsiddiqui Aug 20, 2024
0162049
Added privateRemarks
saadahmsiddiqui Aug 21, 2024
bd78c24
Merge branch 'main' of github.com:sygmaprotocol/sygma-sdk into feat/n…
saadahmsiddiqui Aug 21, 2024
a9399e7
fix examples
saadahmsiddiqui Aug 21, 2024
6a42550
remove redundant function
saadahmsiddiqui Aug 21, 2024
c4fbbdd
removed unused import
saadahmsiddiqui Aug 21, 2024
f17fbbb
resource setters
saadahmsiddiqui Aug 21, 2024
ce438db
fix build issues
saadahmsiddiqui Aug 21, 2024
5652660
remove source setter
saadahmsiddiqui Aug 21, 2024
055a40a
change example to testnet
saadahmsiddiqui Aug 21, 2024
7ba7421
fix
saadahmsiddiqui Aug 21, 2024
b276212
Merge branch 'main' of github.com:sygmaprotocol/sygma-sdk into feat/n…
saadahmsiddiqui Aug 22, 2024
1c9042f
fixed lint and build issues
saadahmsiddiqui Aug 22, 2024
187c6f9
add deposit data test
saadahmsiddiqui Aug 22, 2024
ceb19c1
eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
saadahmsiddiqui Aug 22, 2024
4955c1e
resolved some of antons comments
saadahmsiddiqui Aug 29, 2024
d0cf116
fix lint issue
saadahmsiddiqui Aug 29, 2024
23b9add
resolved antons comment about tests
saadahmsiddiqui Aug 29, 2024
30fca96
Merge branch 'main' of github.com:sygmaprotocol/sygma-sdk into feat/n…
saadahmsiddiqui Sep 4, 2024
f87e54c
fix lint
saadahmsiddiqui Sep 4, 2024
7245ada
fix test
saadahmsiddiqui Sep 4, 2024
e91c64e
resolved comments
saadahmsiddiqui Sep 5, 2024
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
Prev Previous commit
Next Next commit
fix examples
saadahmsiddiqui committed Aug 21, 2024
commit a9399e7279dc45e93a3d8cb564178b0368bdfb69
10 changes: 6 additions & 4 deletions examples/evm-to-evm-fungible-transfer/src/transfer.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,10 @@ import {
Environment,
getSygmaScanLink,
} from "@buildwithsygma/core";
import { createFungibleAssetTransfer } from "@buildwithsygma/evm";
import {
createFungibleAssetTransfer,
FungibleTransferParams,
} from "@buildwithsygma/evm";
import dotenv from "dotenv";
import { Wallet, providers } from "ethers";
import Web3HttpProvider from "web3-providers-http";
@@ -38,14 +41,13 @@ export async function erc20Transfer(): Promise<void> {
const sourceAddress = await wallet.getAddress();
const destinationAddress = await wallet.getAddress();

const params = {
const params: FungibleTransferParams = {
source: SEPOLIA_CHAIN_ID,
destination: AMOY_CHAIN_ID,
sourceNetworkProvider: web3Provider as unknown as Eip1193Provider,
resource: RESOURCE_ID,
amount: BigInt(1) * BigInt(1e18),
environment: (process.env.SYGMA_ENV as Environment) || Environment.TESTNET,
destinationAddress,
recipientAddress: destinationAddress,
sourceAddress,
};

10 changes: 6 additions & 4 deletions examples/evm-to-evm-non-fungible-transfer/src/transfer.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,10 @@ import {
Environment,
getSygmaScanLink,
} from "@buildwithsygma/core";
import { createNonFungibleAssetTransfer } from "@buildwithsygma/evm";
import {
createNonFungibleAssetTransfer,
NonFungibleTransferParams,
} from "@buildwithsygma/evm";
import dotenv from "dotenv";
import { Wallet, providers } from "ethers";
import Web3HttpProvider from "web3-providers-http";
@@ -38,14 +41,13 @@ export async function erc721Transfer(): Promise<void> {
const sourceAddress = await wallet.getAddress();
const destinationAddress = await wallet.getAddress();

const params = {
const params: NonFungibleTransferParams = {
source: SEPOLIA_CHAIN_ID,
destination: CRONOS_TESTNET_CHAIN_ID,
sourceNetworkProvider: web3Provider as unknown as Eip1193Provider,
resource: RESOURCE_ID,
tokenId: process.env.TOKEN_ID,
tokenId: process.env.TOKEN_ID as string,
recipientAddress: destinationAddress,
environment: Environment.DEVNET,
sourceAddress,
};