<divclass="link title"><ahref="/v5/">Documentation</a></div><divclass="base show link depth-1"><ahref="/v5/getting-started/">Getting Started</a></div><divclass="base show link depth-1"><ahref="/v5/concepts/">Ethereum Basics</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/events/">Events</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/gas/">Gas</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/security/">Security</a></div><divclass="hide link depth-2"><ahref="/v5/concepts/best-practices/">Best Practices</a></div><divclass="base show link depth-1"><ahref="/v5/api-keys/">Provider API Keys</a></div><divclass="base ancestor show link depth-1"><ahref="/v5/api/">Application Programming Interface</a></div><divclass="show link depth-2"><ahref="/v5/api/providers/">Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/provider/">Provider</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/jsonrpc-provider/">JsonRpcProvider</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/api-providers/">API Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/other/">Other Providers</a></div><divclass="hide link depth-3"><ahref="/v5/api/providers/types/">Types</a></div><divclass="show link depth-2"><ahref="/v5/api/signer/">Signers</a></div><divclass="show link depth-2"><ahref="/v5/api/contract/">Contract Interaction</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/contract/">Contract</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/contract-factory/">ContractFactory</a></div><divclass="hide link depth-3"><ahref="/v5/api/contract/example/">Example: ERC-20 Contract</a></div><divclass="ancestor show link depth-2"><ahref="/v5/api/utils/">Utilities</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/abi/">Application Binary Interface</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/coder/">AbiCoder</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/formats/">ABI Formats</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/fragments/">Fragments</a></div><divclass="hide link depth-4"><ahref="/v5/api/utils/abi/interface/">Interface</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/address/">Addresses</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/bignumber/">BigNumber</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/bytes/">Byte Manipulation</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/constants/">Constants</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/display-logic/">Display Logic and Input</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/encoding/">Encoding Utilities</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/fixednumber/">FixedNumber</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/hashing/">Hashing Algorithms</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/hdnode/">HD Wallet</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/logger/">Logging</a></div><divclass="myself ancestor ancestor show link depth-3"><ahref="/v5/api/utils/properties/">Property Utilities</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/signing-key/">Signing Key</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/strings/">Strings</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/transactions/">Transactions</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/web/">Web Utilities</a></div><divclass="show link depth-3"><ahref="/v5/api/utils/wordlists/">Wordlists</a></div><divclass="show link depth-2"><ahref="/v5/api/other/">Other Libraries</a></div><divclass="hide link depth-3"><ahref="/v5/api/other/assembly/">Assembly</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/dialect/">Ethers ASM Dialect</a></div><divclass="hide link depth-4"><ahref="/v5/api/other/assembly/api/">Utilities</a></div><divclass="hidelinkde
<aname="property-utilities"></a><h1class="show-anchors"><div>Property Utilities<divclass="anchors"><aclass="self"href="/v5/api/utils/properties/#property-utilities"></a></div></div></h1><p>This is a collection of utility functions used for handling properties in a platform-safe way.</p>
<p>The next major version of ethers will no longer be compatible with ES3, so many of these will be removed in favor of the built-in options available in ES2015 and above.</p>
<divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">checkProperties</span><spanclass="symbol">(</span><spanclass="param">object</span><spanclass="symbol">,</span><spanclass="param">check</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">void</span><divclass="anchors"></div></div><divclass="body"><p>Checks that <i>object</i> only contains properties included in <i>check</i>, and throws <ahref="/v5/api/utils/logger/#errors--invalid-argument">INVALID_ARGUMENT</a> if not.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">deepCopy</span><spanclass="symbol">(</span><spanclass="param">anObject</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">any</span><divclass="anchors"></div></div><divclass="body"><p>Creates a recursive copy of <i>anObject</i>. Frozen (i.e. and other known immutable) objects are copied by reference.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">defineReadOnly</span><spanclass="symbol">(</span><spanclass="param">anObject</span><spanclass="symbol">,</span><spanclass="param">name</span><spanclass="symbol">,</span><spanclass="param">value</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">void</span><divclass="anchors"></div></div><divclass="body"><p>Uses the <codeclass="inline">Object.defineProperty</code> method to set a read-only property on an object.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">getStatic</span><spanclass="symbol">(</span><spanclass="param">aConstructor</span><spanclass="symbol">,</span><spanclass="param">key</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">any</span><divclass="anchors"></div></div><divclass="body"><p>Recursively check for a static method <i>key</i> on an inheritance chain from <i>aConstructor</i> to all ancestors.</p>
<p>This is used to mimic behaviour in other languages where <codeclass="inline">this</code> in a static method will also search ancestors.</p>
</div></div><aname="utils-resolveproperties"></a><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">resolveProperties</span><spanclass="symbol">(</span><spanclass="param">anObject</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">Promise< any ></span><divclass="anchors"><aclass="self"href="/v5/api/utils/properties/#utils-resolveproperties"></a><aclass="source"href="https://github.com/ethers-io/ethers.js/blob/master/packages/properties/src.ts/index.ts#L32">source</a></div></div><divclass="body"><p>Retruns a Promise which resolves all child values on <i>anObject</i>.</p>
</div></div><divclass="property show-anchors"><divclass="signature"><spanclass="path">ethers</span><spanclass="symbol">.</span><spanclass="path">utils</span><spanclass="symbol">.</span><spanclass="method">shallowCopy</span><spanclass="symbol">(</span><spanclass="param">anObject</span><spanclass="symbol">)</span><spanclass="arrow">⇒</span><spanclass="returns">any</span><divclass="anchors"></div></div><divclass="body"><p>Returns a shallow copy of <i>anObject</i>. This is the same as using <codeclass="inline">Object.assign({ }, anObject)</code>.</p>
<divclass="copyright">The content of this site is licensed under the <ahref="https://choosealicense.com/licenses/cc-by-4.0/">Creative Commons License</a>. Generated on February 8, 2021, 3:25pm.</div>