prettymuchbryce / abidecoder

Kotlin and Java library for decoding data params and events from ethereum transactions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

abidecoder

A port of abi-decoder to Kotlin for use with Kotlin/Java projects.

Installation

adding as a dependency to your Maven project:
<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>
	
<dependency>
	<groupId>org.github.prettymuchbryce</groupId>
	<artifactId>abidecoder</artifactId>
	<version>master-SNAPSHOT</version>
</dependency>
or your Gradle project:
repositories {
	maven { url 'https://jitpack.io' }
}
compile 'com.github.prettymuchbryce:abidecoder:master-SNAPSHOT'

Usage

package main;

import com.prettymuchbryce.abidecoder.Decoder;

public class Main {
	public static void main(String[] args) {
		Decoder d = new Decoder();
		d.addAbi(myAbiJsonString);
		Decoder.DecodedMethod result = d.decodeMethod(methodData);
		System.out.print(result);
	}
}

Please see unit tests for more usage examples.

About

Kotlin and Java library for decoding data params and events from ethereum transactions

License:MIT License


Languages

Language:Kotlin 100.0%