-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into filipe/substreams-mappings
- Loading branch information
Showing
6 changed files
with
89 additions
and
1 deletion.
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,5 @@ | ||
--- | ||
'@graphprotocol/graph-ts': minor | ||
--- | ||
|
||
add starknet data types |
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,39 @@ | ||
import '../common/eager_offset'; | ||
import { Bytes } from '../common/collections'; | ||
import { BigInt } from '../common/numbers'; | ||
|
||
export namespace starknet { | ||
export class Block { | ||
constructor( | ||
public number: BigInt, | ||
public hash: Bytes, | ||
public prevHash: Bytes, | ||
public timestamp: BigInt, | ||
) {} | ||
} | ||
|
||
export class Transaction { | ||
constructor( | ||
public type: TransactionType, | ||
public hash: Bytes, | ||
) {} | ||
} | ||
|
||
export enum TransactionType { | ||
DEPLOY = 0, | ||
INVOKE_FUNCTION = 1, | ||
DECLARE = 2, | ||
L1_HANDLER = 3, | ||
DEPLOY_ACCOUNT = 4, | ||
} | ||
|
||
export class Event { | ||
constructor( | ||
public fromAddr: Bytes, | ||
public keys: Array<Bytes>, | ||
public data: Array<Bytes>, | ||
public block: Block, | ||
public transaction: Transaction, | ||
) {} | ||
} | ||
} |
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