Socket
Socket
Sign inDemoInstall

@vechain/sdk-hardhat-plugin

Package Overview
Dependencies
Maintainers
7
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vechain/sdk-hardhat-plugin - npm Package Compare versions

Comparing version 1.0.0-beta.6 to 1.0.0-beta.7

8

dist/index.d.ts

@@ -1,2 +0,2 @@

import { HardhatVechainProvider, SignTransactionOptions } from '@vechain/sdk-network';
import { HardhatVeChainProvider, SignTransactionOptions } from '@vechain/sdk-network';
import { vechain_sdk_core_ethers } from '@vechain/sdk-core';

@@ -8,3 +8,3 @@ import { HardhatEthersHelpers } from '@nomicfoundation/hardhat-ethers/types';

*
* - Add `vechainProvider` to `HardhatRuntimeEnvironment`
* - Add `VeChainProvider` to `HardhatRuntimeEnvironment`
*/

@@ -14,6 +14,6 @@ declare module 'hardhat/types/runtime' {

/**
* The vechain provider.
* The VeChain provider.
* Useful to have for custom functionality.
*/
vechainProvider?: HardhatVechainProvider;
VeChainProvider?: HardhatVeChainProvider;
/**

@@ -20,0 +20,0 @@ * The ethers object.

@@ -76,10 +76,10 @@ "use strict";

if (!networkName.includes("vechain")) {
(0, import_sdk_logging.VechainSDKLogger)("warning").log({
(0, import_sdk_logging.VeChainSDKLogger)("warning").log({
title: "You are operating on a non-vechain network",
messages: [
"Ensure your hardhat config file has a network that:",
" 1. Is a vechain valid network (set url and optionally delegator parameter)",
" 1. Is a VeChain valid network (set url and optionally delegator parameter)",
' 2. Has the name of the network containing "vechain" (e.g. "vechain_mainnet", "vechain_testnet", "vechain_solo", ...)',
"",
"This is required to use the vechain provider and its functions. Note that this is only a warning and you can hardhat without a vechain network.",
"This is required to use the VeChain provider and its functions. Note that this is only a warning and you can hardhat without a VeChain network.",
"BUT it's possible that some functionalities will not be available."

@@ -89,3 +89,3 @@ ]

}
const hardhatVechainProvider = new import_sdk_network2.HardhatVechainProvider(
const hardhatVeChainProvider = new import_sdk_network2.HardhatVeChainProvider(
createWalletFromHardhatNetworkConfig(networkConfig),

@@ -101,7 +101,7 @@ networkConfig.url,

);
hre.vechainProvider = (0, import_plugins.lazyObject)(() => hardhatVechainProvider);
hre.network.provider = hardhatVechainProvider;
hre.VeChainProvider = (0, import_plugins.lazyObject)(() => hardhatVeChainProvider);
hre.network.provider = hardhatVeChainProvider;
hre.ethers = (0, import_plugins.lazyObject)(() => {
const vechainNewHardhatProvider = new import_hardhat_ethers_provider.HardhatEthersProvider(
hardhatVechainProvider,
hardhatVeChainProvider,
hre.network.name

@@ -114,3 +114,3 @@ );

return await deployContractBound(...args).then(
(contract) => (0, import_sdk_ethers_adapter.contractAdapter)(contract, hardhatVechainProvider)
(contract) => (0, import_sdk_ethers_adapter.contractAdapter)(contract, hardhatVeChainProvider)
);

@@ -121,3 +121,3 @@ },

return await contractFactoryBound(...args).then(
(factory) => (0, import_sdk_ethers_adapter.factoryAdapter)(factory, hardhatVechainProvider)
(factory) => (0, import_sdk_ethers_adapter.factoryAdapter)(factory, hardhatVeChainProvider)
);

@@ -132,3 +132,3 @@ },

).then(
(factory) => (0, import_sdk_ethers_adapter.factoryAdapter)(factory, hardhatVechainProvider)
(factory) => (0, import_sdk_ethers_adapter.factoryAdapter)(factory, hardhatVeChainProvider)
);

@@ -135,0 +135,0 @@ },

{
"name": "@vechain/sdk-hardhat-plugin",
"version": "1.0.0-beta.6",
"version": "1.0.0-beta.7",
"description": "This module allows to create smart contracts and interact with them using the vechain SDK and Hardhat",

@@ -37,4 +37,4 @@ "author": "vechain Foundation",

"dependencies": {
"@vechain/sdk-network": "1.0.0-beta.6",
"@vechain/sdk-ethers-adapter": "1.0.0-beta.6"
"@vechain/sdk-network": "1.0.0-beta.7",
"@vechain/sdk-ethers-adapter": "1.0.0-beta.7"
},

@@ -41,0 +41,0 @@ "devDependencies": {

# @vechain/sdk-hardhat-plugin
Welcome to the **hardhat-plugin package** of the vechain SDK!
Welcome to the **hardhat-plugin package** of the VeChain SDK!
## Introduction
The vechain SDK Hardhat plugin is a crucial tool that bridges the gap between Hardhat and the vechain SDK, providing a seamless interface for developers. This versatile package is indispensable for smart contract development on the VeChainThor blockchain network.
The VeChain SDK Hardhat plugin is a crucial tool that bridges the gap between Hardhat and the VeChain SDK, providing a seamless interface for developers. This versatile package is indispensable for smart contract development on the VeChainThor blockchain network.
## Key Features
The plugin streamlines the process of creating, testing, deploying and interacting with smart contracts, making it easier for developers to build robust decentralized applications (dApps) and services on VeChainThor. By integrating the vechain SDK into Hardhat, developers can leverage the full power of vechain's blockchain infrastructure while enjoying the familiar development environment provided by Hardhat.
The plugin streamlines the process of creating, testing, deploying and interacting with smart contracts, making it easier for developers to build robust decentralized applications (dApps) and services on VeChainThor. By integrating the VeChain SDK into Hardhat, developers can leverage the full power of vechain's blockchain infrastructure while enjoying the familiar development environment provided by Hardhat.
## Example
If you want to explore a comprehensive example of the Hardhat plugin, you can navigate to the `apps/sdk-hardhat-integration`. Inside this directory, you'll find a fully-fledged example with all the necessary commands already configured. This example serves as a practical demonstration of how to use the Hardhat plugin for vechain SDK integration, providing a complete setup that you can easily follow and replicate for your own projects.
If you want to explore a comprehensive example of the Hardhat plugin, you can navigate to the `apps/sdk-hardhat-integration`. Inside this directory, you'll find a fully-fledged example with all the necessary commands already configured. This example serves as a practical demonstration of how to use the Hardhat plugin for VeChain SDK integration, providing a complete setup that you can easily follow and replicate for your own projects.

@@ -23,2 +23,2 @@ ## Usage

Happy coding with the vechain SDK!
Happy coding with the VeChain SDK!

@@ -17,4 +17,4 @@ import { createWalletFromHardhatNetworkConfig } from './helpers';

// Custom provider for ethers
import { HardhatVechainProvider } from '@vechain/sdk-network';
import { VechainSDKLogger } from '@vechain/sdk-logging';
import { HardhatVeChainProvider } from '@vechain/sdk-network';
import { VeChainSDKLogger } from '@vechain/sdk-logging';

@@ -32,3 +32,3 @@ // Import needed to customize ethers functionality

/**
* Extend the environment with provider to be able to use vechain functions
* Extend the environment with provider to be able to use VeChain functions
*/

@@ -57,10 +57,10 @@ extendEnvironment((hre) => {

if (!networkName.includes('vechain')) {
VechainSDKLogger('warning').log({
VeChainSDKLogger('warning').log({
title: 'You are operating on a non-vechain network',
messages: [
'Ensure your hardhat config file has a network that:',
'\t1. Is a vechain valid network (set url and optionally delegator parameter)',
'\t1. Is a VeChain valid network (set url and optionally delegator parameter)',
'\t2. Has the name of the network containing "vechain" (e.g. "vechain_mainnet", "vechain_testnet", "vechain_solo", ...)',
'',
'This is required to use the vechain provider and its functions. Note that this is only a warning and you can hardhat without a vechain network.',
'This is required to use the VeChain provider and its functions. Note that this is only a warning and you can hardhat without a VeChain network.',
"BUT it's possible that some functionalities will not be available."

@@ -71,6 +71,6 @@ ]

// 3 - Extend environment with the 'HardhatVechainProvider'
// 3 - Extend environment with the 'HardhatVeChainProvider'
// 3.1 - Create the provider
const hardhatVechainProvider = new HardhatVechainProvider(
const hardhatVeChainProvider = new HardhatVeChainProvider(
createWalletFromHardhatNetworkConfig(networkConfig),

@@ -89,6 +89,6 @@ networkConfig.url,

// 3.2 - Extend environment
hre.vechainProvider = lazyObject(() => hardhatVechainProvider);
hre.VeChainProvider = lazyObject(() => hardhatVeChainProvider);
// 3.3 - Set provider for the network
hre.network.provider = hardhatVechainProvider;
hre.network.provider = hardhatVeChainProvider;

@@ -99,3 +99,3 @@ hre.ethers = lazyObject(() => {

const vechainNewHardhatProvider = new HardhatEthersProvider(
hardhatVechainProvider,
hardhatVeChainProvider,
hre.network.name

@@ -110,3 +110,3 @@ );

return await deployContractBound(...args).then((contract) =>
contractAdapter(contract, hardhatVechainProvider)
contractAdapter(contract, hardhatVeChainProvider)
);

@@ -119,3 +119,3 @@ },

return await contractFactoryBound(...args).then((factory) =>
factoryAdapter(factory, hardhatVechainProvider)
factoryAdapter(factory, hardhatVeChainProvider)
);

@@ -141,3 +141,3 @@ },

).then((factory) =>
factoryAdapter(factory, hardhatVechainProvider)
factoryAdapter(factory, hardhatVeChainProvider)
);

@@ -144,0 +144,0 @@ },

import {
type HardhatVechainProvider,
type HardhatVeChainProvider,
type SignTransactionOptions

@@ -17,3 +17,3 @@ } from '@vechain/sdk-network';

*
* - Add `vechainProvider` to `HardhatRuntimeEnvironment`
* - Add `VeChainProvider` to `HardhatRuntimeEnvironment`
*/

@@ -23,6 +23,6 @@ declare module 'hardhat/types/runtime' {

/**
* The vechain provider.
* The VeChain provider.
* Useful to have for custom functionality.
*/
vechainProvider?: HardhatVechainProvider;
VeChainProvider?: HardhatVeChainProvider;

@@ -29,0 +29,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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