Skip to content

Commit

Permalink
Updating casper-node dependency, aligning code with those changes (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
zajko authored Feb 28, 2025
1 parent dd30cd9 commit 9df492b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 70 deletions.
17 changes: 8 additions & 9 deletions Cargo.lock

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

34 changes: 6 additions & 28 deletions resources/test/rpc_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6011,7 +6011,10 @@
"$ref": "#/components/schemas/NamedKeys"
},
"entry_points": {
"$ref": "#/components/schemas/Array_of_NamedEntryPoint"
"type": "array",
"items": {
"$ref": "#/components/schemas/EntryPoint"
}
},
"protocol_version": {
"$ref": "#/components/schemas/ProtocolVersion"
Expand All @@ -6022,31 +6025,6 @@
"description": "The hash address of the contract wasm",
"type": "string"
},
"Array_of_NamedEntryPoint": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NamedEntryPoint"
}
},
"NamedEntryPoint": {
"type": "object",
"required": [
"entry_point",
"name"
],
"properties": {
"name": {
"type": "string"
},
"entry_point": {
"allOf": [
{
"$ref": "#/components/schemas/EntryPoint"
}
]
}
}
},
"EntryPoint": {
"description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.",
"type": "object",
Expand Down Expand Up @@ -6740,14 +6718,14 @@
],
"properties": {
"V1CasperVm": {
"$ref": "#/components/schemas/EntryPoint2"
"$ref": "#/components/schemas/EntityEntryPoint"
}
},
"additionalProperties": false
}
]
},
"EntryPoint2": {
"EntityEntryPoint": {
"description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.",
"type": "object",
"required": [
Expand Down
34 changes: 6 additions & 28 deletions resources/test/speculative_rpc_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,10 @@
"$ref": "#/components/schemas/NamedKeys"
},
"entry_points": {
"$ref": "#/components/schemas/Array_of_NamedEntryPoint"
"type": "array",
"items": {
"$ref": "#/components/schemas/EntryPoint"
}
},
"protocol_version": {
"$ref": "#/components/schemas/ProtocolVersion"
Expand All @@ -1930,31 +1933,6 @@
"description": "The hash address of the contract wasm",
"type": "string"
},
"Array_of_NamedEntryPoint": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NamedEntryPoint"
}
},
"NamedEntryPoint": {
"type": "object",
"required": [
"entry_point",
"name"
],
"properties": {
"name": {
"type": "string"
},
"entry_point": {
"allOf": [
{
"$ref": "#/components/schemas/EntryPoint"
}
]
}
}
},
"EntryPoint": {
"description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.",
"type": "object",
Expand Down Expand Up @@ -3607,14 +3585,14 @@
],
"properties": {
"V1CasperVm": {
"$ref": "#/components/schemas/EntryPoint2"
"$ref": "#/components/schemas/EntityEntryPoint"
}
},
"additionalProperties": false
}
]
},
"EntryPoint2": {
"EntityEntryPoint": {
"description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.",
"type": "object",
"required": [
Expand Down
10 changes: 5 additions & 5 deletions rpc_sidecar/src/rpcs/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ use casper_types::{
AUCTION,
},
AddressableEntity, AddressableEntityHash, BlockHash, BlockHeader, BlockHeaderV2,
BlockIdentifier, BlockTime, BlockV2, CLValue, Digest, EntityAddr, EntryPoint, EntryPointValue,
EraId, GlobalStateIdentifier, Key, KeyTag, Package, PackageHash, PublicKey, SecretKey,
StoredValue, URef, U512,
BlockIdentifier, BlockTime, BlockV2, CLValue, Digest, EntityAddr, EntityEntryPoint,
EntryPointValue, EraId, GlobalStateIdentifier, Key, KeyTag, Package, PackageHash, PublicKey,
SecretKey, StoredValue, URef, U512,
};
#[cfg(test)]
use rand::Rng;
Expand Down Expand Up @@ -108,7 +108,7 @@ static GET_ADDRESSABLE_ENTITY_RESULT: Lazy<GetAddressableEntityResult> =
.collect::<BTreeMap<_, _>>()
.into(),
entry_points: vec![EntryPointValue::new_v1_entry_point_value(
EntryPoint::default_with_name("entry_point"),
EntityEntryPoint::default_with_name("entry_point"),
)],
bytecode: None,
},
Expand Down Expand Up @@ -1961,7 +1961,7 @@ mod tests {
.into();
let entry_point_count = rng.gen_range(0..10);
let entry_points = iter::repeat_with(|| {
EntryPointValue::new_v1_entry_point_value(EntryPoint::default_with_name(
EntryPointValue::new_v1_entry_point_value(EntityEntryPoint::default_with_name(
rng.random_string(1..10),
))
})
Expand Down

0 comments on commit 9df492b

Please sign in to comment.