This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose a richer token decoding schema.
From an ERC20 decoded transaction, one can now fetch the symbol of the token contract, total supply and balances. Resolves #42.
- Loading branch information
Raúl Kripalani
committed
Jun 29, 2018
1 parent
13ee810
commit c35b096
Showing
9 changed files
with
338 additions
and
51 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,2 @@ | ||
src/abi/ | ||
dist/ |
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
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
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
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 |
---|---|---|
@@ -1,26 +1,44 @@ | ||
# import Account, DecodedTransaction from "core.graphql" | ||
|
||
type ERC20Transfer implements DecodedTransaction { | ||
type TokenContract { | ||
account: Account | ||
symbol: String | ||
totalSupply: Long | ||
} | ||
|
||
interface ERC20Transaction { | ||
tokenContract: TokenContract | ||
} | ||
|
||
type TokenHolder { | ||
account: Account! | ||
tokenBalance: Long | ||
} | ||
|
||
type ERC20Transfer implements DecodedTransaction & ERC20Transaction { | ||
standard: String | ||
operation: String | ||
from: Account | ||
to: Account | ||
from: TokenHolder | ||
to: TokenHolder | ||
value: String | ||
tokenContract: TokenContract | ||
} | ||
|
||
type ERC20TransferFrom implements DecodedTransaction { | ||
type ERC20TransferFrom implements DecodedTransaction & ERC20Transaction { | ||
standard: String | ||
operation: String | ||
from: Account | ||
to: Account | ||
from: TokenHolder | ||
to: TokenHolder | ||
value: String | ||
spender: Account | ||
spender: TokenHolder | ||
tokenContract: TokenContract | ||
} | ||
|
||
type ERC20Approve implements DecodedTransaction { | ||
standard: String | ||
operation: String | ||
from: Account | ||
spender: Account | ||
from: TokenHolder | ||
spender: TokenHolder | ||
value: String | ||
tokenContract: TokenContract | ||
} |
Oops, something went wrong.