Feature: Add Graphql API Implementation. - #390
Merged
Merged
Conversation
- redirect property-management to use propchain-traits for ReentrancyGuard instead of propchain-contracts, eliminating duplicate __ink_generate_metadata linker error when building the cdylib - fix set_liquidity_mining_campaign missing admin timelock guard - fix execute_governance_proposal not applying new_fee_bips on passed proposals - fix limit order auto-execution blocked by reentrancy guard; extract execute_order_core so process_executable_limit_orders can call it without double-locking the non_reentrant guard
|
@Lansa-18 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
@Lansa-18 fix CI. |
- Add burn() function allowing contract admin to burn tokens - Only admin can burn tokens for supply management - Checks token exists and is not locked in bridge operation - Decrements total_supply counter - Clears token ownership, approvals, and balances - Emits Transfer event (to zero address) and TokenBurned event - TokenBurned event includes reason field for audit trail - Add TokenBurned event with token_id, burned_by, and reason fields Use cases: - Supply management and tokenomics control - Regulatory compliance requirements - Removing tokens from circulation - Managing token economics
- Add ShareStakeInfo struct and LockPeriod enum to types.rs - Add share_reward_pool storage field to PropertyToken - Initialize all staking storage fields in constructor - Fix type mismatch in snapshot total_supply (u64 to u128 cast) - Add REWARD_RATE_PRECISION constant for staking calculations - Fix ShareLockPeriod references to use LockPeriod - Add #[allow(clippy::too_many_arguments)] to vesting function - Remove unnecessary casts in vesting calculations - Fix non_reentrant macro ambiguity in escrow contract - Add #[allow(clippy::too_many_arguments)] to audit functions All compilation errors fixed. Property-token and escrow contracts now pass cargo check, cargo fmt, and cargo clippy.
Contributor
Author
|
@LaGodxy Fixed the CI errors. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #171
Feature: GraphQL API for PropChain Indexer (#171)
Goal
Add a GraphQL endpoint to the existing
propchain-indexerAxum server so clients can query blockchain events and contracts with field selection, complex filtering, and schema introspection — without replacing the existing REST API.📁 Files Modified
indexer/Cargo.tomlasync-graphql = { version = "7", features = ["chrono", "uuid"] }indexer/src/graphql.rsindexer/src/main.rsmod graphql, built the schema, mounted/graphqlroutesWhat Was Achieved
GqlEvent— aSimpleObjectGraphQL output type mapped from the existingIndexedEventdb type, with camelCase field exposureEventFilterInput— a GraphQLInputObjectmirroringEventQuery, supporting filtering by contract, event type, topic, timestamp range, block range, limit, and offsetQueryRootwith two resolvers:events(filter)— queriescontract_eventswith all filter optionscontracts— returns a distinct list of indexed contract addressesPOST /graphql— executes GraphQL queries (via native AxumJsonextractor, without theasync-graphql-axumcrate)GET /graphql— serves the GraphiQL in-browser IDE playground