Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/feat-2.0' into retrieve-entity…
Browse files Browse the repository at this point in the history
…-named-keys
  • Loading branch information
jacek-casper committed May 7, 2024
2 parents 10acda4 + 2f47b5b commit 49844c8
Show file tree
Hide file tree
Showing 5 changed files with 423 additions and 56 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

218 changes: 199 additions & 19 deletions resources/test/rpc_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,18 +808,6 @@
"package_hash": "package-0000000000000000000000000000000000000000000000000000000000000000",
"byte_code_hash": "byte-code-0000000000000000000000000000000000000000000000000000000000000000",
"main_purse": "uref-09480c3248ef76b603d386f3f4f8a5f87f597d4eaffd475433f861af187ab5db-007",
"entry_points": [
{
"name": "call",
"entry_point": {
"name": "call",
"args": [],
"ret": "Unit",
"access": "Public",
"entry_point_type": "Caller"
}
}
],
"associated_keys": [
{
"account_hash": "account-hash-e94daaff79c2ab8d9c31d9c3058d7d0a0dd31204a5638dc1451fa67b2e3fb88c",
Expand Down Expand Up @@ -3462,6 +3450,13 @@
"enum": [
"VmCasperV1"
]
},
{
"description": "The Casper Version 2 Virtual Machine.",
"type": "string",
"enum": [
"VmCasperV2"
]
}
]
},
Expand Down Expand Up @@ -3562,6 +3557,13 @@
"enum": [
"ActivateBid"
]
},
{
"description": "The `change_bid_public_key` native entry point, used to change a bid's public key.",
"type": "string",
"enum": [
"ChangeBidPublicKey"
]
}
]
},
Expand Down Expand Up @@ -4802,6 +4804,19 @@
}
},
"additionalProperties": false
},
{
"description": "A bridge record pointing to a new `ValidatorBid` after the public key was changed.",
"type": "object",
"required": [
"Bridge"
],
"properties": {
"Bridge": {
"$ref": "#/components/schemas/Bridge"
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -4864,6 +4879,42 @@
},
"additionalProperties": false
},
"Bridge": {
"description": "A bridge record pointing to a new `ValidatorBid` after the public key was changed.",
"type": "object",
"required": [
"era_id",
"new_validator_public_key",
"old_validator_public_key"
],
"properties": {
"old_validator_public_key": {
"description": "Previous validator public key associated with the bid.",
"allOf": [
{
"$ref": "#/components/schemas/PublicKey"
}
]
},
"new_validator_public_key": {
"description": "New validator public key associated with the bid.",
"allOf": [
{
"$ref": "#/components/schemas/PublicKey"
}
]
},
"era_id": {
"description": "Era when bridge record was created.",
"allOf": [
{
"$ref": "#/components/schemas/EraId"
}
]
}
},
"additionalProperties": false
},
"ExecutionResultV2": {
"description": "The result of executing a single transaction.",
"type": "object",
Expand Down Expand Up @@ -5498,6 +5549,19 @@
}
},
"additionalProperties": false
},
{
"description": "An entrypoint record.",
"type": "object",
"required": [
"EntryPoint"
],
"properties": {
"EntryPoint": {
"$ref": "#/components/schemas/EntryPointValue"
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -5951,7 +6015,6 @@
"associated_keys",
"byte_code_hash",
"entity_kind",
"entry_points",
"main_purse",
"message_topics",
"package_hash",
Expand All @@ -5973,9 +6036,6 @@
"main_purse": {
"$ref": "#/components/schemas/URef"
},
"entry_points": {
"$ref": "#/components/schemas/Array_of_NamedEntryPoint"
},
"associated_keys": {
"$ref": "#/components/schemas/EntityAssociatedKeys"
},
Expand Down Expand Up @@ -6018,10 +6078,16 @@
},
{
"description": "Packages associated with Wasm stored on chain.",
"type": "string",
"enum": [
"type": "object",
"required": [
"SmartContract"
]
],
"properties": {
"SmartContract": {
"$ref": "#/components/schemas/TransactionRuntime"
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -6371,6 +6437,120 @@
}
}
},
"EntryPointValue": {
"description": "The encaspulated representation of entrypoints.",
"oneOf": [
{
"description": "Entrypoints to be executed against the V1 Casper VM.",
"type": "object",
"required": [
"V1CasperVm"
],
"properties": {
"V1CasperVm": {
"$ref": "#/components/schemas/EntryPoint2"
}
},
"additionalProperties": false
},
{
"description": "Entrypoints to be executed against the V2 Casper VM.",
"type": "object",
"required": [
"V2CasperVm"
],
"properties": {
"V2CasperVm": {
"$ref": "#/components/schemas/EntryPointV2"
}
},
"additionalProperties": false
}
]
},
"EntryPoint2": {
"description": "Type signature of a method. Order of arguments matter since can be referenced by index as well as name.",
"type": "object",
"required": [
"access",
"args",
"entry_point_payment",
"entry_point_type",
"name",
"ret"
],
"properties": {
"name": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Parameter"
}
},
"ret": {
"$ref": "#/components/schemas/CLType"
},
"access": {
"$ref": "#/components/schemas/EntryPointAccess"
},
"entry_point_type": {
"$ref": "#/components/schemas/EntryPointType"
},
"entry_point_payment": {
"$ref": "#/components/schemas/EntryPointPayment"
}
}
},
"EntryPointPayment": {
"description": "An enum specifying who pays for the invocation and execution of the entrypoint.",
"oneOf": [
{
"description": "The caller must cover cost",
"type": "string",
"enum": [
"Caller"
]
},
{
"description": "Will cover cost to execute self but not cost of any subsequent invoked contracts",
"type": "string",
"enum": [
"SelfOnly"
]
},
{
"description": "will cover cost to execute self and the cost of any subsequent invoked contracts",
"type": "string",
"enum": [
"SelfOnward"
]
}
]
},
"EntryPointV2": {
"description": "The entry point for the V2 Casper VM.",
"type": "object",
"required": [
"flags",
"function_index"
],
"properties": {
"function_index": {
"description": "The selector.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"flags": {
"description": "The flags.",
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
}
},
"TransformError": {
"description": "Error type for applying and combining transforms.\n\nA `TypeMismatch` occurs when a transform cannot be applied because the types are not compatible (e.g. trying to add a number to a string).",
"oneOf": [
Expand Down
Loading

0 comments on commit 49844c8

Please sign in to comment.