https://github.com/sambacha/solidity-tools
ethereum/solidity tools/scripts/etc
https://github.com/sambacha/solidity-tools
ast erc20 erc721 ethereum evm grammar parser smart-contracts solidity
Last synced: 5 months ago
JSON representation
ethereum/solidity tools/scripts/etc
- Host: GitHub
- URL: https://github.com/sambacha/solidity-tools
- Owner: sambacha
- Created: 2020-08-19T10:59:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-15T20:57:36.000Z (about 5 years ago)
- Last Synced: 2025-10-11T01:57:33.298Z (9 months ago)
- Topics: ast, erc20, erc721, ethereum, evm, grammar, parser, smart-contracts, solidity
- Language: JavaScript
- Homepage:
- Size: 6.58 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Smart Contract Tools
## Overview
> Various Tools for working with contracts
### Gwei Contract Monitor
Alerts for Contracts for *potential* attacks through transactions
### Solidity AST Generator
### Overview
`$ sh parse.sh`
#### Output
```json
{
"type": "Program",
"body": [
{
"type": "ContractStatement",
"name": "MyContract",
"is": [],
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "DeclarativeExpression",
"name": "counter",
"literal": {
"type": "Type",
"literal": "uint",
"members": [],
"array_parts": []
},
"is_constant": false,
"is_public": false,
"is_memory": false
},
"right": {
"type": "Literal",
"value": 0
}
}
},
{
"type": "FunctionDeclaration",
"name": "Count",
"params": null,
"modifiers": null,
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "UpdateExpression",
"operator": "++",
"argument": {
"type": "Identifier",
"name": "counter"
},
"prefix": false
}
}
]
},
"is_abstract": false
},
{
"type": "FunctionDeclaration",
"name": "CallCount",
"params": null,
"modifiers": null,
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "Count"
},
"arguments": []
}
}
]
},
"is_abstract": false
},
{
"type": "FunctionDeclaration",
"name": "Send",
"params": null,
"modifiers": null,
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "msg"
},
"property": {
"type": "Identifier",
"name": "sender"
},
"computed": false
},
"property": {
"type": "Identifier",
"name": "send"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"value": 1
}
]
}
}
]
},
"is_abstract": false
},
{
"type": "FunctionDeclaration",
"name": "Call",
"params": null,
"modifiers": null,
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"arguments": [],
"callee": {
"type": "MemberExpression",
"property": {
"type": "Identifier",
"name": "call"
},
"computed": false,
"object": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"object": {
"type": "MemberExpression",
"object": {
"type": "Identifier",
"name": "msg"
},
"property": {
"type": "Identifier",
"name": "sender"
},
"computed": false
},
"property": {
"type": "Identifier",
"name": "value"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"value": 1
}
]
}
}
}
}
]
},
"is_abstract": false
}
]
}
]
}
```
## License
ISC