MCPcopy Index your code
hub / github.com/CashScript/cashscript / calculateDust

Function calculateDust

packages/cashscript/src/utils.ts:126–131  ·  view source on GitHub ↗
(output: Output)

Source from the content-addressed store, hash-verified

124}
125
126export function calculateDust(output: Output): number {
127 const outputSize = getOutputSize(output);
128 // Formula used to calculate the minimum allowed output
129 const dustAmount = 444 + outputSize * 3;
130 return dustAmount;
131}
132
133export function getOutputSize(output: Output): number {
134 const encodedOutput = encodeOutput(output);

Callers 5

timelocks.test.tsFile · 0.85
validateOutputFunction · 0.85

Calls 1

getOutputSizeFunction · 0.85

Tested by

no test coverage detected