Skip to content

Commit

Permalink
feat: added -hx, --hideExpand <variables> option to storage command
Browse files Browse the repository at this point in the history
chore: bumped version to 2.5.9
  • Loading branch information
naddison36 committed Aug 15, 2023
1 parent 7034a7c commit 0091b4a
Show file tree
Hide file tree
Showing 20 changed files with 7,462 additions and 1,445 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Options:
-u, --url <url> URL of the Ethereum node to get storage values if the `data` option is used. (default: "http://localhost:8545", env: NODE_URL)
-bn, --block <number> Block number to get the contract storage values from. (default: "latest")
-a, --array <number> Number of slots to display at the start and end of arrays. (default: "2")
-hx, --hideExpand <variables> Comma-separated list of storage variables to not expand. That's arrays, structs, strings or bytes.
-hv, --hideValue Hide storage slot value column. (default: false)
-h, --help display help for command
```
Expand Down
2,758 changes: 1,382 additions & 1,376 deletions examples/storage/TestStorage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/converterAST2Classes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/converterClasses2Storage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface StorageSection {
* @param contractFilename relative path of the contract in the file system
* @return storageSections array of storageSection objects
*/
export declare const convertClasses2StorageSections: (contractName: string, umlClasses: UmlClass[], arrayItems: number, contractFilename?: string) => StorageSection[];
export declare const convertClasses2StorageSections: (contractName: string, umlClasses: UmlClass[], arrayItems: number, contractFilename?: string, noExpandVariables?: string[]) => StorageSection[];
/**
* Recursively adds new storage sections under a class attribute.
* also returns the allowed enum values
Expand All @@ -57,7 +57,7 @@ export declare const convertClasses2StorageSections: (contractName: string, umlC
* @return storageSection new storage section that was added or undefined if none was added.
* @return enumValues array of allowed enum values. undefined if attribute is not an enum
*/
export declare const parseStorageSectionFromAttribute: (attribute: Attribute, umlClass: UmlClass, otherClasses: readonly UmlClass[], storageSections: StorageSection[], mapping: boolean, arrayItems: number) => {
export declare const parseStorageSectionFromAttribute: (attribute: Attribute, umlClass: UmlClass, otherClasses: readonly UmlClass[], storageSections: StorageSection[], mapping: boolean, arrayItems: number, noExpandVariables: string[]) => {
storageSection: StorageSection;
enumValues?: string[];
};
Expand Down
22 changes: 12 additions & 10 deletions lib/converterClasses2Storage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions lib/sol2uml.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/utils/regEx.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export declare const ethereumAddress: RegExp;
export declare const ethereumAddresses: RegExp;
export declare const commaSeparatedList: RegExp;
export declare const isAddress: (input: string) => boolean;
export declare const parseSolidityVersion: (compilerVersion: string) => string;
4 changes: 3 additions & 1 deletion lib/utils/regEx.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/utils/validators.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export declare const validateAddress: (address: string) => string;
export declare const validateAddresses: (addresses: string) => string[];
export declare const validateVariables: (variables: string) => string[];
export declare const validateLineBuffer: (lineBufferParam: string) => number;
33 changes: 14 additions & 19 deletions lib/utils/validators.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0091b4a

Please sign in to comment.