-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
3,804 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Create the ABIs directory if it doesn't exist | ||
mkdir -p abis | ||
|
||
# Iterate over all JSON files in the out directory and its subdirectories | ||
find out -name '*.json' | while read -r file; do | ||
# Extract the contract name from the file path | ||
contract_name=$(basename "$file" .json) | ||
|
||
# Check if the ABI is not empty using jq | ||
if jq -e '.abi | length > 0' "$file" > /dev/null; then | ||
# Extract the ABI and save it to the ABIs directory | ||
jq '.abi' "$file" > "abis/${contract_name}.abi.json" | ||
echo "Extracted ABI for $contract_name" | ||
else | ||
echo "Skipped $contract_name as its ABI is empty" | ||
fi | ||
done | ||
|
||
echo "All non-empty ABIs have been extracted to the ABIs directory." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[ | ||
{ | ||
"type": "function", | ||
"name": "increment", | ||
"inputs": [], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "number", | ||
"inputs": [], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
} | ||
], | ||
"stateMutability": "view" | ||
}, | ||
{ | ||
"type": "function", | ||
"name": "setNumber", | ||
"inputs": [ | ||
{ | ||
"name": "newNumber", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
} | ||
], | ||
"outputs": [], | ||
"stateMutability": "nonpayable" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[ | ||
{ | ||
"type": "function", | ||
"name": "supportsInterface", | ||
"inputs": [ | ||
{ | ||
"name": "interfaceId", | ||
"type": "bytes4", | ||
"internalType": "bytes4" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "", | ||
"type": "bool", | ||
"internalType": "bool" | ||
} | ||
], | ||
"stateMutability": "view" | ||
} | ||
] |
Oops, something went wrong.