Skip to content

Commit

Permalink
fix: token registry dry run gas limit (#191)
Browse files Browse the repository at this point in the history
fix: token-registry dry run - roles error
  • Loading branch information
osslgtm authored Jan 27, 2022
1 parent caabd91 commit c62cf7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/implementations/deploy/token-registry/token-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ export const deployTokenRegistry = async ({
dryRun,
...rest
}: DeployTokenRegistryCommand): Promise<TransactionReceipt> => {
const wallet = await getWalletOrSigner({ network, ...rest });
const factory = new TradeTrustErc721Factory(wallet);
if (dryRun) {
// TODO this does not work ?
const factory = new TradeTrustErc721Factory();
const unsignedTx = factory.getDeployTransaction(registryName, registrySymbol, {});
const tx = await wallet.populateTransaction(unsignedTx);
await dryRunMode({
network,
gasPriceScale: gasPriceScale,
transaction: factory.getDeployTransaction(registryName, registrySymbol, {}),
transaction: tx,
});
process.exit(0);
}
const wallet = await getWalletOrSigner({ network, ...rest });
const gasPrice = await wallet.provider.getGasPrice();
const factory = new TradeTrustErc721Factory(wallet);
signale.await(`Sending transaction to pool`);
const transaction = await factory.deploy(registryName, registrySymbol, { gasPrice: gasPrice.mul(gasPriceScale) });
trace(`Tx hash: ${transaction.deployTransaction.hash}`);
Expand Down

0 comments on commit c62cf7a

Please sign in to comment.