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

[Aptos Framework][API][Transaction][VM] Add a richer multisig account model #5894

Merged
merged 12 commits into from
Mar 1, 2023
Merged
76 changes: 38 additions & 38 deletions Cargo.lock

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -488,34 +488,34 @@ x25519-dalek = "1.2.0"

# Note: the BEGIN and END comments below are required for external tooling. Do not remove.
# BEGIN MOVE DEPENDENCIES
move-abigen = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-binary-format = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-bytecode-verifier = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-cli = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-command-line-common = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-compiler ={ git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-core-types = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc", features = ["address32"] }
move-docgen = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-ir-compiler = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-model = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-package = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-prover = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-prover-boogie-backend = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-stackless-bytecode = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-prover-test-utils = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-resource-viewer = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-stackless-bytecode-interpreter = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-stdlib = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-symbol-pool = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-table-extension = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-transactional-test-runner = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-unit-test = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc", features = ["table-extension"] }
move-vm-runtime = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc", features = ["lazy_natives"] }
move-vm-test-utils = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc", features = ["table-extension"] }
move-vm-types = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
read-write-set = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
read-write-set-dynamic = { git = "https://github.com/move-language/move", rev = "3b69b861372625e0247948bdc18254d2214528cc" }
move-abigen = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-binary-format = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-bytecode-verifier = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-cli = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-command-line-common = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-compiler ={ git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-core-types = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7", features = ["address32"] }
move-docgen = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-ir-compiler = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-model = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-package = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-prover = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-prover-boogie-backend = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-stackless-bytecode = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-prover-test-utils = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-resource-viewer = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-stackless-bytecode-interpreter = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-stdlib = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-symbol-pool = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-table-extension = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-transactional-test-runner = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
move-unit-test = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7", features = ["table-extension"] }
move-vm-runtime = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7", features = ["lazy_natives"] }
move-vm-test-utils = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7", features = ["table-extension"] }
move-vm-types = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
read-write-set = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
read-write-set-dynamic = { git = "https://github.com/move-language/move", rev = "6bf0970221ecc0b27454d574a6cc89e8fa175cc7" }
# END MOVE DEPENDENCIES

[profile.release]
Expand Down
48 changes: 47 additions & 1 deletion api/doc/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -12998,6 +12998,29 @@
}
}
},
"MultisigPayload": {
"type": "object",
"description": "A multisig transaction that allows an owner of a multisig account to execute a pre-approved\ntransaction as the multisig account.",
"required": [
"multisig_address"
],
"properties": {
"multisig_address": {
"$ref": "#/components/schemas/Address"
},
"transaction_payload": {
"$ref": "#/components/schemas/MultisigTransactionPayload"
}
}
},
"MultisigTransactionPayload": {
"type": "object",
"anyOf": [
{
"$ref": "#/components/schemas/EntryFunctionPayload"
}
]
},
"PendingTransaction": {
"type": "object",
"description": "A transaction waiting in mempool",
Expand Down Expand Up @@ -13258,14 +13281,18 @@
},
{
"$ref": "#/components/schemas/TransactionPayload_ModuleBundlePayload"
},
{
"$ref": "#/components/schemas/TransactionPayload_MultisigPayload"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"entry_function_payload": "#/components/schemas/TransactionPayload_EntryFunctionPayload",
"script_payload": "#/components/schemas/TransactionPayload_ScriptPayload",
"module_bundle_payload": "#/components/schemas/TransactionPayload_ModuleBundlePayload"
"module_bundle_payload": "#/components/schemas/TransactionPayload_ModuleBundlePayload",
"multisig_payload": "#/components/schemas/TransactionPayload_MultisigPayload"
}
}
},
Expand Down Expand Up @@ -13307,6 +13334,25 @@
}
]
},
"TransactionPayload_MultisigPayload": {
"allOf": [
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"example": "multisig_payload"
}
}
},
{
"$ref": "#/components/schemas/MultisigPayload"
}
]
},
"TransactionPayload_ScriptPayload": {
"allOf": [
{
Expand Down
28 changes: 28 additions & 0 deletions api/doc/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9820,6 +9820,22 @@ components:
description: The number of signatures required for a successful transaction
bitmap:
$ref: '#/components/schemas/HexEncodedBytes'
MultisigPayload:
type: object
description: |-
A multisig transaction that allows an owner of a multisig account to execute a pre-approved
transaction as the multisig account.
required:
- multisig_address
properties:
multisig_address:
$ref: '#/components/schemas/Address'
transaction_payload:
$ref: '#/components/schemas/MultisigTransactionPayload'
MultisigTransactionPayload:
type: object
anyOf:
- $ref: '#/components/schemas/EntryFunctionPayload'
PendingTransaction:
type: object
description: A transaction waiting in mempool
Expand Down Expand Up @@ -10005,12 +10021,14 @@ components:
- $ref: '#/components/schemas/TransactionPayload_EntryFunctionPayload'
- $ref: '#/components/schemas/TransactionPayload_ScriptPayload'
- $ref: '#/components/schemas/TransactionPayload_ModuleBundlePayload'
- $ref: '#/components/schemas/TransactionPayload_MultisigPayload'
discriminator:
propertyName: type
mapping:
entry_function_payload: '#/components/schemas/TransactionPayload_EntryFunctionPayload'
script_payload: '#/components/schemas/TransactionPayload_ScriptPayload'
module_bundle_payload: '#/components/schemas/TransactionPayload_ModuleBundlePayload'
multisig_payload: '#/components/schemas/TransactionPayload_MultisigPayload'
TransactionPayload_EntryFunctionPayload:
allOf:
- type: object
Expand All @@ -10031,6 +10049,16 @@ components:
type: string
example: module_bundle_payload
- $ref: '#/components/schemas/ModuleBundlePayload'
TransactionPayload_MultisigPayload:
allOf:
- type: object
required:
- type
properties:
type:
type: string
example: multisig_payload
- $ref: '#/components/schemas/MultisigPayload'
TransactionPayload_ScriptPayload:
allOf:
- type: object
Expand Down
1 change: 1 addition & 0 deletions api/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mod events_test;
mod index_test;
mod invalid_post_request_test;
mod modules;
mod multisig_transactions_test;
mod objects;
mod resource_groups;
mod state_test;
Expand Down
Loading