aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-24 12:00:23 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commit6d832deb62cdef38c5fa69169986ef00dbc6e1eb (patch)
treea8f6eac5dbf5573ef17a5a603beaff7e2ba9c4fd /packages
parent0b6c9c84688b565a9000b2c4e889c682ccaa7e51 (diff)
downloaddexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.tar
dexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.tar.gz
dexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.tar.bz2
dexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.tar.lz
dexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.tar.xz
dexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.tar.zst
dexon-sol-tools-6d832deb62cdef38c5fa69169986ef00dbc6e1eb.zip
Decodes revert reason as array to appease Geth
Diffstat (limited to 'packages')
-rw-r--r--packages/base-contract/src/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts
index 814b052b0..9723dc9c8 100644
--- a/packages/base-contract/src/index.ts
+++ b/packages/base-contract/src/index.ts
@@ -82,7 +82,7 @@ export class BaseContract {
}
protected static _throwIfRevertWithReasonCallResult(rawCallResult: string): void {
if (rawCallResult.slice(REVERT_ERROR_SELECTOR_OFFSET, REVERT_ERROR_SELECTOR_END) === REVERT_ERROR_SELECTOR) {
- const revertReason = AbiEncoder.create('(string)').decode(
+ const revertReason = AbiEncoder.create('(string)').decodeAsArray(
ethers.utils.hexDataSlice(rawCallResult, REVERT_ERROR_SELECTOR_BYTES_LENGTH),
);
throw new Error(revertReason);