Skip to content

Commit

Permalink
Merge pull request #136 from lukso-network/fix-l16-issues
Browse files Browse the repository at this point in the history
fix: remove gas price from gas estimates
  • Loading branch information
CallumGrindle authored Jun 24, 2022
2 parents 53fec59 + 784b530 commit 9968a8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
4 changes: 1 addition & 3 deletions src/lib/helpers/deployment.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ export function initialize(
switchMap(async (result) => {
const contract = await factory.attach(result.receipt.contractAddress);
const initializeParams = await initArguments(result);
const gasEstimate = await contract.estimateGas.initialize(...initializeParams, {
gasPrice: GAS_PRICE,
});
const gasEstimate = await contract.estimateGas.initialize(...initializeParams);
const transaction = await contract.initialize(...initializeParams, {
gasLimit: gasEstimate.add(GAS_BUFFER),
gasPrice: GAS_PRICE,
Expand Down
16 changes: 3 additions & 13 deletions src/lib/services/digital-asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@ function initializeLSP7Proxy(
name,
symbol,
controllerAddress,
isNFT,
{
gasPrice: GAS_PRICE,
}
isNFT
);

const transaction = await contract[`initialize(string,string,address,bool)`](
Expand Down Expand Up @@ -321,10 +318,7 @@ function initializeLSP8Proxy(
const gasEstimate = await contract.estimateGas[`initialize(string,string,address)`](
name,
symbol,
controllerAddress,
{
gasPrice: GAS_PRICE,
}
controllerAddress
);

const transaction = await contract[`initialize(string,string,address)`](
Expand Down Expand Up @@ -520,10 +514,7 @@ export async function sendSetDataAndTransferOwnershipTransactions(
if (keysToSet && valuesToSet) {
const setDataEstimate = await digitalAsset.estimateGas['setData(bytes32[],bytes[])'](
keysToSet,
valuesToSet,
{
gasPrice: GAS_PRICE,
}
valuesToSet
);

setDataTransaction = digitalAsset['setData(bytes32[],bytes[])'](keysToSet, valuesToSet, {
Expand All @@ -545,7 +536,6 @@ export async function sendSetDataAndTransferOwnershipTransactions(
controllerAddress,
{
from: signerAddress,
gasPrice: GAS_PRICE,
}
);

Expand Down
8 changes: 1 addition & 7 deletions src/lib/services/universal-profile.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,17 +485,13 @@ export async function sendSetDataAndTransferOwnershipTransactions(

const setDataEstimate = await erc725Account.estimateGas['setData(bytes32[],bytes[])'](
keysToSet,
valuesToSet as BytesLike[],
{
gasPrice: GAS_PRICE,
}
valuesToSet as BytesLike[]
);

const transferOwnershipEstimate = await erc725Account.estimateGas.transferOwnership(
keyManagerAddress,
{
from: signerAddress,
gasPrice: GAS_PRICE,
}
);

Expand Down Expand Up @@ -547,7 +543,6 @@ export async function claimOwnership(

const claimOwnershipEstimate = await keyManager.estimateGas.execute(claimOwnershipPayload, {
from: signerAddress,
gasPrice: GAS_PRICE,
});

const claimOwnershipTransaction = await keyManager.execute(claimOwnershipPayload, {
Expand Down Expand Up @@ -601,7 +596,6 @@ export async function revokeSignerPermissions(
revokeSignerPermissionsPayload,
{
from: signerAddress,
gasPrice: GAS_PRICE,
}
);

Expand Down

0 comments on commit 9968a8e

Please sign in to comment.