Skip to content

Commit

Permalink
Merge branch 'main' into fs-899-support-non-18-decimals-custom-gas-token
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstph-dvx authored Oct 22, 2024
2 parents 68bd781 + db18a1c commit c80f0ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/createRollupGetRetryablesFees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,17 @@ export async function createRollupGetRetryablesFees<TChain extends Chain | undef
gas: gasWithBuffer,
});

return decodeFunctionResult({
const decodedResult = decodeFunctionResult({
abi: deployHelperABI,
functionName: 'getDeploymentTotalCost',
data: result!,
});

return isCustomGasToken
? // for custom gas token chains, retryable fees don't scale with parent base fee, so there's no need for any buffer
decodedResult
: // for eth chains, add 3% buffer
applyPercentIncrease({ base: decodedResult, percentIncrease: 3n });
}

export async function createRollupGetRetryablesFeesWithDefaults<TChain extends Chain | undefined>(
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arbitrum/orbit-sdk",
"description": "TypeScript SDK for building Arbitrum Orbit chains",
"version": "0.21.0",
"version": "0.21.1",
"main": "./dist/index.js",
"files": [
"./dist"
Expand Down

0 comments on commit c80f0ef

Please sign in to comment.