Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crosslightning-evm

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crosslightning-evm - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

17

dist/evm/swaps/EVMSwapProgram.js

@@ -776,5 +776,16 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
const tokenContract = new ethers_1.Contract(token, erc20Abi_1.erc20Abi, this.signer);
const transferTx = yield tokenContract.populateTransaction.transfer(dstAddress, ethers_1.BigNumber.from(amount.toString(10)));
transferTx.gasLimit = ethers_1.BigNumber.from(80000);
let transferTx;
if (ZERO_ADDRESS === token) {
transferTx = {
from: this.getAddress(),
to: dstAddress,
value: ethers_1.BigNumber.from(amount.toString(10)),
gasLimit: ethers_1.BigNumber.from(21000)
};
}
else {
const tokenContract = new ethers_1.Contract(token, erc20Abi_1.erc20Abi, this.signer);
transferTx = yield tokenContract.populateTransaction.transfer(dstAddress, ethers_1.BigNumber.from(amount.toString(10)));
transferTx.gasLimit = ethers_1.BigNumber.from(80000);
}
const [txId] = yield this.sendAndConfirm([transferTx], waitForConfirmation, abortSignal, false);

@@ -781,0 +792,0 @@ return txId;

2

package.json
{
"name": "crosslightning-evm",
"version": "3.3.0",
"version": "3.3.1",
"description": "EVM specific base implementation",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -965,7 +965,16 @@ import * as BN from "bn.js";

async transfer(token: TokenAddress, amount: BN, dstAddress: string, waitForConfirmation?: boolean, abortSignal?: AbortSignal): Promise<string> {
const tokenContract: Contract = new Contract(token, erc20Abi, this.signer);
let transferTx;
if(ZERO_ADDRESS===token) {
transferTx = {
from: this.getAddress(),
to: dstAddress,
value: BigNumber.from(amount.toString(10)),
gasLimit: BigNumber.from(21000)
};
} else {
const tokenContract: Contract = new Contract(token, erc20Abi, this.signer);
transferTx = await tokenContract.populateTransaction.transfer(dstAddress, BigNumber.from(amount.toString(10)));
transferTx.gasLimit = BigNumber.from(80000);
}
const transferTx = await tokenContract.populateTransaction.transfer(dstAddress, BigNumber.from(amount.toString(10)));
transferTx.gasLimit = BigNumber.from(80000);
const [txId] = await this.sendAndConfirm([transferTx], waitForConfirmation, abortSignal, false);

@@ -972,0 +981,0 @@ return txId;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc