Skip to content
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(platform)!: token support [WIP] #2428

Open
wants to merge 1 commit into
base: v2.0-dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .github/package-filters/js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
- .github/workflows/tests*
- packages/wallet-utils-contract/**

'@dashevo/token-history-contract': &token-history-contract
- .github/workflows/tests*
- packages/token-history-contract/**

'@dashevo/dashpay-contract': &dashpay-contract
- .github/workflows/tests*
- packages/dashpay-contract/**
Expand Down Expand Up @@ -30,6 +34,7 @@
- *dpns-contract
- *withdrawals-contract
- *wallet-utils-contract
- *token-history-contract
- packages/rs-platform-serialization/**
- packages/rs-platform-serialization-derive/**
- packages/rs-platform-value/**
Expand Down Expand Up @@ -80,6 +85,7 @@ dashmate:
- *masternode-reward-shares-contract
- *dpns-contract
- *withdrawals-contract
- *token-history-contract
- *wallet-lib
- *dapi-client

Expand Down
5 changes: 5 additions & 0 deletions .github/package-filters/rs-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ wallet-utils-contract: &wallet-utils-contract
- .github/workflows/tests*
- packages/wallet-utils-contract/**

token-history-contract: &token-history-contract
- .github/workflows/tests*
- packages/token-history-contract/**

dashpay-contract: &dashpay-contract
- .github/workflows/tests*
- packages/dashpay-contract/**
Expand Down Expand Up @@ -30,6 +34,7 @@ dpp: &dpp
- *dpns-contract
- *withdrawals-contract
- *wallet-utils-contract
- *token-history-contract
- *json-schema-compatibility-validator
- packages/rs-platform-serialization/**
- packages/rs-platform-serialization-derive/**
Expand Down
60 changes: 33 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ members = [
"packages/rs-json-schema-compatibility-validator",
"packages/check-features",
"packages/wallet-utils-contract",
"packages/token-history-contract"
]
[workspace.package]

Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ COPY --parents \
packages/feature-flags-contract \
packages/dpns-contract \
packages/wallet-utils-contract \
packages/token-history-contract \
packages/data-contracts \
packages/strategy-tests \
packages/simple-signer \
Expand Down Expand Up @@ -419,6 +420,7 @@ COPY --parents \
packages/rs-drive-abci \
packages/dashpay-contract \
packages/wallet-utils-contract \
packages/token-history-contract \
packages/withdrawals-contract \
packages/masternode-reward-shares-contract \
packages/feature-flags-contract \
Expand Down Expand Up @@ -508,6 +510,7 @@ COPY --parents \
packages/dashpay-contract \
packages/withdrawals-contract \
packages/wallet-utils-contract \
packages/token-history-contract \
packages/masternode-reward-shares-contract \
packages/feature-flags-contract \
packages/dpns-contract \
Expand Down Expand Up @@ -628,6 +631,7 @@ COPY --from=build-dashmate-helper /platform/packages/js-grpc-common packages/js-
COPY --from=build-dashmate-helper /platform/packages/dapi-grpc packages/dapi-grpc
COPY --from=build-dashmate-helper /platform/packages/dash-spv packages/dash-spv
COPY --from=build-dashmate-helper /platform/packages/wallet-utils-contract packages/wallet-utils-contract
COPY --from=build-dashmate-helper /platform/packages/token-history-contract packages/token-history-contract
COPY --from=build-dashmate-helper /platform/packages/withdrawals-contract packages/withdrawals-contract
COPY --from=build-dashmate-helper /platform/packages/masternode-reward-shares-contract packages/masternode-reward-shares-contract
COPY --from=build-dashmate-helper /platform/packages/feature-flags-contract packages/feature-flags-contract
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"test:dashpay-contract": "ultra -r --filter \"packages/@(dashpay-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test",
"test:dpns-contract": "ultra -r --filter \"packages/@(dpns-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test",
"test:feature-flags-contract": "ultra -r --filter \"packages/@(feature-flags-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test",
"test:token-history-contract": "ultra -r --filter \"packages/@(token-history-contract|js-dash-sdk|js-drive|js-dapi-client|wasm-dpp|wallet-lib|dapi|platform-test-suite)\" test",
"test:dapi-client": "ultra -r --filter \"packages/@(js-dapi-client|wallet-lib|js-dash-sdk|platform-test-suite)\" test",
"test:sdk": "ultra -r --filter \"packages/@(js-dash-sdk|platform-test-suite)\" test",
"test:spv": "ultra -r --filter \"packages/@(dash-spv|js-dapi-client)\" test",
Expand Down Expand Up @@ -65,7 +66,8 @@
"packages/masternode-reward-shares-contract",
"packages/dash-spv",
"packages/wasm-dpp",
"packages/withdrawals-contract"
"packages/withdrawals-contract",
"packages/token-history-contract"
],
"resolutions": {
"elliptic": "6.5.7",
Expand Down
12 changes: 10 additions & 2 deletions packages/dapi-grpc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
// Derive features for versioned messages
//
// "GetConsensusParamsRequest" is excluded as this message does not support proofs
const VERSIONED_REQUESTS: [&str; 30] = [
const VERSIONED_REQUESTS: [&str; 34] = [
"GetDataContractHistoryRequest",
"GetDataContractRequest",
"GetDataContractsRequest",
Expand Down Expand Up @@ -78,14 +78,18 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
"GetEvonodesProposedEpochBlocksByIdsRequest",
"GetEvonodesProposedEpochBlocksByRangeRequest",
"GetStatusRequest",
"GetIdentityTokenBalancesRequest",
"GetIdentitiesTokenBalancesRequest",
"GetIdentityTokenInfosRequest",
"GetIdentitiesTokenInfosRequest",
];

// The following responses are excluded as they don't support proofs:
// - "GetConsensusParamsResponse"
// - "GetStatusResponse"
//
// "GetEvonodesProposedEpochBlocksResponse" is used for 2 Requests
const VERSIONED_RESPONSES: [&str; 29] = [
const VERSIONED_RESPONSES: [&str; 33] = [
"GetDataContractHistoryResponse",
"GetDataContractResponse",
"GetDataContractsResponse",
Expand Down Expand Up @@ -115,6 +119,10 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
"GetVotePollsByEndDateResponse",
"GetTotalCreditsInPlatformResponse",
"GetEvonodesProposedEpochBlocksResponse",
"GetIdentityTokenBalancesResponse",
"GetIdentitiesTokenBalancesResponse",
"GetIdentityTokenInfosResponse",
"GetIdentitiesTokenInfosResponse",
];

check_unique(&VERSIONED_REQUESTS).expect("VERSIONED_REQUESTS");
Expand Down
Loading
Loading