ethers.js/docs/api/utils/bignumber/index.html

65 lines
32 KiB
HTML
Raw Normal View History

2020-02-02 08:53:22 +03:00
<html><head><title>Big Number</title><link rel="stylesheet" type="text/css" href="/static/style.css"></head><body><div class="sidebar"><div class="header"><div class="logo"><a href="/"><div class="image"></div><div class="name">ethers</div><div class="version">v5.0-beta</div></a></div></div><div class="toc"><div><div class="link title"><a href="/">Documentation</a></div><div class="base show link depth-1"><a href="/getting-started/">Getting Started</a></div><div class="hide link depth-2"><a href="/getting-started/#installing">Installing</a></div><div class="hide link depth-2"><a href="/getting-started/#importing">Importing</a></div><div class="base show link depth-1"><a href="/concepts/">Concepts</a></div><div class="hide link depth-2"><a href="/concepts/events/">Events</a></div><div class="hide link depth-3"><a href="/concepts/events/#solidity-topics">Solidity Topics</a></div><div class="hide link depth-2"><a href="/concepts/gas/">Gas</a></div><div class="hide link depth-3"><a href="/concepts/gas/#gas-price">Gas Price</a></div><div class="hide link depth-3"><a href="/concepts/gas/#gas-limit">Gas Limit</a></div><div class="base ancestor show link depth-1"><a href="/api/">Application Programming Interface</a></div><div class="show link depth-2"><a href="/api/contract/">Contracts</a></div><div class="hide link depth-3"><a href="/api/contract/#buckets">Buckets</a></div><div class="show link depth-2"><a href="/api/signer/">Signers</a></div><div class="hide link depth-3"><a href="/api/signer/#signer">Signer</a></div><div class="hide link depth-3"><a href="/api/signer/#wallet">Wallet</a></div><div class="hide link depth-3"><a href="/api/signer/#voidsigner">VoidSigner</a></div><div class="hide link depth-3"><a href="/api/signer/#externallyownedaccount">ExternallyOwnedAccount</a></div><div class="show link depth-2"><a href="/api/providers/">Providers</a></div><div class="hide link depth-3"><a href="/api/providers/provider/">Provider</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#accounts-methods">Accounts Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#blocks-methods">Blocks Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#ethereum-naming-service-(ens)-methods">Ethereum Naming Service (ENS) Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#logs-methods">Logs Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#network-status-methods">Network Status Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#transactions-methods">Transactions Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#event-emitter-methods">Event Emitter Methods</a></div><div class="hide link depth-4"><a href="/api/providers/provider/#inspection-methods">Inspection Methods</a></div><div class="hide link depth-3"><a href="/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><div class="hide link depth-4"><a href="/api/providers/jsonrpc-provider/#jsonrpcsigner">JsonRpcSigner</a></div><div class="hide link depth-4"><a href="/api/providers/jsonrpc-provider/#jsonrpcuncheckedsigner">JsonRpcUncheckedSigner</a></div><div class="hide link depth-3"><a href="/api/providers/api-providers/">API Providers</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#etherscanprovider">EtherscanProvider</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#infuraprovider">InfuraProvider</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#alchemyprovider">AlchemyProvider</a></div><div class="hide link depth-4"><a href="/api/providers/api-providers/#cloudfrontprovider">CloudfrontProvider</a></div><div class="hide link depth-3"><a href="/api/providers/other/">Other Providers</a></div><div class="hide link depth-4"><a href="/api/providers/other/#fallbackprovider">FallbackProvider</a></div><div class="hide link depth-4"><a href="/api/providers/other/#ipcprovider">IpcProvider</a></div><div class="
2019-12-14 06:05:10 +03:00
<a name="bignumber"></a><a name="bignumber"></a><h1 class="show-anchors"><div>BigNumber<div class="anchors"><a class="self" href="#bignumber"></a></div></div></h1>
<p>Explain about BigNumber here...</p>
2019-12-14 06:05:10 +03:00
<a name="importing"></a><h3 class="show-anchors"><div>Importing<div class="anchors"><a class="self" href="#importing"></a></div></div></h3>
<div class="code"><span class="comment">/////</span><br><span class="comment">// CommonJS:</span><br><br><span class="comment">// From the Umbrella ethers package...</span><br>const { BigNumber } = require("ethers");<br><br><span class="comment">// From the bignumber pacakge...</span><br>const { BigNumber } = require("@ethersproject/bignumber");<br><br><br><span class="comment">/////</span><br><span class="comment">// ES6 and TypeScript:</span><br><br><span class="comment">// From the Umbrella ethers package...</span><br>import { BigNumber } from "ethers";<br><br><span class="comment">// From the bignumber pacakge...</span><br>import { BigNumber } from "@ethersproject/bignumber";<br></div>
2019-12-14 06:05:10 +03:00
<a name="types"></a><h2 class="show-anchors"><div>Types<div class="anchors"><a class="self" href="#types"></a></div></div></h2>
2019-12-14 06:05:10 +03:00
<a name="bignumberish"></a><a name="bignumberish"></a><h3 class="show-anchors"><div>BigNumberish<div class="anchors"><a class="self" href="#bignumberish"></a></div></div></h3>
<p>Many functions and methods in this library take in values which can be non-ambiguously and safely converted to a BigNumber. These values can be sepcified as:</p>
2019-12-14 06:05:10 +03:00
<div class="definition show-anchors"><div class="term"><b><i>string</i></b></div><div class="body"><p>A <a href="/api/utils/bytes/#hexstring">hexstring</a> or a decimal string, either of which may be negative.</p></div></div>
<div class="definition show-anchors"><div class="term"><b><i>BytesLike</i></b></div><div class="body"><p>A <a href="/api/utils/bytes/#byteslike">BytesLike</a> Object, such as an Array or Uint8Array.</p></div></div>
<div class="definition show-anchors"><div class="term"><b><i>BigNumber</i></b></div><div class="body"><p>An existing BigNumber instance.</p></div></div>
<div class="definition show-anchors"><div class="term"><b><i>number</i></b></div><div class="body"><p>A number that is within the safe range for JavaScript numbers.</p></div></div>
<div class="definition show-anchors"><div class="term"><b><i>BigInt</i></b></div><div class="body"><p>A JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt">BigInt</a> object, on environments that support BigInt.</p></div></div>
<a name="creating-instances"></a><h2 class="show-anchors"><div>Creating Instances<div class="anchors"><a class="self" href="#creating-instances"></a></div></div></h2>
<p>The constructor of BigNumber cannot be called directly. Instead, Use the static <code class="inline">BigNumber.from</code>.</p>
2019-12-14 06:05:10 +03:00
<div class="property show-anchors"><div class="signature"><span class="path">BigNumber</span> . <span class="method">from</span> ( <span class="param">aBigNumberish</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"></div></div><div class="body"><p>Returns an instance of a <b>BigNumber</b> for <i>aBigNumberish</i>.</p></div></div>
<a name="examples:"></a><h3 class="show-anchors"><div>Examples:<div class="anchors"><a class="self" href="#examples:"></a></div></div></h3>
2020-02-02 08:53:22 +03:00
<div class="code"><br><span class="comment">// From a decimal string...</span><br>BigNumber.from("42")<br><span class="result ok">// { BigNumber: "42" }</span><br><br><span class="comment">// From a hexstring...</span><br>BigNumber.from("0x2a")<br><span class="result ok">// { BigNumber: "42" }</span><br><br><span class="comment">// From a negative hexstring...</span><br>BigNumber.from("-0x2a")<br><span class="result ok">// { BigNumber: "-42" }</span><br><br><span class="comment">// From an Array (or Uint8Array)...</span><br>BigNumber.from([ 42 ])<br><span class="result ok">// { BigNumber: "42" }</span><br><br><span class="comment">// From an existing BigNumber...</span><br>let one1 = constants.One;<br>let one2 = BigNumber.from(one1)<br><br>one2<br><span class="result ok">// { BigNumber: "1" }</span><br><br><span class="comment">// ...which returns the same instance</span><br>one1 === one2<br><span class="result ok">// true</span><br><br><span class="comment">// From a (safe) number...</span><br>BigNumber.from(42)<br><span class="result ok">// { BigNumber: "42" }</span><br><br><span class="comment">// From a ES2015 BigInt... (only on platforms with BigInt support)</span><br>BigNumber.from(42n)<br><span class="result ok">// { BigNumber: "42" }</span><br><br><span class="comment">// Numbers outside the safe range fail:</span><br>BigNumber.from(Number.MAX_SAFE_INTEGER);<br><span class="result error">// Error: overflow (fault="overflow", operation="BigNumber.from", value=9007199254740991, version=bignumber/5.0.0-beta.135)</span><br></div>
2019-12-14 06:05:10 +03:00
<a name="methods"></a><h2 class="show-anchors"><div>Methods<div class="anchors"><a class="self" href="#methods"></a></div></div></h2>
<p>The BigNumber class is immutable, so no operations can change the value it represents.</p>
2019-12-14 06:05:10 +03:00
<a name="math-operations"></a><h3 class="show-anchors"><div>Math Operations<div class="anchors"><a class="self" href="#math-operations"></a></div></div></h3>
2020-02-02 08:53:22 +03:00
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">add</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L71">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> <b>+</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">sub</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L75">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> <b>&ndash;</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">mul</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L87">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> <b>&times;</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">div</span> ( <span class="param">divisor</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L79">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> <b>&#247;</b> <i>divisor</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">mod</span> ( <span class="param">divisor</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L91">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of the <b>remainder</b> of <i>bignumber</i> &#247; <i>divisor</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">pow</span> ( <span class="param">exponent</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L95">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> to the power of <i>exponent</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">abs</span> ( ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L64">source</a></div></div><div class="body"><p>Returns a BigNumber with the absolute value of <i>bignumber</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">maskn</span> ( <span class="param">bitcount</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L99">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> with bits beyond the <i>bitcount</i> least significant bits set to zero.</p></div></div>
2019-12-14 06:05:10 +03:00
<a name="two's-compliment"></a><h3 class="show-anchors"><div>Two's Compliment<div class="anchors"><a class="self" href="#two's-compliment"></a></div></div></h3>
<p><a href="https://en.wikipedia.org/wiki/Two%27s_complement">Two's Complicment</a> is an elegant method used to encode and decode fixed-width signed values while efficiently preserving mathematic operations. Most users will not need to interact with these.</p>
2020-02-02 08:53:22 +03:00
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">fromTwos</span> ( <span class="param">bitwidth</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L56">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> converted from twos-compliment with <i>bitwidth</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">toTwos</span> ( <span class="param">bitwidth</span> ) <span class="arrow">&rArr;</span> <span class="returns"><a href="/api/utils/bignumber/">BigNumber</a></span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L60">source</a></div></div><div class="body"><p>Returns a BigNumber with the value of <i>bignumber</i> converted to twos-compliment with <i>bitwidth</i>.</p></div></div>
2019-12-14 06:05:10 +03:00
<a name="comparison-and-equivalence"></a><h3 class="show-anchors"><div>Comparison and Equivalence<div class="anchors"><a class="self" href="#comparison-and-equivalence"></a></div></div></h3>
2020-02-02 08:53:22 +03:00
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">eq</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L103">source</a></div></div><div class="body"><p>Returns true if and only if the value of <i>bignumber</i> is equal to <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">lt</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L107">source</a></div></div><div class="body"><p>Returns true if and only if the value of <i>bignumber</i> <b>&lt;</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">lte</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L111">source</a></div></div><div class="body"><p>Returns true if and only if the value of <i>bignumber</i> <b>&le;</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">gt</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L115">source</a></div></div><div class="body"><p>Returns true if and only if the value of <i>bignumber</i> <b>&gt;</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">gte</span> ( <span class="param">otherValue</span> ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L119">source</a></div></div><div class="body"><p>Returns true if and only if the value of <i>bignumber</i> <b>&ge;</b> <i>otherValue</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">isZero</span> ( ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L123">source</a></div></div><div class="body"><p>Returns true if and only if the value of <i>bignumber</i> is zero.</p></div></div>
2019-12-14 06:05:10 +03:00
<a name="conversion"></a><h3 class="show-anchors"><div>Conversion<div class="anchors"><a class="self" href="#conversion"></a></div></div></h3>
2020-02-02 08:53:22 +03:00
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">toNumber</span> ( ) <span class="arrow">&rArr;</span> <span class="returns">number</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L127">source</a></div></div><div class="body"><p>Returns the value of <i>bignumber</i> as a JavaScript value.</p><p>This will <b>throw an error</b> if the value is greater than or equal to <i>Number.MAX_SAFE_INTEGER</i> or less than or equal to <i>Number.MIN_SAFE_INTEGER</i>.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">toString</span> ( ) <span class="arrow">&rArr;</span> <span class="returns">string</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L136">source</a></div></div><div class="body"><p>Returns the value of <i>bignumber</i> as a base-10 string.</p></div></div>
<div class="property show-anchors"><div class="signature"><span class="path">bignumber</span> . <span class="method">toHexString</span> ( ) <span class="arrow">&rArr;</span> <span class="returns">string&lt;&thinsp;<a href="/api/utils/bytes/#datahexstring">DataHexstring</a>&thinsp;&gt;</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L144">source</a></div></div><div class="body"><p>Returns the value of <i>bignumber</i> as a base-16, `0x`-prefixed <a href="/api/utils/bytes/#hexstring">hexstring</a>.</p></div></div>
2019-12-14 06:05:10 +03:00
<a name="inspection"></a><h3 class="show-anchors"><div>Inspection<div class="anchors"><a class="self" href="#inspection"></a></div></div></h3>
2020-02-02 08:53:22 +03:00
<div class="property show-anchors"><div class="signature"><span class="path">BigNumnber</span> . <span class="method">isBigNumber</span> ( <span class="param">object</span> ) <span class="arrow">&rArr;</span> <span class="returns">boolean</span><div class="anchors"><a class="source" href="https://github.com/ethers-io/ethers.js/blob/ethers-v5-beta/packages/bignumber/src.ts/bignumber.ts#L197">source</a></div></div><div class="body"><p>Returns true if and only if the <i>object</i> is a BigNumber object.</p></div></div>
2019-12-14 06:05:10 +03:00
<a name="examples"></a><h3 class="show-anchors"><div>Examples<div class="anchors"><a class="self" href="#examples"></a></div></div></h3>
2020-02-02 08:53:22 +03:00
<div class="code"><br>let a = BigNumber.from(42);<br>let b = BigNumber.from("91");<br><br> a.mul(b);<br><span class="result ok"> // { BigNumber: "3822" }</span><br></div>
2019-12-14 06:05:10 +03:00
<a name="notes"></a><h2 class="show-anchors"><div>Notes<div class="anchors"><a class="self" href="#notes"></a></div></div></h2>
<p>A few short notes on numbers...</p>
2019-12-14 06:05:10 +03:00
<a name="why-can't-i-just-use-numbers?"></a><h3 class="show-anchors"><div>Why can't I just use numbers?<div class="anchors"><a class="self" href="#why-can't-i-just-use-numbers?"></a></div></div></h3>
<p>The first problem many encounter when dealing with Ethereum is the concept of numbers. Most common currencies are broken down with very little granularity. For example, there are only 100 cents in a single dollar. However, there are 10<sup>18</sup> <b>wei</b> in a single <b>ether</b>.</p><p>JavaScript uses <a href="https:<i>en.wikipedia.org/wiki/Double-precision_floating-point_format">IEEE 754 double-precision binary floating point</a> numbers to represent numeric values. As a result, there are </i>holes<i> in the integer set after 9,007,199,254,740,991; which is problematic for </i>Ethereum// because that is only around 0.009 ether (in wei), which means any value over that will begin to experience rounding errors.</p><p>To demonstrate how this may be an issue in your code, consider:</p>
2020-02-02 08:53:22 +03:00
<div class="code">(Number.MAX_SAFE_INTEGER + 2 - 2) == (Number.MAX_SAFE_INTEGER)<br><span class="result ok">// false</span><br></div>
<p>To remedy this, all numbers (which can be large) are stored and manipulated as <a href="/api/utils/bignumber/">Big Numbers</a>.</p><p>The functions <a href="http:<i>linkto">parseEther( etherString )</a> and <a href="http:</i>linkto">formatEther( wei )</a> can be used to convert between string representations, which are displayed to or entered by the user and Big Number representations which can have mathematical operations handled safely.</p><div class="footer"><div class="nav previous"><a href="/api/utils/abi/"><span class="arrow">&larr;</span>Application Binary Interface</a></div> <div class="nav next"><a href="/api/utils/bytes/">Byte Manipulation<span class="arrow">&rarr;</span></a></div></div><div class="copyright">The content of this site is licensed under the <a href="https://choosealicense.com/licenses/cc-by-4.0/">Creative Commons Attribution 4.0 International License</a>.</div></div><script src="/script.js" type="text/javascript"></script></body></html><!-- ContentHash:663fd16a88741be54ff177935f6e4b5f6e7879e55c06c2bdb56f0c20618bbb84 -->