Skip to content

Commit

Permalink
chore: upgrade deployment scripts to ethers v6
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 committed Feb 27, 2024
1 parent f38759f commit 175ae97
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 49 deletions.
4 changes: 0 additions & 4 deletions deploy/001_deploy_universal_profile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';

const deployUniversalProfile: DeployFunction = async ({
deployments,
Expand All @@ -9,12 +8,9 @@ const deployUniversalProfile: DeployFunction = async ({
const { deploy } = deployments;
const { owner } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('UniversalProfile', {
from: owner,
args: [owner],
gasPrice,
log: true,
});
};
Expand Down
4 changes: 0 additions & 4 deletions deploy/002_deploy_key_manager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';

const deployKeyManager: DeployFunction = async ({
deployments,
Expand All @@ -11,12 +10,9 @@ const deployKeyManager: DeployFunction = async ({

const UniversalProfile = await deployments.get('UniversalProfile');

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP6KeyManager', {
from: owner,
args: [UniversalProfile.address],
gasPrice,
log: true,
});
};
Expand Down
4 changes: 0 additions & 4 deletions deploy/003_deploy_universal_receiver_delegate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { SALT } from './salt';

const deployUniversalReceiverDelegateUPDeterministic: DeployFunction = async ({
Expand All @@ -10,11 +9,8 @@ const deployUniversalReceiverDelegateUPDeterministic: DeployFunction = async ({
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP1UniversalReceiverDelegateUP', {
from: deployer,
gasPrice,
log: true,
deterministicDeployment: SALT,
});
Expand Down
4 changes: 0 additions & 4 deletions deploy/005_deploy_universal_receiver_delegate_vault.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { SALT } from './salt';

const deployUniversalReceiverDelegateVaultDeterministic: DeployFunction = async ({
Expand All @@ -10,11 +9,8 @@ const deployUniversalReceiverDelegateVaultDeterministic: DeployFunction = async
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP1UniversalReceiverDelegateVault', {
from: deployer,
gasPrice,
log: true,
deterministicDeployment: SALT,
});
Expand Down
4 changes: 0 additions & 4 deletions deploy/006_deploy_base_universal_profile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { SALT } from './salt';

const deployBaseUniversalProfileDeterministic: DeployFunction = async ({
Expand All @@ -10,12 +9,9 @@ const deployBaseUniversalProfileDeterministic: DeployFunction = async ({
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('UniversalProfileInit', {
from: deployer,
log: true,
gasPrice,
deterministicDeployment: SALT,
});
};
Expand Down
3 changes: 0 additions & 3 deletions deploy/007_deploy_base_key_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ const deployBaseKeyManagerDeterministic: DeployFunction = async ({
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP6KeyManagerInit', {
from: deployer,
log: true,
gasLimit: 5_000_000,
gasPrice,
deterministicDeployment: SALT,
});
};
Expand Down
6 changes: 1 addition & 5 deletions deploy/008_deploy_lsp7_mintable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { LSP4_TOKEN_TYPES } from '../constants';
import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts/constants';

const deployLSP7Mintable: DeployFunction = async ({
deployments,
Expand All @@ -10,12 +9,9 @@ const deployLSP7Mintable: DeployFunction = async ({
const { deploy } = deployments;
const { owner } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP7Mintable', {
from: owner,
args: ['LSP7 Mintable', 'LSP7M', owner, LSP4_TOKEN_TYPES.TOKEN, false],
gasPrice,
log: true,
});
};
Expand Down
7 changes: 2 additions & 5 deletions deploy/009_deploy_lsp8_mintable.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { LSP4_TOKEN_TYPES, LSP8_TOKEN_ID_FORMAT } from '../constants';
import { LSP4_TOKEN_TYPES } from '@lukso/lsp4-contracts/constants';
import { LSP8_TOKEN_ID_FORMAT } from '@lukso/lsp8-contracts/constants';

const deployLSP8MintableDeterministic: DeployFunction = async ({
deployments,
Expand All @@ -10,12 +10,9 @@ const deployLSP8MintableDeterministic: DeployFunction = async ({
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP8Mintable', {
from: deployer,
args: ['LSP8 Mintable', 'LSP8M', deployer, LSP4_TOKEN_TYPES.NFT, LSP8_TOKEN_ID_FORMAT.NUMBER],
gasPrice,
log: true,
});
};
Expand Down
4 changes: 0 additions & 4 deletions deploy/010_deploy_base_lsp7_mintable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { SALT } from './salt';

const deployBaseLSP7MintableDeterministic: DeployFunction = async ({
Expand All @@ -10,11 +9,8 @@ const deployBaseLSP7MintableDeterministic: DeployFunction = async ({
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP7MintableInit', {
from: deployer,
gasPrice,
log: true,
deterministicDeployment: SALT,
});
Expand Down
4 changes: 0 additions & 4 deletions deploy/011_deploy_base_lsp8_mintable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { SALT } from './salt';

const deployBaseLSP8Mintable: DeployFunction = async ({
Expand All @@ -10,11 +9,8 @@ const deployBaseLSP8Mintable: DeployFunction = async ({
const { deploy } = deployments;
const { owner } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP8MintableInit', {
from: owner,
gasPrice,
log: true,
deterministicDeployment: SALT,
});
Expand Down
4 changes: 0 additions & 4 deletions deploy/012_deploy_vault.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';

const deployVault: DeployFunction = async ({
deployments,
Expand All @@ -9,12 +8,9 @@ const deployVault: DeployFunction = async ({
const { deploy } = deployments;
const { owner } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP9Vault', {
from: owner,
args: [owner],
gasPrice,
log: true,
});
};
Expand Down
4 changes: 0 additions & 4 deletions deploy/013_deploy_base_vault.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
import { ethers } from 'hardhat';
import { SALT } from './salt';

const deployBaseVaultDeterministic: DeployFunction = async ({
Expand All @@ -10,12 +9,9 @@ const deployBaseVaultDeterministic: DeployFunction = async ({
const { deploy } = deployments;
const { owner: deployer } = await getNamedAccounts();

const gasPrice = await ethers.provider.getGasPrice();

await deploy('LSP9VaultInit', {
from: deployer,
log: true,
gasPrice,
deterministicDeployment: SALT,
});
};
Expand Down

0 comments on commit 175ae97

Please sign in to comment.