Skip to content

Commit

Permalink
Merge pull request #227 from holographxyz/feature/HOLO-1363-deploy-v2…
Browse files Browse the repository at this point in the history
…-for-develop-env

Feature/holo 1363 deploy v2 for develop env
  • Loading branch information
alexanderattar authored Feb 7, 2024
2 parents 0f74518 + c613da5 commit d3d600e
Show file tree
Hide file tree
Showing 338 changed files with 155,779 additions and 3,184 deletions.
15 changes: 13 additions & 2 deletions deploy/01_sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
StrictECDSA,
txParams,
getDeployer,
askQuestion,
} from '../scripts/utils/helpers';
import { MultisigAwareTx } from '../scripts/utils/multisig-aware-tx';
import { reservedNamespaceHashes } from '../scripts/utils/reserved-namespaces';
Expand All @@ -67,11 +68,21 @@ const func: DeployFunction = async function (hre1: HardhatRuntimeEnvironment) {
let { hre, hre2 } = await hreSplit(hre1, global.__companionNetwork);
const deployer = await getDeployer(hre);
const deployerAddress = await deployer.signer.getAddress();
const web3 = new Web3();
const salt = hre.deploymentSalt;

console.log('Deployer address:', deployerAddress);
console.log(`Deploying to network: ${hre1.network!.name}`);
console.log(`The deployment salt is: ${BigNumber.from(salt).toString()}`);
console.log(`We are in dry run mode? ${process.env.DRY_RUN === 'true'}`);

const web3 = new Web3();
const answer = await askQuestion(`Continue? (y/n)\n`);
if (answer !== 'y') {
console.log(`Exiting...`);
process.exit();
}

const salt = hre.deploymentSalt;
console.log(`Continuing...`);

const futureHolographAddress = await genesisDeriveFutureAddress(
hre,
Expand Down
21 changes: 15 additions & 6 deletions deploy/22_hToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
import { MultisigAwareTx } from '../scripts/utils/multisig-aware-tx';
import { HolographERC20Event, ConfigureEvents, AllEventsEnabled } from '../scripts/utils/events';
import { NetworkType, Network, networks } from '@holographxyz/networks';
import { Environment, getEnvironment } from '@holographxyz/environment';

interface HTokenData {
primaryNetwork: Network;
Expand Down Expand Up @@ -185,10 +186,21 @@ const func: DeployFunction = async function (hre1: HardhatRuntimeEnvironment) {
const hTokenHash = '0x' + web3.utils.asciiToHex('hToken').substring(2).padStart(64, '0');
const chainId = '0x' + data.primaryNetwork.holographId.toString(16).padStart(8, '0');

// NOTE: At the moment the hToken contract's address is reliant on the deployerAddress which prevents multiple approved deployers from deploying the same address. This is a temporary solution until the hToken contract is upgraded to allow any deployerAddress to be used.
// NOTICE: At the moment the hToken contract's address is reliant on the deployerAddress which prevents multiple approved deployers from deploying the same address. This is a temporary solution until the hToken contract is upgraded to allow any deployerAddress to be used.
// NOTE: Use hardcoded version of deployerAddress from Ledger hardware only for testnet and mainnet envs
// If environment is develop use the signers deployerAddress
let erc20DeployerAddress = '0xBB566182f35B9E5Ae04dB02a5450CC156d2f89c1'; // Ledger deployerAddress
const environment: Environment = getEnvironment();
console.log(`Environment: ${environment}`);

if (environment == Environment.develop) {
hre.deployments.log(`Using deployerAddress from signer ${deployerAddress}`);
erc20DeployerAddress = deployerAddress;
}

let { erc20Config, erc20ConfigHash, erc20ConfigHashBytes } = await generateErc20Config(
data.primaryNetwork,
'0xBB566182f35B9E5Ae04dB02a5450CC156d2f89c1', // TODO: Upgrade the hToken contract so that any deployerAddress can be used
erc20DeployerAddress, // TODO: Upgrade the hToken contract so that any deployerAddress can be used
'hTokenProxy',
'Holographed ' + data.tokenSymbol,
'h' + data.tokenSymbol,
Expand All @@ -203,10 +215,7 @@ const func: DeployFunction = async function (hre1: HardhatRuntimeEnvironment) {
registry.address,
generateInitCode(
['address', 'uint16'],
[
'0xBB566182f35B9E5Ae04dB02a5450CC156d2f89c1' /* TODO: Upgrade the hToken contract so that any deployerAddress can be used */,
0,
]
[erc20DeployerAddress /* TODO: Upgrade the hToken contract so that any deployerAddress can be used */, 0]
),
]
),
Expand Down
1 change: 1 addition & 0 deletions deployments/develop/arbitrumTestnetSepolia/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
421614
433 changes: 433 additions & 0 deletions deployments/develop/arbitrumTestnetSepolia/CxipERC721.json

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions deployments/develop/arbitrumTestnetSepolia/CxipERC721Proxy.json

Large diffs are not rendered by default.

480 changes: 480 additions & 0 deletions deployments/develop/arbitrumTestnetSepolia/DropsMetadataRenderer.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

174 changes: 174 additions & 0 deletions deployments/develop/arbitrumTestnetSepolia/DropsPriceOracleProxy.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions deployments/develop/arbitrumTestnetSepolia/Faucet.json

Large diffs are not rendered by default.

Loading

0 comments on commit d3d600e

Please sign in to comment.