Skip to content

Commit

Permalink
🩹 Increase gas fee for update ISCN
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 committed Dec 29, 2023
1 parent f55e0d3 commit 18ad21c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
1 change: 0 additions & 1 deletion constant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export const ISCN_MIN_BALANCE = 0.01;

export const ISCN_GAS_FEE = 200000;
export const ISCN_GAS_MULTIPLIER = 1.5;
export const UPDATE_ISCN_GAS_FEE = 300000;

export const ISCN_REGISTRY_NAME = 'likecoin-chain';

Expand Down
28 changes: 1 addition & 27 deletions utils/cosmos/iscn/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export async function signISCN(
? signingClient.updateISCNRecord(address, iscnId as string, tx, {
memo: memo || 'app.like.co',
fee: {
gas,
gas: new BigNumber(gas).multipliedBy(ISCN_GAS_MULTIPLIER).toFixed(0),
amount: [{
denom: DEFAULT_GAS_PRICE[0].denom,
amount: new BigNumber(gas).multipliedBy(DEFAULT_GAS_PRICE[0].amount).toFixed(0),
Expand All @@ -190,29 +190,3 @@ export async function signISCN(
return res as DeliverTxResponse
}

export async function updateISCNRecord(
signer: OfflineSigner,
address: string,
iscnId: string,
payload: ISCNSignPayload,
) {
const signingClient = await getSigningClient()
await signingClient.connectWithSigner(network.rpcURL, signer)
const signingPromise = signingClient.updateISCNRecord(
address,
iscnId,
payload,
{
fee: {
gas: (new BigNumber(ISCN_GAS_FEE).times(ISCN_GAS_MULTIPLIER).toFixed(0)).toString(),
amount: [{
denom: DEFAULT_GAS_PRICE[0].denom,
amount: DEFAULT_GAS_PRICE[0].amount.toString(),
}],
},
},
)

const res = await signingPromise
return res as DeliverTxResponse
}

0 comments on commit 18ad21c

Please sign in to comment.