Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
prettymuchbryce committed Jan 30, 2018
1 parent 047b7eb commit 3ff5425
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 115 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The MIT License (MIT)
Copyright (c) 2018 Bryce Neal

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
### Resources
### abidecoder

- https://ethereum.github.io/yellowpaper/paper.pdf
- https://github.com/CoinCulture/evm-tools/blob/master/analysis/guide.md
- https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI
- https://media.consensys.net/technical-introduction-to-events-and-logs-in-ethereum-a074d65dd61e
- https://github.com/ConsenSys/abi-decoder/blob/master/index.js
- https://github.com/web3j/web3j/blob/fc5c992f4ff750916ba597086c01bb24f4c679bd/core/src/main/java/org/web3j/protocol/core/methods/response/AbiDefinition.java
- https://github.com/ethereum/web3.js/blob/530c4a3b1d7bc787c90e9b0e35fd3c9ae560d76e/lib/solidity/coder.js
- https://github.com/ethereum/web3.js/tree/develop/lib/solidity
- https://github.com/web3j/web3j/tree/master/abi/src/main/java/org/web3j/abi
> A port of [abi-decoder](https://github.com/ConsenSys/abi-decoderhttps://github.com/ConsenSys/abi-decoder) to Kotlin for use with Kotlin/Java projects.
### usage
103 changes: 0 additions & 103 deletions example-abi.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/main/kotlin/com/prettymuchbryce/abidecoder/Decoder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Decoder {

for (i in entry.inputs.indices) {
val input = entry.inputs[i]
var param: Param? = null
var param: Param?

if (input.indexed) {
val topic = log.topics[topicsIndex].removePrefix("0x")
Expand All @@ -133,7 +133,7 @@ class Decoder {
param = Param(input.name, input.type.toString(), decoded[dataIndex]!!)
dataIndex++
}
decodedParams.add(param!!)
decodedParams.add(param)
}

val decodedLog = DecodedLog(entry.name, log.address, decodedParams)
Expand Down

0 comments on commit 3ff5425

Please sign in to comment.