From d08aa653f5e1ac05d1eac6cfa745b2f3eca0912c Mon Sep 17 00:00:00 2001 From: Li Xuanji Date: Mon, 24 Sep 2018 16:27:21 -0400 Subject: [PATCH] specify `AbiCoder::encode` more precisely --- source/ethers.js/source/api-advanced.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/ethers.js/source/api-advanced.rst b/source/ethers.js/source/api-advanced.rst index 05566ef..26634c3 100644 --- a/source/ethers.js/source/api-advanced.rst +++ b/source/ethers.js/source/api-advanced.rst @@ -313,6 +313,11 @@ Prototype Returns a :ref:`hex string ` of the *values* encoded as the *types*. If names is provided, *values* may contain named keys for tuples, otherwise each tuple expects an Array. Throws if a value is invalid for the type. + + Formally, this returns `enc((values[0], values[1] ... ))` where `enc` is this + `function `_ + defined in the Solidity documentation, and where `values[i]` is an instance of type + `types[i]`. :sup:`prototype` . decode ( [ names , ] types , data ) Returns an Object by parsing *data* assuming *types*, with each parameter