-
Notifications
You must be signed in to change notification settings - Fork 116
Add-credential-create-transaction #863
New issue
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
Add-credential-create-transaction #863
Conversation
* add AMMInstanceCreate * update definitions to get AMMInstanceCreate working * fix lint errors * add unit test for Instance Create * fix lint errors * fix definitions and change AmmCreate to AMMInstanceCreate * fix lint error * add AMMInfo * update AMMInfo docstring * add docstring to AMMInfo params * update definitions.json * remove AMMAccount from AMMInstanceCreate model * add AMMDeposit * fix lint errors * add AMMWithdraw * add AMMVote * add AMMBid * fix typo * update AMMBid test * add MaxSlotPrice param to AMMBid * refactor test * update definitions and replace AMMHash with AMMID * update lptokens type to IssuedCurrencyAmount * assert with error message * assert with error messages for AMMInstanceCreate and amm_info * move to_xrpl tests to test_base_model * rename lptokens to lp_tokens * update amm_info request params to be in snake_case * update docstrings * reorder SPECIAL_CAMELCASE_STRINGS to alphabetical order * refactor ABBREVIATIONS to be set in one place * rename LPTokens to LPToken * update CHANGELOG.md * fix typo * fix lint error * refactor max trading fee to be in one place * update amm_bid error message * add AuthAccount base model for AMMBid * update definitions to fix AMM in LEDGER_ENTRY_TYPES * update CHANGELOG.md to specify XLS-30 * update wording on AMMDeposit & AMMWithdraw validation errors * add negative FeeVal check * add negative TradingFee check * fix lint error * export AuthAccount model * add AuthAccount and refactor special case models check * revert Path and _value_to_tx_json() changes * fix AuthAccount capitalization issues (XRPLF#432) Co-authored-by: Omar Khan <[email protected]> * add AMMBid codec-fixture * add AMMInstanceCreate codec-fixture * update definitions.json with different AuthAccounts number * remove AMM codec-fixtures * Change amm_info asset parameters to Currency type * API name changes with updated definitions.json * rename amm_info param asset1 -> asset * change AMM_MAX_TRADING_FEE to 1% and rename fee_val to trading_fee * rename MinBidPrice -> BidMin and MaxBidPrice -> BidMax * update definitions to change Asset & Asset2 nth values to 3 & 4 * Use asset/asset2 instead of amm_id for Deposit/Withdraw/Bid/Vote * update definitions * add Issue type * add flags to AMM deposit & withdraw * add Issue model * add Issue type to models with asset & asset2; remove amm_id * resolve lint errors * rename LPToken in amm deposit & withdraw * update docstrings * add AMM codec-fixtures * add one asset withdraw & withdraw all tests * update definitions.json with refactored error codes * add Owner Reserve Fee for AMMCreate transaction * refactor asset pair to be Currency type * update amm_info asset pair to be Currency type and remove Issue model * update definitions and codec-fixtures * update DiscountedFee definition * update definitions and codec-fixtures * update definitions * remove sidechain method * small refactor * update docstrings * refactor _value_to_tx_json to remove special case for auth_account * refactor AuthAccount to be a NestedModel * remove test_base_model tests for amm * add test_to_xrpl_auth_accounts * fix indentation with tests * update definitions * add AMMDelete * add AMMDelete docstring --------- Co-authored-by: Mayukha Vadari <[email protected]>
[cherry-pick] add AMM support (XRPLF#422)
Update remote repo
Update type
Pulling set_fee tx updates
Add default value of NULL for optional fields
Codeowners file
Add nft token metadata
Caution Review failedThe pull request is closed. WalkthroughAdds AMM feature support (transactions, requests, flags, codec schema/type Issue), expands XChain, Oracle, DID, CredentialCreate models, updates transaction parsing/encoding (from_blob/from_xrpl, network_id, signing), adjusts SetFee (pre/post amendment), refactors AccountSet flags, updates fee calc to use owner-reserve for AMMCreate, and adds extensive tests/fixtures and metadata. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor App
participant TxModel as Transaction
participant Codec as Binary Codec
participant Net as Network/Client
App->>TxModel: from_xrpl(value)
activate TxModel
TxModel->>TxModel: _process_xrpl_json + key/value normalization
TxModel-->>App: Transaction instance
App->>TxModel: blob()
TxModel->>Codec: encode(to_xrpl())
Codec-->>TxModel: hex blob
TxModel-->>App: hex blob
App->>TxModel: is_signed()
TxModel-->>App: bool (single or multi-sig)
rect rgba(200,230,255,0.3)
note right of TxModel: New flow: from_blob
App->>TxModel: from_blob(tx_blob)
TxModel->>Codec: decode(tx_blob)
Codec-->>TxModel: XRPL JSON
TxModel-->>App: Transaction instance
end
sequenceDiagram
autonumber
actor App
participant Fee as asyncio.transaction.main
participant Cl as Client
participant Server as rippled (server_state)
App->>Fee: calculate_base_fee(tx=AMMCreate, client=?)
alt client provided
Fee->>Cl: _request_impl(ServerState)
Cl-->>Fee: server_state(reserve_inc)
Fee->>Fee: _fetch_owner_reserve_fee(reserve_inc)
Fee-->>App: owner-reserve-based fee
else no client
Fee-->>App: _OWNER_RESERVE_FEE
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (53)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
High Level Overview of Change
Context of Change
Type of Change
Did you update CHANGELOG.md?
Test Plan
Summary by CodeRabbit