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

Version 0.2.0-beta.4 bigNumber removed #60

Merged
merged 49 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d482a88
tests and safe deploy fun
talhamalik883 Nov 15, 2023
7f9b7bc
internal functions mocking
talhamalik883 Nov 15, 2023
8978d41
tests updated
talhamalik883 Nov 16, 2023
4a0ec34
Signer fix and biconomy get wallets function (#20)
anshulforyou Nov 17, 2023
038bab8
testing workflow added
anshulforyou Nov 17, 2023
9e5677e
Merge branch 'develop' of https://github.com/aarc-xyz/aarc-sdk into d…
anshulforyou Nov 17, 2023
ef8ba1b
Sdk bug fixes (#21)
anshulforyou Nov 20, 2023
59cf8af
nft transfer gasless updated
anshulforyou Nov 20, 2023
cb9bf57
package version changes
anshulforyou Nov 20, 2023
1bb071e
Update README.md
anshulforyou Nov 21, 2023
0b1ce0d
Update README.md - CRITICAL (#26)
theblackmace Nov 22, 2023
3aaf65f
Update README.md (#24)
theblackmace Nov 22, 2023
c42b375
Merge branch 'staging' into develop
anshulforyou Nov 22, 2023
6a65473
estimation implementation for both non gasless and gasless flow (#25)
talhamalik883 Nov 23, 2023
3b6adca
Nft edge cases fix (#29)
anshulforyou Nov 24, 2023
416b43f
types check added (#30)
talhamalik883 Nov 24, 2023
d2669c7
Feat/linting enabled (#31)
talhamalik883 Nov 24, 2023
68e35d1
Cosmetic/code refactoring (#33)
anshulforyou Nov 27, 2023
dd259fd
readme bugfix
anshulforyou Nov 27, 2023
aebe826
test script for both gasless and non gasless and bug fixes (#32)
talhamalik883 Nov 27, 2023
a889d7e
Update README.md (#37)
theblackmace Nov 29, 2023
c949c70
Fix/gasless bug (#36)
talhamalik883 Dec 1, 2023
1d22b94
arbitrum goerli support added (#38)
anshulforyou Dec 1, 2023
4e6e8f0
Merge branch 'staging' into develop
anshulforyou Dec 1, 2023
980a6e5
version update
anshulforyou Dec 1, 2023
026645f
minor changes
anshulforyou Dec 1, 2023
c3dda64
Feat/wallet deployment (#41)
talhamalik883 Dec 4, 2023
99255dd
permit bug fix (#42)
anshulforyou Dec 6, 2023
1cd7e58
package version update
anshulforyou Dec 6, 2023
bacb1c4
Merge branch 'develop' of https://github.com/aarc-xyz/aarc-sdk into d…
anshulforyou Dec 6, 2023
0593aff
Merge branch 'staging' into develop
anshulforyou Dec 6, 2023
3b74f5d
Merge branch 'staging' into develop
anshulforyou Dec 11, 2023
d6640a3
readme updated (#45)
talhamalik883 Dec 13, 2023
c8950dd
minor fixes
anshulforyou Dec 13, 2023
9490354
Merge branch 'staging' into develop
anshulforyou Jan 3, 2024
084ef27
Feat/gasless gelato (#46)
talhamalik883 Jan 4, 2024
59e8894
Feat/forward (#51)
talhamalik883 Jan 5, 2024
ce74c1b
sepolia support
anshulforyou Jan 5, 2024
4408fb2
msg fix
anshulforyou Jan 5, 2024
4c4db4a
package release changes
anshulforyou Jan 5, 2024
869905d
Merge branch 'staging' into develop
anshulforyou Jan 5, 2024
750bda2
minor change
anshulforyou Jan 8, 2024
e3e73b6
publish cmd added
anshulforyou Jan 8, 2024
ffc1df6
Fix/ux error messages (#54)
talhamalik883 Jan 9, 2024
bffcd36
Merge branch 'staging' into develop
anshulforyou Jan 9, 2024
e8e7ae8
Merge branch 'staging' into develop
anshulforyou Jan 10, 2024
ce1cfbf
gelato package removed (#57)
anshulforyou Jan 11, 2024
8b44697
BigNumber fixes (#59)
talhamalik883 Jan 12, 2024
1df2067
package version update
anshulforyou Jan 12, 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
137 changes: 4 additions & 133 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aarc-sdk",
"version": "0.2.0-beta.3",
"version": "0.2.0-beta.4",
"description": "The Aarc SDK is a TypeScript library that makes it easy for developers to transfer assets from Externally Owned Accounts (EOA) to any destination address. It simplifies the asset transfer process by supporting various token standards, such as ERC20 and ERC721, and offering custom flows like batched transactions, gasless transactions, and paying gas fees with the same asset being moved. Additionally, it enables custom contract interaction within the same transaction using permit2(), allowing for direct swaps and bridge functionality.",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -70,7 +70,6 @@
"@biconomy/modules": "^3.1.0",
"@biconomy/node-client": "^3.1.0",
"@ethersproject/hash": "^5.7.0",
"@gelatonetwork/relay-sdk": "^5.5.2",
"@safe-global/api-kit": "^1.3.1",
"@safe-global/protocol-kit": "^1.3.0",
"@safe-global/safe-deployments": "^1.28.0",
Expand Down
2 changes: 0 additions & 2 deletions scripts/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dotenv.config();
export const PRIVATE_KEY = process.env.PRIVATE_KEY || "";
export const RPC_URL = process.env.RPC_URL || "";
export const API_KEY = process.env.API_KEY || "";
export const GELATO_API_KEY = process.env.GELATO_API_KEY || "";
export const DAPP_API_KEY = process.env.DAPP_API_KEY || ""


Expand Down Expand Up @@ -85,7 +84,6 @@ export const validateEnvironmentVariables = () => {
if (!PRIVATE_KEY) missingVariables.push('PRIVATE_KEY');
if (!RPC_URL) missingVariables.push('RPC_URL');
if (!API_KEY) missingVariables.push('API_KEY');
if (!GELATO_API_KEY) missingVariables.push('GELATO_API_KEY');

if (missingVariables.length > 0) {
throw new Error(`Missing environment variables: ${missingVariables.join(', ')}`);
Expand Down
8 changes: 4 additions & 4 deletions scripts/Forward.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export const mintAndTransferErc20Tokens = async () => {
senderSigner: signer,
receiverAddress: "0x786E6045eacb96cAe0259cd761e151b68B85bdA7",
transferTokenDetails: [
{ tokenAddress: tokenAddresses[chainId].USDA1.address, amount: BigNumber.from("100000000") },
{ tokenAddress: tokenAddresses[chainId].USDB.address, amount: BigNumber.from("100000000") },
{ tokenAddress: tokenAddresses[chainId].USDA2.address, amount: BigNumber.from("500000000") },
{ tokenAddress: tokenAddresses[chainId].USDC.address, amount: BigNumber.from("300000") },
{ tokenAddress: tokenAddresses[chainId].USDA1.address, amount: BigNumber.from("100000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDB.address, amount: BigNumber.from("100000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDA2.address, amount: BigNumber.from("500000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDC.address, amount: BigNumber.from("300000")._hex },
]
})
console.log('ResultSet ', resultSet);
Expand Down
16 changes: 10 additions & 6 deletions scripts/Gasless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ export const mintAndTransferErc20Tokens = async () => {
for (const tokenName in tokenAddresses[chainId]) {
console.log(' tokenName ', tokenName);
const { address, decimals } = tokenAddresses[chainId][tokenName as keyof typeof TokenName];

if (!address)
continue

const token = balances.data.find(token => {
return token.token_address.toLowerCase() === address.toLowerCase()
})
Expand All @@ -87,10 +91,10 @@ export const mintAndTransferErc20Tokens = async () => {
senderSigner: signer,
receiverAddress: "0x786E6045eacb96cAe0259cd761e151b68B85bdA7",
transferTokenDetails: [
{ tokenAddress: tokenAddresses[chainId].USDA1.address, amount: BigNumber.from("100000000") },
{ tokenAddress: tokenAddresses[chainId].USDB.address, amount: BigNumber.from("100000000") },
{ tokenAddress: tokenAddresses[chainId].USDA2.address, amount: BigNumber.from("500000000") },
{ tokenAddress: tokenAddresses[chainId].USDC.address, amount: BigNumber.from("30000") },
{ tokenAddress: tokenAddresses[chainId].USDA1.address, amount: BigNumber.from("100000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDB.address, amount: BigNumber.from("100000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDA2.address, amount: BigNumber.from("500000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDC.address, amount: BigNumber.from("30000")._hex },
]
})
console.log('ResultSet ', resultSet);
Expand Down Expand Up @@ -146,7 +150,7 @@ export const transferErc20Tokens = async () => {


if (token) {
transferTokenDetails.push({ tokenAddress: address, amount: token.balance })
transferTokenDetails.push({ tokenAddress: address, amount: (token.balance)._hex })
}

}
Expand Down Expand Up @@ -209,7 +213,7 @@ export const transferFullNativeOnly = async () => {
const resultSet = await aarcSDK.executeMigrationGasless({
senderSigner: signer,
receiverAddress: '0x786E6045eacb96cAe0259cd761e151b68B85bdA7',
transferTokenDetails: [{ tokenAddress: '0x0000000000000000000000000000000000001010', amount: BigNumber.from(1000) }]
transferTokenDetails: [{ tokenAddress: '0x0000000000000000000000000000000000001010', amount: BigNumber.from(1000)._hex }]
})
console.log('ResultSet ', resultSet);

Expand Down
12 changes: 6 additions & 6 deletions scripts/NonGasless.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumber, ethers } from "ethers";
import { AarcSDK } from '../src';
import { RPC_URL, PRIVATE_KEY, API_KEY, GELATO_API_KEY, nativeTokenAddress, tokenAddresses, TokenName, ChainID, nativeTokenAddresses, MUMBAI_NFT_ADDRESS, validateEnvironmentVariables } from "./Constants";
import { RPC_URL, PRIVATE_KEY, API_KEY, tokenAddresses, TokenName, ChainID, nativeTokenAddresses, MUMBAI_NFT_ADDRESS, validateEnvironmentVariables } from "./Constants";
import { ERC20_ABI } from '../src/utils/abis/ERC20.abi';
import { ERC721_ABI } from "../src/utils/abis/ERC721.abi";
import { delay } from "../src/helpers";
Expand Down Expand Up @@ -65,10 +65,10 @@ export const transferErc20Tokens = async () => {
senderSigner: signer,
receiverAddress: "0x786E6045eacb96cAe0259cd761e151b68B85bdA7",
transferTokenDetails: [
{ tokenAddress: tokenAddresses[chainId].USDA1.address, amount: BigNumber.from("100000000") },
{ tokenAddress: tokenAddresses[chainId].USDB.address, amount: BigNumber.from("100000000") },
{ tokenAddress: tokenAddresses[chainId].USDA2.address, amount: BigNumber.from("500000000") },
{ tokenAddress: tokenAddresses[chainId].USDC.address, amount: BigNumber.from("30000000000000000") },
{ tokenAddress: tokenAddresses[chainId].USDA1.address, amount: BigNumber.from("100000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDB.address, amount: BigNumber.from("100000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDA2.address, amount: BigNumber.from("500000000")._hex },
{ tokenAddress: tokenAddresses[chainId].USDC.address, amount: BigNumber.from("30000000000000000")._hex },
],
})
console.log('ResultSet ', resultSet);
Expand Down Expand Up @@ -126,7 +126,7 @@ export const transferFullNativeOnly = async () => {
const resultSet = await aarcSDK.executeMigration({
senderSigner: signer,
receiverAddress: '0x786E6045eacb96cAe0259cd761e151b68B85bdA7',
transferTokenDetails: [{tokenAddress: '0x0000000000000000000000000000000000001010', amount: BigNumber.from(1000)}],
transferTokenDetails: [{tokenAddress: '0x0000000000000000000000000000000000001010', amount: BigNumber.from(1000)._hex}],
})
console.log('ResultSet ', resultSet);

Expand Down
Loading
Loading