-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(station)!: multi chain support #374
Open
olaszakos
wants to merge
20
commits into
main
Choose a base branch
from
multi-chain-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
In this PR: - add Asset repository - add Asset model validation - add validation - remove static asset list - add ICP asset at init_canister step --------- Co-authored-by: Kepler Vital <[email protected]>
Add asset management UI: - assets page - asset create/edit dialog - asset request operation components - UI tests Limitations / known issues: - Standards autocomplete picker shows the code vs. the localized name of the standard. - new Accounts are created for ICP, even if another asset is selected, thats because it is hard coded currently --- Added to the sidebar: <img width="333" alt="image" src="https://github.com/user-attachments/assets/9ec840ba-c105-44f5-89ec-442cbbb4c4f8"> Assets page: <img width="1312" alt="image" src="https://github.com/user-attachments/assets/904e00b9-fbed-48b5-b091-9fc3a37b7164"> Add new asset: <img width="908" alt="image" src="https://github.com/user-attachments/assets/5cab6d89-da51-4f1a-a6c5-e5c8c56b02c6"> Edit asset: <img width="917" alt="image" src="https://github.com/user-attachments/assets/6acb7cb8-d712-4dda-8f43-14dfd1352e9c"> Peding edit request: <img width="1301" alt="image" src="https://github.com/user-attachments/assets/8ed708f1-4f17-4adb-8b94-b6aee5511333"> Peding edit request details: <img width="905" alt="image" src="https://github.com/user-attachments/assets/a2fc01dd-e258-4278-ae40-fa282157a93f"> --------- Co-authored-by: Kepler Vital <[email protected]>
Disabled checks: - Frontend validation - Migration tests --------- Co-authored-by: mraszyk <[email protected]> Co-authored-by: Kepler Vital <[email protected]>
This PR adds ICRC-1 support for the station. Adding the default ICP asset to an account now generates 2 addresses for the account: AccountIdentifier and ICRC-1 Account. They reference the same account in the ICP ledger.
Todo: - [x] add frontend tests - [x] update locales - [x] remove duplicated account name - [x] make index canister optional and display a warning when transactions cannot be loaded if it's missing - [x] fix icrc1 address shortening ...c0337e7f4d424...dec70df... - [x] unify address display across the frontend - [x] account page Requests button should filter for Accounts - [x] fix notification error -- `was local dev issue with unmigrated account` - [x] disallow removing an asset if any accounts reference it - [x] localize assets page standards - [x] fix edit account request views - [x] restore ICP/ICRC1 asset creation custom form fields POST MVP: - [ ] show fee at transfer - [ ] add icrc1/icp ledger interfaces to UI (dfx generate) - [ ] fetch when the dialog is displayed --------- Co-authored-by: Kepler Vital <[email protected]>
### STATION 1. [x] create ICP asset and set up asset management permissions and policies 2. [x] migrate models: - [x] Account - remove `blockchain` - remove `address` - remove `standard` - remove `symbol` - remove `decimals - remove `balance` - add `seed` - add `assets` - add `addresses` - [x] Transfer - add from_asset - add with_standard - RequestOperation - [x] EditAccount - add `change_assets` - [x] TransferOperation - add `asset` - [x] TransferOperationInput - add `from_asset_id` - add `with_standard` - [x] AddAccountOperationInput - add `assets` - remove `blockchain` - remove `standard` - [x] AddAddressBookEntryOperationInput - add address_format - [x] AddressBookEntry - add address_format 3. [x] update integration tests 4. [x] add snapshot generation test ### UPGRADER: 1. [x] ~migrate accounts~ support both old and new model 2. [x] update DR spec --------- Co-authored-by: Kepler Vital <[email protected]>
keplervital
reviewed
Nov 4, 2024
Addressing the following tickets: 1. [x] [Transfer form should keep transfer btn disabled if address format is invalid](https://dfinity.atlassian.net/browse/PEN-335) 2. [x] [Add assets dashboard page](https://dfinity.atlassian.net/browse/PEN-337) New dashboard page: ![image](https://github.com/user-attachments/assets/353b34d4-7b1e-458f-8639-ea2b951feaae) --------- Co-authored-by: Kepler Vital <[email protected]>
roelstorms
reviewed
Nov 11, 2024
/// The account id, which is a UUID. | ||
pub type AccountId = UUID; | ||
pub type AccountSeed = UUID; | ||
|
||
/// Represents a account in the system. | ||
/// | ||
/// A account can be associated with one or more users and can only hold one type of asset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is no longer accurate.
Problem: 1. The station syncs all assets and accounts to the upgrader on any account and asset change. The accounts change on each balance query since the new balance is saved back to the repository. This results in very frequent unnecessary syncs. 2. The upgrader log size is growing rapidly. Trimming is necessary, but it cannot be trimmed due to the stable Log structure only supporting append operation. Task: 1. [x] only sync assets and accounts when the change is relevant - ie. any field of the DR version of the entries change 2. [x] switch to a stable BTreeMap to keep the logs and limit the log size to 25k items Also bundled a small fix for a missing asset foreign key check. --------- Co-authored-by: Kepler Vital <[email protected]>
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.
design doc:
https://docs.google.com/document/d/1l8u2-m2lH-FeN6tLJv80pqUnHpWIy3ROkz7jxTz0HtM/edit?tab=t.0#heading=h.lic4oqo4af1m
Jira ticket: https://dfinity.atlassian.net/browse/PEN-142?atlOrigin=eyJpIjoiNTExMDU0ODUzODFjNDRjNDhlMDEzNTI1OTdjOWRlMDAiLCJwIjoiaiJ9