-
Notifications
You must be signed in to change notification settings - Fork 94
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
Runtime API for polkadex-ido #439
Merged
Merged
Conversation
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
zktony
previously approved these changes
Jun 14, 2022
LGTM |
felixfaisal
added
the
A3-InProgress
Pull request is in progress. No review needed at this stage.
label
Jun 14, 2022
pavankanteti
added
A0-PleaseReview
Pull request needs code review.
and removed
A3-InProgress
Pull request is in progress. No review needed at this stage.
labels
Jun 15, 2022
serhii-temchenko
requested changes
Jun 15, 2022
serhii-temchenko
approved these changes
Jun 17, 2022
Gauthamastro
approved these changes
Jun 22, 2022
Gauthamastro
added a commit
that referenced
this pull request
Oct 5, 2022
* fix: add thea client and pallet (#412) * Integrate ido to mainnet runtime (#416) * add: IDO Pallet * fix: update dependency file * fix: integrate ido with runtime * fix: include assets in testnet genesis config * refactor: Polkadex_Ido to polkadex-ido * refactor: remove Polkadex_Ido * remove: assets config * fix: dependency issues * fix: remove orml dependencies and code * fix: reorder pallets as per index * Create pull_request_template.md (#425) * fix: update ido with polkadex_primitives changes (#431) * Updated chain_spec (#423) * Integrate OCEX pallet to runtime (#434) * Test token provider pallet for testnet (#424) * add: skeleton pallet * fix: add AssetManager and skeleton extrinsic * add: demo minting function * add: mock runtime environment with dependencies * add: small mvp with unit tests * fix: integrate token provider with runtime * fix: validate_unsigned in token provider * fix: validation logic for minting tokens * fix: minting native token * refactor: update manifest * fix: asset_id for ether * fix: build errors due to deps * fix: hardcoded asset_id * fix: provide accout to resolve priority issue * fix: update pallet with upstream changes (#437) * Runtime API for polkadex-ido (#439) * fix: update unit tests with primitives * fix: add api for polkadex-ido * fix: build errors * fix: include ido rpc in node * fix: changes required for testnet * fix: remove random eviction and unit tests for fcfs * fix: update faucet token asset * fix: remove redundant lines and debug messages * Integrate Chainbridge and AssetHandler Pallet (#411) * Added Chainbridge Pallet * Updated chainbridge Pallet * Added new AssetHandler Pallet * Updated runtime * Added test files * Fixed tests * Updated Pallet description * Save files * Added weight * Added copyrights * Fixed Clippy Warnings * Fixed formatting issue * Included chainbridge tests * Added copyrights * Fixed tests * Refactored asset handler signature to be consistent and refactored tests * Removed unused imports * Extended docblocks * Code style fixes * Code Formatted Co-authored-by: Serhii Temchenko <serhii@polkadex.trade> * Fixed Mint Asset Extrinsic and amount precision (#473) * Changed datatypes * fixed chainbridge issues * weights for OCEX extrinsics and proper weight annotation (#486) * Testing OCEX pallet (#479) * Updated OCEX Pallet * Merged latest gj-ocex * fix: allowing test tokens for a few assetids * fix: update asset_id * fix: update extrinsic * fix: asset * fix: token amount * fix: updating asset amount * fix: remove unwrap causing panic * Refactor register_enclave * Saved new chnages * fix: updated mock environment * fix: moved tests to mock * add: pallet_timestamp dev deps * fix: add tests module * fix: add new test ext function * fix: add dev dependency for testing * add: single test for registering main account * fix: add unit tests for extrinsics * fix: add deposit tests * fix: add tests for open_trading_pair extrinsic * fix: add tests for close_trading_pair extrinsic * fix: testing collect_fees extrinsic * fix: add dev deps for MRR tests * fix: add function to calculate MMR for accounts * fix: add tests for submitting snapshot * fix: submit_snapshot extrinsic * fix: add tests for register_enclave extrinsic * fix: add tests for shutdown * fix: add event assertion in tests * fix: ingress messages assertion in testcases * fix: add bad origin test for shutdown * fix: add bad origin test for withdrawal * fix: add bad origin test for register_enclave * fix: add bad origin test for submit_snapshot * fix: add bad origin test for collect_fees * fix: bad origin test for close trading pairs * fix: bad origin test for open_trading_pair * fix: bad origin test for deposit * fix: bad origin test for register_trading_pair * fix: bad origin test for add_proxy_account * fix: bad origin test for register_main_account * fix: add proxy limit test * fix: add success withdrawal test * fix: adding withdrawal test with a valid snapshot instance * fix: updating lock file * Update register_main_account to add proxy account correctly (#484) * Integrated council governence * Changed comment * Added concil * fix: balance assertions * fix: add trailing empty line * fix: remove unused account_id * fix: remove example pallet in mock.rs * Fix Compilation * Change back the branch * Added orderbook council (#487) * Added orderbook council * Added new paramenters * Upgrade to polkadot-v0.9.28 (#488) * Upgrade to polkadot-v0.9.28 * fix: ocex pallet compilation * fix: typo Co-authored-by: Faisal Ahmed <faisalahmedfarooq46@gmail.com> * fix: cleanup tests * fix: remove EnsureOneOf and use EitherOfDiverse * fix: updated withdrawal extrinsic with BoundedBTreeMap * fix: updated snapshot tests * fix: updated succesfull tests to include BoundedBTreeMap * fix: updated tests for collect_fees * fix: added sp_io as a dev dependency for testing * fix: assert_ok for enclave empty report * fix: annotate insert_enclave with #[doc(hidden)] * fix: remove comment in cargo.toml * refactor: add trailing empty line * fix: add Cargo.lock * Adds Chainbridge and AssetHandler * Adds Chainbridge and AssetHandler * Code style fixes * fix: remove accidental comment * fix: update register_enclave test and extrinsic * Fix Snapshot Nonce in ocex * Fix Snapshot Nonce in ocex * Fix Snapshot Nonce in ocex * fix: add rpcs and update tests Co-authored-by: zktony <zktony@protonmail.com> Co-authored-by: zktony <86763036+zktony@users.noreply.github.com> Co-authored-by: Gautham <Gauthamastro@gmail.com> Co-authored-by: Serhii Temchenko <serhii@polkadex.trade> * Added remove proxy extrinsic (#489) * Integrated remove proxy * Added proxy extrinsic * Added remove proxy extrinsic * Impl delay for withdrawals above a certain limit (#490) * Integrated remove proxy * Added proxy extrinsic * Added remove proxy extrinsic * Updated withdrawal * Resolved Gautham comment * Resolved compilation issue * added test cases * Fixed order * Removed expect * Added test cases * Updated weights * Refactor Withdrawals (#497) * fix: add onchain_events * fix: update tests * fix: assertions for onchainevent for withdrawal claimed * fix: add remove_proxy extrinsic which was accidentally removed * fix: add doc for onchaineventsfilled * fix: add test for onchain_events overflow * fix: add on_initialize test * fix: update withdrawal struct with fees for tests * fix: remove rpc implementation as no longer required * fix: remove data insertions outside ensure macro * fix: update OnchainEventsFilled to OnchainEventsBoundedVecOverflow * fix: update comments and remove panic * fix: add weights for submit_snapshot and withdraw * fix: updating weights for submit_snapshot * fix: add benchmarks manually * Update lib.rs * fix: update dep for polkadex-primitives * fix: comments for storage item Co-authored-by: Gautham <Gauthamastro@gmail.com> * Fix CI in develop * Update build-ci.yml * fix: tests for ocex (#498) * Update build-ci.yml (#501) * Fix chainspec (#504) * . (#505) * [428] Improve CI/CD (#506) * Code style fixes * Added fmt check in CI * Added fmt check action task * Added wasm toolchain to ci * Code style fixes * Handled unhandled result * Usage of deprecated method replaced with correct one * Removed unused imports * Added compiler flag to fail CI build on warnings * Code style fixes (clippy) * Added CI clippy check * Updated branch name in CI * Activated and updated CI code coverage * Installed clippy as a component in CI * Code style fixes * fix minor issues with ocex pallet (#514) * enabled 24 hr removal of registered enclaves * enabled 24 hr removal of registered enclaves * change withdrawal ext to claim_withdraw * add arugment accounted to claim-withdraw extrinsic * unwrap replaced with safe unwrap_or_else (#517) Co-authored-by: Ivan Temchenko <35359595i@gmail.com> * fee collect by ob-council (#515) * fee collect with orderbook council (governance) * fix typo * Replace Balance type with Decimal (#516) * Add rust-decimal instead of Balance * Fix cargo test * Fixed tests * Update deposit extrinsic (#518) * fix: add deposit overflow check * fix: update deposit to 10^27 from 10^21 * fix: add unit tests for deposit overflow * fix: update unit test for deposit overflow * Cargo fmt and remove faucet and ido * Fixing cargo tests.rs * fix: warnings and remove unused code (#520) * fix: warnings and remove unused code * fix: remove unused variables * fix: remove create_withdrawal_500 * Tests passing * Some stuff * Delete unused RPC code * fix: failing unit tests of onchain events overflow (#521) Co-authored-by: zktony <zktony@protonmail.com> Co-authored-by: Faisal Ahmed <42486737+felixfaisal@users.noreply.github.com> * Code style fix (#519) * Code style fix * Clippy fix * Fix Field change * remove TradingPairStatus (#511) * remove tradingPairStatus * fix cargo fmt * fix cargo clippy * fix cargo fmt * fix fmt and clippy warnings * updated test cases * fix fmt - again * Set Fees to default in `submit_snapshot` (#513) * fix: set fees to default in submit_snapshot * fix: register_enclave test has been completed * fix: tests and ci formatting * fix: apply formatting with nightly flag * Implemented Token whitelisting for CB Pallet (#523) * Added token whitelisting in AssetHandler Pallet * Fixed tests * Fixed formatting issue * Updated collected fee * Resolved comments * Fixed formating issue * Fixed tarpaulin CI run command * Remove unused var Co-authored-by: Serhii Temchenko <serhii@polkadex.trade> * Add extrinsic to update trading pair config (#522) * Add rust-decimal instead of Balance * Fix cargo test * Fixed tests * Update deposit extrinsic (#518) * fix: add deposit overflow check * fix: update deposit to 10^27 from 10^21 * fix: add unit tests for deposit overflow * fix: update unit test for deposit overflow * Cargo fmt and remove faucet and ido * Fixing cargo tests.rs * fix: warnings and remove unused code (#520) * fix: warnings and remove unused code * fix: remove unused variables * fix: remove create_withdrawal_500 * fix: add extrinsic to update market config * fix: unit tests for update trading pair ext * fix: ensure params do not overflow * fix: formating for CI * fix: apply fmt with nightly flag * refactor: StorageOverflow to AmountOverflow * fix: update tests to include overflows * fix: add checks for zero and subsequent tests * fix: resolve ci checks Co-authored-by: Gautham <gauthamastro@gmail.com> Co-authored-by: zktony <zktony@protonmail.com> * Whitelisting of enclaves (#526) * fix: add extrinsic to whitelist enclave account_ids * fix: add unit tests for the new extrinsics * fix: review comments * fix: updated inline comments * Get Balances RPC call (#510) * fix: add rpc for account balances in asset-handler pallet * fix: apply fmt with nightly flag * fix: add unit test for account_balances helper function * fix: apply review comment fixes * fix: codecov config * Fix balances RPC (#528) * Update lib.rs * fix: RPC account_balances * fix: add if condition for withdrawals onchain events (#500) * fix: add if condition for withdrawals onchain events * fix: update lock file * fix: unit tests failing * Trading Pair Min volume (#524) * trading pair min volume logic fixed * fixed fmt * worked on commments * added comments * added edge case test case, fixed naming conventions * added the comments backed * fixed typo * fixed typo * Min volume condition for Update trading pair (#547) * checked min volume condition in update trading pair pallet and added Test case for it * fixed formatting * relayer checked done before proceeding for further calculations (#549) * Validation for Asset precision (#530) * fix: adding validation logic for asset precision * fix: Updating tests and validation logic for precision * fix: Fixes based on PR comments * fix: accidental merge changes * fix: update cargo.lock file * Impl token allowlisting for OCEX Pallet (#527) * Added * Fixed clippy warning * Fixed formating issue * Changed from whitelist to allowlist * Solved formmatting issues * Format Co-authored-by: Gautham <gauthamastro@gmail.com> * fix: free pending withdrawals after succesful transfer (#553) * fix: collect fees extrinsics (#552) * fix: collect-fees * fix: update collect fees extrinsic * fix: add while loop * refactor: apply rustfmt fixes * fix: return error if transfer fails * fix: add test for overflow in collect-fees * Fix arithmetic (#551) * fixed unsafe aritmetic in register trading pair * fixed unsafe aritmetic in update trading pair * safe arithmetics used in ocex pallet * fixed arithmetics in asst handler pallet * fixed ci * instead of storing result in variable, return it directly * Made claim_withdraw feeless (#556) * fix: extrinsic for exchange state (#550) * fix: extrinsic for exchange state * fix: update unit tests * fix: add unit tests for exchange state * fix: failing unit test * fix: deposit event upon updating exchange state * fix: merge Develop * changed error msg (#558) * fix: withdrawal double spend bug (#548) * fix: withdrawal double spend bug * refactor: rustfmt fixes * refactor: do not remove key from btree_map * fix: apply CI fixes * fix: apply clippy warnings fix * fix: apply review comments fix * Update version (#557) * Nuel/fix release issues (#554) * - fix for deposit validation - add operational status check for trading pairs * add checks so asset_id created from same * fix clippy and added nightly to script * fix tests * fix tests * Add unwrap Co-authored-by: Gautham <gauthamastro@gmail.com> * Fix Comments (#560) * Fix Comments Co-authored-by: Faisal Ahmed <42486737+felixfaisal@users.noreply.github.com> Co-authored-by: zktony <86763036+zktony@users.noreply.github.com> Co-authored-by: Serhii Temchenko <serhii@polkadex.trade> Co-authored-by: Ivan Temchenko <35359595i@gmail.com> Co-authored-by: zktony <zktony@protonmail.com> Co-authored-by: serhii-temchenko <107397548+serhii-temchenko@users.noreply.github.com> Co-authored-by: Emmanuel Thomas <50878033+nuel77@users.noreply.github.com> Co-authored-by: Nakul Amate <nakul.amate@gmail.com>
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.
This PR includes the following: