aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-doc/src
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-09-18 05:23:55 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-09-18 07:31:30 +0800
commit5b07669bd0e128a92c8a71d797ac95d77337209b (patch)
tree1c6a6992021d9d3347c13de2689cedcd2d3294ac /packages/sol-doc/src
parent3c7155afb07f17c62d7203c43bddeb4a3c5b7b01 (diff)
downloaddexon-sol-tools-5b07669bd0e128a92c8a71d797ac95d77337209b.tar.gz
dexon-sol-tools-5b07669bd0e128a92c8a71d797ac95d77337209b.tar.zst
dexon-sol-tools-5b07669bd0e128a92c8a71d797ac95d77337209b.zip
add and test support for fallback functions
Diffstat (limited to 'packages/sol-doc/src')
-rw-r--r--packages/sol-doc/src/solidity_doc_generator.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/sol-doc/src/solidity_doc_generator.ts b/packages/sol-doc/src/solidity_doc_generator.ts
index 513468803..3501e9a52 100644
--- a/packages/sol-doc/src/solidity_doc_generator.ts
+++ b/packages/sol-doc/src/solidity_doc_generator.ts
@@ -1,6 +1,7 @@
import * as _ from 'lodash';
import {
+ AbiDefinition,
ConstructorAbi,
DataItem,
DevdocOutput,
@@ -100,10 +101,13 @@ function _genDocSection(compiledContract: StandardContractOutput): DocSection {
// that's because the type of the events array doesn't have any fields for documentation!
break;
case 'function':
+ case 'fallback':
docSection.methods.push(_genMethodDoc(abiDefinition, compiledContract.devdoc));
break;
default:
- throw new Error(`unknown and unsupported AbiDefinition type '${abiDefinition.type}'`);
+ throw new Error(
+ `unknown and unsupported AbiDefinition type '${(abiDefinition as AbiDefinition).type}'`,
+ );
}
}