Skip to content

Commit 2f6c878

Browse files
committed
feature: Update for rcnet-v2-phase-2
1 parent 5d19b9a commit 2f6c878

31 files changed

+470
-389
lines changed

core-rust/Cargo.lock

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core-rust/Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ members = [
2121
# $ git push origin "release_name-BLAH"
2222
# * Then use tag="release_name-BLAH" in the below dependencies.
2323
#
24-
sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e", features = ["serde"] }
25-
transaction = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
26-
transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
27-
radix-engine-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e", features = ["serde"] }
28-
radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
29-
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
30-
radix-engine-constants = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
31-
radix-engine-stores = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
32-
radix-engine-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
33-
radix-engine-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e" }
34-
utils = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-638673d16e", features = ["serde"] }
24+
sbor = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267", features = ["serde"] }
25+
transaction = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
26+
transaction-scenarios = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
27+
radix-engine-common = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267", features = ["serde"] }
28+
radix-engine-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
29+
radix-engine = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
30+
radix-engine-constants = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
31+
radix-engine-stores = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
32+
radix-engine-store-interface = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
33+
radix-engine-queries = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267" }
34+
utils = { git = "https://github.com/radixdlt/radixdlt-scrypto", tag = "rcnet-v2-phase-2-bc272a1267", features = ["serde"] }
3535

3636
jni = { version = "0.19.0" }
3737
tracing = { version = "0.1" }

core-rust/core-api-server/core-api-schema.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6567,10 +6567,9 @@ components:
65676567
StatePackageResponse:
65686568
type: object
65696569
required:
6570-
- royalty
65716570
- owner_role
65726571
properties:
6573-
royalty:
6574-
$ref: "#/components/schemas/Substate"
65756572
owner_role:
65766573
$ref: "#/components/schemas/Substate"
6574+
royalty:
6575+
$ref: "#/components/schemas/Substate"

core-rust/core-api-server/src/core_api/conversions/substates/access_controller.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ use radix_engine_queries::typed_substate_layout::*;
77

88
pub fn to_api_access_controller_substate(
99
context: &MappingContext,
10-
substate: &AccessControllerSubstate,
10+
substate: &FieldSubstate<AccessControllerSubstate>,
1111
) -> Result<models::Substate, MappingError> {
12-
let data = scrypto_encode(substate).unwrap();
13-
1412
Ok(field_substate!(
1513
substate,
1614
AccessControllerFieldState,
17-
{
15+
substate => {
16+
let data = scrypto_encode(substate).unwrap();
17+
},
18+
Value {
1819
data_struct: Box::new(to_api_data_struct_from_bytes(context, &data)?),
1920
}
2021
))

core-rust/core-api-server/src/core_api/conversions/substates/access_rules_module.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ use radix_engine_queries::typed_substate_layout::*;
77

88
pub fn to_api_owner_role_substate(
99
context: &MappingContext,
10-
substate: &OwnerRoleSubstate,
10+
substate: &FieldSubstate<OwnerRoleSubstate>,
1111
) -> Result<models::Substate, MappingError> {
12-
let OwnerRoleSubstate { owner_role_entry } = substate;
1312
Ok(field_substate!(
1413
substate,
1514
AccessRulesModuleFieldOwnerRole,
16-
{
15+
OwnerRoleSubstate { owner_role_entry },
16+
Value {
1717
owner_role: Some(models::OwnerRole {
1818
rule: Some(to_api_access_rule(context, &owner_role_entry.rule)?),
1919
updater: match owner_role_entry.updater {

core-rust/core-api-server/src/core_api/conversions/substates/account.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ use radix_engine_queries::typed_substate_layout::*;
88

99
pub fn to_api_account_state_substate(
1010
_context: &MappingContext,
11-
substate: &AccountSubstate,
11+
substate: &FieldSubstate<AccountSubstate>,
1212
) -> Result<models::Substate, MappingError> {
13-
let AccountSubstate {
14-
default_deposit_rule,
15-
} = substate;
1613
Ok(field_substate!(
1714
substate,
1815
AccountFieldState,
19-
{
16+
AccountSubstate {
17+
default_deposit_rule,
18+
},
19+
Value {
2020
default_deposit_rule: match default_deposit_rule {
2121
AccountDefaultDepositRule::Accept => models::DefaultDepositRule::Accept,
2222
AccountDefaultDepositRule::Reject => models::DefaultDepositRule::Reject,
23-
AccountDefaultDepositRule::AllowExisting => models::DefaultDepositRule::AllowExisting,
23+
AccountDefaultDepositRule::AllowExisting =>
24+
models::DefaultDepositRule::AllowExisting,
2425
},
2526
}
2627
))

0 commit comments

Comments
 (0)