We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The AMM consists of two contracts therefore we can separate the indexer into two modules.
Each index should contain functions in the format index_<event_name>.
index_<event_name>
E.g.
#[indexer(manifest = "<path/to/file/amm.manifest.yaml>")] mod amm_index { fn index_register_pool_event(event: RegisterPoolEvent, block: BlockData) { ... } } #[indexer(manifest = "<path/to/file/amm-exchange.manifest.yaml>")] mod amm_exchange_index { fn index_add_liquidity_event(event: AddLiquidityEvent, block: BlockData) { ... } // more events }
Each type in graphql should have a required field.
required
Certain event fields would benefit from the @indexed directive.
@indexed
RegisterPoolEvent
AddLiquidityEvent
DepositEvent
RemoveLiquidityEvent
SwapEvent
WithdrawEvent
From the BlockData we should retrieve the block height and add it to each event so that we have a measure of time for when the event took place.
BlockData
The text was updated successfully, but these errors were encountered:
Closing in favor of #605
Sorry, something went wrong.
No branches or pull requests
Indexer Guideline
The AMM consists of two contracts therefore we can separate the indexer into two modules.
Each index should contain functions in the format
index_<event_name>
.E.g.
Each type in graphql should have a
required
field.Certain event fields would benefit from the
@indexed
directive.RegisterPoolEvent
AddLiquidityEvent
DepositEvent
RemoveLiquidityEvent
SwapEvent
WithdrawEvent
From the
BlockData
we should retrieve the block height and add it to each event so that we have a measure of time for when the event took place.The text was updated successfully, but these errors were encountered: