aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/abi_encoder/calldata/calldata.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-11-28 07:28:26 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-11-29 08:38:11 +0800
commitf479212410b238a7673983148f403b3a220083af (patch)
tree4d3ebe1ee98ec0a03b8eb99275878f5cc2062123 /packages/utils/src/abi_encoder/calldata/calldata.ts
parentffb8b0a619be3b8fb30a6acc99f590a6b40d49e1 (diff)
downloaddexon-sol-tools-f479212410b238a7673983148f403b3a220083af.tar
dexon-sol-tools-f479212410b238a7673983148f403b3a220083af.tar.gz
dexon-sol-tools-f479212410b238a7673983148f403b3a220083af.tar.bz2
dexon-sol-tools-f479212410b238a7673983148f403b3a220083af.tar.lz
dexon-sol-tools-f479212410b238a7673983148f403b3a220083af.tar.xz
dexon-sol-tools-f479212410b238a7673983148f403b3a220083af.tar.zst
dexon-sol-tools-f479212410b238a7673983148f403b3a220083af.zip
Style cleanup. Improved wording of some error messages.
Diffstat (limited to 'packages/utils/src/abi_encoder/calldata/calldata.ts')
-rw-r--r--packages/utils/src/abi_encoder/calldata/calldata.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/packages/utils/src/abi_encoder/calldata/calldata.ts b/packages/utils/src/abi_encoder/calldata/calldata.ts
index c57ff08c2..6d8814e06 100644
--- a/packages/utils/src/abi_encoder/calldata/calldata.ts
+++ b/packages/utils/src/abi_encoder/calldata/calldata.ts
@@ -59,7 +59,7 @@ export class Calldata {
offset += block.getSizeInBytes();
}
// Generate hex string
- const hexString = this._rules.annotate ? this._toAnnotatedString() : this._toCondensedString();
+ const hexString = this._rules.annotate ? this._toHumanReadableCallData() : this._toEvmCompatibeCallDataHex();
return hexString;
}
/**
@@ -131,10 +131,7 @@ export class Calldata {
}
}
}
- /**
- * Returns EVM-compatible calldata as a Hex string.
- */
- private _toCondensedString(): string {
+ private _toEvmCompatibeCallDataHex(): string {
// Sanity check: must have a root block.
if (_.isUndefined(this._root)) {
throw new Error('expected root');
@@ -152,7 +149,7 @@ export class Calldata {
return hexValue;
}
/**
- * Returns human-redable calldata.
+ * Returns human-readable calldata.
*
* Example:
* simpleFunction(string[], string[])
@@ -173,7 +170,7 @@ export class Calldata {
* 0xe0 0000000000000000000000000000000000000000000000000000000000000005 array2[1]
* 0x100 576f726c64000000000000000000000000000000000000000000000000000000
*/
- private _toAnnotatedString(): string {
+ private _toHumanReadableCallData(): string {
// Sanity check: must have a root block.
if (_.isUndefined(this._root)) {
throw new Error('expected root');