@vechain/sdk-ethers-adapter
Advanced tools
Comparing version 1.0.0-beta.24 to 1.0.0-beta.25
@@ -62,13 +62,15 @@ "use strict"; | ||
var import_sdk_core = require("@vechain/sdk-core"); | ||
var import_sdk_errors = require("@vechain/sdk-errors"); | ||
function factoryAdapter(contractFactory, hardhatVeChainProvider) { | ||
contractFactory.deploy = async function(...args) { | ||
const tx = await this.getDeployTransaction(...args); | ||
import_sdk_core.vechain_sdk_core_ethers.assert( | ||
this.runner != null && typeof this.runner.sendTransaction === "function", | ||
"factory runner does not support sending transactions", | ||
"UNSUPPORTED_OPERATION", | ||
{ | ||
operation: "sendTransaction" | ||
} | ||
); | ||
if (this.runner == null || typeof this.runner.sendTransaction !== "function") { | ||
throw new import_sdk_errors.UnsupportedOperation( | ||
"factoryAdapter()", | ||
"Runner does not support sending transactions", | ||
{ | ||
operation: "sendTransaction" | ||
} | ||
); | ||
} | ||
const sentTx = await this.runner.sendTransaction(tx); | ||
@@ -75,0 +77,0 @@ const receipt = await hardhatVeChainProvider.thorClient.transactions.waitForTransaction( |
{ | ||
"name": "@vechain/sdk-ethers-adapter", | ||
"version": "1.0.0-beta.24", | ||
"version": "1.0.0-beta.25", | ||
"description": "This module serves as a crucial bridge between the standard Ethereum tooling provided by Hardhat and the unique features of the vechain thor blockchain", | ||
@@ -37,4 +37,5 @@ "author": "vechain Foundation", | ||
"dependencies": { | ||
"@vechain/sdk-core": "1.0.0-beta.24", | ||
"@vechain/sdk-network": "1.0.0-beta.24" | ||
"@vechain/sdk-core": "1.0.0-beta.25", | ||
"@vechain/sdk-network": "1.0.0-beta.25", | ||
"@vechain/sdk-errors": "1.0.0-beta.25" | ||
}, | ||
@@ -41,0 +42,0 @@ "devDependencies": { |
import type { HardhatVeChainProvider } from '@vechain/sdk-network'; | ||
import { vechain_sdk_core_ethers } from '@vechain/sdk-core'; | ||
import { UnsupportedOperation } from '@vechain/sdk-errors'; | ||
@@ -20,11 +21,14 @@ /** | ||
vechain_sdk_core_ethers.assert( | ||
this.runner != null && | ||
typeof this.runner.sendTransaction === 'function', | ||
'factory runner does not support sending transactions', | ||
'UNSUPPORTED_OPERATION', | ||
{ | ||
operation: 'sendTransaction' | ||
} | ||
); | ||
if ( | ||
this.runner == null || | ||
typeof this.runner.sendTransaction !== 'function' | ||
) { | ||
throw new UnsupportedOperation( | ||
'factoryAdapter()', | ||
'Runner does not support sending transactions', | ||
{ | ||
operation: 'sendTransaction' | ||
} | ||
); | ||
} | ||
@@ -31,0 +35,0 @@ const sentTx = await this.runner.sendTransaction(tx); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14590
280
3
+ Added@vechain/sdk-core@1.0.0-beta.25(transitive)
+ Added@vechain/sdk-errors@1.0.0-beta.25(transitive)
+ Added@vechain/sdk-logging@1.0.0-beta.25(transitive)
+ Added@vechain/sdk-network@1.0.0-beta.25(transitive)
- Removed@vechain/sdk-core@1.0.0-beta.24(transitive)
- Removed@vechain/sdk-errors@1.0.0-beta.24(transitive)
- Removed@vechain/sdk-logging@1.0.0-beta.24(transitive)
- Removed@vechain/sdk-network@1.0.0-beta.24(transitive)