From 3ba9b4eec953fbe221a81580618494d7ccbe5f77 Mon Sep 17 00:00:00 2001 From: David Wolinsky Date: Fri, 11 Mar 2022 16:43:41 -0800 Subject: [PATCH] keep the existing license owner --- .../actions/land-blocking/find-lbt-images.sh | 2 +- api/Makefile | 2 +- api/doc/openapi.yaml | 2 +- api/src/accounts.rs | 2 +- api/src/context.rs | 2 +- api/src/events.rs | 2 +- api/src/failpoint.rs | 2 +- api/src/health_check.rs | 2 +- api/src/index.rs | 2 +- api/src/lib.rs | 2 +- api/src/log.rs | 2 +- api/src/metrics.rs | 2 +- api/src/page.rs | 2 +- api/src/param.rs | 2 +- api/src/runtime.rs | 2 +- api/src/tests/accounts_test.rs | 2 +- api/src/tests/events_test.rs | 2 +- api/src/tests/index_test.rs | 2 +- api/src/tests/invalid_post_request_test.rs | 2 +- api/src/tests/mod.rs | 2 +- api/src/tests/string_resource_test.rs | 2 +- api/src/tests/test_context.rs | 2 +- api/src/tests/transactions_test.rs | 2 +- api/src/transactions.rs | 2 +- api/src/version.rs | 2 +- api/types/src/account.rs | 2 +- api/types/src/address.rs | 2 +- api/types/src/bytecode.rs | 2 +- api/types/src/convert.rs | 2 +- api/types/src/error.rs | 2 +- api/types/src/event_key.rs | 2 +- api/types/src/hash.rs | 2 +- api/types/src/ledger_info.rs | 2 +- api/types/src/lib.rs | 2 +- api/types/src/mime_types.rs | 2 +- api/types/src/move_types.rs | 2 +- api/types/src/response.rs | 2 +- api/types/src/transaction.rs | 2 +- aptos-move/aptos-keygen/src/lib.rs | 2 +- aptos-move/aptos-keygen/src/main.rs | 2 +- aptos-move/aptos-resource-viewer/src/lib.rs | 2 +- .../benches/transaction_benches.rs | 2 +- .../aptos-transaction-benchmarks/src/lib.rs | 2 +- .../src/measurement.rs | 2 +- .../src/transactions.rs | 2 +- .../src/diem_test_harness.rs | 2 +- .../src/lib.rs | 2 +- .../tests/tests.rs | 2 +- .../aptos-validator-interface/src/lib.rs | 2 +- .../src/storage_interface.rs | 2 +- aptos-move/aptos-vm/src/access_path_cache.rs | 2 +- aptos-move/aptos-vm/src/adapter_common.rs | 2 +- aptos-move/aptos-vm/src/aptos_vm.rs | 2 +- aptos-move/aptos-vm/src/aptos_vm_impl.rs | 2 +- aptos-move/aptos-vm/src/counters.rs | 2 +- aptos-move/aptos-vm/src/data_cache.rs | 2 +- aptos-move/aptos-vm/src/errors.rs | 2 +- aptos-move/aptos-vm/src/foreign_contracts.rs | 2 +- aptos-move/aptos-vm/src/lib.rs | 2 +- aptos-move/aptos-vm/src/logging.rs | 2 +- aptos-move/aptos-vm/src/natives.rs | 2 +- .../aptos-vm/src/parallel_executor/mod.rs | 2 +- .../read_write_set_analyzer.rs | 2 +- .../src/parallel_executor/storage_wrapper.rs | 2 +- .../src/parallel_executor/vm_wrapper.rs | 2 +- .../aptos-vm/src/read_write_set_analysis.rs | 2 +- .../aptos-vm/src/script_to_script_function.rs | 2 +- .../aptos-vm/src/system_module_names.rs | 2 +- .../aptos-vm/src/transaction_metadata.rs | 2 +- aptos-move/aptos-vm/src/unit_tests/mod.rs | 2 +- .../script_to_script_function_tests.rs | 2 +- aptos-move/df-cli/src/lib.rs | 2 +- aptos-move/df-cli/src/main.rs | 2 +- aptos-move/df-cli/tests/cli_testsuite.rs | 2 +- aptos-move/e2e-tests-replay/src/lib.rs | 2 +- aptos-move/e2e-tests-replay/src/main.rs | 2 +- aptos-move/e2e-tests/src/account.rs | 2 +- aptos-move/e2e-tests/src/account_universe.rs | 2 +- .../src/account_universe/bad_transaction.rs | 2 +- .../src/account_universe/create_account.rs | 2 +- .../src/account_universe/peer_to_peer.rs | 2 +- .../src/account_universe/rotate_key.rs | 2 +- .../src/account_universe/universe.rs | 2 +- .../e2e-tests/src/common_transactions.rs | 2 +- aptos-move/e2e-tests/src/compile.rs | 2 +- aptos-move/e2e-tests/src/currencies.rs | 2 +- aptos-move/e2e-tests/src/data_store.rs | 2 +- .../execution_strategies/basic_strategy.rs | 2 +- .../execution_strategies/guided_strategy.rs | 2 +- .../e2e-tests/src/execution_strategies/mod.rs | 2 +- .../execution_strategies/multi_strategy.rs | 2 +- .../execution_strategies/random_strategy.rs | 2 +- .../src/execution_strategies/types.rs | 2 +- aptos-move/e2e-tests/src/executor.rs | 2 +- aptos-move/e2e-tests/src/gas_costs.rs | 2 +- aptos-move/e2e-tests/src/golden_outputs.rs | 2 +- aptos-move/e2e-tests/src/lib.rs | 2 +- aptos-move/e2e-tests/src/on_chain_configs.rs | 2 +- aptos-move/e2e-tests/src/proptest_types.rs | 2 +- aptos-move/e2e-tests/src/utils.rs | 2 +- aptos-move/e2e-tests/src/versioning.rs | 2 +- aptos-move/e2e-testsuite/src/lib.rs | 2 +- .../e2e-testsuite/src/tests/account_limits.rs | 2 +- .../tests/account_universe/bad_transaction.rs | 2 +- .../tests/account_universe/create_account.rs | 2 +- .../src/tests/account_universe/mod.rs | 2 +- .../tests/account_universe/peer_to_peer.rs | 2 +- .../src/tests/account_universe/rotate_key.rs | 2 +- .../e2e-testsuite/src/tests/admin_script.rs | 2 +- .../e2e-testsuite/src/tests/create_account.rs | 2 +- aptos-move/e2e-testsuite/src/tests/crsn.rs | 2 +- .../e2e-testsuite/src/tests/data_store.rs | 2 +- .../src/tests/emergency_admin_script.rs | 2 +- .../src/tests/execution_strategies.rs | 2 +- .../e2e-testsuite/src/tests/experimental.rs | 2 +- .../src/tests/failed_transaction_tests.rs | 2 +- aptos-move/e2e-testsuite/src/tests/genesis.rs | 2 +- .../src/tests/genesis_initializations.rs | 2 +- aptos-move/e2e-testsuite/src/tests/mint.rs | 2 +- aptos-move/e2e-testsuite/src/tests/mod.rs | 2 +- .../src/tests/module_publishing.rs | 2 +- .../e2e-testsuite/src/tests/multi_agent.rs | 2 +- .../src/tests/on_chain_configs.rs | 2 +- .../src/tests/parallel_execution.rs | 2 +- .../e2e-testsuite/src/tests/peer_to_peer.rs | 2 +- .../e2e-testsuite/src/tests/rotate_key.rs | 2 +- aptos-move/e2e-testsuite/src/tests/scripts.rs | 2 +- .../src/tests/transaction_builder.rs | 2 +- .../src/tests/transaction_fees.rs | 2 +- .../src/tests/transaction_fuzzer.rs | 2 +- .../src/tests/validator_set_management.rs | 2 +- aptos-move/e2e-testsuite/src/tests/vasps.rs | 2 +- .../e2e-testsuite/src/tests/verify_txn.rs | 2 +- .../e2e-testsuite/src/tests/write_set.rs | 2 +- .../src/tests/writeset_builder.rs | 2 +- .../current/transaction_script_builder.rs | 2 +- .../framework/DPN/releases/src/legacy/mod.rs | 2 +- .../src/legacy/transaction_scripts.rs | 2 +- aptos-move/framework/DPN/releases/src/lib.rs | 2 +- .../framework/DPN/releases/src/tests.rs | 2 +- .../current/transaction_script_builder.rs | 2 +- .../aptos-framework/releases/src/lib.rs | 2 +- .../current/transaction_script_builder.rs | 2 +- .../current/transaction_script_builder.rs | 2 +- .../experimental/releases/src/lib.rs | 2 +- aptos-move/framework/releases/src/lib.rs | 2 +- aptos-move/framework/src/lib.rs | 2 +- aptos-move/framework/src/main.rs | 2 +- aptos-move/framework/src/natives/account.rs | 2 +- aptos-move/framework/src/natives/mod.rs | 2 +- aptos-move/framework/src/natives/signature.rs | 2 +- aptos-move/framework/src/release.rs | 4 +- .../tests/aptos_transactional_tests.rs | 2 +- .../tests/dpn_transactional_tests.rs | 2 +- aptos-move/framework/tests/generated_files.rs | 2 +- aptos-move/framework/tests/move_unit_test.rs | 2 +- .../framework/tests/move_verification_test.rs | 2 +- aptos-move/genesis-viewer/src/main.rs | 2 +- aptos-move/move-examples/src/main.rs | 2 +- .../move-examples/tests/move_unit_tests.rs | 2 +- aptos-move/mvhashmap/src/lib.rs | 2 +- aptos-move/mvhashmap/src/unit_tests/mod.rs | 2 +- .../src/unit_tests/proptest_types.rs | 2 +- .../benches/scheduler_benches.rs | 2 +- aptos-move/parallel-executor/src/errors.rs | 2 +- aptos-move/parallel-executor/src/executor.rs | 2 +- aptos-move/parallel-executor/src/lib.rs | 2 +- .../parallel-executor/src/outcome_array.rs | 2 +- .../src/proptest_types/bencher.rs | 2 +- .../src/proptest_types/mod.rs | 2 +- .../src/proptest_types/tests.rs | 2 +- .../src/proptest_types/types.rs | 2 +- aptos-move/parallel-executor/src/scheduler.rs | 2 +- aptos-move/parallel-executor/src/task.rs | 2 +- .../src/txn_last_input_output.rs | 2 +- .../parallel-executor/src/unit_tests/mod.rs | 2 +- .../examples/cpp/stdlib_demo.cpp | 2 +- .../custom_aptos_code/AccountAddress.cs | 2 +- .../examples/golang/stdlib_demo.go | 2 +- .../examples/java/StdlibDemo.java | 2 +- .../custom_aptos_code/AccountAddress.java | 2 +- .../custom_aptos_code/AccountAddress.py | 2 +- .../examples/python3/stdlib_demo.py | 2 +- .../examples/rust/script_fun_demo.rs | 2 +- .../examples/rust/tx_script_demo.rs | 2 +- .../examples/typescript/mod.ts | 2 +- .../src/common.rs | 2 +- .../transaction-builder-generator/src/cpp.rs | 2 +- .../src/csharp.rs | 2 +- .../src/generate.rs | 2 +- .../src/golang.rs | 2 +- .../transaction-builder-generator/src/java.rs | 2 +- .../transaction-builder-generator/src/lib.rs | 2 +- .../src/python3.rs | 2 +- .../transaction-builder-generator/src/rust.rs | 4 +- .../src/swift.rs | 2 +- .../src/typescript.rs | 2 +- .../tests/cli.rs | 2 +- .../tests/generation.rs | 2 +- aptos-move/transaction-replay/src/lib.rs | 2 +- aptos-move/transaction-replay/src/main.rs | 2 +- .../src/unit_tests/bisection_tests.rs | 2 +- .../transaction-replay/src/unit_tests/mod.rs | 2 +- aptos-move/vm-genesis/src/genesis_context.rs | 2 +- aptos-move/vm-genesis/src/lib.rs | 2 +- .../src/admin_script_builder.rs | 2 +- .../writeset-transaction-generator/src/lib.rs | 2 +- .../src/writeset_builder.rs | 2 +- aptos-node/src/lib.rs | 2 +- aptos-node/src/main.rs | 2 +- config/generate-key/src/lib.rs | 2 +- config/generate-key/src/main.rs | 2 +- config/global-constants/src/lib.rs | 2 +- config/management/genesis/src/builder.rs | 2 +- config/management/genesis/src/command.rs | 2 +- .../management/genesis/src/config_builder.rs | 2 +- .../genesis/src/fullnode_builder.rs | 2 +- config/management/genesis/src/genesis.rs | 2 +- config/management/genesis/src/key.rs | 2 +- config/management/genesis/src/layout.rs | 2 +- config/management/genesis/src/lib.rs | 2 +- config/management/genesis/src/main.rs | 2 +- config/management/genesis/src/move_modules.rs | 2 +- .../management/genesis/src/storage_helper.rs | 2 +- .../genesis/src/validator_builder.rs | 2 +- .../genesis/src/validator_config.rs | 2 +- .../genesis/src/validator_operator.rs | 2 +- config/management/genesis/src/verify.rs | 2 +- config/management/genesis/src/waypoint.rs | 2 +- .../operational/src/account_resource.rs | 2 +- .../operational/src/auto_validate.rs | 2 +- config/management/operational/src/command.rs | 2 +- .../management/operational/src/governance.rs | 2 +- config/management/operational/src/keys.rs | 2 +- config/management/operational/src/lib.rs | 2 +- config/management/operational/src/main.rs | 2 +- .../operational/src/network_checker.rs | 2 +- config/management/operational/src/owner.rs | 2 +- config/management/operational/src/print.rs | 2 +- .../management/operational/src/rest_client.rs | 2 +- .../management/operational/src/test_helper.rs | 2 +- .../operational/src/validate_transaction.rs | 2 +- .../operational/src/validator_config.rs | 2 +- .../operational/src/validator_set.rs | 2 +- .../operational/src/validator_state.rs | 2 +- config/management/src/config.rs | 2 +- config/management/src/error.rs | 2 +- config/management/src/lib.rs | 2 +- config/management/src/secure_backend.rs | 2 +- config/management/src/storage.rs | 2 +- config/management/src/transaction.rs | 2 +- config/management/src/validator_config.rs | 2 +- config/management/src/waypoint.rs | 2 +- config/seed-peer-generator/src/lib.rs | 2 +- config/seed-peer-generator/src/main.rs | 2 +- config/seed-peer-generator/src/utils.rs | 2 +- config/src/config/api_config.rs | 2 +- config/src/config/consensus_config.rs | 2 +- config/src/config/debug_interface_config.rs | 2 +- config/src/config/error.rs | 2 +- config/src/config/execution_config.rs | 2 +- config/src/config/json_rpc_config.rs | 2 +- config/src/config/key_manager_config.rs | 2 +- config/src/config/logger_config.rs | 2 +- config/src/config/mempool_config.rs | 2 +- config/src/config/mod.rs | 2 +- config/src/config/network_config.rs | 2 +- config/src/config/safety_rules_config.rs | 2 +- config/src/config/secure_backend_config.rs | 2 +- config/src/config/state_sync_config.rs | 2 +- config/src/config/storage_config.rs | 2 +- config/src/config/test_config.rs | 2 +- config/src/generator.rs | 2 +- config/src/keys.rs | 2 +- config/src/lib.rs | 2 +- config/src/network_id.rs | 2 +- config/src/utils.rs | 2 +- consensus/consensus-types/src/block.rs | 2 +- consensus/consensus-types/src/block_data.rs | 2 +- .../consensus-types/src/block_retrieval.rs | 2 +- consensus/consensus-types/src/block_test.rs | 2 +- .../consensus-types/src/block_test_utils.rs | 2 +- consensus/consensus-types/src/common.rs | 2 +- .../consensus-types/src/epoch_retrieval.rs | 2 +- .../consensus-types/src/executed_block.rs | 2 +- .../src/experimental/commit_decision.rs | 2 +- .../src/experimental/commit_vote.rs | 2 +- .../consensus-types/src/experimental/mod.rs | 2 +- consensus/consensus-types/src/lib.rs | 2 +- consensus/consensus-types/src/proposal_msg.rs | 2 +- consensus/consensus-types/src/quorum_cert.rs | 2 +- consensus/consensus-types/src/safety_data.rs | 2 +- consensus/consensus-types/src/sync_info.rs | 2 +- consensus/consensus-types/src/timeout.rs | 2 +- .../consensus-types/src/timeout_2chain.rs | 2 +- .../src/timeout_certificate.rs | 2 +- consensus/consensus-types/src/vote.rs | 2 +- consensus/consensus-types/src/vote_data.rs | 2 +- consensus/consensus-types/src/vote_msg.rs | 2 +- .../consensus-types/src/vote_proposal.rs | 2 +- .../safety-rules/benches/safety_rules.rs | 2 +- .../src/configurable_validator_signer.rs | 2 +- consensus/safety-rules/src/consensus_state.rs | 2 +- consensus/safety-rules/src/counters.rs | 2 +- consensus/safety-rules/src/error.rs | 2 +- consensus/safety-rules/src/fuzzing_utils.rs | 2 +- consensus/safety-rules/src/lib.rs | 2 +- consensus/safety-rules/src/local_client.rs | 2 +- consensus/safety-rules/src/logging.rs | 2 +- consensus/safety-rules/src/main.rs | 2 +- .../src/persistent_safety_storage.rs | 2 +- consensus/safety-rules/src/process.rs | 2 +- consensus/safety-rules/src/remote_service.rs | 2 +- consensus/safety-rules/src/safety_rules.rs | 2 +- .../safety-rules/src/safety_rules_2chain.rs | 2 +- .../safety-rules/src/safety_rules_manager.rs | 2 +- consensus/safety-rules/src/serializer.rs | 2 +- consensus/safety-rules/src/t_safety_rules.rs | 2 +- consensus/safety-rules/src/test_utils.rs | 2 +- consensus/safety-rules/src/tests/local.rs | 2 +- consensus/safety-rules/src/tests/mod.rs | 2 +- .../safety-rules/src/tests/networking.rs | 2 +- .../safety-rules/src/tests/safety_rules.rs | 2 +- .../safety-rules/src/tests/serializer.rs | 2 +- consensus/safety-rules/src/tests/suite.rs | 2 +- consensus/safety-rules/src/tests/thread.rs | 2 +- consensus/safety-rules/src/tests/vault.rs | 2 +- consensus/safety-rules/src/thread.rs | 2 +- consensus/safety-rules/tests/binary.rs | 2 +- consensus/src/block_storage/block_store.rs | 2 +- .../block_store_and_lec_recovery_test.rs | 2 +- .../src/block_storage/block_store_test.rs | 2 +- consensus/src/block_storage/block_tree.rs | 2 +- consensus/src/block_storage/mod.rs | 2 +- consensus/src/block_storage/sync_manager.rs | 2 +- consensus/src/block_storage/tracing.rs | 2 +- consensus/src/consensus_provider.rs | 2 +- consensus/src/consensusdb/consensusdb_test.rs | 2 +- consensus/src/consensusdb/mod.rs | 2 +- consensus/src/consensusdb/schema/block/mod.rs | 2 +- .../src/consensusdb/schema/block/test.rs | 2 +- consensus/src/consensusdb/schema/mod.rs | 2 +- .../schema/quorum_certificate/mod.rs | 2 +- .../schema/quorum_certificate/test.rs | 2 +- .../consensusdb/schema/single_entry/mod.rs | 2 +- .../consensusdb/schema/single_entry/test.rs | 2 +- consensus/src/counters.rs | 2 +- consensus/src/epoch_manager.rs | 2 +- consensus/src/error.rs | 2 +- consensus/src/experimental/buffer.rs | 2 +- consensus/src/experimental/buffer_item.rs | 2 +- consensus/src/experimental/buffer_manager.rs | 2 +- .../experimental/decoupled_execution_utils.rs | 2 +- consensus/src/experimental/errors.rs | 2 +- consensus/src/experimental/execution_phase.rs | 2 +- consensus/src/experimental/hashable.rs | 2 +- consensus/src/experimental/linkedlist.rs | 2 +- consensus/src/experimental/mod.rs | 2 +- .../experimental/ordering_state_computer.rs | 2 +- .../src/experimental/persisting_phase.rs | 2 +- consensus/src/experimental/pipeline_phase.rs | 2 +- consensus/src/experimental/signing_phase.rs | 2 +- .../tests/buffer_manager_tests.rs | 2 +- .../tests/execution_phase_tests.rs | 2 +- .../experimental/tests/integration_tests.rs | 2 +- consensus/src/experimental/tests/mod.rs | 2 +- .../tests/ordering_state_computer_tests.rs | 2 +- .../src/experimental/tests/phase_tester.rs | 2 +- .../experimental/tests/signing_phase_tests.rs | 2 +- .../src/experimental/tests/test_utils.rs | 2 +- consensus/src/lib.rs | 2 +- consensus/src/liveness/leader_reputation.rs | 2 +- .../src/liveness/leader_reputation_test.rs | 2 +- consensus/src/liveness/mod.rs | 2 +- consensus/src/liveness/proposal_generator.rs | 2 +- .../src/liveness/proposal_generator_test.rs | 2 +- consensus/src/liveness/proposer_election.rs | 2 +- .../liveness/rotating_proposer_election.rs | 2 +- .../src/liveness/rotating_proposer_test.rs | 2 +- .../src/liveness/round_proposer_election.rs | 2 +- consensus/src/liveness/round_proposer_test.rs | 2 +- consensus/src/liveness/round_state.rs | 2 +- consensus/src/liveness/round_state_test.rs | 2 +- consensus/src/logging.rs | 2 +- consensus/src/metrics_safety_rules.rs | 2 +- consensus/src/network.rs | 2 +- consensus/src/network_interface.rs | 2 +- consensus/src/network_tests.rs | 2 +- consensus/src/pending_votes.rs | 2 +- consensus/src/persistent_liveness_storage.rs | 2 +- consensus/src/round_manager.rs | 2 +- consensus/src/round_manager_fuzzing.rs | 2 +- consensus/src/round_manager_test.rs | 2 +- consensus/src/state_computer.rs | 2 +- consensus/src/state_replication.rs | 2 +- .../src/test_utils/mock_state_computer.rs | 2 +- consensus/src/test_utils/mock_storage.rs | 2 +- consensus/src/test_utils/mock_txn_manager.rs | 2 +- consensus/src/test_utils/mod.rs | 2 +- consensus/src/twins/basic_twins_test.rs | 2 +- consensus/src/twins/mod.rs | 2 +- consensus/src/twins/twins_node.rs | 2 +- consensus/src/txn_manager.rs | 2 +- consensus/src/util/mock_time_service.rs | 2 +- consensus/src/util/mod.rs | 2 +- consensus/src/util/time_service.rs | 2 +- crates/aptos-bitvec/src/lib.rs | 2 +- crates/aptos-crypto-derive/src/hasher.rs | 2 +- crates/aptos-crypto-derive/src/lib.rs | 2 +- crates/aptos-crypto-derive/src/unions.rs | 2 +- crates/aptos-crypto/benches/ed25519.rs | 2 +- crates/aptos-crypto/benches/noise.rs | 2 +- crates/aptos-crypto/src/compat.rs | 2 +- crates/aptos-crypto/src/ed25519.rs | 2 +- crates/aptos-crypto/src/error.rs | 2 +- crates/aptos-crypto/src/hash.rs | 2 +- crates/aptos-crypto/src/hkdf.rs | 2 +- crates/aptos-crypto/src/lib.rs | 2 +- crates/aptos-crypto/src/multi_ed25519.rs | 2 +- crates/aptos-crypto/src/noise.rs | 2 +- crates/aptos-crypto/src/tags.rs | 2 +- crates/aptos-crypto/src/test_utils.rs | 2 +- crates/aptos-crypto/src/traits.rs | 2 +- .../aptos-crypto/src/unit_tests/bcs_test.rs | 2 +- .../src/unit_tests/compat_test.rs | 2 +- .../src/unit_tests/compilation/cross_test.rs | 2 +- .../compilation/cross_test_trait_obj.rs | 2 +- .../compilation/cross_test_trait_obj_pub.rs | 2 +- .../compilation/cross_test_trait_obj_sig.rs | 2 +- .../src/unit_tests/compilation/small_kdf.rs | 2 +- .../aptos-crypto/src/unit_tests/cross_test.rs | 2 +- .../src/unit_tests/cryptohasher.rs | 2 +- .../src/unit_tests/ed25519_test.rs | 2 +- .../aptos-crypto/src/unit_tests/hash_test.rs | 2 +- .../aptos-crypto/src/unit_tests/hkdf_test.rs | 2 +- crates/aptos-crypto/src/unit_tests/mod.rs | 2 +- .../src/unit_tests/multi_ed25519_test.rs | 2 +- .../aptos-crypto/src/unit_tests/noise_test.rs | 2 +- crates/aptos-crypto/src/validatable.rs | 2 +- crates/aptos-crypto/src/x25519.rs | 2 +- crates/aptos-faucet/src/lib.rs | 2 +- crates/aptos-faucet/src/main.rs | 4 +- crates/aptos-faucet/src/mint.rs | 2 +- crates/aptos-id-generator/src/lib.rs | 2 +- crates/aptos-infallible/src/lib.rs | 2 +- crates/aptos-infallible/src/math.rs | 2 +- crates/aptos-infallible/src/mutex.rs | 2 +- crates/aptos-infallible/src/nonzero.rs | 2 +- crates/aptos-infallible/src/rwlock.rs | 2 +- crates/aptos-infallible/src/time.rs | 2 +- crates/aptos-log-derive/src/lib.rs | 2 +- crates/aptos-logger/src/aptos_logger.rs | 2 +- crates/aptos-logger/src/counters.rs | 2 +- crates/aptos-logger/src/event.rs | 2 +- crates/aptos-logger/src/filter.rs | 2 +- crates/aptos-logger/src/kv.rs | 2 +- crates/aptos-logger/src/lib.rs | 2 +- crates/aptos-logger/src/logger.rs | 2 +- crates/aptos-logger/src/macros.rs | 2 +- crates/aptos-logger/src/metadata.rs | 2 +- crates/aptos-logger/src/sample.rs | 2 +- crates/aptos-logger/src/security.rs | 2 +- crates/aptos-logger/src/struct_log.rs | 2 +- crates/aptos-logger/src/tracing_adapter.rs | 2 +- crates/aptos-logger/tests/derive.rs | 2 +- crates/aptos-logger/tests/logger.rs | 2 +- .../tests/logger_custom_format.rs | 2 +- crates/aptos-logger/tests/remote.rs | 2 +- .../tests/tracing_translation_tests.rs | 2 +- crates/aptos-metrics-core/src/lib.rs | 2 +- crates/aptos-metrics/build.rs | 2 +- crates/aptos-metrics/src/json_encoder.rs | 2 +- crates/aptos-metrics/src/json_metrics.rs | 2 +- crates/aptos-metrics/src/lib.rs | 2 +- crates/aptos-metrics/src/metric_server.rs | 2 +- crates/aptos-metrics/src/op_counters.rs | 2 +- crates/aptos-metrics/src/public_metrics.rs | 2 +- .../aptos-metrics/src/unit_tests/lib_test.rs | 2 +- crates/aptos-metrics/src/unit_tests/mod.rs | 2 +- .../src/growing_subset.rs | 2 +- crates/aptos-proptest-helpers/src/lib.rs | 2 +- .../aptos-proptest-helpers/src/repeat_vec.rs | 2 +- .../aptos-proptest-helpers/src/unit_tests.rs | 2 +- .../src/unit_tests/growing_subset_tests.rs | 2 +- .../src/unit_tests/pick_idx_tests.rs | 2 +- .../src/unit_tests/repeat_vec_tests.rs | 2 +- .../src/value_generator.rs | 2 +- crates/aptos-rate-limiter/src/async_lib.rs | 2 +- crates/aptos-rate-limiter/src/lib.rs | 2 +- crates/aptos-rate-limiter/src/main.rs | 2 +- crates/aptos-rate-limiter/src/rate_limit.rs | 2 +- crates/aptos-rest-client/src/dpn.rs | 2 +- crates/aptos-rest-client/src/error.rs | 2 +- crates/aptos-rest-client/src/faucet.rs | 2 +- crates/aptos-rest-client/src/lib.rs | 2 +- crates/aptos-rest-client/src/response.rs | 2 +- crates/aptos-rest-client/src/state.rs | 2 +- crates/aptos-rest-client/src/types.rs | 2 +- crates/aptos-rest-client/src/views.rs | 2 +- crates/aptos-retrier/src/lib.rs | 2 +- crates/aptos-temppath/src/lib.rs | 2 +- crates/aptos-time-service/src/interval.rs | 2 +- crates/aptos-time-service/src/lib.rs | 2 +- crates/aptos-time-service/src/mock.rs | 2 +- crates/aptos-time-service/src/real.rs | 2 +- crates/aptos-time-service/src/timeout.rs | 2 +- crates/aptos-wallet/src/error.rs | 2 +- crates/aptos-wallet/src/internal_macros.rs | 2 +- crates/aptos-wallet/src/io_utils.rs | 2 +- crates/aptos-wallet/src/key_factory.rs | 2 +- crates/aptos-wallet/src/lib.rs | 2 +- crates/aptos-wallet/src/mnemonic.rs | 2 +- crates/aptos-wallet/src/wallet_library.rs | 2 +- crates/aptos-workspace-hack/build.rs | 2 +- crates/aptos-workspace-hack/src/lib.rs | 2 +- crates/bounded-executor/src/lib.rs | 2 +- crates/channel/src/aptos_channel.rs | 2 +- crates/channel/src/aptos_channel_test.rs | 2 +- crates/channel/src/lib.rs | 2 +- crates/channel/src/message_queues.rs | 2 +- crates/channel/src/message_queues_test.rs | 2 +- crates/channel/src/test.rs | 2 +- crates/channel/tests/many-keys-stress-test.rs | 2 +- crates/crash-handler/src/lib.rs | 2 +- crates/debug-interface/src/lib.rs | 2 +- .../debug-interface/src/node_debug_service.rs | 2 +- crates/fallible/src/copy_from_slice.rs | 2 +- crates/fallible/src/lib.rs | 2 +- crates/num-variants/src/lib.rs | 2 +- crates/num-variants/tests/basic.rs | 2 +- crates/proxy/src/lib.rs | 2 +- crates/short-hex-str/src/lib.rs | 2 +- .../src/atomic_histogram.rs | 2 +- crates/transaction-emitter/src/cluster.rs | 2 +- crates/transaction-emitter/src/instance.rs | 2 +- crates/transaction-emitter/src/lib.rs | 2 +- crates/transaction-emitter/src/main.rs | 2 +- .../static/examples/first_transaction.py | 2 +- .../static/examples/hello_blockchain.py | 2 +- devtools/x-core/src/core_config.rs | 2 +- devtools/x-core/src/errors.rs | 2 +- devtools/x-core/src/git.rs | 2 +- devtools/x-core/src/graph.rs | 2 +- devtools/x-core/src/lib.rs | 2 +- devtools/x-core/src/workspace_subset.rs | 2 +- devtools/x-lint/src/content.rs | 2 +- devtools/x-lint/src/file_path.rs | 2 +- devtools/x-lint/src/lib.rs | 2 +- devtools/x-lint/src/package.rs | 2 +- devtools/x-lint/src/project.rs | 2 +- devtools/x-lint/src/runner.rs | 2 +- devtools/x/src/bench.rs | 2 +- devtools/x/src/build.rs | 2 +- devtools/x/src/cargo.rs | 2 +- devtools/x/src/cargo/build_args.rs | 2 +- devtools/x/src/cargo/selected_package.rs | 2 +- devtools/x/src/changed_since.rs | 2 +- devtools/x/src/check.rs | 2 +- devtools/x/src/clippy.rs | 2 +- devtools/x/src/config.rs | 2 +- devtools/x/src/context.rs | 2 +- devtools/x/src/diff_summary.rs | 2 +- devtools/x/src/fix.rs | 2 +- devtools/x/src/fmt.rs | 2 +- devtools/x/src/generate_summaries.rs | 2 +- devtools/x/src/generate_workspace_hack.rs | 2 +- devtools/x/src/installer.rs | 2 +- devtools/x/src/lint/allowed_paths.rs | 2 +- devtools/x/src/lint/determinator.rs | 2 +- devtools/x/src/lint/guppy.rs | 2 +- devtools/x/src/lint/license.rs | 4 +- devtools/x/src/lint/mod.rs | 2 +- devtools/x/src/lint/toml.rs | 2 +- devtools/x/src/lint/whitespace.rs | 2 +- devtools/x/src/lint/workspace_classify.rs | 2 +- devtools/x/src/lint/workspace_hack.rs | 2 +- devtools/x/src/main.rs | 2 +- devtools/x/src/nextest.rs | 2 +- devtools/x/src/playground.rs | 2 +- devtools/x/src/test.rs | 2 +- devtools/x/src/tools.rs | 2 +- devtools/x/src/utils.rs | 2 +- docker/aptos-build.sh | 2 +- docker/build-aws.sh | 2 +- docker/build-common.sh | 2 +- docker/build-push-local.sh | 2 +- docker/build_push.sh | 2 +- docker/compose/test_docker_compose.sh | 2 +- docker/docker_republish.sh | 2 +- docker/faucet/build.sh | 2 +- docker/forge/build.sh | 2 +- docker/init/build.sh | 2 +- docker/install-tools.sh | 2 +- docker/safety-rules/build.sh | 2 +- docker/tag-and-push.sh | 2 +- docker/tools/build.sh | 2 +- docker/validator/build.sh | 2 +- docker/vault/run.sh | 2 +- documentation/specifications/README.md | 4 +- .../lbft-verification/lbft-verification.tex | 2 +- .../src/bin/db-bootstrapper.rs | 2 +- .../src/execution_correctness.rs | 2 +- .../src/execution_correctness_manager.rs | 2 +- execution/execution-correctness/src/lib.rs | 2 +- execution/execution-correctness/src/local.rs | 2 +- execution/execution-correctness/src/main.rs | 2 +- .../execution-correctness/src/process.rs | 2 +- .../src/remote_service.rs | 2 +- .../execution-correctness/src/serializer.rs | 2 +- .../execution-correctness/src/tests/local.rs | 2 +- .../execution-correctness/src/tests/mod.rs | 2 +- .../src/tests/serializer.rs | 2 +- .../execution-correctness/src/tests/suite.rs | 2 +- .../execution-correctness/src/tests/thread.rs | 2 +- execution/execution-correctness/src/thread.rs | 2 +- .../execution-correctness/tests/binary.rs | 2 +- .../benches/executor_benchmark.rs | 2 +- .../executor-benchmark/src/db_generator.rs | 2 +- execution/executor-benchmark/src/lib.rs | 2 +- execution/executor-benchmark/src/main.rs | 2 +- .../src/transaction_committer.rs | 2 +- .../src/transaction_executor.rs | 2 +- .../src/transaction_generator.rs | 2 +- .../src/integration_test_impl.rs | 2 +- execution/executor-test-helpers/src/lib.rs | 2 +- execution/executor-types/src/error.rs | 2 +- .../executor-types/src/executed_chunk.rs | 2 +- execution/executor-types/src/lib.rs | 2 +- execution/executor/src/block_executor.rs | 2 +- execution/executor/src/chunk_executor.rs | 2 +- .../src/components/apply_chunk_output.rs | 2 +- .../executor/src/components/block_tree/mod.rs | 2 +- .../src/components/block_tree/test.rs | 2 +- .../src/components/chunk_commit_queue.rs | 2 +- .../executor/src/components/chunk_output.rs | 2 +- execution/executor/src/components/mod.rs | 2 +- execution/executor/src/db_bootstrapper.rs | 2 +- execution/executor/src/fuzzing.rs | 2 +- execution/executor/src/lib.rs | 2 +- execution/executor/src/logging.rs | 2 +- execution/executor/src/metrics.rs | 2 +- .../executor/src/mock_vm/mock_vm_test.rs | 2 +- execution/executor/src/mock_vm/mod.rs | 2 +- .../src/tests/chunk_executor_tests.rs | 2 +- execution/executor/src/tests/mod.rs | 2 +- .../executor/tests/db_bootstrapper_test.rs | 2 +- .../tests/storage_integration_test.rs | 2 +- mempool/src/core_mempool/index.rs | 2 +- mempool/src/core_mempool/mempool.rs | 2 +- mempool/src/core_mempool/mod.rs | 2 +- mempool/src/core_mempool/transaction.rs | 2 +- mempool/src/core_mempool/transaction_store.rs | 2 +- mempool/src/core_mempool/ttl_cache.rs | 2 +- mempool/src/counters.rs | 2 +- mempool/src/lib.rs | 2 +- mempool/src/logging.rs | 2 +- mempool/src/shared_mempool/coordinator.rs | 2 +- mempool/src/shared_mempool/mod.rs | 2 +- mempool/src/shared_mempool/network.rs | 2 +- mempool/src/shared_mempool/runtime.rs | 2 +- mempool/src/shared_mempool/tasks.rs | 2 +- mempool/src/shared_mempool/types.rs | 2 +- mempool/src/tests/common.rs | 2 +- mempool/src/tests/core_mempool_test.rs | 2 +- mempool/src/tests/fuzzing.rs | 2 +- mempool/src/tests/integration_tests.rs | 2 +- mempool/src/tests/mocks.rs | 2 +- mempool/src/tests/mod.rs | 2 +- mempool/src/tests/multi_node_test.rs | 2 +- mempool/src/tests/node.rs | 2 +- mempool/src/tests/shared_mempool_test.rs | 2 +- mempool/src/tests/test_framework.rs | 2 +- network/builder/src/builder.rs | 2 +- network/builder/src/dummy.rs | 2 +- network/builder/src/lib.rs | 2 +- network/builder/src/test.rs | 2 +- network/discovery/src/counters.rs | 2 +- network/discovery/src/file.rs | 2 +- network/discovery/src/lib.rs | 2 +- network/discovery/src/validator_set.rs | 2 +- network/memsocket/src/lib.rs | 2 +- network/memsocket/tests/memory_listener.rs | 2 +- network/memsocket/tests/memory_socket.rs | 2 +- network/netcore/src/framing.rs | 2 +- network/netcore/src/lib.rs | 2 +- network/netcore/src/transport/and_then.rs | 2 +- network/netcore/src/transport/boxed.rs | 2 +- network/netcore/src/transport/memory.rs | 2 +- network/netcore/src/transport/mod.rs | 2 +- .../netcore/src/transport/proxy_protocol.rs | 2 +- network/netcore/src/transport/tcp.rs | 2 +- network/src/application/interface.rs | 2 +- network/src/application/mod.rs | 2 +- network/src/application/storage.rs | 2 +- network/src/application/tests.rs | 2 +- network/src/application/types.rs | 2 +- network/src/connectivity_manager/builder.rs | 2 +- network/src/connectivity_manager/mod.rs | 2 +- network/src/connectivity_manager/test.rs | 2 +- network/src/constants.rs | 2 +- network/src/counters.rs | 2 +- network/src/error.rs | 2 +- network/src/fuzzing.rs | 2 +- network/src/lib.rs | 2 +- network/src/logging.rs | 2 +- network/src/noise/error.rs | 2 +- network/src/noise/fuzzing.rs | 2 +- network/src/noise/handshake.rs | 2 +- network/src/noise/mod.rs | 2 +- network/src/noise/stream.rs | 2 +- network/src/peer/fuzzing.rs | 2 +- network/src/peer/mod.rs | 2 +- network/src/peer/test.rs | 2 +- network/src/peer_manager/builder.rs | 2 +- .../src/peer_manager/conn_notifs_channel.rs | 2 +- network/src/peer_manager/error.rs | 2 +- network/src/peer_manager/mod.rs | 2 +- network/src/peer_manager/senders.rs | 2 +- network/src/peer_manager/tests.rs | 2 +- network/src/peer_manager/transport.rs | 2 +- network/src/peer_manager/types.rs | 2 +- network/src/protocols/direct_send/mod.rs | 2 +- .../src/protocols/health_checker/builder.rs | 2 +- .../src/protocols/health_checker/interface.rs | 2 +- network/src/protocols/health_checker/mod.rs | 2 +- network/src/protocols/health_checker/test.rs | 2 +- network/src/protocols/identity.rs | 2 +- network/src/protocols/mod.rs | 2 +- network/src/protocols/network/mod.rs | 2 +- network/src/protocols/rpc/error.rs | 2 +- network/src/protocols/rpc/mod.rs | 2 +- network/src/protocols/wire/handshake.rs | 2 +- .../src/protocols/wire/handshake/v1/mod.rs | 2 +- .../src/protocols/wire/handshake/v1/test.rs | 2 +- network/src/protocols/wire/messaging.rs | 2 +- .../src/protocols/wire/messaging/v1/mod.rs | 2 +- .../src/protocols/wire/messaging/v1/test.rs | 2 +- network/src/protocols/wire/mod.rs | 2 +- network/src/testutils/builder.rs | 2 +- network/src/testutils/fake_socket.rs | 2 +- network/src/testutils/mod.rs | 2 +- network/src/testutils/test_framework.rs | 2 +- network/src/testutils/test_node.rs | 2 +- network/src/transport/mod.rs | 2 +- network/src/transport/test.rs | 2 +- scripts/cargo_check_dependencies.sh | 2 +- scripts/cargo_update_outdated.sh | 2 +- scripts/changed-files.sh | 2 +- scripts/cli/start_cli_testnet.sh | 2 +- scripts/dev_setup.sh | 2 +- scripts/dockerhub_prune.sh | 2 +- scripts/fgi/kube.py | 2 +- scripts/fgi/run | 2 +- scripts/git-checks.sh | 2 +- scripts/run_quarantined.sh | 2 +- scripts/weekly-dep-report.sh | 2 +- sdk/offchain/src/identifier.rs | 2 +- sdk/offchain/src/jws.rs | 2 +- sdk/offchain/src/lib.rs | 2 +- sdk/offchain/src/payment_command.rs | 2 +- sdk/offchain/src/subaddress.rs | 2 +- sdk/offchain/src/types.rs | 2 +- sdk/src/lib.rs | 2 +- sdk/src/transaction_builder.rs | 2 +- sdk/src/types.rs | 2 +- sdk/transaction-builder/src/aptos_stdlib.rs | 356 +- sdk/transaction-builder/src/error_explain.rs | 2 +- .../src/experimental_stdlib.rs | 1124 +- sdk/transaction-builder/src/lib.rs | 2 +- sdk/transaction-builder/src/stdlib.rs | 9252 ++++++++++++++++- secure/net/src/lib.rs | 2 +- secure/push-metrics/src/lib.rs | 2 +- secure/storage/github/src/lib.rs | 2 +- secure/storage/src/crypto_kv_storage.rs | 2 +- secure/storage/src/crypto_storage.rs | 2 +- secure/storage/src/error.rs | 2 +- secure/storage/src/github.rs | 2 +- secure/storage/src/in_memory.rs | 2 +- secure/storage/src/kv_storage.rs | 2 +- secure/storage/src/lib.rs | 2 +- secure/storage/src/namespaced.rs | 2 +- secure/storage/src/on_disk.rs | 2 +- secure/storage/src/policy.rs | 2 +- secure/storage/src/storage.rs | 2 +- secure/storage/src/tests/github.rs | 2 +- secure/storage/src/tests/in_memory.rs | 2 +- secure/storage/src/tests/mod.rs | 2 +- secure/storage/src/tests/on_disk.rs | 2 +- secure/storage/src/tests/suite.rs | 2 +- secure/storage/src/tests/vault.rs | 2 +- secure/storage/src/vault.rs | 2 +- secure/storage/vault/src/dev.rs | 2 +- secure/storage/vault/src/fuzzing.rs | 2 +- secure/storage/vault/src/lib.rs | 2 +- .../aptos-data-client/src/aptosnet/logging.rs | 2 +- .../aptos-data-client/src/aptosnet/metrics.rs | 2 +- .../aptos-data-client/src/aptosnet/mod.rs | 2 +- .../aptos-data-client/src/aptosnet/state.rs | 2 +- .../aptos-data-client/src/aptosnet/tests.rs | 2 +- state-sync/aptos-data-client/src/lib.rs | 2 +- .../consensus-notifications/src/lib.rs | 2 +- .../event-notifications/src/lib.rs | 2 +- .../event-notifications/src/tests.rs | 2 +- .../mempool-notifications/src/lib.rs | 2 +- state-sync/state-sync-v1/src/bootstrapper.rs | 2 +- state-sync/state-sync-v1/src/chunk_request.rs | 2 +- .../state-sync-v1/src/chunk_response.rs | 2 +- state-sync/state-sync-v1/src/client.rs | 2 +- state-sync/state-sync-v1/src/coordinator.rs | 2 +- state-sync/state-sync-v1/src/counters.rs | 2 +- state-sync/state-sync-v1/src/error.rs | 2 +- .../state-sync-v1/src/executor_proxy.rs | 2 +- state-sync/state-sync-v1/src/fuzzing.rs | 2 +- state-sync/state-sync-v1/src/lib.rs | 2 +- state-sync/state-sync-v1/src/logging.rs | 2 +- state-sync/state-sync-v1/src/network.rs | 2 +- .../state-sync-v1/src/request_manager.rs | 2 +- .../state-sync-v1/src/shared_components.rs | 2 +- .../state-sync-v1/tests/integration_tests.rs | 2 +- .../state-sync-v1/tests/test_harness.rs | 2 +- .../src/data_notification.rs | 2 +- .../data-streaming-service/src/data_stream.rs | 2 +- .../data-streaming-service/src/error.rs | 2 +- .../data-streaming-service/src/lib.rs | 2 +- .../data-streaming-service/src/logging.rs | 2 +- .../data-streaming-service/src/metrics.rs | 2 +- .../src/stream_engine.rs | 2 +- .../src/streaming_client.rs | 2 +- .../src/streaming_service.rs | 2 +- .../src/tests/data_stream.rs | 2 +- .../data-streaming-service/src/tests/mod.rs | 2 +- .../src/tests/stream_engine.rs | 2 +- .../src/tests/streaming_client.rs | 2 +- .../src/tests/streaming_service.rs | 2 +- .../data-streaming-service/src/tests/utils.rs | 2 +- .../state-sync-driver/src/bootstrapper.rs | 2 +- .../src/continuous_syncer.rs | 2 +- .../state-sync-driver/src/driver.rs | 2 +- .../state-sync-driver/src/driver_client.rs | 2 +- .../state-sync-driver/src/driver_factory.rs | 2 +- .../state-sync-driver/src/error.rs | 2 +- .../state-sync-driver/src/lib.rs | 2 +- .../src/notification_handlers.rs | 2 +- .../src/storage_synchronizer.rs | 2 +- .../state-sync-driver/src/tests/driver.rs | 2 +- .../state-sync-driver/src/tests/mod.rs | 2 +- .../state-sync-driver/src/tests/utils.rs | 2 +- .../state-sync-driver/src/utils.rs | 2 +- .../state-sync-multiplexer/src/lib.rs | 2 +- state-sync/storage-service/client/src/lib.rs | 2 +- state-sync/storage-service/server/src/lib.rs | 2 +- .../storage-service/server/src/logging.rs | 2 +- .../storage-service/server/src/metrics.rs | 2 +- .../storage-service/server/src/network.rs | 2 +- .../storage-service/server/src/tests.rs | 2 +- state-sync/storage-service/types/src/lib.rs | 2 +- storage/accumulator/src/lib.rs | 2 +- storage/accumulator/src/test_helpers.rs | 2 +- storage/accumulator/src/tests/mod.rs | 2 +- storage/accumulator/src/tests/proof_test.rs | 2 +- storage/accumulator/src/tests/write_test.rs | 2 +- storage/aptosdb/src/aptosdb_test.rs | 2 +- storage/aptosdb/src/aptossum/mod.rs | 2 +- storage/aptosdb/src/backup/backup_handler.rs | 2 +- storage/aptosdb/src/backup/mod.rs | 2 +- storage/aptosdb/src/backup/restore_handler.rs | 2 +- storage/aptosdb/src/backup/test.rs | 2 +- storage/aptosdb/src/change_set.rs | 2 +- storage/aptosdb/src/errors.rs | 2 +- storage/aptosdb/src/event_store/mod.rs | 2 +- storage/aptosdb/src/event_store/test.rs | 2 +- storage/aptosdb/src/ledger_counters/mod.rs | 2 +- storage/aptosdb/src/ledger_counters/test.rs | 2 +- .../src/ledger_store/ledger_info_test.rs | 2 +- storage/aptosdb/src/ledger_store/mod.rs | 2 +- .../src/ledger_store/transaction_info_test.rs | 2 +- storage/aptosdb/src/lib.rs | 2 +- storage/aptosdb/src/metrics.rs | 2 +- storage/aptosdb/src/pruner/mod.rs | 2 +- storage/aptosdb/src/pruner/test.rs | 2 +- .../src/schema/epoch_by_version/mod.rs | 2 +- .../src/schema/epoch_by_version/test.rs | 2 +- storage/aptosdb/src/schema/event/mod.rs | 2 +- storage/aptosdb/src/schema/event/test.rs | 2 +- .../src/schema/event_accumulator/mod.rs | 2 +- .../src/schema/event_accumulator/test.rs | 2 +- .../aptosdb/src/schema/event_by_key/mod.rs | 2 +- .../aptosdb/src/schema/event_by_key/test.rs | 2 +- .../src/schema/event_by_version/mod.rs | 2 +- .../src/schema/event_by_version/test.rs | 2 +- .../src/schema/jellyfish_merkle_node/mod.rs | 2 +- .../src/schema/jellyfish_merkle_node/test.rs | 2 +- .../aptosdb/src/schema/ledger_counters/mod.rs | 2 +- .../src/schema/ledger_counters/test.rs | 2 +- storage/aptosdb/src/schema/ledger_info/mod.rs | 2 +- .../aptosdb/src/schema/ledger_info/test.rs | 2 +- storage/aptosdb/src/schema/mod.rs | 2 +- .../src/schema/stale_node_index/mod.rs | 2 +- .../src/schema/stale_node_index/test.rs | 2 +- storage/aptosdb/src/schema/transaction/mod.rs | 2 +- .../aptosdb/src/schema/transaction/test.rs | 2 +- .../src/schema/transaction_accumulator/mod.rs | 2 +- .../schema/transaction_accumulator/test.rs | 2 +- .../src/schema/transaction_by_account/mod.rs | 2 +- .../src/schema/transaction_by_account/test.rs | 2 +- .../src/schema/transaction_by_hash/mod.rs | 2 +- .../src/schema/transaction_by_hash/test.rs | 2 +- .../src/schema/transaction_info/mod.rs | 2 +- .../src/schema/transaction_info/test.rs | 2 +- storage/aptosdb/src/schema/write_set/mod.rs | 2 +- storage/aptosdb/src/schema/write_set/test.rs | 2 +- storage/aptosdb/src/state_store/mod.rs | 2 +- .../src/state_store/state_store_test.rs | 2 +- storage/aptosdb/src/system_store/mod.rs | 2 +- storage/aptosdb/src/system_store/test.rs | 2 +- storage/aptosdb/src/test_helper.rs | 2 +- storage/aptosdb/src/transaction_store/mod.rs | 2 +- storage/aptosdb/src/transaction_store/test.rs | 2 +- storage/aptossum/src/main.rs | 2 +- .../src/backup_types/epoch_ending/backup.rs | 2 +- .../src/backup_types/epoch_ending/manifest.rs | 2 +- .../src/backup_types/epoch_ending/mod.rs | 2 +- .../src/backup_types/epoch_ending/restore.rs | 2 +- .../src/backup_types/epoch_ending/tests.rs | 2 +- .../backup/backup-cli/src/backup_types/mod.rs | 2 +- .../src/backup_types/state_snapshot/backup.rs | 2 +- .../backup_types/state_snapshot/manifest.rs | 2 +- .../src/backup_types/state_snapshot/mod.rs | 2 +- .../backup_types/state_snapshot/restore.rs | 2 +- .../src/backup_types/state_snapshot/tests.rs | 2 +- .../backup-cli/src/backup_types/tests.rs | 2 +- .../src/backup_types/transaction/backup.rs | 2 +- .../src/backup_types/transaction/manifest.rs | 2 +- .../src/backup_types/transaction/mod.rs | 2 +- .../src/backup_types/transaction/restore.rs | 2 +- .../src/backup_types/transaction/tests.rs | 2 +- .../backup-cli/src/bin/db-backup-verify.rs | 2 +- .../backup/backup-cli/src/bin/db-backup.rs | 2 +- .../backup/backup-cli/src/bin/db-restore.rs | 2 +- .../backup-cli/src/bin/replay-verify.rs | 2 +- .../backup-cli/src/coordinators/backup.rs | 2 +- .../backup/backup-cli/src/coordinators/mod.rs | 2 +- .../src/coordinators/replay_verify.rs | 2 +- .../backup-cli/src/coordinators/restore.rs | 2 +- .../backup-cli/src/coordinators/verify.rs | 2 +- storage/backup/backup-cli/src/lib.rs | 2 +- .../backup/backup-cli/src/metadata/cache.rs | 2 +- storage/backup/backup-cli/src/metadata/mod.rs | 2 +- .../backup/backup-cli/src/metadata/view.rs | 2 +- .../backup/backup-cli/src/metrics/backup.rs | 2 +- .../backup/backup-cli/src/metrics/metadata.rs | 2 +- storage/backup/backup-cli/src/metrics/mod.rs | 2 +- .../backup/backup-cli/src/metrics/restore.rs | 2 +- .../backup/backup-cli/src/metrics/verify.rs | 2 +- .../src/storage/command_adapter/command.rs | 2 +- .../src/storage/command_adapter/config.rs | 2 +- .../src/storage/command_adapter/mod.rs | 2 +- .../src/storage/command_adapter/tests.rs | 2 +- .../backup-cli/src/storage/local_fs/mod.rs | 2 +- .../backup-cli/src/storage/local_fs/tests.rs | 2 +- storage/backup/backup-cli/src/storage/mod.rs | 2 +- .../backup-cli/src/storage/test_util.rs | 2 +- .../backup/backup-cli/src/storage/tests.rs | 2 +- .../src/utils/backup_service_client.rs | 2 +- .../backup-cli/src/utils/error_notes.rs | 2 +- storage/backup/backup-cli/src/utils/mod.rs | 2 +- .../backup-cli/src/utils/read_record_bytes.rs | 2 +- .../backup-cli/src/utils/storage_ext.rs | 2 +- .../backup-cli/src/utils/stream/buffered_x.rs | 2 +- .../src/utils/stream/futures_ordered_x.rs | 2 +- .../src/utils/stream/futures_unordered_x.rs | 2 +- .../backup/backup-cli/src/utils/stream/mod.rs | 2 +- .../src/utils/stream/try_buffered_x.rs | 2 +- .../backup/backup-cli/src/utils/test_utils.rs | 2 +- .../backup/backup-service/src/handlers/mod.rs | 2 +- .../backup-service/src/handlers/utils.rs | 2 +- storage/backup/backup-service/src/lib.rs | 2 +- storage/inspector/src/main.rs | 2 +- .../src/iterator/iterator_test.rs | 2 +- storage/jellyfish-merkle/src/iterator/mod.rs | 2 +- .../src/jellyfish_merkle_test.rs | 2 +- storage/jellyfish-merkle/src/lib.rs | 2 +- storage/jellyfish-merkle/src/metrics.rs | 2 +- .../jellyfish-merkle/src/mock_tree_store.rs | 2 +- storage/jellyfish-merkle/src/node_type/mod.rs | 2 +- .../src/node_type/node_type_test.rs | 2 +- storage/jellyfish-merkle/src/restore/mod.rs | 2 +- .../src/restore/restore_test.rs | 2 +- storage/jellyfish-merkle/src/test_helper.rs | 2 +- .../jellyfish-merkle/src/tree_cache/mod.rs | 2 +- .../src/tree_cache/tree_cache_test.rs | 2 +- storage/schemadb/src/lib.rs | 2 +- storage/schemadb/src/metrics.rs | 2 +- storage/schemadb/src/schema.rs | 2 +- storage/schemadb/tests/db.rs | 2 +- storage/schemadb/tests/iterator.rs | 2 +- storage/scratchpad/benches/sparse_merkle.rs | 2 +- storage/scratchpad/src/lib.rs | 2 +- .../src/sparse_merkle/batches_update.rs | 2 +- .../scratchpad/src/sparse_merkle/metrics.rs | 2 +- storage/scratchpad/src/sparse_merkle/mod.rs | 2 +- storage/scratchpad/src/sparse_merkle/node.rs | 2 +- .../src/sparse_merkle/sparse_merkle_test.rs | 2 +- .../src/sparse_merkle/test_utils/mod.rs | 2 +- .../src/sparse_merkle/test_utils/naive_smt.rs | 2 +- .../sparse_merkle/test_utils/proof_reader.rs | 2 +- .../test_utils/proptest_helpers.rs | 2 +- .../scratchpad/src/sparse_merkle/updater.rs | 2 +- storage/scratchpad/src/sparse_merkle/utils.rs | 2 +- storage/state-view/src/lib.rs | 2 +- storage/storage-client/src/lib.rs | 2 +- storage/storage-interface/src/lib.rs | 2 +- storage/storage-interface/src/mock.rs | 2 +- storage/storage-interface/src/state_view.rs | 2 +- storage/storage-service/src/lib.rs | 2 +- .../src/storage_service_test.rs | 2 +- testsuite/aptos-fuzzer/fuzz/build.rs | 2 +- .../fuzz/fuzz_targets/fuzz_runner.rs | 2 +- .../fuzz/google-oss-fuzz/build.sh | 2 +- .../fuzz/google-oss-fuzz/build_corpus.sh | 2 +- .../fuzz/google-oss-fuzz/build_fuzzer.sh | 2 +- .../fuzz/google-oss-fuzz/fuzzer_builder.rs | 2 +- testsuite/aptos-fuzzer/src/bin/flamegraph.rs | 2 +- testsuite/aptos-fuzzer/src/bin/investigate.rs | 4 +- testsuite/aptos-fuzzer/src/commands.rs | 2 +- testsuite/aptos-fuzzer/src/coverage.rs | 2 +- testsuite/aptos-fuzzer/src/fuzz_targets.rs | 2 +- .../src/fuzz_targets/consensus.rs | 2 +- .../aptos-fuzzer/src/fuzz_targets/executor.rs | 2 +- .../aptos-fuzzer/src/fuzz_targets/mempool.rs | 2 +- .../aptos-fuzzer/src/fuzz_targets/move_vm.rs | 2 +- .../aptos-fuzzer/src/fuzz_targets/network.rs | 2 +- .../aptos-fuzzer/src/fuzz_targets/proof.rs | 2 +- .../src/fuzz_targets/safety_rules.rs | 2 +- .../src/fuzz_targets/secure_storage_vault.rs | 2 +- .../src/fuzz_targets/state_sync.rs | 2 +- .../aptos-fuzzer/src/fuzz_targets/storage.rs | 2 +- .../src/fuzz_targets/transaction.rs | 2 +- testsuite/aptos-fuzzer/src/fuzz_targets/vm.rs | 2 +- testsuite/aptos-fuzzer/src/lib.rs | 2 +- testsuite/aptos-fuzzer/src/main.rs | 2 +- testsuite/aptos-fuzzer/tests/artifacts.rs | 2 +- testsuite/forge-cli/src/lib.rs | 2 +- testsuite/forge-cli/src/main.rs | 2 +- .../forge/src/backend/k8s/cluster_helper.rs | 2 +- testsuite/forge/src/backend/k8s/mod.rs | 2 +- testsuite/forge/src/backend/k8s/node.rs | 2 +- testsuite/forge/src/backend/k8s/swarm.rs | 2 +- testsuite/forge/src/backend/local/cargo.rs | 2 +- testsuite/forge/src/backend/local/mod.rs | 2 +- testsuite/forge/src/backend/local/node.rs | 2 +- testsuite/forge/src/backend/local/swarm.rs | 2 +- testsuite/forge/src/backend/mod.rs | 2 +- testsuite/forge/src/github.rs | 2 +- testsuite/forge/src/interface/admin.rs | 2 +- testsuite/forge/src/interface/aptos.rs | 2 +- testsuite/forge/src/interface/chain_info.rs | 2 +- testsuite/forge/src/interface/factory.rs | 2 +- testsuite/forge/src/interface/mod.rs | 2 +- testsuite/forge/src/interface/network.rs | 2 +- testsuite/forge/src/interface/nft.rs | 2 +- testsuite/forge/src/interface/node.rs | 2 +- testsuite/forge/src/interface/public.rs | 2 +- testsuite/forge/src/interface/swarm.rs | 2 +- testsuite/forge/src/interface/test.rs | 2 +- testsuite/forge/src/lib.rs | 2 +- testsuite/forge/src/report.rs | 2 +- testsuite/forge/src/runner.rs | 2 +- testsuite/forge/src/slack.rs | 2 +- testsuite/generate-format/src/aptos.rs | 2 +- testsuite/generate-format/src/compute.rs | 2 +- testsuite/generate-format/src/consensus.rs | 2 +- testsuite/generate-format/src/lib.rs | 2 +- testsuite/generate-format/src/linter.rs | 2 +- testsuite/generate-format/src/move_abi.rs | 2 +- testsuite/generate-format/src/network.rs | 2 +- .../tests/detect_format_change.rs | 2 +- testsuite/generate-format/tests/linter.rs | 2 +- .../smoke-test/src/aptos/account_creation.rs | 2 +- testsuite/smoke-test/src/aptos/gas_check.rs | 2 +- .../smoke-test/src/aptos/mint_transfer.rs | 2 +- testsuite/smoke-test/src/aptos/mod.rs | 2 +- .../smoke-test/src/aptos/module_publish.rs | 2 +- testsuite/smoke-test/src/client.rs | 2 +- testsuite/smoke-test/src/consensus.rs | 2 +- .../smoke-test/src/dev_modules/module.move | 2 +- .../smoke-test/src/dev_modules/script.move | 2 +- testsuite/smoke-test/src/full_nodes.rs | 2 +- testsuite/smoke-test/src/fullnode.rs | 2 +- testsuite/smoke-test/src/genesis.rs | 2 +- testsuite/smoke-test/src/lib.rs | 2 +- testsuite/smoke-test/src/network.rs | 2 +- testsuite/smoke-test/src/nft_transaction.rs | 2 +- .../smoke-test/src/operational_tooling.rs | 2 +- testsuite/smoke-test/src/rest_api.rs | 2 +- .../smoke-test/src/scripts_and_modules.rs | 2 +- .../smoke-test/src/smoke_test_environment.rs | 2 +- testsuite/smoke-test/src/state_sync.rs | 2 +- testsuite/smoke-test/src/state_sync_v2.rs | 2 +- testsuite/smoke-test/src/storage.rs | 2 +- testsuite/smoke-test/src/test_utils.rs | 2 +- testsuite/smoke-test/src/transaction.rs | 2 +- testsuite/smoke-test/src/workspace_builder.rs | 2 +- testsuite/smoke-test/tests/forge-aptos.rs | 2 +- testsuite/smoke-test/tests/forge-nft.rs | 2 +- testsuite/smoke-test/tests/forge.rs | 2 +- testsuite/testcases/src/compatibility_test.rs | 2 +- testsuite/testcases/src/fixed_tps_test.rs | 2 +- testsuite/testcases/src/gas_price_test.rs | 2 +- testsuite/testcases/src/lib.rs | 2 +- .../testcases/src/partial_nodes_down_test.rs | 2 +- testsuite/testcases/src/performance_test.rs | 2 +- .../testcases/src/reconfiguration_test.rs | 2 +- .../testcases/src/state_sync_performance.rs | 2 +- .../tests/forge-local-compatibility.rs | 2 +- .../tests/forge-local-performance.rs | 2 +- types/src/access_path.rs | 2 +- types/src/account_address.rs | 2 +- types/src/account_config/constants/account.rs | 2 +- .../src/account_config/constants/addresses.rs | 2 +- types/src/account_config/constants/coins.rs | 2 +- .../constants/designated_dealer.rs | 2 +- types/src/account_config/constants/diem.rs | 2 +- types/src/account_config/constants/event.rs | 2 +- types/src/account_config/constants/mod.rs | 2 +- .../events/admin_transaction.rs | 2 +- .../events/base_url_rotation.rs | 2 +- types/src/account_config/events/burn.rs | 2 +- .../src/account_config/events/cancel_burn.rs | 2 +- .../events/compliance_key_rotation.rs | 2 +- .../account_config/events/create_account.rs | 2 +- .../events/exchange_rate_update.rs | 2 +- .../src/account_config/events/force_shift.rs | 2 +- types/src/account_config/events/mint.rs | 2 +- types/src/account_config/events/mod.rs | 2 +- types/src/account_config/events/new_block.rs | 2 +- types/src/account_config/events/new_epoch.rs | 2 +- types/src/account_config/events/preburn.rs | 2 +- .../account_config/events/received_mint.rs | 2 +- .../account_config/events/received_payment.rs | 2 +- .../src/account_config/events/sent_payment.rs | 2 +- types/src/account_config/mod.rs | 2 +- types/src/account_config/resources/account.rs | 2 +- types/src/account_config/resources/balance.rs | 2 +- .../resources/chain_account_info.rs | 2 +- .../src/account_config/resources/chain_id.rs | 2 +- .../account_config/resources/core_account.rs | 2 +- types/src/account_config/resources/crsn.rs | 2 +- .../account_config/resources/currency_info.rs | 2 +- .../resources/designated_dealer.rs | 2 +- .../resources/dual_attestation.rs | 2 +- .../account_config/resources/freezing_bit.rs | 2 +- .../resources/key_rotation_capability.rs | 2 +- types/src/account_config/resources/mod.rs | 2 +- .../resources/preburn_balance.rs | 2 +- .../account_config/resources/preburn_queue.rs | 2 +- .../resources/preburn_with_metadata.rs | 2 +- types/src/account_config/resources/role.rs | 2 +- types/src/account_config/resources/vasp.rs | 2 +- .../account_config/resources/vasp_domain.rs | 2 +- .../resources/withdraw_capability.rs | 2 +- types/src/account_state.rs | 2 +- types/src/account_state_blob.rs | 2 +- types/src/block_info.rs | 2 +- types/src/block_metadata.rs | 2 +- types/src/chain_id.rs | 2 +- types/src/contract_event.rs | 2 +- types/src/diem_id_identifier.rs | 2 +- types/src/epoch_change.rs | 2 +- types/src/epoch_state.rs | 2 +- types/src/event.rs | 2 +- types/src/ledger_info.rs | 2 +- types/src/lib.rs | 2 +- types/src/mempool_status.rs | 2 +- types/src/move_resource.rs | 2 +- types/src/network_address/mod.rs | 2 +- types/src/nft/mod.rs | 2 +- types/src/nft/tokens.rs | 2 +- types/src/nibble/mod.rs | 2 +- types/src/nibble/nibble_path/mod.rs | 2 +- .../nibble/nibble_path/nibble_path_test.rs | 2 +- types/src/on_chain_config/consensus_config.rs | 2 +- types/src/on_chain_config/diem_version.rs | 2 +- types/src/on_chain_config/mod.rs | 2 +- .../parallel_execution_config.rs | 2 +- .../on_chain_config/registered_currencies.rs | 2 +- types/src/on_chain_config/validator_set.rs | 2 +- types/src/on_chain_config/vm_config.rs | 2 +- .../on_chain_config/vm_publishing_option.rs | 2 +- .../src/proof/accumulator/accumulator_test.rs | 2 +- types/src/proof/accumulator/mock.rs | 2 +- types/src/proof/accumulator/mod.rs | 2 +- types/src/proof/definition.rs | 2 +- types/src/proof/mod.rs | 2 +- types/src/proof/position/mod.rs | 2 +- types/src/proof/position/position_test.rs | 2 +- types/src/proof/proptest_proof.rs | 2 +- types/src/proof/unit_tests/mod.rs | 2 +- .../proof/unit_tests/proof_conversion_test.rs | 2 +- types/src/proof/unit_tests/proof_test.rs | 2 +- types/src/proptest_types.rs | 2 +- types/src/serde_helper/mod.rs | 2 +- types/src/serde_helper/vec_bytes.rs | 2 +- types/src/state_proof.rs | 2 +- types/src/test_helpers/mod.rs | 2 +- .../test_helpers/transaction_test_helpers.rs | 2 +- types/src/timestamp.rs | 2 +- types/src/transaction/authenticator.rs | 2 +- types/src/transaction/change_set.rs | 2 +- types/src/transaction/helpers.rs | 2 +- types/src/transaction/metadata.rs | 2 +- types/src/transaction/mod.rs | 2 +- types/src/transaction/module.rs | 2 +- types/src/transaction/script.rs | 2 +- types/src/transaction/transaction_argument.rs | 2 +- types/src/trusted_state.rs | 2 +- types/src/unit_tests/access_path_test.rs | 2 +- types/src/unit_tests/block_metadata_test.rs | 2 +- .../canonical_serialization_examples.rs | 2 +- types/src/unit_tests/code_debug_fmt_test.rs | 2 +- types/src/unit_tests/contract_event_test.rs | 2 +- types/src/unit_tests/currency_code_test.rs | 2 +- types/src/unit_tests/mod.rs | 2 +- types/src/unit_tests/transaction_test.rs | 2 +- types/src/unit_tests/trusted_state_test.rs | 2 +- types/src/unit_tests/validator_set_test.rs | 2 +- types/src/unit_tests/write_set_test.rs | 2 +- types/src/validator_config.rs | 2 +- types/src/validator_info.rs | 2 +- types/src/validator_signer.rs | 2 +- types/src/validator_verifier.rs | 2 +- types/src/vm_status.rs | 2 +- types/src/waypoint.rs | 2 +- types/src/write_set.rs | 2 +- vm-validator/src/lib.rs | 2 +- vm-validator/src/mocks/mock_vm_validator.rs | 2 +- vm-validator/src/mocks/mod.rs | 2 +- .../src/unit_tests/vm_validator_test.rs | 2 +- vm-validator/src/vm_validator.rs | 2 +- 1239 files changed, 11971 insertions(+), 1245 deletions(-) mode change 120000 => 100644 sdk/transaction-builder/src/aptos_stdlib.rs mode change 120000 => 100644 sdk/transaction-builder/src/experimental_stdlib.rs mode change 120000 => 100644 sdk/transaction-builder/src/stdlib.rs diff --git a/.github/actions/land-blocking/find-lbt-images.sh b/.github/actions/land-blocking/find-lbt-images.sh index 23221cbfbb439..1a988e244fac7 100755 --- a/.github/actions/land-blocking/find-lbt-images.sh +++ b/.github/actions/land-blocking/find-lbt-images.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 REPOS=(diem/validator diem/init diem/validator_tcb) diff --git a/api/Makefile b/api/Makefile index 0a37273f7336f..d87e0db9ec2c1 100644 --- a/api/Makefile +++ b/api/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 test: clean lint test-code-gen test-api-spec clean diff --git a/api/doc/openapi.yaml b/api/doc/openapi.yaml index ac3ee37012293..bcab71d9dcda2 100644 --- a/api/doc/openapi.yaml +++ b/api/doc/openapi.yaml @@ -8,7 +8,7 @@ info: url: http://www.apache.org/licenses/LICENSE-2.0.html version: 0.1.0 contact: - name: The Aptos Foundation + name: The Diem Core Contributors url: https://github.com/aptos-labs/aptos-core tags: - name: general diff --git a/api/src/accounts.rs b/api/src/accounts.rs index f07cc37497a32..774dfe1587848 100644 --- a/api/src/accounts.rs +++ b/api/src/accounts.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/api/src/context.rs b/api/src/context.rs index 46ff9f356c278..65e04f6d4e915 100644 --- a/api/src/context.rs +++ b/api/src/context.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_api_types::{Error, LedgerInfo, MoveConverter, TransactionOnChainData}; diff --git a/api/src/events.rs b/api/src/events.rs index 6667b3469c9cc..00d2981b4917a 100644 --- a/api/src/events.rs +++ b/api/src/events.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/api/src/failpoint.rs b/api/src/failpoint.rs index e5c64e6ea88cf..4995037d901f3 100644 --- a/api/src/failpoint.rs +++ b/api/src/failpoint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[allow(unused_imports)] diff --git a/api/src/health_check.rs b/api/src/health_check.rs index 093db25c493c7..32e24a6142ada 100644 --- a/api/src/health_check.rs +++ b/api/src/health_check.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{ensure, Result}; diff --git a/api/src/index.rs b/api/src/index.rs index aac26e27cbbf4..a746677508ef5 100644 --- a/api/src/index.rs +++ b/api/src/index.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/api/src/lib.rs b/api/src/lib.rs index 6fb3e125d1344..78f205eac9077 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod accounts; diff --git a/api/src/log.rs b/api/src/log.rs index b8b7c156f59bb..c847441740f4a 100644 --- a/api/src/log.rs +++ b/api/src/log.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::time::Duration; diff --git a/api/src/metrics.rs b/api/src/metrics.rs index 01f7820cb36da..5a6d10b70a750 100644 --- a/api/src/metrics.rs +++ b/api/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{register_histogram_vec, HistogramVec}; diff --git a/api/src/page.rs b/api/src/page.rs index 98273f1ff62bd..3bc812ce988e5 100644 --- a/api/src/page.rs +++ b/api/src/page.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::param::{Param, TransactionVersionParam}; diff --git a/api/src/param.rs b/api/src/param.rs index 8389b715eaadb..8620bc7c67162 100644 --- a/api/src/param.rs +++ b/api/src/param.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_api_types::{Address, Error, EventKey, MoveStructTag, TransactionId}; diff --git a/api/src/runtime.rs b/api/src/runtime.rs index 2a9416541abe3..8b73a21811e45 100644 --- a/api/src/runtime.rs +++ b/api/src/runtime.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{context::Context, index}; diff --git a/api/src/tests/accounts_test.rs b/api/src/tests/accounts_test.rs index 409988c6d5143..08ffba2a5ad11 100644 --- a/api/src/tests/accounts_test.rs +++ b/api/src/tests/accounts_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::{assert_json, find_value, new_test_context}; diff --git a/api/src/tests/events_test.rs b/api/src/tests/events_test.rs index 8d70d43621db3..17942adc6a17f 100644 --- a/api/src/tests/events_test.rs +++ b/api/src/tests/events_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::{assert_json, new_test_context}; diff --git a/api/src/tests/index_test.rs b/api/src/tests/index_test.rs index 54df1d0e1e252..18fb0eede7de1 100644 --- a/api/src/tests/index_test.rs +++ b/api/src/tests/index_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::{assert_json, new_test_context}; diff --git a/api/src/tests/invalid_post_request_test.rs b/api/src/tests/invalid_post_request_test.rs index 20b6e207af969..34898acce36b8 100644 --- a/api/src/tests/invalid_post_request_test.rs +++ b/api/src/tests/invalid_post_request_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::new_test_context; diff --git a/api/src/tests/mod.rs b/api/src/tests/mod.rs index 0d81328366531..1d57cf2c08db1 100644 --- a/api/src/tests/mod.rs +++ b/api/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod accounts_test; diff --git a/api/src/tests/string_resource_test.rs b/api/src/tests/string_resource_test.rs index 7b2b3a5312c31..5526f9b94a933 100644 --- a/api/src/tests/string_resource_test.rs +++ b/api/src/tests/string_resource_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::new_test_context; diff --git a/api/src/tests/test_context.rs b/api/src/tests/test_context.rs index 0e69f4cf6b0f9..9a7955acc1b49 100644 --- a/api/src/tests/test_context.rs +++ b/api/src/tests/test_context.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{context::Context, index, tests::pretty}; diff --git a/api/src/tests/transactions_test.rs b/api/src/tests/transactions_test.rs index ceb907d7ff99f..aa3fe883f7d2b 100644 --- a/api/src/tests/transactions_test.rs +++ b/api/src/tests/transactions_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::{assert_json, find_value, new_test_context, pretty, TestContext}; diff --git a/api/src/transactions.rs b/api/src/transactions.rs index 9d90df62603bc..eeb8febb8a47d 100644 --- a/api/src/transactions.rs +++ b/api/src/transactions.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/api/src/version.rs b/api/src/version.rs index 8d40abc131a2b..5bd3a041e7433 100644 --- a/api/src/version.rs +++ b/api/src/version.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::param::LedgerVersionParam; diff --git a/api/types/src/account.rs b/api/types/src/account.rs index 240e440955ac7..a92acdd86f220 100644 --- a/api/types/src/account.rs +++ b/api/types/src/account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{HexEncodedBytes, U64}; diff --git a/api/types/src/address.rs b/api/types/src/address.rs index d3c4e6d2c4035..296abea2716e2 100644 --- a/api/types/src/address.rs +++ b/api/types/src/address.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::account_address::AccountAddress; diff --git a/api/types/src/bytecode.rs b/api/types/src/bytecode.rs index aa16f83bcce03..63dd88e1599a5 100644 --- a/api/types/src/bytecode.rs +++ b/api/types/src/bytecode.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::borrow::Borrow; diff --git a/api/types/src/convert.rs b/api/types/src/convert.rs index ec50da9e63419..71d96c825cbdd 100644 --- a/api/types/src/convert.rs +++ b/api/types/src/convert.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/api/types/src/error.rs b/api/types/src/error.rs index d2cf6bb7ee348..cd338fd84f457 100644 --- a/api/types/src/error.rs +++ b/api/types/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/api/types/src/event_key.rs b/api/types/src/event_key.rs index 1bd9ba0dd2c7d..80b168f1f462e 100644 --- a/api/types/src/event_key.rs +++ b/api/types/src/event_key.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer}; diff --git a/api/types/src/hash.rs b/api/types/src/hash.rs index 0fbda65295627..52a632d80c6f3 100644 --- a/api/types/src/hash.rs +++ b/api/types/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{de::Error as _, Deserialize, Deserializer, Serialize, Serializer}; diff --git a/api/types/src/ledger_info.rs b/api/types/src/ledger_info.rs index d32eb7e0e84ee..c80a31f07c41c 100644 --- a/api/types/src/ledger_info.rs +++ b/api/types/src/ledger_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::U64; diff --git a/api/types/src/lib.rs b/api/types/src/lib.rs index 630c52019f68c..89207a0fcd0ff 100644 --- a/api/types/src/lib.rs +++ b/api/types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod account; diff --git a/api/types/src/mime_types.rs b/api/types/src/mime_types.rs index 74bacb35c9d39..25906b4f38298 100644 --- a/api/types/src/mime_types.rs +++ b/api/types/src/mime_types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub const BCS_SIGNED_TRANSACTION: &str = "application/x.diem.signed_transaction+bcs"; diff --git a/api/types/src/move_types.rs b/api/types/src/move_types.rs index 0f7aa968cb2c1..629789b1820e9 100644 --- a/api/types/src/move_types.rs +++ b/api/types/src/move_types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Address, Bytecode}; diff --git a/api/types/src/response.rs b/api/types/src/response.rs index 20ae06b9c66c3..e021e34675be8 100644 --- a/api/types/src/response.rs +++ b/api/types/src/response.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Error, LedgerInfo}; diff --git a/api/types/src/transaction.rs b/api/types/src/transaction.rs index a8c0fd8b4facf..c6e700b89ee9d 100755 --- a/api/types/src/transaction.rs +++ b/api/types/src/transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/aptos-keygen/src/lib.rs b/aptos-move/aptos-keygen/src/lib.rs index bba4a5628d832..efc6548a03ee3 100644 --- a/aptos-move/aptos-keygen/src/lib.rs +++ b/aptos-move/aptos-keygen/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/aptos-move/aptos-keygen/src/main.rs b/aptos-move/aptos-keygen/src/main.rs index 2988395fe7706..16ab438d26fc5 100644 --- a/aptos-move/aptos-keygen/src/main.rs +++ b/aptos-move/aptos-keygen/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::ValidCryptoMaterialStringExt; diff --git a/aptos-move/aptos-resource-viewer/src/lib.rs b/aptos-move/aptos-resource-viewer/src/lib.rs index 1f06a5c2e2421..99bad3ba21de1 100644 --- a/aptos-move/aptos-resource-viewer/src/lib.rs +++ b/aptos-move/aptos-resource-viewer/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, Result}; diff --git a/aptos-move/aptos-transaction-benchmarks/benches/transaction_benches.rs b/aptos-move/aptos-transaction-benchmarks/benches/transaction_benches.rs index 36d5b1842bada..643636a2664ae 100644 --- a/aptos-move/aptos-transaction-benchmarks/benches/transaction_benches.rs +++ b/aptos-move/aptos-transaction-benchmarks/benches/transaction_benches.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_benchmarks::{ diff --git a/aptos-move/aptos-transaction-benchmarks/src/lib.rs b/aptos-move/aptos-transaction-benchmarks/src/lib.rs index 7e7c78687e895..e3f799028cb9e 100644 --- a/aptos-move/aptos-transaction-benchmarks/src/lib.rs +++ b/aptos-move/aptos-transaction-benchmarks/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/aptos-transaction-benchmarks/src/measurement.rs b/aptos-move/aptos-transaction-benchmarks/src/measurement.rs index 479f5685ac678..71622e39d58eb 100644 --- a/aptos-move/aptos-transaction-benchmarks/src/measurement.rs +++ b/aptos-move/aptos-transaction-benchmarks/src/measurement.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use criterion::Criterion; diff --git a/aptos-move/aptos-transaction-benchmarks/src/transactions.rs b/aptos-move/aptos-transaction-benchmarks/src/transactions.rs index 9a1de14f3a3d0..289f6df86598a 100644 --- a/aptos-move/aptos-transaction-benchmarks/src/transactions.rs +++ b/aptos-move/aptos-transaction-benchmarks/src/transactions.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/aptos-move/aptos-transactional-test-harness/src/diem_test_harness.rs b/aptos-move/aptos-transactional-test-harness/src/diem_test_harness.rs index 32dedab227666..c7187e5a2bb39 100644 --- a/aptos-move/aptos-transactional-test-harness/src/diem_test_harness.rs +++ b/aptos-move/aptos-transactional-test-harness/src/diem_test_harness.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, format_err, Result}; diff --git a/aptos-move/aptos-transactional-test-harness/src/lib.rs b/aptos-move/aptos-transactional-test-harness/src/lib.rs index 86ba34a35b98c..ca2df0dcd9f88 100644 --- a/aptos-move/aptos-transactional-test-harness/src/lib.rs +++ b/aptos-move/aptos-transactional-test-harness/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod diem_test_harness; diff --git a/aptos-move/aptos-transactional-test-harness/tests/tests.rs b/aptos-move/aptos-transactional-test-harness/tests/tests.rs index f6de00dadccb6..5177732ee3b81 100644 --- a/aptos-move/aptos-transactional-test-harness/tests/tests.rs +++ b/aptos-move/aptos-transactional-test-harness/tests/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transactional_test_harness::run_dpn_test; diff --git a/aptos-move/aptos-validator-interface/src/lib.rs b/aptos-move/aptos-validator-interface/src/lib.rs index 35fa6f9676ac8..7cf0a224fba8c 100644 --- a/aptos-move/aptos-validator-interface/src/lib.rs +++ b/aptos-move/aptos-validator-interface/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod storage_interface; diff --git a/aptos-move/aptos-validator-interface/src/storage_interface.rs b/aptos-move/aptos-validator-interface/src/storage_interface.rs index 68c678bd5381b..39dce1386a1a3 100644 --- a/aptos-move/aptos-validator-interface/src/storage_interface.rs +++ b/aptos-move/aptos-validator-interface/src/storage_interface.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::AptosValidatorInterface; diff --git a/aptos-move/aptos-vm/src/access_path_cache.rs b/aptos-move/aptos-vm/src/access_path_cache.rs index 08c7656e26d29..be8e2387e0baf 100644 --- a/aptos-move/aptos-vm/src/access_path_cache.rs +++ b/aptos-move/aptos-vm/src/access_path_cache.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::access_path::AccessPath; diff --git a/aptos-move/aptos-vm/src/adapter_common.rs b/aptos-move/aptos-vm/src/adapter_common.rs index cc468f03ee8e7..680eacdd75f31 100644 --- a/aptos-move/aptos-vm/src/adapter_common.rs +++ b/aptos-move/aptos-vm/src/adapter_common.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{counters::*, data_cache::StateViewCache}; diff --git a/aptos-move/aptos-vm/src/aptos_vm.rs b/aptos-move/aptos-vm/src/aptos_vm.rs index 240d8bcf973c8..3392a1a2dab6a 100644 --- a/aptos-move/aptos-vm/src/aptos_vm.rs +++ b/aptos-move/aptos-vm/src/aptos_vm.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/aptos-vm/src/aptos_vm_impl.rs b/aptos-move/aptos-vm/src/aptos_vm_impl.rs index a3dafaf5919a0..f587976392136 100644 --- a/aptos-move/aptos-vm/src/aptos_vm_impl.rs +++ b/aptos-move/aptos-vm/src/aptos_vm_impl.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/aptos-vm/src/counters.rs b/aptos-move/aptos-vm/src/counters.rs index 9ed1b919ae9f9..0838947d8ad3b 100644 --- a/aptos-move/aptos-vm/src/counters.rs +++ b/aptos-move/aptos-vm/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/aptos-move/aptos-vm/src/data_cache.rs b/aptos-move/aptos-vm/src/data_cache.rs index 2957391164a7d..140cd73541b66 100644 --- a/aptos-move/aptos-vm/src/data_cache.rs +++ b/aptos-move/aptos-vm/src/data_cache.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Scratchpad for on chain values during the execution. diff --git a/aptos-move/aptos-vm/src/errors.rs b/aptos-move/aptos-vm/src/errors.rs index 6eb7b202a62d8..56280fba0d37d 100644 --- a/aptos-move/aptos-vm/src/errors.rs +++ b/aptos-move/aptos-vm/src/errors.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::logging::AdapterLogSchema; diff --git a/aptos-move/aptos-vm/src/foreign_contracts.rs b/aptos-move/aptos-vm/src/foreign_contracts.rs index fa21d9cdc1101..73cb5c862accc 100644 --- a/aptos-move/aptos-vm/src/foreign_contracts.rs +++ b/aptos-move/aptos-vm/src/foreign_contracts.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file contains models of the vm crate's dependencies for use with MIRAI. diff --git a/aptos-move/aptos-vm/src/lib.rs b/aptos-move/aptos-vm/src/lib.rs index eb6e0af4caf5e..2e11af84abdfa 100644 --- a/aptos-move/aptos-vm/src/lib.rs +++ b/aptos-move/aptos-vm/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/aptos-vm/src/logging.rs b/aptos-move/aptos-vm/src/logging.rs index 9694f443703e6..76066b68e7e5b 100644 --- a/aptos-move/aptos-vm/src/logging.rs +++ b/aptos-move/aptos-vm/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::counters::CRITICAL_ERRORS; diff --git a/aptos-move/aptos-vm/src/natives.rs b/aptos-move/aptos-vm/src/natives.rs index dc11b20fab12d..67c4d4c4f3228 100644 --- a/aptos-move/aptos-vm/src/natives.rs +++ b/aptos-move/aptos-vm/src/natives.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::account_config::CORE_CODE_ADDRESS; diff --git a/aptos-move/aptos-vm/src/parallel_executor/mod.rs b/aptos-move/aptos-vm/src/parallel_executor/mod.rs index dd12179c87a25..cc8ab49b86c28 100644 --- a/aptos-move/aptos-vm/src/parallel_executor/mod.rs +++ b/aptos-move/aptos-vm/src/parallel_executor/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod read_write_set_analyzer; diff --git a/aptos-move/aptos-vm/src/parallel_executor/read_write_set_analyzer.rs b/aptos-move/aptos-vm/src/parallel_executor/read_write_set_analyzer.rs index bca4d089e08f5..fc509929d222a 100644 --- a/aptos-move/aptos-vm/src/parallel_executor/read_write_set_analyzer.rs +++ b/aptos-move/aptos-vm/src/parallel_executor/read_write_set_analyzer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/aptos-vm/src/parallel_executor/storage_wrapper.rs b/aptos-move/aptos-vm/src/parallel_executor/storage_wrapper.rs index 2ba353302d6cb..71f6a95642575 100644 --- a/aptos-move/aptos-vm/src/parallel_executor/storage_wrapper.rs +++ b/aptos-move/aptos-vm/src/parallel_executor/storage_wrapper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::data_cache::RemoteStorage; diff --git a/aptos-move/aptos-vm/src/parallel_executor/vm_wrapper.rs b/aptos-move/aptos-vm/src/parallel_executor/vm_wrapper.rs index f0a46c00ca459..fda6f42115638 100644 --- a/aptos-move/aptos-vm/src/parallel_executor/vm_wrapper.rs +++ b/aptos-move/aptos-vm/src/parallel_executor/vm_wrapper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/aptos-vm/src/read_write_set_analysis.rs b/aptos-move/aptos-vm/src/read_write_set_analysis.rs index 78a8ce307878d..6e920feb7ec9a 100644 --- a/aptos-move/aptos-vm/src/read_write_set_analysis.rs +++ b/aptos-move/aptos-vm/src/read_write_set_analysis.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/aptos-vm/src/script_to_script_function.rs b/aptos-move/aptos-vm/src/script_to_script_function.rs index 1674160278f4e..98f30d3de3ae4 100644 --- a/aptos-move/aptos-vm/src/script_to_script_function.rs +++ b/aptos-move/aptos-vm/src/script_to_script_function.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Module containing remapping information between script hashes and their remapped script diff --git a/aptos-move/aptos-vm/src/system_module_names.rs b/aptos-move/aptos-vm/src/system_module_names.rs index 0b95e85dc03a4..11cc3636641c2 100644 --- a/aptos-move/aptos-vm/src/system_module_names.rs +++ b/aptos-move/aptos-vm/src/system_module_names.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Names of modules, functions, and types used by Diem System. diff --git a/aptos-move/aptos-vm/src/transaction_metadata.rs b/aptos-move/aptos-vm/src/transaction_metadata.rs index 2b693726b9f20..b9359947467bd 100644 --- a/aptos-move/aptos-vm/src/transaction_metadata.rs +++ b/aptos-move/aptos-vm/src/transaction_metadata.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519::Ed25519PrivateKey, HashValue, PrivateKey}; diff --git a/aptos-move/aptos-vm/src/unit_tests/mod.rs b/aptos-move/aptos-vm/src/unit_tests/mod.rs index d746b126a39ed..0c23bf4a34f47 100644 --- a/aptos-move/aptos-vm/src/unit_tests/mod.rs +++ b/aptos-move/aptos-vm/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod script_to_script_function_tests; diff --git a/aptos-move/aptos-vm/src/unit_tests/script_to_script_function_tests.rs b/aptos-move/aptos-vm/src/unit_tests/script_to_script_function_tests.rs index 0fb4cb4be2f0a..5ac0e868f4d20 100644 --- a/aptos-move/aptos-vm/src/unit_tests/script_to_script_function_tests.rs +++ b/aptos-move/aptos-vm/src/unit_tests/script_to_script_function_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/df-cli/src/lib.rs b/aptos-move/df-cli/src/lib.rs index 26a0504a48478..1cc54db1297c4 100644 --- a/aptos-move/df-cli/src/lib.rs +++ b/aptos-move/df-cli/src/lib.rs @@ -1,2 +1,2 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 diff --git a/aptos-move/df-cli/src/main.rs b/aptos-move/df-cli/src/main.rs index 6747edd9789b8..5dff51ae143a6 100644 --- a/aptos-move/df-cli/src/main.rs +++ b/aptos-move/df-cli/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/aptos-move/df-cli/tests/cli_testsuite.rs b/aptos-move/df-cli/tests/cli_testsuite.rs index 3daeae4d83364..7759ac9437ef6 100644 --- a/aptos-move/df-cli/tests/cli_testsuite.rs +++ b/aptos-move/df-cli/tests/cli_testsuite.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_cli::sandbox::commands::test; diff --git a/aptos-move/e2e-tests-replay/src/lib.rs b/aptos-move/e2e-tests-replay/src/lib.rs index 158bd403b5285..1224b2c7c902f 100644 --- a/aptos-move/e2e-tests-replay/src/lib.rs +++ b/aptos-move/e2e-tests-replay/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{anyhow, bail, Result}; diff --git a/aptos-move/e2e-tests-replay/src/main.rs b/aptos-move/e2e-tests-replay/src/main.rs index 640a145e9a55e..7ffa899422e32 100644 --- a/aptos-move/e2e-tests-replay/src/main.rs +++ b/aptos-move/e2e-tests-replay/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, Result}; diff --git a/aptos-move/e2e-tests/src/account.rs b/aptos-move/e2e-tests/src/account.rs index e11f8f6fcf6ea..08dc133de9564 100644 --- a/aptos-move/e2e-tests/src/account.rs +++ b/aptos-move/e2e-tests/src/account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Test infrastructure for modeling Diem accounts. diff --git a/aptos-move/e2e-tests/src/account_universe.rs b/aptos-move/e2e-tests/src/account_universe.rs index 2106ab54a5381..e7d2c4343467a 100644 --- a/aptos-move/e2e-tests/src/account_universe.rs +++ b/aptos-move/e2e-tests/src/account_universe.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! A model to test properties of common Diem transactions. diff --git a/aptos-move/e2e-tests/src/account_universe/bad_transaction.rs b/aptos-move/e2e-tests/src/account_universe/bad_transaction.rs index 6c4dd1a00ad60..01b6d1248dfc7 100644 --- a/aptos-move/e2e-tests/src/account_universe/bad_transaction.rs +++ b/aptos-move/e2e-tests/src/account_universe/bad_transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/e2e-tests/src/account_universe/create_account.rs b/aptos-move/e2e-tests/src/account_universe/create_account.rs index eb3535910d0c5..62eece246a8c6 100644 --- a/aptos-move/e2e-tests/src/account_universe/create_account.rs +++ b/aptos-move/e2e-tests/src/account_universe/create_account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/e2e-tests/src/account_universe/peer_to_peer.rs b/aptos-move/e2e-tests/src/account_universe/peer_to_peer.rs index d7059d748e54a..6127ed9f80594 100644 --- a/aptos-move/e2e-tests/src/account_universe/peer_to_peer.rs +++ b/aptos-move/e2e-tests/src/account_universe/peer_to_peer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/e2e-tests/src/account_universe/rotate_key.rs b/aptos-move/e2e-tests/src/account_universe/rotate_key.rs index cceb6910204aa..949d79da3a8dc 100644 --- a/aptos-move/e2e-tests/src/account_universe/rotate_key.rs +++ b/aptos-move/e2e-tests/src/account_universe/rotate_key.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/e2e-tests/src/account_universe/universe.rs b/aptos-move/e2e-tests/src/account_universe/universe.rs index 4a9430f3c5773..a318d2938da07 100644 --- a/aptos-move/e2e-tests/src/account_universe/universe.rs +++ b/aptos-move/e2e-tests/src/account_universe/universe.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Logic for account universes. This is not in the parent module to enforce privacy. diff --git a/aptos-move/e2e-tests/src/common_transactions.rs b/aptos-move/e2e-tests/src/common_transactions.rs index 87e04741b3d5d..adb8795ab0842 100644 --- a/aptos-move/e2e-tests/src/common_transactions.rs +++ b/aptos-move/e2e-tests/src/common_transactions.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Support for encoding transactions for common situations. diff --git a/aptos-move/e2e-tests/src/compile.rs b/aptos-move/e2e-tests/src/compile.rs index d4924c92e26b4..2c089e98958f1 100644 --- a/aptos-move/e2e-tests/src/compile.rs +++ b/aptos-move/e2e-tests/src/compile.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Support for compiling scripts and modules in tests. diff --git a/aptos-move/e2e-tests/src/currencies.rs b/aptos-move/e2e-tests/src/currencies.rs index 629595fda7408..3f884f5eedc29 100644 --- a/aptos-move/e2e-tests/src/currencies.rs +++ b/aptos-move/e2e-tests/src/currencies.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account::Account, compile, executor::FakeExecutor}; diff --git a/aptos-move/e2e-tests/src/data_store.rs b/aptos-move/e2e-tests/src/data_store.rs index 4ec10759b79d7..0db1749468fa1 100644 --- a/aptos-move/e2e-tests/src/data_store.rs +++ b/aptos-move/e2e-tests/src/data_store.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Support for mocking the Diem data store. diff --git a/aptos-move/e2e-tests/src/execution_strategies/basic_strategy.rs b/aptos-move/e2e-tests/src/execution_strategies/basic_strategy.rs index 8131f573dddf5..fdf5fcf1ae2a0 100644 --- a/aptos-move/e2e-tests/src/execution_strategies/basic_strategy.rs +++ b/aptos-move/e2e-tests/src/execution_strategies/basic_strategy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/execution_strategies/guided_strategy.rs b/aptos-move/e2e-tests/src/execution_strategies/guided_strategy.rs index 7ad3ed1b60524..654e0e90bf31c 100644 --- a/aptos-move/e2e-tests/src/execution_strategies/guided_strategy.rs +++ b/aptos-move/e2e-tests/src/execution_strategies/guided_strategy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/execution_strategies/mod.rs b/aptos-move/e2e-tests/src/execution_strategies/mod.rs index 2b880d925eb30..f36b2da0e2803 100644 --- a/aptos-move/e2e-tests/src/execution_strategies/mod.rs +++ b/aptos-move/e2e-tests/src/execution_strategies/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/execution_strategies/multi_strategy.rs b/aptos-move/e2e-tests/src/execution_strategies/multi_strategy.rs index 281c0c88322b2..ac33e0b8c9c12 100644 --- a/aptos-move/e2e-tests/src/execution_strategies/multi_strategy.rs +++ b/aptos-move/e2e-tests/src/execution_strategies/multi_strategy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/execution_strategies/random_strategy.rs b/aptos-move/e2e-tests/src/execution_strategies/random_strategy.rs index 58981208acbe2..8b9b14ff679b8 100644 --- a/aptos-move/e2e-tests/src/execution_strategies/random_strategy.rs +++ b/aptos-move/e2e-tests/src/execution_strategies/random_strategy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/execution_strategies/types.rs b/aptos-move/e2e-tests/src/execution_strategies/types.rs index 3a18371837333..709ae8e41e88a 100644 --- a/aptos-move/e2e-tests/src/execution_strategies/types.rs +++ b/aptos-move/e2e-tests/src/execution_strategies/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/executor.rs b/aptos-move/e2e-tests/src/executor.rs index 9b5340f0f78f1..0602756631459 100644 --- a/aptos-move/e2e-tests/src/executor.rs +++ b/aptos-move/e2e-tests/src/executor.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Support for running the VM to execute and verify transactions. diff --git a/aptos-move/e2e-tests/src/gas_costs.rs b/aptos-move/e2e-tests/src/gas_costs.rs index 070aa4b616d52..bedd0971df597 100644 --- a/aptos-move/e2e-tests/src/gas_costs.rs +++ b/aptos-move/e2e-tests/src/gas_costs.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Gas costs for common transactions. diff --git a/aptos-move/e2e-tests/src/golden_outputs.rs b/aptos-move/e2e-tests/src/golden_outputs.rs index bf0d3324b44a2..4238ea46b6e7b 100644 --- a/aptos-move/e2e-tests/src/golden_outputs.rs +++ b/aptos-move/e2e-tests/src/golden_outputs.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use goldenfile::Mint; diff --git a/aptos-move/e2e-tests/src/lib.rs b/aptos-move/e2e-tests/src/lib.rs index fd6be66483b48..247eac9437f99 100644 --- a/aptos-move/e2e-tests/src/lib.rs +++ b/aptos-move/e2e-tests/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/on_chain_configs.rs b/aptos-move/e2e-tests/src/on_chain_configs.rs index 5600d32357997..b2c9e6e250587 100644 --- a/aptos-move/e2e-tests/src/on_chain_configs.rs +++ b/aptos-move/e2e-tests/src/on_chain_configs.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account::Account, executor::FakeExecutor}; diff --git a/aptos-move/e2e-tests/src/proptest_types.rs b/aptos-move/e2e-tests/src/proptest_types.rs index 86abc58738216..869176e0dc4d4 100644 --- a/aptos-move/e2e-tests/src/proptest_types.rs +++ b/aptos-move/e2e-tests/src/proptest_types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account::{xus_currency_code, Account, AccountData, AccountRoleSpecifier}; diff --git a/aptos-move/e2e-tests/src/utils.rs b/aptos-move/e2e-tests/src/utils.rs index 83a0b37e8be3d..4bf1715bdfc3b 100644 --- a/aptos-move/e2e-tests/src/utils.rs +++ b/aptos-move/e2e-tests/src/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-tests/src/versioning.rs b/aptos-move/e2e-tests/src/versioning.rs index ca6a02f6d93a9..543bf6ff8f443 100644 --- a/aptos-move/e2e-tests/src/versioning.rs +++ b/aptos-move/e2e-tests/src/versioning.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-testsuite/src/lib.rs b/aptos-move/e2e-testsuite/src/lib.rs index 5313eac69d88d..463fcc9a14ee4 100644 --- a/aptos-move/e2e-testsuite/src/lib.rs +++ b/aptos-move/e2e-testsuite/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(test)] diff --git a/aptos-move/e2e-testsuite/src/tests/account_limits.rs b/aptos-move/e2e-testsuite/src/tests/account_limits.rs index 61b11207831d0..8417368462e6d 100644 --- a/aptos-move/e2e-testsuite/src/tests/account_limits.rs +++ b/aptos-move/e2e-testsuite/src/tests/account_limits.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-testsuite/src/tests/account_universe/bad_transaction.rs b/aptos-move/e2e-testsuite/src/tests/account_universe/bad_transaction.rs index 757041457e061..af9b131720260 100644 --- a/aptos-move/e2e-testsuite/src/tests/account_universe/bad_transaction.rs +++ b/aptos-move/e2e-testsuite/src/tests/account_universe/bad_transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use language_e2e_tests::account_universe::{ diff --git a/aptos-move/e2e-testsuite/src/tests/account_universe/create_account.rs b/aptos-move/e2e-testsuite/src/tests/account_universe/create_account.rs index 1bcfebc950e58..fb7c691f4ad4a 100644 --- a/aptos-move/e2e-testsuite/src/tests/account_universe/create_account.rs +++ b/aptos-move/e2e-testsuite/src/tests/account_universe/create_account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // TODO: all of these tests rely on a symmetric account creation mechanism; that is, an account of diff --git a/aptos-move/e2e-testsuite/src/tests/account_universe/mod.rs b/aptos-move/e2e-testsuite/src/tests/account_universe/mod.rs index 4c36881daa5a3..8eaa44950c63c 100644 --- a/aptos-move/e2e-testsuite/src/tests/account_universe/mod.rs +++ b/aptos-move/e2e-testsuite/src/tests/account_universe/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod bad_transaction; diff --git a/aptos-move/e2e-testsuite/src/tests/account_universe/peer_to_peer.rs b/aptos-move/e2e-testsuite/src/tests/account_universe/peer_to_peer.rs index d0de058993800..81463a244fbde 100644 --- a/aptos-move/e2e-testsuite/src/tests/account_universe/peer_to_peer.rs +++ b/aptos-move/e2e-testsuite/src/tests/account_universe/peer_to_peer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use language_e2e_tests::account_universe::{ diff --git a/aptos-move/e2e-testsuite/src/tests/account_universe/rotate_key.rs b/aptos-move/e2e-testsuite/src/tests/account_universe/rotate_key.rs index 8f7a61994d8a8..9c5261580d755 100644 --- a/aptos-move/e2e-testsuite/src/tests/account_universe/rotate_key.rs +++ b/aptos-move/e2e-testsuite/src/tests/account_universe/rotate_key.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use language_e2e_tests::account_universe::{ diff --git a/aptos-move/e2e-testsuite/src/tests/admin_script.rs b/aptos-move/e2e-testsuite/src/tests/admin_script.rs index 106cb36e3d37e..a217ad7c55d9a 100644 --- a/aptos-move/e2e-testsuite/src/tests/admin_script.rs +++ b/aptos-move/e2e-testsuite/src/tests/admin_script.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use language_e2e_tests::{account::Account, current_function_name, executor::FakeExecutor}; diff --git a/aptos-move/e2e-testsuite/src/tests/create_account.rs b/aptos-move/e2e-testsuite/src/tests/create_account.rs index 1f410fd0f165c..2d644526625a4 100644 --- a/aptos-move/e2e-testsuite/src/tests/create_account.rs +++ b/aptos-move/e2e-testsuite/src/tests/create_account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{account_config, transaction::TransactionStatus, vm_status::KeptVMStatus}; diff --git a/aptos-move/e2e-testsuite/src/tests/crsn.rs b/aptos-move/e2e-testsuite/src/tests/crsn.rs index b1f4a954218db..944ca75a0142d 100644 --- a/aptos-move/e2e-testsuite/src/tests/crsn.rs +++ b/aptos-move/e2e-testsuite/src/tests/crsn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::stdlib; use aptos_types::{account_config, vm_status::StatusCode}; diff --git a/aptos-move/e2e-testsuite/src/tests/data_store.rs b/aptos-move/e2e-testsuite/src/tests/data_store.rs index 841fd86cab918..480f923c76a00 100644 --- a/aptos-move/e2e-testsuite/src/tests/data_store.rs +++ b/aptos-move/e2e-testsuite/src/tests/data_store.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ diff --git a/aptos-move/e2e-testsuite/src/tests/emergency_admin_script.rs b/aptos-move/e2e-testsuite/src/tests/emergency_admin_script.rs index 7af7b8d8ee20e..cf6559320ef77 100644 --- a/aptos-move/e2e-testsuite/src/tests/emergency_admin_script.rs +++ b/aptos-move/e2e-testsuite/src/tests/emergency_admin_script.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::stdlib::*; diff --git a/aptos-move/e2e-testsuite/src/tests/execution_strategies.rs b/aptos-move/e2e-testsuite/src/tests/execution_strategies.rs index 1b86dd43f155b..226241c2d17b1 100644 --- a/aptos-move/e2e-testsuite/src/tests/execution_strategies.rs +++ b/aptos-move/e2e-testsuite/src/tests/execution_strategies.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{account_config, transaction::SignedTransaction, vm_status::VMStatus}; diff --git a/aptos-move/e2e-testsuite/src/tests/experimental.rs b/aptos-move/e2e-testsuite/src/tests/experimental.rs index 817c905ab6284..8a71bdfc83589 100644 --- a/aptos-move/e2e-testsuite/src/tests/experimental.rs +++ b/aptos-move/e2e-testsuite/src/tests/experimental.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::experimental_stdlib::encode_create_account_script_function; diff --git a/aptos-move/e2e-testsuite/src/tests/failed_transaction_tests.rs b/aptos-move/e2e-testsuite/src/tests/failed_transaction_tests.rs index 36b475a9a8652..a14038ad8933e 100644 --- a/aptos-move/e2e-testsuite/src/tests/failed_transaction_tests.rs +++ b/aptos-move/e2e-testsuite/src/tests/failed_transaction_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_state_view::StateView; diff --git a/aptos-move/e2e-testsuite/src/tests/genesis.rs b/aptos-move/e2e-testsuite/src/tests/genesis.rs index d494427821f7b..0a8fa734e28a5 100644 --- a/aptos-move/e2e-testsuite/src/tests/genesis.rs +++ b/aptos-move/e2e-testsuite/src/tests/genesis.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::{Transaction, TransactionStatus, WriteSetPayload}; diff --git a/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs b/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs index 49134e3fb2150..9cbfb94509526 100644 --- a/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs +++ b/aptos-move/e2e-testsuite/src/tests/genesis_initializations.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::account_config; diff --git a/aptos-move/e2e-testsuite/src/tests/mint.rs b/aptos-move/e2e-testsuite/src/tests/mint.rs index 63d3ff41ef784..f9674399b7d80 100644 --- a/aptos-move/e2e-testsuite/src/tests/mint.rs +++ b/aptos-move/e2e-testsuite/src/tests/mint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::stdlib::*; diff --git a/aptos-move/e2e-testsuite/src/tests/mod.rs b/aptos-move/e2e-testsuite/src/tests/mod.rs index c932e108cb583..693a7a90d6c94 100644 --- a/aptos-move/e2e-testsuite/src/tests/mod.rs +++ b/aptos-move/e2e-testsuite/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Test module. diff --git a/aptos-move/e2e-testsuite/src/tests/module_publishing.rs b/aptos-move/e2e-testsuite/src/tests/module_publishing.rs index dce77a8a11205..3cda42985ba42 100644 --- a/aptos-move/e2e-testsuite/src/tests/module_publishing.rs +++ b/aptos-move/e2e-testsuite/src/tests/module_publishing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ diff --git a/aptos-move/e2e-testsuite/src/tests/multi_agent.rs b/aptos-move/e2e-testsuite/src/tests/multi_agent.rs index b4fdb7d38bff7..0fb870316d641 100644 --- a/aptos-move/e2e-testsuite/src/tests/multi_agent.rs +++ b/aptos-move/e2e-testsuite/src/tests/multi_agent.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Tests for multi-agent transactions. diff --git a/aptos-move/e2e-testsuite/src/tests/on_chain_configs.rs b/aptos-move/e2e-testsuite/src/tests/on_chain_configs.rs index 62fc252618e45..bacc3725aabff 100644 --- a/aptos-move/e2e-testsuite/src/tests/on_chain_configs.rs +++ b/aptos-move/e2e-testsuite/src/tests/on_chain_configs.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::stdlib::encode_update_dual_attestation_limit_script; diff --git a/aptos-move/e2e-testsuite/src/tests/parallel_execution.rs b/aptos-move/e2e-testsuite/src/tests/parallel_execution.rs index 547874511dd65..c672bc4403ff7 100644 --- a/aptos-move/e2e-testsuite/src/tests/parallel_execution.rs +++ b/aptos-move/e2e-testsuite/src/tests/parallel_execution.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::peer_to_peer::{check_and_apply_transfer_output, create_cyclic_transfers}; diff --git a/aptos-move/e2e-testsuite/src/tests/peer_to_peer.rs b/aptos-move/e2e-testsuite/src/tests/peer_to_peer.rs index 05029b2f015e8..0c6ab202b1952 100644 --- a/aptos-move/e2e-testsuite/src/tests/peer_to_peer.rs +++ b/aptos-move/e2e-testsuite/src/tests/peer_to_peer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ diff --git a/aptos-move/e2e-testsuite/src/tests/rotate_key.rs b/aptos-move/e2e-testsuite/src/tests/rotate_key.rs index 32d728b26d661..eef52a4f2ab5f 100644 --- a/aptos-move/e2e-testsuite/src/tests/rotate_key.rs +++ b/aptos-move/e2e-testsuite/src/tests/rotate_key.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/aptos-move/e2e-testsuite/src/tests/scripts.rs b/aptos-move/e2e-testsuite/src/tests/scripts.rs index 6769498ac0cfa..893ea71a333aa 100644 --- a/aptos-move/e2e-testsuite/src/tests/scripts.rs +++ b/aptos-move/e2e-testsuite/src/tests/scripts.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ diff --git a/aptos-move/e2e-testsuite/src/tests/transaction_builder.rs b/aptos-move/e2e-testsuite/src/tests/transaction_builder.rs index 0df7ac7e952ce..b9514dcd7127c 100644 --- a/aptos-move/e2e-testsuite/src/tests/transaction_builder.rs +++ b/aptos-move/e2e-testsuite/src/tests/transaction_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Tests for all of the script encoding functions in language/transaction_builder/lib.rs. diff --git a/aptos-move/e2e-testsuite/src/tests/transaction_fees.rs b/aptos-move/e2e-testsuite/src/tests/transaction_fees.rs index cf9b7506a4624..0ff4280ba7a9c 100644 --- a/aptos-move/e2e-testsuite/src/tests/transaction_fees.rs +++ b/aptos-move/e2e-testsuite/src/tests/transaction_fees.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519::Ed25519PrivateKey, PrivateKey, Uniform}; diff --git a/aptos-move/e2e-testsuite/src/tests/transaction_fuzzer.rs b/aptos-move/e2e-testsuite/src/tests/transaction_fuzzer.rs index bf72d3d28a8a7..878abc17ddb6b 100644 --- a/aptos-move/e2e-testsuite/src/tests/transaction_fuzzer.rs +++ b/aptos-move/e2e-testsuite/src/tests/transaction_fuzzer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::stdlib::{encode_create_parent_vasp_account_script, ScriptCall}; diff --git a/aptos-move/e2e-testsuite/src/tests/validator_set_management.rs b/aptos-move/e2e-testsuite/src/tests/validator_set_management.rs index ec96a938dfebd..c4a588b89b1c2 100644 --- a/aptos-move/e2e-testsuite/src/tests/validator_set_management.rs +++ b/aptos-move/e2e-testsuite/src/tests/validator_set_management.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::stdlib::*; diff --git a/aptos-move/e2e-testsuite/src/tests/vasps.rs b/aptos-move/e2e-testsuite/src/tests/vasps.rs index fd26b323b1583..41dd00e7753ef 100644 --- a/aptos-move/e2e-testsuite/src/tests/vasps.rs +++ b/aptos-move/e2e-testsuite/src/tests/vasps.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/e2e-testsuite/src/tests/verify_txn.rs b/aptos-move/e2e-testsuite/src/tests/verify_txn.rs index 771d8634e8ba6..e195c406f62e3 100644 --- a/aptos-move/e2e-testsuite/src/tests/verify_txn.rs +++ b/aptos-move/e2e-testsuite/src/tests/verify_txn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/aptos-move/e2e-testsuite/src/tests/write_set.rs b/aptos-move/e2e-testsuite/src/tests/write_set.rs index 484ad181a7d51..126c9184f1324 100644 --- a/aptos-move/e2e-testsuite/src/tests/write_set.rs +++ b/aptos-move/e2e-testsuite/src/tests/write_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519::Ed25519PrivateKey, PrivateKey, Uniform}; diff --git a/aptos-move/e2e-testsuite/src/tests/writeset_builder.rs b/aptos-move/e2e-testsuite/src/tests/writeset_builder.rs index 1479d5d254d0e..8225bfc29cdbe 100644 --- a/aptos-move/e2e-testsuite/src/tests/writeset_builder.rs +++ b/aptos-move/e2e-testsuite/src/tests/writeset_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ access_path::AccessPath, diff --git a/aptos-move/framework/DPN/releases/artifacts/current/transaction_script_builder.rs b/aptos-move/framework/DPN/releases/artifacts/current/transaction_script_builder.rs index 30c76971ed350..9657922823331 100644 --- a/aptos-move/framework/DPN/releases/artifacts/current/transaction_script_builder.rs +++ b/aptos-move/framework/DPN/releases/artifacts/current/transaction_script_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // This file was generated. Do not modify! diff --git a/aptos-move/framework/DPN/releases/src/legacy/mod.rs b/aptos-move/framework/DPN/releases/src/legacy/mod.rs index da3a31ca065da..5e3d8ba8e841b 100644 --- a/aptos-move/framework/DPN/releases/src/legacy/mod.rs +++ b/aptos-move/framework/DPN/releases/src/legacy/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod transaction_scripts; diff --git a/aptos-move/framework/DPN/releases/src/legacy/transaction_scripts.rs b/aptos-move/framework/DPN/releases/src/legacy/transaction_scripts.rs index f9398e0f21c1c..41139e8ff7ab1 100644 --- a/aptos-move/framework/DPN/releases/src/legacy/transaction_scripts.rs +++ b/aptos-move/framework/DPN/releases/src/legacy/transaction_scripts.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Rust representation of a Move transaction script that can be executed on the Diem blockchain. diff --git a/aptos-move/framework/DPN/releases/src/lib.rs b/aptos-move/framework/DPN/releases/src/lib.rs index 69b14c8360436..ae9ff88cdb474 100644 --- a/aptos-move/framework/DPN/releases/src/lib.rs +++ b/aptos-move/framework/DPN/releases/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/aptos-move/framework/DPN/releases/src/tests.rs b/aptos-move/framework/DPN/releases/src/tests.rs index 1404eff4896ab..0debdefce3f07 100644 --- a/aptos-move/framework/DPN/releases/src/tests.rs +++ b/aptos-move/framework/DPN/releases/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_binary_format::CompiledModule; diff --git a/aptos-move/framework/aptos-framework/releases/artifacts/current/transaction_script_builder.rs b/aptos-move/framework/aptos-framework/releases/artifacts/current/transaction_script_builder.rs index be24566904cb5..8252a10031153 100644 --- a/aptos-move/framework/aptos-framework/releases/artifacts/current/transaction_script_builder.rs +++ b/aptos-move/framework/aptos-framework/releases/artifacts/current/transaction_script_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // This file was generated. Do not modify! diff --git a/aptos-move/framework/aptos-framework/releases/src/lib.rs b/aptos-move/framework/aptos-framework/releases/src/lib.rs index 07f3858c6433c..0d1c24f7588a4 100644 --- a/aptos-move/framework/aptos-framework/releases/src/lib.rs +++ b/aptos-move/framework/aptos-framework/releases/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/aptos-move/framework/experimental/DPN/releases/artifacts/current/transaction_script_builder.rs b/aptos-move/framework/experimental/DPN/releases/artifacts/current/transaction_script_builder.rs index a4d6838548ee0..95e66a2d1c46a 100644 --- a/aptos-move/framework/experimental/DPN/releases/artifacts/current/transaction_script_builder.rs +++ b/aptos-move/framework/experimental/DPN/releases/artifacts/current/transaction_script_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // This file was generated. Do not modify! diff --git a/aptos-move/framework/experimental/releases/artifacts/current/transaction_script_builder.rs b/aptos-move/framework/experimental/releases/artifacts/current/transaction_script_builder.rs index 40f0fbe992780..950ddd90f18ef 100644 --- a/aptos-move/framework/experimental/releases/artifacts/current/transaction_script_builder.rs +++ b/aptos-move/framework/experimental/releases/artifacts/current/transaction_script_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // This file was generated. Do not modify! diff --git a/aptos-move/framework/experimental/releases/src/lib.rs b/aptos-move/framework/experimental/releases/src/lib.rs index 118a9ef17899f..d16676d5b27d5 100644 --- a/aptos-move/framework/experimental/releases/src/lib.rs +++ b/aptos-move/framework/experimental/releases/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/aptos-move/framework/releases/src/lib.rs b/aptos-move/framework/releases/src/lib.rs index daa52cb8d9d0e..17968fa41933e 100644 --- a/aptos-move/framework/releases/src/lib.rs +++ b/aptos-move/framework/releases/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/aptos-move/framework/src/lib.rs b/aptos-move/framework/src/lib.rs index e53f3ed5128cc..2ec88f2923c04 100644 --- a/aptos-move/framework/src/lib.rs +++ b/aptos-move/framework/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/framework/src/main.rs b/aptos-move/framework/src/main.rs index 06fa919c546a3..e43b7ab0baefb 100644 --- a/aptos-move/framework/src/main.rs +++ b/aptos-move/framework/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/framework/src/natives/account.rs b/aptos-move/framework/src/natives/account.rs index bf5d796b2d901..fdea3c2449c7e 100644 --- a/aptos-move/framework/src/natives/account.rs +++ b/aptos-move/framework/src/natives/account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_binary_format::errors::PartialVMResult; diff --git a/aptos-move/framework/src/natives/mod.rs b/aptos-move/framework/src/natives/mod.rs index b8965b07cc541..34a431c8502a0 100644 --- a/aptos-move/framework/src/natives/mod.rs +++ b/aptos-move/framework/src/natives/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod account; diff --git a/aptos-move/framework/src/natives/signature.rs b/aptos-move/framework/src/natives/signature.rs index e7791d5630cf3..7a85ac5b91963 100644 --- a/aptos-move/framework/src/natives/signature.rs +++ b/aptos-move/framework/src/natives/signature.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519, traits::*}; diff --git a/aptos-move/framework/src/release.rs b/aptos-move/framework/src/release.rs index 1d1555ea3e897..9acb7cf3a1045 100644 --- a/aptos-move/framework/src/release.rs +++ b/aptos-move/framework/src/release.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_binary_format::{compatibility::Compatibility, normalized::Module, CompiledModule}; @@ -21,7 +21,7 @@ use structopt::*; #[structopt( name = "Diem Frameworks", about = "Release CLI for Diem frameworks", - author = "The Aptos Foundation", + author = "The Diem Core Contributors", rename_all = "kebab-case" )] pub struct ReleaseOptions { diff --git a/aptos-move/framework/tests/aptos_transactional_tests.rs b/aptos-move/framework/tests/aptos_transactional_tests.rs index ec838dbd1ee6d..a6cd6c432b6ed 100644 --- a/aptos-move/framework/tests/aptos_transactional_tests.rs +++ b/aptos-move/framework/tests/aptos_transactional_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 fn main() {} diff --git a/aptos-move/framework/tests/dpn_transactional_tests.rs b/aptos-move/framework/tests/dpn_transactional_tests.rs index b6280487160bf..cad17905490fb 100644 --- a/aptos-move/framework/tests/dpn_transactional_tests.rs +++ b/aptos-move/framework/tests/dpn_transactional_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transactional_test_harness::run_dpn_test; diff --git a/aptos-move/framework/tests/generated_files.rs b/aptos-move/framework/tests/generated_files.rs index 22030a7c71c03..362c76a9858d8 100644 --- a/aptos-move/framework/tests/generated_files.rs +++ b/aptos-move/framework/tests/generated_files.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{anyhow, Result}; diff --git a/aptos-move/framework/tests/move_unit_test.rs b/aptos-move/framework/tests/move_unit_test.rs index cd31601a4f7fb..13e16dbc4b525 100644 --- a/aptos-move/framework/tests/move_unit_test.rs +++ b/aptos-move/framework/tests/move_unit_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_vm::natives::aptos_natives; diff --git a/aptos-move/framework/tests/move_verification_test.rs b/aptos-move/framework/tests/move_verification_test.rs index 01eeef3f78057..e87654136f144 100644 --- a/aptos-move/framework/tests/move_verification_test.rs +++ b/aptos-move/framework/tests/move_verification_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // use move_cli::package::prover::ProverTest; diff --git a/aptos-move/genesis-viewer/src/main.rs b/aptos-move/genesis-viewer/src/main.rs index 33cad5589699b..9f4f8f64da924 100644 --- a/aptos-move/genesis-viewer/src/main.rs +++ b/aptos-move/genesis-viewer/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_resource_viewer::DiemValueAnnotator; diff --git a/aptos-move/move-examples/src/main.rs b/aptos-move/move-examples/src/main.rs index 1a76dd281facb..dfb60438aad48 100644 --- a/aptos-move/move-examples/src/main.rs +++ b/aptos-move/move-examples/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use structopt::StructOpt; diff --git a/aptos-move/move-examples/tests/move_unit_tests.rs b/aptos-move/move-examples/tests/move_unit_tests.rs index 0c291bafb2579..9d2fa9df80f68 100644 --- a/aptos-move/move-examples/tests/move_unit_tests.rs +++ b/aptos-move/move-examples/tests/move_unit_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_vm::natives::aptos_natives; diff --git a/aptos-move/mvhashmap/src/lib.rs b/aptos-move/mvhashmap/src/lib.rs index b958c52e3611e..31f23f28b8ee5 100644 --- a/aptos-move/mvhashmap/src/lib.rs +++ b/aptos-move/mvhashmap/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crossbeam::utils::CachePadded; diff --git a/aptos-move/mvhashmap/src/unit_tests/mod.rs b/aptos-move/mvhashmap/src/unit_tests/mod.rs index 56a5c0698fbab..40c3ff2acdb25 100644 --- a/aptos-move/mvhashmap/src/unit_tests/mod.rs +++ b/aptos-move/mvhashmap/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/aptos-move/mvhashmap/src/unit_tests/proptest_types.rs b/aptos-move/mvhashmap/src/unit_tests/proptest_types.rs index e12be427ab091..0bebee67fa13d 100644 --- a/aptos-move/mvhashmap/src/unit_tests/proptest_types.rs +++ b/aptos-move/mvhashmap/src/unit_tests/proptest_types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::MVHashMap; diff --git a/aptos-move/parallel-executor/benches/scheduler_benches.rs b/aptos-move/parallel-executor/benches/scheduler_benches.rs index 06e33c1185c5e..fa56a3d3cf737 100644 --- a/aptos-move/parallel-executor/benches/scheduler_benches.rs +++ b/aptos-move/parallel-executor/benches/scheduler_benches.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use criterion::{criterion_group, criterion_main, Criterion}; diff --git a/aptos-move/parallel-executor/src/errors.rs b/aptos-move/parallel-executor/src/errors.rs index 10b9d399e9977..6126d2505022f 100644 --- a/aptos-move/parallel-executor/src/errors.rs +++ b/aptos-move/parallel-executor/src/errors.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[derive(Debug)] diff --git a/aptos-move/parallel-executor/src/executor.rs b/aptos-move/parallel-executor/src/executor.rs index 16d4e5f977eb8..0f117bc1cbf5c 100644 --- a/aptos-move/parallel-executor/src/executor.rs +++ b/aptos-move/parallel-executor/src/executor.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/parallel-executor/src/lib.rs b/aptos-move/parallel-executor/src/lib.rs index 66038509aba47..adc72db1bcd7b 100644 --- a/aptos-move/parallel-executor/src/lib.rs +++ b/aptos-move/parallel-executor/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod errors; diff --git a/aptos-move/parallel-executor/src/outcome_array.rs b/aptos-move/parallel-executor/src/outcome_array.rs index 3dae2f1c0a06c..25a484cd31302 100644 --- a/aptos-move/parallel-executor/src/outcome_array.rs +++ b/aptos-move/parallel-executor/src/outcome_array.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/parallel-executor/src/proptest_types/bencher.rs b/aptos-move/parallel-executor/src/proptest_types/bencher.rs index e06eaea0b9b6b..b2b3e6e6e077a 100644 --- a/aptos-move/parallel-executor/src/proptest_types/bencher.rs +++ b/aptos-move/parallel-executor/src/proptest_types/bencher.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/parallel-executor/src/proptest_types/mod.rs b/aptos-move/parallel-executor/src/proptest_types/mod.rs index 126a73c240e44..fbd037b31b663 100644 --- a/aptos-move/parallel-executor/src/proptest_types/mod.rs +++ b/aptos-move/parallel-executor/src/proptest_types/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod bencher; diff --git a/aptos-move/parallel-executor/src/proptest_types/tests.rs b/aptos-move/parallel-executor/src/proptest_types/tests.rs index dee994dad1abd..b537fae308dad 100644 --- a/aptos-move/parallel-executor/src/proptest_types/tests.rs +++ b/aptos-move/parallel-executor/src/proptest_types/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/parallel-executor/src/proptest_types/types.rs b/aptos-move/parallel-executor/src/proptest_types/types.rs index 8fd9530032427..04b9222b4d3d7 100644 --- a/aptos-move/parallel-executor/src/proptest_types/types.rs +++ b/aptos-move/parallel-executor/src/proptest_types/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/parallel-executor/src/scheduler.rs b/aptos-move/parallel-executor/src/scheduler.rs index 4e675a758dbc7..ac58511490f2f 100644 --- a/aptos-move/parallel-executor/src/scheduler.rs +++ b/aptos-move/parallel-executor/src/scheduler.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::Mutex; diff --git a/aptos-move/parallel-executor/src/task.rs b/aptos-move/parallel-executor/src/task.rs index 79ac9a5dbffb1..e2af1c569fdca 100644 --- a/aptos-move/parallel-executor/src/task.rs +++ b/aptos-move/parallel-executor/src/task.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::executor::MVHashMapView; diff --git a/aptos-move/parallel-executor/src/txn_last_input_output.rs b/aptos-move/parallel-executor/src/txn_last_input_output.rs index 7c70cd46310f0..ba0e1045a57cd 100644 --- a/aptos-move/parallel-executor/src/txn_last_input_output.rs +++ b/aptos-move/parallel-executor/src/txn_last_input_output.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/parallel-executor/src/unit_tests/mod.rs b/aptos-move/parallel-executor/src/unit_tests/mod.rs index 61c7c4207bf08..c641bc9322adc 100644 --- a/aptos-move/parallel-executor/src/unit_tests/mod.rs +++ b/aptos-move/parallel-executor/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/aptos-move/transaction-builder-generator/examples/cpp/stdlib_demo.cpp b/aptos-move/transaction-builder-generator/examples/cpp/stdlib_demo.cpp index 04bd8a19df7f9..bdfa4b17d95af 100644 --- a/aptos-move/transaction-builder-generator/examples/cpp/stdlib_demo.cpp +++ b/aptos-move/transaction-builder-generator/examples/cpp/stdlib_demo.cpp @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #include "diem_framework.hpp" diff --git a/aptos-move/transaction-builder-generator/examples/csharp/custom_aptos_code/AccountAddress.cs b/aptos-move/transaction-builder-generator/examples/csharp/custom_aptos_code/AccountAddress.cs index 1ef2571d313ce..20ed69f4d7e56 100644 --- a/aptos-move/transaction-builder-generator/examples/csharp/custom_aptos_code/AccountAddress.cs +++ b/aptos-move/transaction-builder-generator/examples/csharp/custom_aptos_code/AccountAddress.cs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 const int LENGTH = 16; diff --git a/aptos-move/transaction-builder-generator/examples/golang/stdlib_demo.go b/aptos-move/transaction-builder-generator/examples/golang/stdlib_demo.go index 0802d36c274bf..3b3ce114c5e52 100644 --- a/aptos-move/transaction-builder-generator/examples/golang/stdlib_demo.go +++ b/aptos-move/transaction-builder-generator/examples/golang/stdlib_demo.go @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 package main diff --git a/aptos-move/transaction-builder-generator/examples/java/StdlibDemo.java b/aptos-move/transaction-builder-generator/examples/java/StdlibDemo.java index 4da9f5608a2fb..73c8bee557aa6 100644 --- a/aptos-move/transaction-builder-generator/examples/java/StdlibDemo.java +++ b/aptos-move/transaction-builder-generator/examples/java/StdlibDemo.java @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 import java.util.Arrays; diff --git a/aptos-move/transaction-builder-generator/examples/java/custom_aptos_code/AccountAddress.java b/aptos-move/transaction-builder-generator/examples/java/custom_aptos_code/AccountAddress.java index 35af9ba8bdafa..a8f0a35fb9c5f 100644 --- a/aptos-move/transaction-builder-generator/examples/java/custom_aptos_code/AccountAddress.java +++ b/aptos-move/transaction-builder-generator/examples/java/custom_aptos_code/AccountAddress.java @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 static final int LENGTH = 16; diff --git a/aptos-move/transaction-builder-generator/examples/python3/custom_aptos_code/AccountAddress.py b/aptos-move/transaction-builder-generator/examples/python3/custom_aptos_code/AccountAddress.py index 4858679d61e99..1943ecb7e54a9 100644 --- a/aptos-move/transaction-builder-generator/examples/python3/custom_aptos_code/AccountAddress.py +++ b/aptos-move/transaction-builder-generator/examples/python3/custom_aptos_code/AccountAddress.py @@ -1,4 +1,4 @@ -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 LENGTH = 16 # type: int diff --git a/aptos-move/transaction-builder-generator/examples/python3/stdlib_demo.py b/aptos-move/transaction-builder-generator/examples/python3/stdlib_demo.py index 46ed694df7dee..631d4f37dcebb 100644 --- a/aptos-move/transaction-builder-generator/examples/python3/stdlib_demo.py +++ b/aptos-move/transaction-builder-generator/examples/python3/stdlib_demo.py @@ -1,4 +1,4 @@ -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # pyre-strict diff --git a/aptos-move/transaction-builder-generator/examples/rust/script_fun_demo.rs b/aptos-move/transaction-builder-generator/examples/rust/script_fun_demo.rs index 24528842bbd89..8f616a537ed21 100644 --- a/aptos-move/transaction-builder-generator/examples/rust/script_fun_demo.rs +++ b/aptos-move/transaction-builder-generator/examples/rust/script_fun_demo.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{AccountAddress, Identifier, StructTag, TypeTag}; diff --git a/aptos-move/transaction-builder-generator/examples/rust/tx_script_demo.rs b/aptos-move/transaction-builder-generator/examples/rust/tx_script_demo.rs index de847d508e53d..e2ace84166f45 100644 --- a/aptos-move/transaction-builder-generator/examples/rust/tx_script_demo.rs +++ b/aptos-move/transaction-builder-generator/examples/rust/tx_script_demo.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{AccountAddress, Identifier, StructTag, TypeTag}; diff --git a/aptos-move/transaction-builder-generator/examples/typescript/mod.ts b/aptos-move/transaction-builder-generator/examples/typescript/mod.ts index 243bef6f36009..dcb63c52be55b 100644 --- a/aptos-move/transaction-builder-generator/examples/typescript/mod.ts +++ b/aptos-move/transaction-builder-generator/examples/typescript/mod.ts @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 import * as DiemStdlib from "./diemStdlib/mod.ts"; diff --git a/aptos-move/transaction-builder-generator/src/common.rs b/aptos-move/transaction-builder-generator/src/common.rs index 79c740bab0177..dfccc922b1d9b 100644 --- a/aptos-move/transaction-builder-generator/src/common.rs +++ b/aptos-move/transaction-builder-generator/src/common.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::{ diff --git a/aptos-move/transaction-builder-generator/src/cpp.rs b/aptos-move/transaction-builder-generator/src/cpp.rs index a744609381433..1c46f23e33aee 100644 --- a/aptos-move/transaction-builder-generator/src/cpp.rs +++ b/aptos-move/transaction-builder-generator/src/cpp.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/src/csharp.rs b/aptos-move/transaction-builder-generator/src/csharp.rs index af8d2e59eb58b..18d8472ccf2cf 100644 --- a/aptos-move/transaction-builder-generator/src/csharp.rs +++ b/aptos-move/transaction-builder-generator/src/csharp.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/src/generate.rs b/aptos-move/transaction-builder-generator/src/generate.rs index 26b56c693d77b..d5584a9bb50e6 100644 --- a/aptos-move/transaction-builder-generator/src/generate.rs +++ b/aptos-move/transaction-builder-generator/src/generate.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! # Code generator for Move script builders diff --git a/aptos-move/transaction-builder-generator/src/golang.rs b/aptos-move/transaction-builder-generator/src/golang.rs index 09cf8df53d204..a058cf52db9b9 100644 --- a/aptos-move/transaction-builder-generator/src/golang.rs +++ b/aptos-move/transaction-builder-generator/src/golang.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/src/java.rs b/aptos-move/transaction-builder-generator/src/java.rs index 4b54d51a068f4..29b4b37a5f02a 100644 --- a/aptos-move/transaction-builder-generator/src/java.rs +++ b/aptos-move/transaction-builder-generator/src/java.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/src/lib.rs b/aptos-move/transaction-builder-generator/src/lib.rs index d7927d390f3ab..6b3fcb162a225 100644 --- a/aptos-move/transaction-builder-generator/src/lib.rs +++ b/aptos-move/transaction-builder-generator/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::ScriptABI; diff --git a/aptos-move/transaction-builder-generator/src/python3.rs b/aptos-move/transaction-builder-generator/src/python3.rs index 7a8626396ea9f..897c308895177 100644 --- a/aptos-move/transaction-builder-generator/src/python3.rs +++ b/aptos-move/transaction-builder-generator/src/python3.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/src/rust.rs b/aptos-move/transaction-builder-generator/src/rust.rs index 8170b3b3cf26b..cab91e0bce52f 100644 --- a/aptos-move/transaction-builder-generator/src/rust.rs +++ b/aptos-move/transaction-builder-generator/src/rust.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; @@ -110,7 +110,7 @@ where writeln!( self.out, r#" -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // This file was generated. Do not modify! diff --git a/aptos-move/transaction-builder-generator/src/swift.rs b/aptos-move/transaction-builder-generator/src/swift.rs index 634b17b7edaff..6f9a46bbd5f5f 100644 --- a/aptos-move/transaction-builder-generator/src/swift.rs +++ b/aptos-move/transaction-builder-generator/src/swift.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/src/typescript.rs b/aptos-move/transaction-builder-generator/src/typescript.rs index 1c6db095b3079..ee5874bc2afe3 100644 --- a/aptos-move/transaction-builder-generator/src/typescript.rs +++ b/aptos-move/transaction-builder-generator/src/typescript.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common; diff --git a/aptos-move/transaction-builder-generator/tests/cli.rs b/aptos-move/transaction-builder-generator/tests/cli.rs index 14bdcb8e90315..8a64663fed1e6 100644 --- a/aptos-move/transaction-builder-generator/tests/cli.rs +++ b/aptos-move/transaction-builder-generator/tests/cli.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::{io::Write, process::Command}; diff --git a/aptos-move/transaction-builder-generator/tests/generation.rs b/aptos-move/transaction-builder-generator/tests/generation.rs index f5faf3d0b4cb5..5bd1aa81b9b16 100644 --- a/aptos-move/transaction-builder-generator/tests/generation.rs +++ b/aptos-move/transaction-builder-generator/tests/generation.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::ScriptABI; diff --git a/aptos-move/transaction-replay/src/lib.rs b/aptos-move/transaction-replay/src/lib.rs index 351dbc62e53b1..3844206099964 100644 --- a/aptos-move/transaction-replay/src/lib.rs +++ b/aptos-move/transaction-replay/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{anyhow, bail, format_err, Result}; diff --git a/aptos-move/transaction-replay/src/main.rs b/aptos-move/transaction-replay/src/main.rs index a4bf0c51ecf82..69d3990252bba 100644 --- a/aptos-move/transaction-replay/src/main.rs +++ b/aptos-move/transaction-replay/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, Result}; diff --git a/aptos-move/transaction-replay/src/unit_tests/bisection_tests.rs b/aptos-move/transaction-replay/src/unit_tests/bisection_tests.rs index b6550bd7f27ea..a9c79a419490c 100644 --- a/aptos-move/transaction-replay/src/unit_tests/bisection_tests.rs +++ b/aptos-move/transaction-replay/src/unit_tests/bisection_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{unit_tests::TestInterface, AptosDebugger}; diff --git a/aptos-move/transaction-replay/src/unit_tests/mod.rs b/aptos-move/transaction-replay/src/unit_tests/mod.rs index 8929e5d3c0025..68aaf0eeac65a 100644 --- a/aptos-move/transaction-replay/src/unit_tests/mod.rs +++ b/aptos-move/transaction-replay/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod bisection_tests; diff --git a/aptos-move/vm-genesis/src/genesis_context.rs b/aptos-move/vm-genesis/src/genesis_context.rs index 6e2b13780d2ae..d4f02dc6d126f 100644 --- a/aptos-move/vm-genesis/src/genesis_context.rs +++ b/aptos-move/vm-genesis/src/genesis_context.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/vm-genesis/src/lib.rs b/aptos-move/vm-genesis/src/lib.rs index 7a5bd17cc0a49..c9940d3398e3f 100644 --- a/aptos-move/vm-genesis/src/lib.rs +++ b/aptos-move/vm-genesis/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/aptos-move/writeset-transaction-generator/src/admin_script_builder.rs b/aptos-move/writeset-transaction-generator/src/admin_script_builder.rs index b21174d474141..372100682eb6a 100644 --- a/aptos-move/writeset-transaction-generator/src/admin_script_builder.rs +++ b/aptos-move/writeset-transaction-generator/src/admin_script_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/aptos-move/writeset-transaction-generator/src/lib.rs b/aptos-move/writeset-transaction-generator/src/lib.rs index 75a7564d27b55..d74736cf82b41 100644 --- a/aptos-move/writeset-transaction-generator/src/lib.rs +++ b/aptos-move/writeset-transaction-generator/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod admin_script_builder; diff --git a/aptos-move/writeset-transaction-generator/src/writeset_builder.rs b/aptos-move/writeset-transaction-generator/src/writeset_builder.rs index 8470e2a06a1e6..394117a81355f 100644 --- a/aptos-move/writeset-transaction-generator/src/writeset_builder.rs +++ b/aptos-move/writeset-transaction-generator/src/writeset_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::format_err; diff --git a/aptos-node/src/lib.rs b/aptos-node/src/lib.rs index 3b5acfa5bbe4f..5525a94cb9e1d 100644 --- a/aptos-node/src/lib.rs +++ b/aptos-node/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_api::runtime::bootstrap as bootstrap_api; diff --git a/aptos-node/src/main.rs b/aptos-node/src/main.rs index 8bd653cdedbbb..ec75371a34f4a 100644 --- a/aptos-node/src/main.rs +++ b/aptos-node/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/generate-key/src/lib.rs b/config/generate-key/src/lib.rs index 8babccb6e6e8e..b0995db8a03df 100644 --- a/config/generate-key/src/lib.rs +++ b/config/generate-key/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/generate-key/src/main.rs b/config/generate-key/src/main.rs index 510df56ce506d..e8c967f8f23c3 100644 --- a/config/generate-key/src/main.rs +++ b/config/generate-key/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/global-constants/src/lib.rs b/config/global-constants/src/lib.rs index c9d693c89e824..7ac9b72883c80 100644 --- a/config/global-constants/src/lib.rs +++ b/config/global-constants/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The purpose of this crate is to offer a single source of truth for the definitions of shared diff --git a/config/management/genesis/src/builder.rs b/config/management/genesis/src/builder.rs index f39a287e95c44..4728bf33cf6d0 100644 --- a/config/management/genesis/src/builder.rs +++ b/config/management/genesis/src/builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::layout::Layout; diff --git a/config/management/genesis/src/command.rs b/config/management/genesis/src/command.rs index fc9992fbbada2..f0e2cd0a942ab 100644 --- a/config/management/genesis/src/command.rs +++ b/config/management/genesis/src/command.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::ed25519::Ed25519PublicKey; use aptos_management::{error::Error, execute_command}; diff --git a/config/management/genesis/src/config_builder.rs b/config/management/genesis/src/config_builder.rs index 5951ea023dc4e..adf9fcdb5b811 100644 --- a/config/management/genesis/src/config_builder.rs +++ b/config/management/genesis/src/config_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::validator_builder::ValidatorBuilder; diff --git a/config/management/genesis/src/fullnode_builder.rs b/config/management/genesis/src/fullnode_builder.rs index 86ba45c4b51fa..bd9ec72c059c2 100644 --- a/config/management/genesis/src/fullnode_builder.rs +++ b/config/management/genesis/src/fullnode_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{ensure, Result}; diff --git a/config/management/genesis/src/genesis.rs b/config/management/genesis/src/genesis.rs index 3db3042de3987..11e32668f7704 100644 --- a/config/management/genesis/src/genesis.rs +++ b/config/management/genesis/src/genesis.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::builder::GenesisBuilder; diff --git a/config/management/genesis/src/key.rs b/config/management/genesis/src/key.rs index 30b30c48c9b28..91ecdfb26af21 100644 --- a/config/management/genesis/src/key.rs +++ b/config/management/genesis/src/key.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::ed25519::Ed25519PublicKey; diff --git a/config/management/genesis/src/layout.rs b/config/management/genesis/src/layout.rs index 5c1f2c3d3c9dc..8b766411386f4 100644 --- a/config/management/genesis/src/layout.rs +++ b/config/management/genesis/src/layout.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::builder::GenesisBuilder; diff --git a/config/management/genesis/src/lib.rs b/config/management/genesis/src/lib.rs index 22fc83da13088..286098268af38 100644 --- a/config/management/genesis/src/lib.rs +++ b/config/management/genesis/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/management/genesis/src/main.rs b/config/management/genesis/src/main.rs index 69689a389c963..a65839e5aced0 100644 --- a/config/management/genesis/src/main.rs +++ b/config/management/genesis/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/management/genesis/src/move_modules.rs b/config/management/genesis/src/move_modules.rs index 6f358fa3cbd1f..ae69b3eb2e4ef 100644 --- a/config/management/genesis/src/move_modules.rs +++ b/config/management/genesis/src/move_modules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::builder::GenesisBuilder; diff --git a/config/management/genesis/src/storage_helper.rs b/config/management/genesis/src/storage_helper.rs index 671114268c442..3534c6205ec32 100644 --- a/config/management/genesis/src/storage_helper.rs +++ b/config/management/genesis/src/storage_helper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // FIXME: (gnazario) storage helper doesn't belong in the genesis tool, but it's attached to it right now diff --git a/config/management/genesis/src/validator_builder.rs b/config/management/genesis/src/validator_builder.rs index 2eb26a8292b1e..af557fb741f4c 100644 --- a/config/management/genesis/src/validator_builder.rs +++ b/config/management/genesis/src/validator_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/management/genesis/src/validator_config.rs b/config/management/genesis/src/validator_config.rs index 33f99629aa4f3..aa5446334fe89 100644 --- a/config/management/genesis/src/validator_config.rs +++ b/config/management/genesis/src/validator_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_global_constants::OWNER_ACCOUNT; diff --git a/config/management/genesis/src/validator_operator.rs b/config/management/genesis/src/validator_operator.rs index 85648239d9fd1..942929088997f 100644 --- a/config/management/genesis/src/validator_operator.rs +++ b/config/management/genesis/src/validator_operator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_global_constants::OPERATOR_KEY; diff --git a/config/management/genesis/src/verify.rs b/config/management/genesis/src/verify.rs index 325ba272bfa22..8b92f991fe449 100644 --- a/config/management/genesis/src/verify.rs +++ b/config/management/genesis/src/verify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::config::RocksdbConfig; diff --git a/config/management/genesis/src/waypoint.rs b/config/management/genesis/src/waypoint.rs index 66d7b0aec9f92..eff96a881cd4b 100644 --- a/config/management/genesis/src/waypoint.rs +++ b/config/management/genesis/src/waypoint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::config::RocksdbConfig; diff --git a/config/management/operational/src/account_resource.rs b/config/management/operational/src/account_resource.rs index 623763bdc259e..cd0784b6c986b 100644 --- a/config/management/operational/src/account_resource.rs +++ b/config/management/operational/src/account_resource.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{auto_validate::AutoValidate, rest_client::RestClient, TransactionContext}; diff --git a/config/management/operational/src/auto_validate.rs b/config/management/operational/src/auto_validate.rs index da7277471d712..61790d624d0ec 100644 --- a/config/management/operational/src/auto_validate.rs +++ b/config/management/operational/src/auto_validate.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{validate_transaction::ValidateTransaction, TransactionContext}; diff --git a/config/management/operational/src/command.rs b/config/management/operational/src/command.rs index 6461c29c84e7f..e9b84d0cff35c 100644 --- a/config/management/operational/src/command.rs +++ b/config/management/operational/src/command.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/management/operational/src/governance.rs b/config/management/operational/src/governance.rs index c943e89f15956..8d40a8974d3ce 100644 --- a/config/management/operational/src/governance.rs +++ b/config/management/operational/src/governance.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{auto_validate::AutoValidate, rest_client::RestClient, TransactionContext}; diff --git a/config/management/operational/src/keys.rs b/config/management/operational/src/keys.rs index fb482afcdb5a8..cb77f41833300 100644 --- a/config/management/operational/src/keys.rs +++ b/config/management/operational/src/keys.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::config::{Peer, PeerRole}; diff --git a/config/management/operational/src/lib.rs b/config/management/operational/src/lib.rs index fd14cfcf00738..e1040b4aef2bd 100644 --- a/config/management/operational/src/lib.rs +++ b/config/management/operational/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/management/operational/src/main.rs b/config/management/operational/src/main.rs index efec2a5ca80e2..67ac72b6a61e9 100644 --- a/config/management/operational/src/main.rs +++ b/config/management/operational/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/management/operational/src/network_checker.rs b/config/management/operational/src/network_checker.rs index 40c1fefae9f7a..55c696502a727 100644 --- a/config/management/operational/src/network_checker.rs +++ b/config/management/operational/src/network_checker.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/management/operational/src/owner.rs b/config/management/operational/src/owner.rs index fd2bcfc31debf..e838d69c71bfa 100644 --- a/config/management/operational/src/owner.rs +++ b/config/management/operational/src/owner.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{auto_validate::AutoValidate, rest_client::RestClient, TransactionContext}; diff --git a/config/management/operational/src/print.rs b/config/management/operational/src/print.rs index 77e60b70e4a51..8ffb3bb937dab 100644 --- a/config/management/operational/src/print.rs +++ b/config/management/operational/src/print.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519::Ed25519PublicKey, x25519}; diff --git a/config/management/operational/src/rest_client.rs b/config/management/operational/src/rest_client.rs index b256c0c39eb51..60582e8678957 100644 --- a/config/management/operational/src/rest_client.rs +++ b/config/management/operational/src/rest_client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{TransactionContext, TransactionStatus}; diff --git a/config/management/operational/src/test_helper.rs b/config/management/operational/src/test_helper.rs index d614d6ce34ba0..de98ef7c1682a 100644 --- a/config/management/operational/src/test_helper.rs +++ b/config/management/operational/src/test_helper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/management/operational/src/validate_transaction.rs b/config/management/operational/src/validate_transaction.rs index 48d8dce50e0af..252c0cf3d7e79 100644 --- a/config/management/operational/src/validate_transaction.rs +++ b/config/management/operational/src/validate_transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{rest_client::RestClient, TransactionContext}; diff --git a/config/management/operational/src/validator_config.rs b/config/management/operational/src/validator_config.rs index 9e5b920d8b74a..060a6d3fa2b53 100644 --- a/config/management/operational/src/validator_config.rs +++ b/config/management/operational/src/validator_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{auto_validate::AutoValidate, rest_client::RestClient, TransactionContext}; diff --git a/config/management/operational/src/validator_set.rs b/config/management/operational/src/validator_set.rs index 5c638a6337d4b..b3d96b7113612 100644 --- a/config/management/operational/src/validator_set.rs +++ b/config/management/operational/src/validator_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/management/operational/src/validator_state.rs b/config/management/operational/src/validator_state.rs index 9e24561ec97c4..4ee25ae990306 100644 --- a/config/management/operational/src/validator_state.rs +++ b/config/management/operational/src/validator_state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{rest_client::RestClient, validator_config::DecodedValidatorConfig}; diff --git a/config/management/src/config.rs b/config/management/src/config.rs index 03b9f2f4059ba..4d1e7e4d589de 100644 --- a/config/management/src/config.rs +++ b/config/management/src/config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{error::Error, storage::StorageWrapper}; diff --git a/config/management/src/error.rs b/config/management/src/error.rs index f3551096ea22f..0c21d3f58d549 100644 --- a/config/management/src/error.rs +++ b/config/management/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use thiserror::Error; diff --git a/config/management/src/lib.rs b/config/management/src/lib.rs index 373c8d072f36e..44a5652c1ba43 100644 --- a/config/management/src/lib.rs +++ b/config/management/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/management/src/secure_backend.rs b/config/management/src/secure_backend.rs index 64f57d7999e44..42b2275c07da1 100644 --- a/config/management/src/secure_backend.rs +++ b/config/management/src/secure_backend.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::Error; diff --git a/config/management/src/storage.rs b/config/management/src/storage.rs index 57144fdca63ae..72a4a4474d5de 100644 --- a/config/management/src/storage.rs +++ b/config/management/src/storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::Error; diff --git a/config/management/src/transaction.rs b/config/management/src/transaction.rs index e7276ba9c2789..99b7ea618e77d 100644 --- a/config/management/src/transaction.rs +++ b/config/management/src/transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::constants; diff --git a/config/management/src/validator_config.rs b/config/management/src/validator_config.rs index 55816213a5895..bc41d8e6ca25b 100644 --- a/config/management/src/validator_config.rs +++ b/config/management/src/validator_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/management/src/waypoint.rs b/config/management/src/waypoint.rs index cefa013e9c0fa..462f932b157d1 100644 --- a/config/management/src/waypoint.rs +++ b/config/management/src/waypoint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{config::ConfigPath, error::Error, secure_backend::ValidatorBackend}; diff --git a/config/seed-peer-generator/src/lib.rs b/config/seed-peer-generator/src/lib.rs index cd34810cdf244..0dea666e55761 100644 --- a/config/seed-peer-generator/src/lib.rs +++ b/config/seed-peer-generator/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod utils; diff --git a/config/seed-peer-generator/src/main.rs b/config/seed-peer-generator/src/main.rs index 0c6c410a8f3ca..f578b6a17d6e6 100644 --- a/config/seed-peer-generator/src/main.rs +++ b/config/seed-peer-generator/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/seed-peer-generator/src/utils.rs b/config/seed-peer-generator/src/utils.rs index 7b42740c01f47..b781a12b77e55 100644 --- a/config/seed-peer-generator/src/utils.rs +++ b/config/seed-peer-generator/src/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/src/config/api_config.rs b/config/src/config/api_config.rs index 5d6e508ef09ce..6003cae1c5cc2 100644 --- a/config/src/config/api_config.rs +++ b/config/src/config/api_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::utils; diff --git a/config/src/config/consensus_config.rs b/config/src/config/consensus_config.rs index 491c6a2df4f10..19a7ecdfa2445 100644 --- a/config/src/config/consensus_config.rs +++ b/config/src/config/consensus_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::SafetyRulesConfig; diff --git a/config/src/config/debug_interface_config.rs b/config/src/config/debug_interface_config.rs index 768213e7a944b..0d57a27096f16 100644 --- a/config/src/config/debug_interface_config.rs +++ b/config/src/config/debug_interface_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::utils; diff --git a/config/src/config/error.rs b/config/src/config/error.rs index f6fdb57f60396..c6aabcec4563a 100644 --- a/config/src/config/error.rs +++ b/config/src/config/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use thiserror::Error; diff --git a/config/src/config/execution_config.rs b/config/src/config/execution_config.rs index b6f49a00ab167..ce524fec147cf 100644 --- a/config/src/config/execution_config.rs +++ b/config/src/config/execution_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::{Error, RootPath, SecureBackend}; diff --git a/config/src/config/json_rpc_config.rs b/config/src/config/json_rpc_config.rs index 2fe6c5f34729b..5ec4f4c23c04d 100644 --- a/config/src/config/json_rpc_config.rs +++ b/config/src/config/json_rpc_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::utils; diff --git a/config/src/config/key_manager_config.rs b/config/src/config/key_manager_config.rs index 1d32f7e423a6b..3d62f76d47d86 100644 --- a/config/src/config/key_manager_config.rs +++ b/config/src/config/key_manager_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::{Error, LoggerConfig, PersistableConfig, SecureBackend}; diff --git a/config/src/config/logger_config.rs b/config/src/config/logger_config.rs index 01a054bb5be66..80d9b50881781 100644 --- a/config/src/config/logger_config.rs +++ b/config/src/config/logger_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_logger::{Level, CHANNEL_SIZE}; diff --git a/config/src/config/mempool_config.rs b/config/src/config/mempool_config.rs index 1f328d9c62737..a8927ce9e5260 100644 --- a/config/src/config/mempool_config.rs +++ b/config/src/config/mempool_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/config/src/config/mod.rs b/config/src/config/mod.rs index d1d53c504cbbb..2289484b4b2bc 100644 --- a/config/src/config/mod.rs +++ b/config/src/config/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::network_id::NetworkId; diff --git a/config/src/config/network_config.rs b/config/src/config/network_config.rs index 3f3c7938e343f..1f1686b2b3947 100644 --- a/config/src/config/network_config.rs +++ b/config/src/config/network_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/src/config/safety_rules_config.rs b/config/src/config/safety_rules_config.rs index 2ef62adb717bf..ee765ae96c931 100644 --- a/config/src/config/safety_rules_config.rs +++ b/config/src/config/safety_rules_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/config/src/config/secure_backend_config.rs b/config/src/config/secure_backend_config.rs index 99e470329678d..58ad7dd70e0c5 100644 --- a/config/src/config/secure_backend_config.rs +++ b/config/src/config/secure_backend_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::Error; diff --git a/config/src/config/state_sync_config.rs b/config/src/config/state_sync_config.rs index 2e87c68b14a83..417faddbdf64d 100644 --- a/config/src/config/state_sync_config.rs +++ b/config/src/config/state_sync_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/config/src/config/storage_config.rs b/config/src/config/storage_config.rs index 22796c142a2e5..b4c424d562d98 100644 --- a/config/src/config/storage_config.rs +++ b/config/src/config/storage_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::utils; diff --git a/config/src/config/test_config.rs b/config/src/config/test_config.rs index 981e0be690df0..df684b06395fa 100644 --- a/config/src/config/test_config.rs +++ b/config/src/config/test_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::keys::ConfigKey; diff --git a/config/src/generator.rs b/config/src/generator.rs index e5765219df09f..14bbc2bd77bc9 100644 --- a/config/src/generator.rs +++ b/config/src/generator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Convenience structs and functions for generating a random set of nodes without the diff --git a/config/src/keys.rs b/config/src/keys.rs index 0e1bb8558435a..0a8937d74c807 100644 --- a/config/src/keys.rs +++ b/config/src/keys.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file implements a KeyPair data structure. diff --git a/config/src/lib.rs b/config/src/lib.rs index 3a692b6ec28e2..8eee85f45be8b 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/config/src/network_id.rs b/config/src/network_id.rs index f98c70e1ea921..e369500f27dad 100644 --- a/config/src/network_id.rs +++ b/config/src/network_id.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::{PeerRole, RoleType}; use aptos_types::PeerId; diff --git a/config/src/utils.rs b/config/src/utils.rs index 3f146fd4da201..170a9cc5a959c 100644 --- a/config/src/utils.rs +++ b/config/src/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::NodeConfig; diff --git a/consensus/consensus-types/src/block.rs b/consensus/consensus-types/src/block.rs index 15f88b628b35e..022cde01be158 100644 --- a/consensus/consensus-types/src/block.rs +++ b/consensus/consensus-types/src/block.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/block_data.rs b/consensus/consensus-types/src/block_data.rs index dd57260d82317..1b983b18f8c6b 100644 --- a/consensus/consensus-types/src/block_data.rs +++ b/consensus/consensus-types/src/block_data.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/block_retrieval.rs b/consensus/consensus-types/src/block_retrieval.rs index 471708f94eaf0..9a56e1a08deb2 100644 --- a/consensus/consensus-types/src/block_retrieval.rs +++ b/consensus/consensus-types/src/block_retrieval.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::block::Block; diff --git a/consensus/consensus-types/src/block_test.rs b/consensus/consensus-types/src/block_test.rs index 86523bdda51e3..f721b2a11dcef 100644 --- a/consensus/consensus-types/src/block_test.rs +++ b/consensus/consensus-types/src/block_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/block_test_utils.rs b/consensus/consensus-types/src/block_test_utils.rs index 1eea4789ec906..a47cc69641423 100644 --- a/consensus/consensus-types/src/block_test_utils.rs +++ b/consensus/consensus-types/src/block_test_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![allow(clippy::integer_arithmetic)] diff --git a/consensus/consensus-types/src/common.rs b/consensus/consensus-types/src/common.rs index 5bb902789d723..857ba75d3d56b 100644 --- a/consensus/consensus-types/src/common.rs +++ b/consensus/consensus-types/src/common.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{account_address::AccountAddress, transaction::SignedTransaction}; diff --git a/consensus/consensus-types/src/epoch_retrieval.rs b/consensus/consensus-types/src/epoch_retrieval.rs index 6f1acb2876419..f78e9fb5a9c3e 100644 --- a/consensus/consensus-types/src/epoch_retrieval.rs +++ b/consensus/consensus-types/src/epoch_retrieval.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/consensus/consensus-types/src/executed_block.rs b/consensus/consensus-types/src/executed_block.rs index 9963cb95b8cbb..b015bf94e4c77 100644 --- a/consensus/consensus-types/src/executed_block.rs +++ b/consensus/consensus-types/src/executed_block.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/experimental/commit_decision.rs b/consensus/consensus-types/src/experimental/commit_decision.rs index 8f7613cadcf06..64421105c8ee8 100644 --- a/consensus/consensus-types/src/experimental/commit_decision.rs +++ b/consensus/consensus-types/src/experimental/commit_decision.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common::Round; diff --git a/consensus/consensus-types/src/experimental/commit_vote.rs b/consensus/consensus-types/src/experimental/commit_vote.rs index f2d1e8170e689..274083f45bf50 100644 --- a/consensus/consensus-types/src/experimental/commit_vote.rs +++ b/consensus/consensus-types/src/experimental/commit_vote.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common::{Author, Round}; diff --git a/consensus/consensus-types/src/experimental/mod.rs b/consensus/consensus-types/src/experimental/mod.rs index 99b31bc052fea..ef92e3322ad86 100644 --- a/consensus/consensus-types/src/experimental/mod.rs +++ b/consensus/consensus-types/src/experimental/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod commit_decision; diff --git a/consensus/consensus-types/src/lib.rs b/consensus/consensus-types/src/lib.rs index 71ca8f05b9463..298a1e2ff18ab 100644 --- a/consensus/consensus-types/src/lib.rs +++ b/consensus/consensus-types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/consensus/consensus-types/src/proposal_msg.rs b/consensus/consensus-types/src/proposal_msg.rs index 9800399a505c0..9bac48f325800 100644 --- a/consensus/consensus-types/src/proposal_msg.rs +++ b/consensus/consensus-types/src/proposal_msg.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{block::Block, common::Author, sync_info::SyncInfo}; diff --git a/consensus/consensus-types/src/quorum_cert.rs b/consensus/consensus-types/src/quorum_cert.rs index 4352184693e76..df1700070ca94 100644 --- a/consensus/consensus-types/src/quorum_cert.rs +++ b/consensus/consensus-types/src/quorum_cert.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::vote_data::VoteData; diff --git a/consensus/consensus-types/src/safety_data.rs b/consensus/consensus-types/src/safety_data.rs index 80dc89e413755..93154f66e8fdd 100644 --- a/consensus/consensus-types/src/safety_data.rs +++ b/consensus/consensus-types/src/safety_data.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::vote::Vote; diff --git a/consensus/consensus-types/src/sync_info.rs b/consensus/consensus-types/src/sync_info.rs index 2f2f66ff87c6a..bee5518315bd8 100644 --- a/consensus/consensus-types/src/sync_info.rs +++ b/consensus/consensus-types/src/sync_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/timeout.rs b/consensus/consensus-types/src/timeout.rs index c5b4181e685f6..3c9adb4f6d6d1 100644 --- a/consensus/consensus-types/src/timeout.rs +++ b/consensus/consensus-types/src/timeout.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::common::Round; diff --git a/consensus/consensus-types/src/timeout_2chain.rs b/consensus/consensus-types/src/timeout_2chain.rs index 066040e75396f..4fbd94c024c7f 100644 --- a/consensus/consensus-types/src/timeout_2chain.rs +++ b/consensus/consensus-types/src/timeout_2chain.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{common::Author, quorum_cert::QuorumCert}; diff --git a/consensus/consensus-types/src/timeout_certificate.rs b/consensus/consensus-types/src/timeout_certificate.rs index 6a9ba06352683..3f1091f82c55d 100644 --- a/consensus/consensus-types/src/timeout_certificate.rs +++ b/consensus/consensus-types/src/timeout_certificate.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/vote.rs b/consensus/consensus-types/src/vote.rs index a63eaaf66cd96..f8243747058eb 100644 --- a/consensus/consensus-types/src/vote.rs +++ b/consensus/consensus-types/src/vote.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/consensus-types/src/vote_data.rs b/consensus/consensus-types/src/vote_data.rs index a5c0306d5759d..dea2fbbaf4b6c 100644 --- a/consensus/consensus-types/src/vote_data.rs +++ b/consensus/consensus-types/src/vote_data.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto_derive::{BCSCryptoHash, CryptoHasher}; diff --git a/consensus/consensus-types/src/vote_msg.rs b/consensus/consensus-types/src/vote_msg.rs index 0f968c69beb02..b7f32c689ce29 100644 --- a/consensus/consensus-types/src/vote_msg.rs +++ b/consensus/consensus-types/src/vote_msg.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{sync_info::SyncInfo, vote::Vote}; diff --git a/consensus/consensus-types/src/vote_proposal.rs b/consensus/consensus-types/src/vote_proposal.rs index 243a071ed0ec9..e547c7297e936 100644 --- a/consensus/consensus-types/src/vote_proposal.rs +++ b/consensus/consensus-types/src/vote_proposal.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{block::Block, vote_data::VoteData}; diff --git a/consensus/safety-rules/benches/safety_rules.rs b/consensus/safety-rules/benches/safety_rules.rs index ac33abbc0fd13..8e0d5f4d230ed 100644 --- a/consensus/safety-rules/benches/safety_rules.rs +++ b/consensus/safety-rules/benches/safety_rules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519::Ed25519PrivateKey, Uniform}; diff --git a/consensus/safety-rules/src/configurable_validator_signer.rs b/consensus/safety-rules/src/configurable_validator_signer.rs index c6e3b40e88be8..7d7edd85c4dcf 100644 --- a/consensus/safety-rules/src/configurable_validator_signer.rs +++ b/consensus/safety-rules/src/configurable_validator_signer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Error, PersistentSafetyStorage}; diff --git a/consensus/safety-rules/src/consensus_state.rs b/consensus/safety-rules/src/consensus_state.rs index 058eca59fd3c9..f41206fd90cd4 100644 --- a/consensus/safety-rules/src/consensus_state.rs +++ b/consensus/safety-rules/src/consensus_state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::waypoint::Waypoint; diff --git a/consensus/safety-rules/src/counters.rs b/consensus/safety-rules/src/counters.rs index e42096cf58061..aa8cd95d94ae8 100644 --- a/consensus/safety-rules/src/counters.rs +++ b/consensus/safety-rules/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_secure_push_metrics::{ diff --git a/consensus/safety-rules/src/error.rs b/consensus/safety-rules/src/error.rs index 471755c52a1bf..60d51539a721c 100644 --- a/consensus/safety-rules/src/error.rs +++ b/consensus/safety-rules/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/consensus/safety-rules/src/fuzzing_utils.rs b/consensus/safety-rules/src/fuzzing_utils.rs index 621f33764449a..b14e270c2e147 100644 --- a/consensus/safety-rules/src/fuzzing_utils.rs +++ b/consensus/safety-rules/src/fuzzing_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::serializer::SafetyRulesInput; diff --git a/consensus/safety-rules/src/lib.rs b/consensus/safety-rules/src/lib.rs index 2adf579676836..9a3b037b6596b 100644 --- a/consensus/safety-rules/src/lib.rs +++ b/consensus/safety-rules/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/consensus/safety-rules/src/local_client.rs b/consensus/safety-rules/src/local_client.rs index c9c0bb75d0e89..5925982d28ac1 100644 --- a/consensus/safety-rules/src/local_client.rs +++ b/consensus/safety-rules/src/local_client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ConsensusState, Error, SafetyRules, TSafetyRules}; diff --git a/consensus/safety-rules/src/logging.rs b/consensus/safety-rules/src/logging.rs index 0ae8ea8c1016e..8e2d4c6d9a92e 100644 --- a/consensus/safety-rules/src/logging.rs +++ b/consensus/safety-rules/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Error; diff --git a/consensus/safety-rules/src/main.rs b/consensus/safety-rules/src/main.rs index 9ac428b87bfa3..22457499c05d4 100644 --- a/consensus/safety-rules/src/main.rs +++ b/consensus/safety-rules/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Usage: ./safety-rules node.config diff --git a/consensus/safety-rules/src/persistent_safety_storage.rs b/consensus/safety-rules/src/persistent_safety_storage.rs index bf9a8ba5c62aa..d1d19a35fdd95 100644 --- a/consensus/safety-rules/src/persistent_safety_storage.rs +++ b/consensus/safety-rules/src/persistent_safety_storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/safety-rules/src/process.rs b/consensus/safety-rules/src/process.rs index d54d1ed761234..d9b650c690e0e 100644 --- a/consensus/safety-rules/src/process.rs +++ b/consensus/safety-rules/src/process.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/safety-rules/src/remote_service.rs b/consensus/safety-rules/src/remote_service.rs index c7c5780e394ce..10f688fb1ea80 100644 --- a/consensus/safety-rules/src/remote_service.rs +++ b/consensus/safety-rules/src/remote_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/safety-rules/src/safety_rules.rs b/consensus/safety-rules/src/safety_rules.rs index 4db0732956a83..f658a1668fea8 100644 --- a/consensus/safety-rules/src/safety_rules.rs +++ b/consensus/safety-rules/src/safety_rules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/safety-rules/src/safety_rules_2chain.rs b/consensus/safety-rules/src/safety_rules_2chain.rs index 6c1339bab0ca0..7978e6a385cea 100644 --- a/consensus/safety-rules/src/safety_rules_2chain.rs +++ b/consensus/safety-rules/src/safety_rules_2chain.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{error::Error, safety_rules::next_round, SafetyRules}; diff --git a/consensus/safety-rules/src/safety_rules_manager.rs b/consensus/safety-rules/src/safety_rules_manager.rs index 48c1b6ce01e32..de2a2e2c00751 100644 --- a/consensus/safety-rules/src/safety_rules_manager.rs +++ b/consensus/safety-rules/src/safety_rules_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/safety-rules/src/serializer.rs b/consensus/safety-rules/src/serializer.rs index 5d4b14e8675eb..e036efbbb7462 100644 --- a/consensus/safety-rules/src/serializer.rs +++ b/consensus/safety-rules/src/serializer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{counters, logging::LogEntry, ConsensusState, Error, SafetyRules, TSafetyRules}; diff --git a/consensus/safety-rules/src/t_safety_rules.rs b/consensus/safety-rules/src/t_safety_rules.rs index db77f3420adfb..e03a954e39f17 100644 --- a/consensus/safety-rules/src/t_safety_rules.rs +++ b/consensus/safety-rules/src/t_safety_rules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ConsensusState, Error}; diff --git a/consensus/safety-rules/src/test_utils.rs b/consensus/safety-rules/src/test_utils.rs index db70bd37bed25..bc7fdd12f679d 100644 --- a/consensus/safety-rules/src/test_utils.rs +++ b/consensus/safety-rules/src/test_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/safety-rules/src/tests/local.rs b/consensus/safety-rules/src/tests/local.rs index 0a41374780bdf..a99d4fd5dae52 100644 --- a/consensus/safety-rules/src/tests/local.rs +++ b/consensus/safety-rules/src/tests/local.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_utils, tests::suite, SafetyRulesManager}; diff --git a/consensus/safety-rules/src/tests/mod.rs b/consensus/safety-rules/src/tests/mod.rs index 63405fcc806be..049118857a0c0 100644 --- a/consensus/safety-rules/src/tests/mod.rs +++ b/consensus/safety-rules/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod local; diff --git a/consensus/safety-rules/src/tests/networking.rs b/consensus/safety-rules/src/tests/networking.rs index f24a93564e15e..9e7d357de7ffe 100644 --- a/consensus/safety-rules/src/tests/networking.rs +++ b/consensus/safety-rules/src/tests/networking.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_utils, SafetyRulesManager}; diff --git a/consensus/safety-rules/src/tests/safety_rules.rs b/consensus/safety-rules/src/tests/safety_rules.rs index 70a2e8b7bb2f0..d389db5f3b5dc 100644 --- a/consensus/safety-rules/src/tests/safety_rules.rs +++ b/consensus/safety-rules/src/tests/safety_rules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_utils, tests::suite, SafetyRules}; diff --git a/consensus/safety-rules/src/tests/serializer.rs b/consensus/safety-rules/src/tests/serializer.rs index 424730ec9fae8..01afac4e521ac 100644 --- a/consensus/safety-rules/src/tests/serializer.rs +++ b/consensus/safety-rules/src/tests/serializer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_utils, tests::suite, SafetyRulesManager}; diff --git a/consensus/safety-rules/src/tests/suite.rs b/consensus/safety-rules/src/tests/suite.rs index 5c42f7a6e3fe1..8ada33964438e 100644 --- a/consensus/safety-rules/src/tests/suite.rs +++ b/consensus/safety-rules/src/tests/suite.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_utils, test_utils::make_timeout_cert, Error, SafetyRules, TSafetyRules}; diff --git a/consensus/safety-rules/src/tests/thread.rs b/consensus/safety-rules/src/tests/thread.rs index 1c91bbb3a7c02..3367527bb0a1a 100644 --- a/consensus/safety-rules/src/tests/thread.rs +++ b/consensus/safety-rules/src/tests/thread.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_utils, tests::suite, SafetyRulesManager}; diff --git a/consensus/safety-rules/src/tests/vault.rs b/consensus/safety-rules/src/tests/vault.rs index f93ad2be197d9..cef1212de19fb 100644 --- a/consensus/safety-rules/src/tests/vault.rs +++ b/consensus/safety-rules/src/tests/vault.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{tests::suite, PersistentSafetyStorage, SafetyRulesManager}; diff --git a/consensus/safety-rules/src/thread.rs b/consensus/safety-rules/src/thread.rs index efd63921cdd9c..e4cbf372acc13 100644 --- a/consensus/safety-rules/src/thread.rs +++ b/consensus/safety-rules/src/thread.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This provides a execution separation between SafetyRules and Consensus without requiring the diff --git a/consensus/safety-rules/tests/binary.rs b/consensus/safety-rules/tests/binary.rs index 70ecacd5fd181..12456ced0b067 100644 --- a/consensus/safety-rules/tests/binary.rs +++ b/consensus/safety-rules/tests/binary.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::{ diff --git a/consensus/src/block_storage/block_store.rs b/consensus/src/block_storage/block_store.rs index da76bdd6c0a25..506a8a5995e73 100644 --- a/consensus/src/block_storage/block_store.rs +++ b/consensus/src/block_storage/block_store.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/block_storage/block_store_and_lec_recovery_test.rs b/consensus/src/block_storage/block_store_and_lec_recovery_test.rs index fb80223e4a3c7..54c5ba34684a2 100644 --- a/consensus/src/block_storage/block_store_and_lec_recovery_test.rs +++ b/consensus/src/block_storage/block_store_and_lec_recovery_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/block_storage/block_store_test.rs b/consensus/src/block_storage/block_store_test.rs index 19c7ecf5140a5..34a2713e81aa4 100644 --- a/consensus/src/block_storage/block_store_test.rs +++ b/consensus/src/block_storage/block_store_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/block_storage/block_tree.rs b/consensus/src/block_storage/block_tree.rs index e1aae44043dc6..9082d2d21ab5a 100644 --- a/consensus/src/block_storage/block_tree.rs +++ b/consensus/src/block_storage/block_tree.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/block_storage/mod.rs b/consensus/src/block_storage/mod.rs index aad6e8714f415..9bced18dc440f 100644 --- a/consensus/src/block_storage/mod.rs +++ b/consensus/src/block_storage/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/consensus/src/block_storage/sync_manager.rs b/consensus/src/block_storage/sync_manager.rs index f0f05f6342f9e..892cb9c372623 100644 --- a/consensus/src/block_storage/sync_manager.rs +++ b/consensus/src/block_storage/sync_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/block_storage/tracing.rs b/consensus/src/block_storage/tracing.rs index 2367e6ed968b3..6a7ea04fd3f7d 100644 --- a/consensus/src/block_storage/tracing.rs +++ b/consensus/src/block_storage/tracing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::counters; diff --git a/consensus/src/consensus_provider.rs b/consensus/src/consensus_provider.rs index 361ff0ce49b5f..de02e64290769 100644 --- a/consensus/src/consensus_provider.rs +++ b/consensus/src/consensus_provider.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/consensusdb/consensusdb_test.rs b/consensus/src/consensusdb/consensusdb_test.rs index 54a73f4276fdc..0b7e47bb69cd9 100644 --- a/consensus/src/consensusdb/consensusdb_test.rs +++ b/consensus/src/consensusdb/consensusdb_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/consensus/src/consensusdb/mod.rs b/consensus/src/consensusdb/mod.rs index 3fbce798f4e06..5a3d566c04f88 100644 --- a/consensus/src/consensusdb/mod.rs +++ b/consensus/src/consensusdb/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(test)] diff --git a/consensus/src/consensusdb/schema/block/mod.rs b/consensus/src/consensusdb/schema/block/mod.rs index 4aeffb4fc5cbd..8e8fbcd3ed0ba 100644 --- a/consensus/src/consensusdb/schema/block/mod.rs +++ b/consensus/src/consensusdb/schema/block/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for consensus block. diff --git a/consensus/src/consensusdb/schema/block/test.rs b/consensus/src/consensusdb/schema/block/test.rs index a4c6703867799..296455037b9af 100644 --- a/consensus/src/consensusdb/schema/block/test.rs +++ b/consensus/src/consensusdb/schema/block/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/consensus/src/consensusdb/schema/mod.rs b/consensus/src/consensusdb/schema/mod.rs index 102b9eae68e59..c317b50a24c68 100644 --- a/consensus/src/consensusdb/schema/mod.rs +++ b/consensus/src/consensusdb/schema/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub(crate) mod block; diff --git a/consensus/src/consensusdb/schema/quorum_certificate/mod.rs b/consensus/src/consensusdb/schema/quorum_certificate/mod.rs index 02d192eef450d..f50b85087ea35 100644 --- a/consensus/src/consensusdb/schema/quorum_certificate/mod.rs +++ b/consensus/src/consensusdb/schema/quorum_certificate/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for consensus quorum certificate (of a block). diff --git a/consensus/src/consensusdb/schema/quorum_certificate/test.rs b/consensus/src/consensusdb/schema/quorum_certificate/test.rs index 650d87bb04561..4fc649fd8408d 100644 --- a/consensus/src/consensusdb/schema/quorum_certificate/test.rs +++ b/consensus/src/consensusdb/schema/quorum_certificate/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/consensus/src/consensusdb/schema/single_entry/mod.rs b/consensus/src/consensusdb/schema/single_entry/mod.rs index b6f42f3571976..2176683173278 100644 --- a/consensus/src/consensusdb/schema/single_entry/mod.rs +++ b/consensus/src/consensusdb/schema/single_entry/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for any single-entry data. diff --git a/consensus/src/consensusdb/schema/single_entry/test.rs b/consensus/src/consensusdb/schema/single_entry/test.rs index 7c611628faab0..170d5d194626f 100644 --- a/consensus/src/consensusdb/schema/single_entry/test.rs +++ b/consensus/src/consensusdb/schema/single_entry/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/consensus/src/counters.rs b/consensus/src/counters.rs index ae1c447dfe2cd..e2aa087c254ce 100644 --- a/consensus/src/counters.rs +++ b/consensus/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/consensus/src/epoch_manager.rs b/consensus/src/epoch_manager.rs index cc1195c13c2ae..98f77fdcb2cff 100644 --- a/consensus/src/epoch_manager.rs +++ b/consensus/src/epoch_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/error.rs b/consensus/src/error.rs index 32ce878c9f425..fd5fd7d268602 100644 --- a/consensus/src/error.rs +++ b/consensus/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::experimental; diff --git a/consensus/src/experimental/buffer.rs b/consensus/src/experimental/buffer.rs index 1ec678a1c7dd5..14d46c2efb52d 100644 --- a/consensus/src/experimental/buffer.rs +++ b/consensus/src/experimental/buffer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::experimental::hashable::Hashable; diff --git a/consensus/src/experimental/buffer_item.rs b/consensus/src/experimental/buffer_item.rs index 111d459c00984..1cca815bbf490 100644 --- a/consensus/src/experimental/buffer_item.rs +++ b/consensus/src/experimental/buffer_item.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::collections::BTreeMap; diff --git a/consensus/src/experimental/buffer_manager.rs b/consensus/src/experimental/buffer_manager.rs index 4293bb49a0ddc..dbab61878a9cb 100644 --- a/consensus/src/experimental/buffer_manager.rs +++ b/consensus/src/experimental/buffer_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::sync::Arc; diff --git a/consensus/src/experimental/decoupled_execution_utils.rs b/consensus/src/experimental/decoupled_execution_utils.rs index 6fadd6d0ae5ec..03c382897fd4b 100644 --- a/consensus/src/experimental/decoupled_execution_utils.rs +++ b/consensus/src/experimental/decoupled_execution_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/experimental/errors.rs b/consensus/src/experimental/errors.rs index 95c7157828f62..b479a58b0817a 100644 --- a/consensus/src/experimental/errors.rs +++ b/consensus/src/experimental/errors.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::block_info::BlockInfo; diff --git a/consensus/src/experimental/execution_phase.rs b/consensus/src/experimental/execution_phase.rs index 83a76550bdee1..647a82d67a54c 100644 --- a/consensus/src/experimental/execution_phase.rs +++ b/consensus/src/experimental/execution_phase.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{experimental::pipeline_phase::StatelessPipeline, state_replication::StateComputer}; diff --git a/consensus/src/experimental/hashable.rs b/consensus/src/experimental/hashable.rs index f08f132b48622..5f3fc1e0d53d4 100644 --- a/consensus/src/experimental/hashable.rs +++ b/consensus/src/experimental/hashable.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/consensus/src/experimental/linkedlist.rs b/consensus/src/experimental/linkedlist.rs index 0a14edba86bad..eaad2fcccb25b 100644 --- a/consensus/src/experimental/linkedlist.rs +++ b/consensus/src/experimental/linkedlist.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // modified from https://rust-unofficial.github.io/too-many-lists/fourth-final.html (MIT License) diff --git a/consensus/src/experimental/mod.rs b/consensus/src/experimental/mod.rs index e4393e145aa47..fbeed1efbe9ef 100644 --- a/consensus/src/experimental/mod.rs +++ b/consensus/src/experimental/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /* diff --git a/consensus/src/experimental/ordering_state_computer.rs b/consensus/src/experimental/ordering_state_computer.rs index 03bdd3841e3ea..b4ef7a7a246cb 100644 --- a/consensus/src/experimental/ordering_state_computer.rs +++ b/consensus/src/experimental/ordering_state_computer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/experimental/persisting_phase.rs b/consensus/src/experimental/persisting_phase.rs index f5dbf8b970c87..eb0a7024058ba 100644 --- a/consensus/src/experimental/persisting_phase.rs +++ b/consensus/src/experimental/persisting_phase.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::{ diff --git a/consensus/src/experimental/pipeline_phase.rs b/consensus/src/experimental/pipeline_phase.rs index 07eecd90dc3e9..ac18adc4a4628 100644 --- a/consensus/src/experimental/pipeline_phase.rs +++ b/consensus/src/experimental/pipeline_phase.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::experimental::buffer_manager::{Receiver, Sender}; diff --git a/consensus/src/experimental/signing_phase.rs b/consensus/src/experimental/signing_phase.rs index bcd93ed9f64f7..e31f688d2cbb0 100644 --- a/consensus/src/experimental/signing_phase.rs +++ b/consensus/src/experimental/signing_phase.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use safety_rules::TSafetyRules; diff --git a/consensus/src/experimental/tests/buffer_manager_tests.rs b/consensus/src/experimental/tests/buffer_manager_tests.rs index d3f4f9ccaa2fa..a78b01151740d 100644 --- a/consensus/src/experimental/tests/buffer_manager_tests.rs +++ b/consensus/src/experimental/tests/buffer_manager_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/experimental/tests/execution_phase_tests.rs b/consensus/src/experimental/tests/execution_phase_tests.rs index 7e9eaf409747c..2237b6c1ba3f2 100644 --- a/consensus/src/experimental/tests/execution_phase_tests.rs +++ b/consensus/src/experimental/tests/execution_phase_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::sync::Arc; diff --git a/consensus/src/experimental/tests/integration_tests.rs b/consensus/src/experimental/tests/integration_tests.rs index ab87ef2837156..0e35c067def4d 100644 --- a/consensus/src/experimental/tests/integration_tests.rs +++ b/consensus/src/experimental/tests/integration_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // TODO: integration tests diff --git a/consensus/src/experimental/tests/mod.rs b/consensus/src/experimental/tests/mod.rs index beffd0a326dd8..072a8ccaa3443 100644 --- a/consensus/src/experimental/tests/mod.rs +++ b/consensus/src/experimental/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod buffer_manager_tests; diff --git a/consensus/src/experimental/tests/ordering_state_computer_tests.rs b/consensus/src/experimental/tests/ordering_state_computer_tests.rs index b44d5b3568b59..103f581cddc04 100644 --- a/consensus/src/experimental/tests/ordering_state_computer_tests.rs +++ b/consensus/src/experimental/tests/ordering_state_computer_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[test] diff --git a/consensus/src/experimental/tests/phase_tester.rs b/consensus/src/experimental/tests/phase_tester.rs index 36e44e4e01ee2..b73e2ef7415ff 100644 --- a/consensus/src/experimental/tests/phase_tester.rs +++ b/consensus/src/experimental/tests/phase_tester.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/experimental/tests/signing_phase_tests.rs b/consensus/src/experimental/tests/signing_phase_tests.rs index 60376e44b5524..38f5bf195dcd0 100644 --- a/consensus/src/experimental/tests/signing_phase_tests.rs +++ b/consensus/src/experimental/tests/signing_phase_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/experimental/tests/test_utils.rs b/consensus/src/experimental/tests/test_utils.rs index f39703ec61d7c..7fe71bf16dac9 100644 --- a/consensus/src/experimental/tests/test_utils.rs +++ b/consensus/src/experimental/tests/test_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{metrics_safety_rules::MetricsSafetyRules, test_utils::MockStorage}; diff --git a/consensus/src/lib.rs b/consensus/src/lib.rs index 7b7a7150879a8..126663c08e065 100644 --- a/consensus/src/lib.rs +++ b/consensus/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/consensus/src/liveness/leader_reputation.rs b/consensus/src/liveness/leader_reputation.rs index 9a9e3c982e375..3894be898cd82 100644 --- a/consensus/src/liveness/leader_reputation.rs +++ b/consensus/src/liveness/leader_reputation.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/liveness/leader_reputation_test.rs b/consensus/src/liveness/leader_reputation_test.rs index 43b67aabcee89..6eea1cd00e27a 100644 --- a/consensus/src/liveness/leader_reputation_test.rs +++ b/consensus/src/liveness/leader_reputation_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::liveness::{ diff --git a/consensus/src/liveness/mod.rs b/consensus/src/liveness/mod.rs index 1fce2f3f1af12..7ad3694ac92a2 100644 --- a/consensus/src/liveness/mod.rs +++ b/consensus/src/liveness/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub(crate) mod leader_reputation; diff --git a/consensus/src/liveness/proposal_generator.rs b/consensus/src/liveness/proposal_generator.rs index 808ea0326bc6c..ecc49290530d8 100644 --- a/consensus/src/liveness/proposal_generator.rs +++ b/consensus/src/liveness/proposal_generator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/liveness/proposal_generator_test.rs b/consensus/src/liveness/proposal_generator_test.rs index 656ac6c45fee4..0c4424f73fd58 100644 --- a/consensus/src/liveness/proposal_generator_test.rs +++ b/consensus/src/liveness/proposal_generator_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/liveness/proposer_election.rs b/consensus/src/liveness/proposer_election.rs index 5a7d22d9ea10b..5c05466531ef2 100644 --- a/consensus/src/liveness/proposer_election.rs +++ b/consensus/src/liveness/proposer_election.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use consensus_types::{ diff --git a/consensus/src/liveness/rotating_proposer_election.rs b/consensus/src/liveness/rotating_proposer_election.rs index 73eda73cea342..c7bf83778d879 100644 --- a/consensus/src/liveness/rotating_proposer_election.rs +++ b/consensus/src/liveness/rotating_proposer_election.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::liveness::proposer_election::ProposerElection; diff --git a/consensus/src/liveness/rotating_proposer_test.rs b/consensus/src/liveness/rotating_proposer_test.rs index 5a17a2758d130..8252612c26831 100644 --- a/consensus/src/liveness/rotating_proposer_test.rs +++ b/consensus/src/liveness/rotating_proposer_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::liveness::{ diff --git a/consensus/src/liveness/round_proposer_election.rs b/consensus/src/liveness/round_proposer_election.rs index fe4e79a6e3e5e..3ce5e8d454c7f 100644 --- a/consensus/src/liveness/round_proposer_election.rs +++ b/consensus/src/liveness/round_proposer_election.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::liveness::proposer_election::ProposerElection; diff --git a/consensus/src/liveness/round_proposer_test.rs b/consensus/src/liveness/round_proposer_test.rs index f1c25644682ac..d3e5e3653545b 100644 --- a/consensus/src/liveness/round_proposer_test.rs +++ b/consensus/src/liveness/round_proposer_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::liveness::{ diff --git a/consensus/src/liveness/round_state.rs b/consensus/src/liveness/round_state.rs index 5c33cd2fdd46f..87c99ae9521a3 100644 --- a/consensus/src/liveness/round_state.rs +++ b/consensus/src/liveness/round_state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/liveness/round_state_test.rs b/consensus/src/liveness/round_state_test.rs index 51a2ada79228a..746b56d2b0f7c 100644 --- a/consensus/src/liveness/round_state_test.rs +++ b/consensus/src/liveness/round_state_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/logging.rs b/consensus/src/logging.rs index 747629cad13b2..30b20b270a036 100644 --- a/consensus/src/logging.rs +++ b/consensus/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_logger::Schema; diff --git a/consensus/src/metrics_safety_rules.rs b/consensus/src/metrics_safety_rules.rs index fc07828763658..5ba3d9c426055 100644 --- a/consensus/src/metrics_safety_rules.rs +++ b/consensus/src/metrics_safety_rules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::persistent_liveness_storage::PersistentLivenessStorage; diff --git a/consensus/src/network.rs b/consensus/src/network.rs index f41dbc2e4166f..58ef9b7024907 100644 --- a/consensus/src/network.rs +++ b/consensus/src/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/network_interface.rs b/consensus/src/network_interface.rs index b2eed31344d19..e3cdb4e1c28e6 100644 --- a/consensus/src/network_interface.rs +++ b/consensus/src/network_interface.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Interface between Consensus and Network layers. diff --git a/consensus/src/network_tests.rs b/consensus/src/network_tests.rs index 83b3fff311762..1fc78acc13184 100644 --- a/consensus/src/network_tests.rs +++ b/consensus/src/network_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/pending_votes.rs b/consensus/src/pending_votes.rs index e8841285b11fe..0756f31679ebc 100644 --- a/consensus/src/pending_votes.rs +++ b/consensus/src/pending_votes.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! PendingVotes store pending votes observed for a fixed epoch and round. diff --git a/consensus/src/persistent_liveness_storage.rs b/consensus/src/persistent_liveness_storage.rs index ccfbe2583b7e7..731b2641b8016 100644 --- a/consensus/src/persistent_liveness_storage.rs +++ b/consensus/src/persistent_liveness_storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{consensusdb::ConsensusDB, epoch_manager::LivenessStorageData, error::DbError}; diff --git a/consensus/src/round_manager.rs b/consensus/src/round_manager.rs index 9341358abe44f..426c417047fde 100644 --- a/consensus/src/round_manager.rs +++ b/consensus/src/round_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/round_manager_fuzzing.rs b/consensus/src/round_manager_fuzzing.rs index aa8c6a8a42529..3e6dcb37d6d23 100644 --- a/consensus/src/round_manager_fuzzing.rs +++ b/consensus/src/round_manager_fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/round_manager_test.rs b/consensus/src/round_manager_test.rs index 664bf32f4cdf7..e512b2e9da0b4 100644 --- a/consensus/src/round_manager_test.rs +++ b/consensus/src/round_manager_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/state_computer.rs b/consensus/src/state_computer.rs index 6085b9c53ad76..0e10a8a115ee6 100644 --- a/consensus/src/state_computer.rs +++ b/consensus/src/state_computer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/state_replication.rs b/consensus/src/state_replication.rs index 6fb236294b4be..df7f3ae85e365 100644 --- a/consensus/src/state_replication.rs +++ b/consensus/src/state_replication.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::{MempoolError, StateSyncError}; diff --git a/consensus/src/test_utils/mock_state_computer.rs b/consensus/src/test_utils/mock_state_computer.rs index 075e1c8bf8bd0..ced4d242d5211 100644 --- a/consensus/src/test_utils/mock_state_computer.rs +++ b/consensus/src/test_utils/mock_state_computer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/test_utils/mock_storage.rs b/consensus/src/test_utils/mock_storage.rs index 7d309775a2276..49789b15e1c0f 100644 --- a/consensus/src/test_utils/mock_storage.rs +++ b/consensus/src/test_utils/mock_storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/test_utils/mock_txn_manager.rs b/consensus/src/test_utils/mock_txn_manager.rs index c708db6041fbb..21e3a5565d6cc 100644 --- a/consensus/src/test_utils/mock_txn_manager.rs +++ b/consensus/src/test_utils/mock_txn_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{error::MempoolError, state_replication::TxnManager, txn_manager::MempoolProxy}; diff --git a/consensus/src/test_utils/mod.rs b/consensus/src/test_utils/mod.rs index 80d65ef678765..29e982fb3b620 100644 --- a/consensus/src/test_utils/mod.rs +++ b/consensus/src/test_utils/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::block_storage::{BlockReader, BlockStore}; diff --git a/consensus/src/twins/basic_twins_test.rs b/consensus/src/twins/basic_twins_test.rs index 4856eb06517ee..35ab66ea40214 100644 --- a/consensus/src/twins/basic_twins_test.rs +++ b/consensus/src/twins/basic_twins_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/twins/mod.rs b/consensus/src/twins/mod.rs index 8e4fdbfe6fd78..480434dfa0e77 100644 --- a/consensus/src/twins/mod.rs +++ b/consensus/src/twins/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod basic_twins_test; diff --git a/consensus/src/twins/twins_node.rs b/consensus/src/twins/twins_node.rs index 91fad6f4465e0..b32aea6410775 100644 --- a/consensus/src/twins/twins_node.rs +++ b/consensus/src/twins/twins_node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/consensus/src/txn_manager.rs b/consensus/src/txn_manager.rs index b47af6b995fde..0d18b05ba2a98 100644 --- a/consensus/src/txn_manager.rs +++ b/consensus/src/txn_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{error::MempoolError, state_replication::TxnManager}; diff --git a/consensus/src/util/mock_time_service.rs b/consensus/src/util/mock_time_service.rs index 9bdcffd9906e7..604cb5df23b76 100644 --- a/consensus/src/util/mock_time_service.rs +++ b/consensus/src/util/mock_time_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::util::time_service::{ScheduledTask, TimeService}; diff --git a/consensus/src/util/mod.rs b/consensus/src/util/mod.rs index 7c1365d1eb7ac..000664aa88f5a 100644 --- a/consensus/src/util/mod.rs +++ b/consensus/src/util/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(any(test, feature = "fuzzing"))] diff --git a/consensus/src/util/time_service.rs b/consensus/src/util/time_service.rs index 04f0aa64abfbf..ccad1669be6d7 100644 --- a/consensus/src/util/time_service.rs +++ b/consensus/src/util/time_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_logger::prelude::*; diff --git a/crates/aptos-bitvec/src/lib.rs b/crates/aptos-bitvec/src/lib.rs index c23f61b77e8ce..bd617c443a1b4 100644 --- a/crates/aptos-bitvec/src/lib.rs +++ b/crates/aptos-bitvec/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This library defines a BitVec struct that represents a bit vector. diff --git a/crates/aptos-crypto-derive/src/hasher.rs b/crates/aptos-crypto-derive/src/hasher.rs index 8a6d81b578563..53aa6f4c6571b 100644 --- a/crates/aptos-crypto-derive/src/hasher.rs +++ b/crates/aptos-crypto-derive/src/hasher.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// Converts a camel-case string to snake-case diff --git a/crates/aptos-crypto-derive/src/lib.rs b/crates/aptos-crypto-derive/src/lib.rs index 1c323bcc7c2fb..7b6ad3c9d7f7c 100644 --- a/crates/aptos-crypto-derive/src/lib.rs +++ b/crates/aptos-crypto-derive/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-crypto-derive/src/unions.rs b/crates/aptos-crypto-derive/src/unions.rs index 16811fe3df74f..32a754aced61f 100644 --- a/crates/aptos-crypto-derive/src/unions.rs +++ b/crates/aptos-crypto-derive/src/unions.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use proc_macro::TokenStream; diff --git a/crates/aptos-crypto/benches/ed25519.rs b/crates/aptos-crypto/benches/ed25519.rs index b9010b5f1b9e3..0f72614507324 100644 --- a/crates/aptos-crypto/benches/ed25519.rs +++ b/crates/aptos-crypto/benches/ed25519.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[macro_use] diff --git a/crates/aptos-crypto/benches/noise.rs b/crates/aptos-crypto/benches/noise.rs index ac9e5b00dee63..77a5b1b4644e8 100644 --- a/crates/aptos-crypto/benches/noise.rs +++ b/crates/aptos-crypto/benches/noise.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Don't forget to run this benchmark with AES-NI enable. diff --git a/crates/aptos-crypto/src/compat.rs b/crates/aptos-crypto/src/compat.rs index 11985ca4f04b1..70a79432ce693 100644 --- a/crates/aptos-crypto/src/compat.rs +++ b/crates/aptos-crypto/src/compat.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Wrapper structs for types that need [RustCrypto](https://github.com/RustCrypto) diff --git a/crates/aptos-crypto/src/ed25519.rs b/crates/aptos-crypto/src/ed25519.rs index 5999c764b2d13..8ce5a9946407a 100644 --- a/crates/aptos-crypto/src/ed25519.rs +++ b/crates/aptos-crypto/src/ed25519.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides an API for the PureEdDSA signature scheme over the ed25519 twisted diff --git a/crates/aptos-crypto/src/error.rs b/crates/aptos-crypto/src/error.rs index 78cf779988f72..324fe87fb5acd 100644 --- a/crates/aptos-crypto/src/error.rs +++ b/crates/aptos-crypto/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Rexport the error types needed for the various crypto traits diff --git a/crates/aptos-crypto/src/hash.rs b/crates/aptos-crypto/src/hash.rs index 342243ee71dc4..8e0c794e760c1 100644 --- a/crates/aptos-crypto/src/hash.rs +++ b/crates/aptos-crypto/src/hash.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines traits and implementations of diff --git a/crates/aptos-crypto/src/hkdf.rs b/crates/aptos-crypto/src/hkdf.rs index 1552213c9b5f0..1fbe9824d2ac4 100644 --- a/crates/aptos-crypto/src/hkdf.rs +++ b/crates/aptos-crypto/src/hkdf.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! An implementation of HKDF, the HMAC-based Extract-and-Expand Key Derivation Function diff --git a/crates/aptos-crypto/src/lib.rs b/crates/aptos-crypto/src/lib.rs index 583edc11b0d46..d419c54fca54d 100644 --- a/crates/aptos-crypto/src/lib.rs +++ b/crates/aptos-crypto/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-crypto/src/multi_ed25519.rs b/crates/aptos-crypto/src/multi_ed25519.rs index 8dc718821e314..b27ab40f50ab7 100644 --- a/crates/aptos-crypto/src/multi_ed25519.rs +++ b/crates/aptos-crypto/src/multi_ed25519.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides an API for the accountable threshold multi-sig PureEdDSA signature scheme diff --git a/crates/aptos-crypto/src/noise.rs b/crates/aptos-crypto/src/noise.rs index 1211610b28402..6533ca5e5e347 100644 --- a/crates/aptos-crypto/src/noise.rs +++ b/crates/aptos-crypto/src/noise.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Noise is a [protocol framework](https://noiseprotocol.org/) which we use to diff --git a/crates/aptos-crypto/src/tags.rs b/crates/aptos-crypto/src/tags.rs index 40f742ec26e48..25f450ef25e1f 100644 --- a/crates/aptos-crypto/src/tags.rs +++ b/crates/aptos-crypto/src/tags.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides definitions of tag types to be used by MIRAI analyzing aptos-crypto. diff --git a/crates/aptos-crypto/src/test_utils.rs b/crates/aptos-crypto/src/test_utils.rs index be5440f55c99b..4945a84424e3c 100644 --- a/crates/aptos-crypto/src/test_utils.rs +++ b/crates/aptos-crypto/src/test_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Internal module containing convenience utility functions mainly for testing diff --git a/crates/aptos-crypto/src/traits.rs b/crates/aptos-crypto/src/traits.rs index dbd3f1c43e06f..cf624f5fd0cd0 100644 --- a/crates/aptos-crypto/src/traits.rs +++ b/crates/aptos-crypto/src/traits.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides a generic set of traits for dealing with cryptographic primitives. diff --git a/crates/aptos-crypto/src/unit_tests/bcs_test.rs b/crates/aptos-crypto/src/unit_tests/bcs_test.rs index 16e69d4357f03..414bed546b9da 100644 --- a/crates/aptos-crypto/src/unit_tests/bcs_test.rs +++ b/crates/aptos-crypto/src/unit_tests/bcs_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use rand::{rngs::StdRng, SeedableRng}; diff --git a/crates/aptos-crypto/src/unit_tests/compat_test.rs b/crates/aptos-crypto/src/unit_tests/compat_test.rs index 9a25ca4c5326a..eaca56440da12 100644 --- a/crates/aptos-crypto/src/unit_tests/compat_test.rs +++ b/crates/aptos-crypto/src/unit_tests/compat_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::compat; diff --git a/crates/aptos-crypto/src/unit_tests/compilation/cross_test.rs b/crates/aptos-crypto/src/unit_tests/compilation/cross_test.rs index a044206ea6457..642ae647839e1 100644 --- a/crates/aptos-crypto/src/unit_tests/compilation/cross_test.rs +++ b/crates/aptos-crypto/src/unit_tests/compilation/cross_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj.rs b/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj.rs index b9e61a21af789..a2fb426f41458 100644 --- a/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj.rs +++ b/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::traits::*; diff --git a/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs b/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs index c24d33254152e..3d17e54eb80a8 100644 --- a/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs +++ b/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_pub.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::traits::*; diff --git a/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs b/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs index b9e61a21af789..a2fb426f41458 100644 --- a/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs +++ b/crates/aptos-crypto/src/unit_tests/compilation/cross_test_trait_obj_sig.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::traits::*; diff --git a/crates/aptos-crypto/src/unit_tests/compilation/small_kdf.rs b/crates/aptos-crypto/src/unit_tests/compilation/small_kdf.rs index fc115939adaf2..6f4828501869c 100644 --- a/crates/aptos-crypto/src/unit_tests/compilation/small_kdf.rs +++ b/crates/aptos-crypto/src/unit_tests/compilation/small_kdf.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 fn main() { diff --git a/crates/aptos-crypto/src/unit_tests/cross_test.rs b/crates/aptos-crypto/src/unit_tests/cross_test.rs index 1ce91811a8d0f..1522c1dfa9c14 100644 --- a/crates/aptos-crypto/src/unit_tests/cross_test.rs +++ b/crates/aptos-crypto/src/unit_tests/cross_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // This is necessary for the derive macros which rely on being used in a diff --git a/crates/aptos-crypto/src/unit_tests/cryptohasher.rs b/crates/aptos-crypto/src/unit_tests/cryptohasher.rs index 64489379ce1e8..d9cd2896b67a9 100644 --- a/crates/aptos-crypto/src/unit_tests/cryptohasher.rs +++ b/crates/aptos-crypto/src/unit_tests/cryptohasher.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Test file for the procedural macros CryptoHasher and BCSCryptoHash. diff --git a/crates/aptos-crypto/src/unit_tests/ed25519_test.rs b/crates/aptos-crypto/src/unit_tests/ed25519_test.rs index f2295471935a6..754a9339114a6 100644 --- a/crates/aptos-crypto/src/unit_tests/ed25519_test.rs +++ b/crates/aptos-crypto/src/unit_tests/ed25519_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate as aptos_crypto; diff --git a/crates/aptos-crypto/src/unit_tests/hash_test.rs b/crates/aptos-crypto/src/unit_tests/hash_test.rs index 888b252ffb966..ad605ec737be0 100644 --- a/crates/aptos-crypto/src/unit_tests/hash_test.rs +++ b/crates/aptos-crypto/src/unit_tests/hash_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::hash::*; diff --git a/crates/aptos-crypto/src/unit_tests/hkdf_test.rs b/crates/aptos-crypto/src/unit_tests/hkdf_test.rs index c90252befffb2..bdf1787c3043b 100644 --- a/crates/aptos-crypto/src/unit_tests/hkdf_test.rs +++ b/crates/aptos-crypto/src/unit_tests/hkdf_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{compat::Sha3_256, hkdf::*}; diff --git a/crates/aptos-crypto/src/unit_tests/mod.rs b/crates/aptos-crypto/src/unit_tests/mod.rs index eb66b4828d2ae..b21c05da26de3 100644 --- a/crates/aptos-crypto/src/unit_tests/mod.rs +++ b/crates/aptos-crypto/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod bcs_test; diff --git a/crates/aptos-crypto/src/unit_tests/multi_ed25519_test.rs b/crates/aptos-crypto/src/unit_tests/multi_ed25519_test.rs index 84a4512f0ca78..00f35c8b70059 100644 --- a/crates/aptos-crypto/src/unit_tests/multi_ed25519_test.rs +++ b/crates/aptos-crypto/src/unit_tests/multi_ed25519_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/crates/aptos-crypto/src/unit_tests/noise_test.rs b/crates/aptos-crypto/src/unit_tests/noise_test.rs index 259e6311d388d..d7950a3348798 100644 --- a/crates/aptos-crypto/src/unit_tests/noise_test.rs +++ b/crates/aptos-crypto/src/unit_tests/noise_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::{fs::File, io::BufReader, path::PathBuf}; diff --git a/crates/aptos-crypto/src/validatable.rs b/crates/aptos-crypto/src/validatable.rs index 39b3796b10510..67fecf93a03ea 100644 --- a/crates/aptos-crypto/src/validatable.rs +++ b/crates/aptos-crypto/src/validatable.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides the `Validate` trait and `Validatable` type in order to aid in deferred diff --git a/crates/aptos-crypto/src/x25519.rs b/crates/aptos-crypto/src/x25519.rs index f8500895b89b8..dd05fb9fd5a92 100644 --- a/crates/aptos-crypto/src/x25519.rs +++ b/crates/aptos-crypto/src/x25519.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! An abstraction of x25519 elliptic curve keys required for diff --git a/crates/aptos-faucet/src/lib.rs b/crates/aptos-faucet/src/lib.rs index 5a8680d0d9e07..503ca10c3fc09 100644 --- a/crates/aptos-faucet/src/lib.rs +++ b/crates/aptos-faucet/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This crate provides the Faucet service for creating and funding accounts on the Aptos Network. diff --git a/crates/aptos-faucet/src/main.rs b/crates/aptos-faucet/src/main.rs index 70c1a540007dd..5cd2d580f6947 100644 --- a/crates/aptos-faucet/src/main.rs +++ b/crates/aptos-faucet/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_logger::info; @@ -12,7 +12,7 @@ use structopt::StructOpt; #[derive(Debug, StructOpt)] #[structopt( name = "Aptos Faucet", - author = "The Aptos Foundation", + author = "The Diem Core Contributors", about = "Aptos Testnet utility service for creating test accounts and minting test coins" )] struct Args { diff --git a/crates/aptos-faucet/src/mint.rs b/crates/aptos-faucet/src/mint.rs index 2280684e76498..243f6b9d59073 100644 --- a/crates/aptos-faucet/src/mint.rs +++ b/crates/aptos-faucet/src/mint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Service; diff --git a/crates/aptos-id-generator/src/lib.rs b/crates/aptos-id-generator/src/lib.rs index 5b71c6cbf7d2d..f4dde3793e113 100644 --- a/crates/aptos-id-generator/src/lib.rs +++ b/crates/aptos-id-generator/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] use std::{ diff --git a/crates/aptos-infallible/src/lib.rs b/crates/aptos-infallible/src/lib.rs index ad42d29a30b64..53f8fe8d95d37 100644 --- a/crates/aptos-infallible/src/lib.rs +++ b/crates/aptos-infallible/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod math; diff --git a/crates/aptos-infallible/src/math.rs b/crates/aptos-infallible/src/math.rs index 6cf916b63ed06..15d85ca661e49 100644 --- a/crates/aptos-infallible/src/math.rs +++ b/crates/aptos-infallible/src/math.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// Utility macro for writing secure arithmetic operations in order to avoid diff --git a/crates/aptos-infallible/src/mutex.rs b/crates/aptos-infallible/src/mutex.rs index 69f5daca99eb1..0dd6975fdacfd 100644 --- a/crates/aptos-infallible/src/mutex.rs +++ b/crates/aptos-infallible/src/mutex.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::sync::Mutex as StdMutex; diff --git a/crates/aptos-infallible/src/nonzero.rs b/crates/aptos-infallible/src/nonzero.rs index d38d77b450009..cb5a72140878f 100644 --- a/crates/aptos-infallible/src/nonzero.rs +++ b/crates/aptos-infallible/src/nonzero.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// A wrapper around `std::num::NonZeroUsize` to no longer worry about `unwrap()` diff --git a/crates/aptos-infallible/src/rwlock.rs b/crates/aptos-infallible/src/rwlock.rs index 10e6c2f95f8fc..c09aa0fa1aec6 100644 --- a/crates/aptos-infallible/src/rwlock.rs +++ b/crates/aptos-infallible/src/rwlock.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::sync::RwLock as StdRwLock; diff --git a/crates/aptos-infallible/src/time.rs b/crates/aptos-infallible/src/time.rs index 100c09fc5ca9f..727273c442c48 100644 --- a/crates/aptos-infallible/src/time.rs +++ b/crates/aptos-infallible/src/time.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-log-derive/src/lib.rs b/crates/aptos-log-derive/src/lib.rs index d0b6903e3f3bf..9907cdba33dae 100644 --- a/crates/aptos-log-derive/src/lib.rs +++ b/crates/aptos-log-derive/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use proc_macro::TokenStream; diff --git a/crates/aptos-logger/src/aptos_logger.rs b/crates/aptos-logger/src/aptos_logger.rs index ad9091f4ee21e..e73447eefce07 100644 --- a/crates/aptos-logger/src/aptos_logger.rs +++ b/crates/aptos-logger/src/aptos_logger.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Implementation of writing logs to both local printers (e.g. stdout) and remote loggers diff --git a/crates/aptos-logger/src/counters.rs b/crates/aptos-logger/src/counters.rs index 1a60445c0b222..c1d53f2f6abad 100644 --- a/crates/aptos-logger/src/counters.rs +++ b/crates/aptos-logger/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Logging metrics for determining quality of log submission diff --git a/crates/aptos-logger/src/event.rs b/crates/aptos-logger/src/event.rs index 097a5309151e4..28184ce98e0c9 100644 --- a/crates/aptos-logger/src/event.rs +++ b/crates/aptos-logger/src/event.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Metadata, Schema}; diff --git a/crates/aptos-logger/src/filter.rs b/crates/aptos-logger/src/filter.rs index f5ddbe26eec5d..18961f1f86fca 100644 --- a/crates/aptos-logger/src/filter.rs +++ b/crates/aptos-logger/src/filter.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Filtering definitions for controlling what modules and levels are logged diff --git a/crates/aptos-logger/src/kv.rs b/crates/aptos-logger/src/kv.rs index 80ccedc7c08cb..1249f903abea7 100644 --- a/crates/aptos-logger/src/kv.rs +++ b/crates/aptos-logger/src/kv.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Key-Value definitions for macros diff --git a/crates/aptos-logger/src/lib.rs b/crates/aptos-logger/src/lib.rs index a2de0763986f4..25b50fd704995 100644 --- a/crates/aptos-logger/src/lib.rs +++ b/crates/aptos-logger/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This crates provides an API for logging. diff --git a/crates/aptos-logger/src/logger.rs b/crates/aptos-logger/src/logger.rs index 03539417039dc..299bc0ffb10cf 100644 --- a/crates/aptos-logger/src/logger.rs +++ b/crates/aptos-logger/src/logger.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Global logger definition and functions diff --git a/crates/aptos-logger/src/macros.rs b/crates/aptos-logger/src/macros.rs index 2d17bd67f0542..eb8e6aac9ccca 100644 --- a/crates/aptos-logger/src/macros.rs +++ b/crates/aptos-logger/src/macros.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Macros for sending logs at predetermined log `Level`s diff --git a/crates/aptos-logger/src/metadata.rs b/crates/aptos-logger/src/metadata.rs index ac9ffb3424bf5..d0e501178a136 100644 --- a/crates/aptos-logger/src/metadata.rs +++ b/crates/aptos-logger/src/metadata.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/crates/aptos-logger/src/sample.rs b/crates/aptos-logger/src/sample.rs index aca64e3b6abbb..ecb517e54d872 100644 --- a/crates/aptos-logger/src/sample.rs +++ b/crates/aptos-logger/src/sample.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Periodic sampling for logs, metrics, and other use cases through a simple macro diff --git a/crates/aptos-logger/src/security.rs b/crates/aptos-logger/src/security.rs index 8f52305e468f3..87660b0d2e379 100644 --- a/crates/aptos-logger/src/security.rs +++ b/crates/aptos-logger/src/security.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! diff --git a/crates/aptos-logger/src/struct_log.rs b/crates/aptos-logger/src/struct_log.rs index d1bc04d9276bc..e36b24190c383 100644 --- a/crates/aptos-logger/src/struct_log.rs +++ b/crates/aptos-logger/src/struct_log.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Implementations for sending logs to external log processes e.g. Logstash diff --git a/crates/aptos-logger/src/tracing_adapter.rs b/crates/aptos-logger/src/tracing_adapter.rs index 9ebc4e6933959..5f04c511bf37f 100644 --- a/crates/aptos-logger/src/tracing_adapter.rs +++ b/crates/aptos-logger/src/tracing_adapter.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{self as dl}; diff --git a/crates/aptos-logger/tests/derive.rs b/crates/aptos-logger/tests/derive.rs index cb0f82cf04dd7..d15eeacf4736b 100644 --- a/crates/aptos-logger/tests/derive.rs +++ b/crates/aptos-logger/tests/derive.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_log_derive::Schema; diff --git a/crates/aptos-logger/tests/logger.rs b/crates/aptos-logger/tests/logger.rs index 0b8901e13947a..2ad2a5d99e2fd 100644 --- a/crates/aptos-logger/tests/logger.rs +++ b/crates/aptos-logger/tests/logger.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::RwLock; diff --git a/crates/aptos-logger/tests/logger_custom_format.rs b/crates/aptos-logger/tests/logger_custom_format.rs index 0ccf830f31530..38827ca326428 100644 --- a/crates/aptos-logger/tests/logger_custom_format.rs +++ b/crates/aptos-logger/tests/logger_custom_format.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::RwLock; diff --git a/crates/aptos-logger/tests/remote.rs b/crates/aptos-logger/tests/remote.rs index 28c8d54499b1f..c3001d2ccaf56 100644 --- a/crates/aptos-logger/tests/remote.rs +++ b/crates/aptos-logger/tests/remote.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_logger::{debug, error, trace, AptosData, Level}; diff --git a/crates/aptos-logger/tests/tracing_translation_tests.rs b/crates/aptos-logger/tests/tracing_translation_tests.rs index 1bbb10dad505a..bf37c07a501c1 100644 --- a/crates/aptos-logger/tests/tracing_translation_tests.rs +++ b/crates/aptos-logger/tests/tracing_translation_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::RwLock; diff --git a/crates/aptos-metrics-core/src/lib.rs b/crates/aptos-metrics-core/src/lib.rs index 5385bd703a36d..7673d2bb9e870 100644 --- a/crates/aptos-metrics-core/src/lib.rs +++ b/crates/aptos-metrics-core/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Re-export counter types from prometheus crate diff --git a/crates/aptos-metrics/build.rs b/crates/aptos-metrics/build.rs index 850ac21a4bd38..d15bb816502a6 100644 --- a/crates/aptos-metrics/build.rs +++ b/crates/aptos-metrics/build.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::{env, process::Command}; diff --git a/crates/aptos-metrics/src/json_encoder.rs b/crates/aptos-metrics/src/json_encoder.rs index 263002eb8fb80..0b9ab9b2ace50 100644 --- a/crates/aptos-metrics/src/json_encoder.rs +++ b/crates/aptos-metrics/src/json_encoder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use prometheus::{ diff --git a/crates/aptos-metrics/src/json_metrics.rs b/crates/aptos-metrics/src/json_metrics.rs index c09431661519b..a3d378516ab59 100644 --- a/crates/aptos-metrics/src/json_metrics.rs +++ b/crates/aptos-metrics/src/json_metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::collections::HashMap; diff --git a/crates/aptos-metrics/src/lib.rs b/crates/aptos-metrics/src/lib.rs index d670a0bbbf222..92bc5313c0101 100644 --- a/crates/aptos-metrics/src/lib.rs +++ b/crates/aptos-metrics/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! # Metrics diff --git a/crates/aptos-metrics/src/metric_server.rs b/crates/aptos-metrics/src/metric_server.rs index 547028ab8c065..c32f3db4cc15c 100644 --- a/crates/aptos-metrics/src/metric_server.rs +++ b/crates/aptos-metrics/src/metric_server.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/crates/aptos-metrics/src/op_counters.rs b/crates/aptos-metrics/src/op_counters.rs index 61f6a2c37190f..ca0113a53bee6 100644 --- a/crates/aptos-metrics/src/op_counters.rs +++ b/crates/aptos-metrics/src/op_counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! `OpCounters` is a collection of convenience methods to add arbitrary counters to modules. diff --git a/crates/aptos-metrics/src/public_metrics.rs b/crates/aptos-metrics/src/public_metrics.rs index 17bf6ddc56c2b..6ac8acebb7375 100644 --- a/crates/aptos-metrics/src/public_metrics.rs +++ b/crates/aptos-metrics/src/public_metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // A list of metrics which will be made public to all the partners diff --git a/crates/aptos-metrics/src/unit_tests/lib_test.rs b/crates/aptos-metrics/src/unit_tests/lib_test.rs index d5f369695f0d8..54b491f49ca53 100644 --- a/crates/aptos-metrics/src/unit_tests/lib_test.rs +++ b/crates/aptos-metrics/src/unit_tests/lib_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::super::*; diff --git a/crates/aptos-metrics/src/unit_tests/mod.rs b/crates/aptos-metrics/src/unit_tests/mod.rs index d0ea7aea9e5a4..cdbf5c171f93e 100644 --- a/crates/aptos-metrics/src/unit_tests/mod.rs +++ b/crates/aptos-metrics/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod lib_test; diff --git a/crates/aptos-proptest-helpers/src/growing_subset.rs b/crates/aptos-proptest-helpers/src/growing_subset.rs index 35000bb34958c..89c9dfaa5b3fc 100644 --- a/crates/aptos-proptest-helpers/src/growing_subset.rs +++ b/crates/aptos-proptest-helpers/src/growing_subset.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use proptest::sample::Index; diff --git a/crates/aptos-proptest-helpers/src/lib.rs b/crates/aptos-proptest-helpers/src/lib.rs index 3387f38e43561..6b1154ab7a743 100644 --- a/crates/aptos-proptest-helpers/src/lib.rs +++ b/crates/aptos-proptest-helpers/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-proptest-helpers/src/repeat_vec.rs b/crates/aptos-proptest-helpers/src/repeat_vec.rs index c12a20cbba8d0..935b943c2498f 100644 --- a/crates/aptos-proptest-helpers/src/repeat_vec.rs +++ b/crates/aptos-proptest-helpers/src/repeat_vec.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::pick_slice_idxs; diff --git a/crates/aptos-proptest-helpers/src/unit_tests.rs b/crates/aptos-proptest-helpers/src/unit_tests.rs index 3705415c6daa0..7676a6a13b5d1 100644 --- a/crates/aptos-proptest-helpers/src/unit_tests.rs +++ b/crates/aptos-proptest-helpers/src/unit_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod growing_subset_tests; diff --git a/crates/aptos-proptest-helpers/src/unit_tests/growing_subset_tests.rs b/crates/aptos-proptest-helpers/src/unit_tests/growing_subset_tests.rs index f02dd4c1c4250..8ab0cc6a0f593 100644 --- a/crates/aptos-proptest-helpers/src/unit_tests/growing_subset_tests.rs +++ b/crates/aptos-proptest-helpers/src/unit_tests/growing_subset_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::GrowingSubset; diff --git a/crates/aptos-proptest-helpers/src/unit_tests/pick_idx_tests.rs b/crates/aptos-proptest-helpers/src/unit_tests/pick_idx_tests.rs index 45b55ceb04fb6..d8cba0c790821 100644 --- a/crates/aptos-proptest-helpers/src/unit_tests/pick_idx_tests.rs +++ b/crates/aptos-proptest-helpers/src/unit_tests/pick_idx_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{pick_slice_idxs, Index}; diff --git a/crates/aptos-proptest-helpers/src/unit_tests/repeat_vec_tests.rs b/crates/aptos-proptest-helpers/src/unit_tests/repeat_vec_tests.rs index b206f83288375..1953d7a271de3 100644 --- a/crates/aptos-proptest-helpers/src/unit_tests/repeat_vec_tests.rs +++ b/crates/aptos-proptest-helpers/src/unit_tests/repeat_vec_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::RepeatVec; diff --git a/crates/aptos-proptest-helpers/src/value_generator.rs b/crates/aptos-proptest-helpers/src/value_generator.rs index a81ab84ae257a..6b002640e5c0a 100644 --- a/crates/aptos-proptest-helpers/src/value_generator.rs +++ b/crates/aptos-proptest-helpers/src/value_generator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use proptest::{ diff --git a/crates/aptos-rate-limiter/src/async_lib.rs b/crates/aptos-rate-limiter/src/async_lib.rs index 16e0fc107318e..93a7f6903214f 100644 --- a/crates/aptos-rate-limiter/src/async_lib.rs +++ b/crates/aptos-rate-limiter/src/async_lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::rate_limit::{Bucket, SharedBucket}; diff --git a/crates/aptos-rate-limiter/src/lib.rs b/crates/aptos-rate-limiter/src/lib.rs index 5f94d8ed734b1..89896c9ec19a8 100644 --- a/crates/aptos-rate-limiter/src/lib.rs +++ b/crates/aptos-rate-limiter/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-rate-limiter/src/main.rs b/crates/aptos-rate-limiter/src/main.rs index 9d0394105fbb7..d0618a2da6dd3 100644 --- a/crates/aptos-rate-limiter/src/main.rs +++ b/crates/aptos-rate-limiter/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::Mutex; diff --git a/crates/aptos-rate-limiter/src/rate_limit.rs b/crates/aptos-rate-limiter/src/rate_limit.rs index fa2bd5af84c03..1f3954c623c86 100644 --- a/crates/aptos-rate-limiter/src/rate_limit.rs +++ b/crates/aptos-rate-limiter/src/rate_limit.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::{Mutex, RwLock}; diff --git a/crates/aptos-rest-client/src/dpn.rs b/crates/aptos-rest-client/src/dpn.rs index d0e79e2a8010b..41caebfedbc8b 100644 --- a/crates/aptos-rest-client/src/dpn.rs +++ b/crates/aptos-rest-client/src/dpn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_api_types::U64; diff --git a/crates/aptos-rest-client/src/error.rs b/crates/aptos-rest-client/src/error.rs index 3fc4ecc15d212..de41cb50d5f3b 100644 --- a/crates/aptos-rest-client/src/error.rs +++ b/crates/aptos-rest-client/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::views; diff --git a/crates/aptos-rest-client/src/faucet.rs b/crates/aptos-rest-client/src/faucet.rs index 90ae8f7dbcce7..939aaa572b9e5 100644 --- a/crates/aptos-rest-client/src/faucet.rs +++ b/crates/aptos-rest-client/src/faucet.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{error::Error, Client, Result}; diff --git a/crates/aptos-rest-client/src/lib.rs b/crates/aptos-rest-client/src/lib.rs index 0398aae2abbf8..5651464916a2d 100644 --- a/crates/aptos-rest-client/src/lib.rs +++ b/crates/aptos-rest-client/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{anyhow, Result}; diff --git a/crates/aptos-rest-client/src/response.rs b/crates/aptos-rest-client/src/response.rs index 7fc7cab157c95..e14771a956c48 100644 --- a/crates/aptos-rest-client/src/response.rs +++ b/crates/aptos-rest-client/src/response.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/crates/aptos-rest-client/src/state.rs b/crates/aptos-rest-client/src/state.rs index eb80b059a174c..13ac12c48ed1e 100644 --- a/crates/aptos-rest-client/src/state.rs +++ b/crates/aptos-rest-client/src/state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_api_types::{ diff --git a/crates/aptos-rest-client/src/types.rs b/crates/aptos-rest-client/src/types.rs index a0f7c84d7f769..e86b1c07e659d 100644 --- a/crates/aptos-rest-client/src/types.rs +++ b/crates/aptos-rest-client/src/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_api_types::{Address, U64}; diff --git a/crates/aptos-rest-client/src/views.rs b/crates/aptos-rest-client/src/views.rs index dda0ebd26c5e1..0cf5d10bb07b9 100644 --- a/crates/aptos-rest-client/src/views.rs +++ b/crates/aptos-rest-client/src/views.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{ensure, format_err, Error, Result}; diff --git a/crates/aptos-retrier/src/lib.rs b/crates/aptos-retrier/src/lib.rs index 6d8a680b038ff..f2d300718a64a 100644 --- a/crates/aptos-retrier/src/lib.rs +++ b/crates/aptos-retrier/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-temppath/src/lib.rs b/crates/aptos-temppath/src/lib.rs index ee99cdb54b01a..421e59103707b 100644 --- a/crates/aptos-temppath/src/lib.rs +++ b/crates/aptos-temppath/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-time-service/src/interval.rs b/crates/aptos-time-service/src/interval.rs index ba69093d55c57..3a45095dcafbf 100644 --- a/crates/aptos-time-service/src/interval.rs +++ b/crates/aptos-time-service/src/interval.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Sleep, SleepTrait, ZERO_DURATION}; diff --git a/crates/aptos-time-service/src/lib.rs b/crates/aptos-time-service/src/lib.rs index 41caaaf0fa637..47939b6406295 100644 --- a/crates/aptos-time-service/src/lib.rs +++ b/crates/aptos-time-service/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-time-service/src/mock.rs b/crates/aptos-time-service/src/mock.rs index bf72cfb9227ce..9b818ea6b413d 100644 --- a/crates/aptos-time-service/src/mock.rs +++ b/crates/aptos-time-service/src/mock.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Sleep, SleepTrait, TimeServiceTrait, ZERO_DURATION}; diff --git a/crates/aptos-time-service/src/real.rs b/crates/aptos-time-service/src/real.rs index e86f1a33757a0..a1c16d92a61df 100644 --- a/crates/aptos-time-service/src/real.rs +++ b/crates/aptos-time-service/src/real.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::TimeServiceTrait; diff --git a/crates/aptos-time-service/src/timeout.rs b/crates/aptos-time-service/src/timeout.rs index b5574fe6de34e..caf42c433ca1b 100644 --- a/crates/aptos-time-service/src/timeout.rs +++ b/crates/aptos-time-service/src/timeout.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Sleep; diff --git a/crates/aptos-wallet/src/error.rs b/crates/aptos-wallet/src/error.rs index 5c2276b3bb79e..ed30db9e0a147 100644 --- a/crates/aptos-wallet/src/error.rs +++ b/crates/aptos-wallet/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use thiserror::Error; diff --git a/crates/aptos-wallet/src/internal_macros.rs b/crates/aptos-wallet/src/internal_macros.rs index 20a5eb414a1c3..3b77ec5ffee25 100644 --- a/crates/aptos-wallet/src/internal_macros.rs +++ b/crates/aptos-wallet/src/internal_macros.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The following macros are slightly modified from rust-bitcoin. The original file may be found diff --git a/crates/aptos-wallet/src/io_utils.rs b/crates/aptos-wallet/src/io_utils.rs index 5fceb8b498826..0b0ff87acd1cf 100644 --- a/crates/aptos-wallet/src/io_utils.rs +++ b/crates/aptos-wallet/src/io_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! A module to generate, store and load known users accounts. diff --git a/crates/aptos-wallet/src/key_factory.rs b/crates/aptos-wallet/src/key_factory.rs index 4f3b50381f8d1..4cc9c997ecf31 100644 --- a/crates/aptos-wallet/src/key_factory.rs +++ b/crates/aptos-wallet/src/key_factory.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The following is a minimalist version of a hierarchical key derivation library for the diff --git a/crates/aptos-wallet/src/lib.rs b/crates/aptos-wallet/src/lib.rs index b05da54560dce..0b44a947e0d29 100644 --- a/crates/aptos-wallet/src/lib.rs +++ b/crates/aptos-wallet/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/aptos-wallet/src/mnemonic.rs b/crates/aptos-wallet/src/mnemonic.rs index a029ea0f46098..5cf896f4f7f22 100644 --- a/crates/aptos-wallet/src/mnemonic.rs +++ b/crates/aptos-wallet/src/mnemonic.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The following is a slightly modified version of the file with the same name in the diff --git a/crates/aptos-wallet/src/wallet_library.rs b/crates/aptos-wallet/src/wallet_library.rs index 537a9d5f8f6ff..3ab96157b5228 100644 --- a/crates/aptos-wallet/src/wallet_library.rs +++ b/crates/aptos-wallet/src/wallet_library.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The following document is a minimalist version of Aptos Wallet. Note that this Wallet does diff --git a/crates/aptos-workspace-hack/build.rs b/crates/aptos-workspace-hack/build.rs index 099c57ba2f766..eb67762ecd5b0 100644 --- a/crates/aptos-workspace-hack/build.rs +++ b/crates/aptos-workspace-hack/build.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // A build script is required for cargo to consider build dependencies. diff --git a/crates/aptos-workspace-hack/src/lib.rs b/crates/aptos-workspace-hack/src/lib.rs index 53de932722da4..e2f6627b91129 100644 --- a/crates/aptos-workspace-hack/src/lib.rs +++ b/crates/aptos-workspace-hack/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // intentionally left blank diff --git a/crates/bounded-executor/src/lib.rs b/crates/bounded-executor/src/lib.rs index 98958d33f7ea6..e6424757ed980 100644 --- a/crates/bounded-executor/src/lib.rs +++ b/crates/bounded-executor/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/channel/src/aptos_channel.rs b/crates/channel/src/aptos_channel.rs index de2c4454bd5b7..025a9128b4175 100644 --- a/crates/channel/src/aptos_channel.rs +++ b/crates/channel/src/aptos_channel.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! aptos_channel provides an mpsc channel which has two ends `aptos_channel::Receiver` diff --git a/crates/channel/src/aptos_channel_test.rs b/crates/channel/src/aptos_channel_test.rs index 150d936acaf79..191dc2998ed50 100644 --- a/crates/channel/src/aptos_channel_test.rs +++ b/crates/channel/src/aptos_channel_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{aptos_channel, aptos_channel::ElementStatus, message_queues::QueueStyle}; diff --git a/crates/channel/src/lib.rs b/crates/channel/src/lib.rs index ebee58291b35c..607b9e8ddccc8 100644 --- a/crates/channel/src/lib.rs +++ b/crates/channel/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/channel/src/message_queues.rs b/crates/channel/src/message_queues.rs index a809acfb232e2..84bd38353510b 100644 --- a/crates/channel/src/message_queues.rs +++ b/crates/channel/src/message_queues.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::IntCounterVec; diff --git a/crates/channel/src/message_queues_test.rs b/crates/channel/src/message_queues_test.rs index dbaff5b6e13dd..744f312553656 100644 --- a/crates/channel/src/message_queues_test.rs +++ b/crates/channel/src/message_queues_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::message_queues::{PerKeyQueue, QueueStyle}; diff --git a/crates/channel/src/test.rs b/crates/channel/src/test.rs index 1dfd2b39fd1fc..b148f8e7114c6 100644 --- a/crates/channel/src/test.rs +++ b/crates/channel/src/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate as channel; diff --git a/crates/channel/tests/many-keys-stress-test.rs b/crates/channel/tests/many-keys-stress-test.rs index f12e657ca5228..f3425201aaad2 100644 --- a/crates/channel/tests/many-keys-stress-test.rs +++ b/crates/channel/tests/many-keys-stress-test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use channel::{aptos_channel, message_queues::QueueStyle}; diff --git a/crates/crash-handler/src/lib.rs b/crates/crash-handler/src/lib.rs index 68a1c3c8f54cb..faa29519339b0 100644 --- a/crates/crash-handler/src/lib.rs +++ b/crates/crash-handler/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/debug-interface/src/lib.rs b/crates/debug-interface/src/lib.rs index 60e009c4c1edb..3513be045b069 100644 --- a/crates/debug-interface/src/lib.rs +++ b/crates/debug-interface/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/crates/debug-interface/src/node_debug_service.rs b/crates/debug-interface/src/node_debug_service.rs index b58461f86e516..d2cf0e2f8e45c 100644 --- a/crates/debug-interface/src/node_debug_service.rs +++ b/crates/debug-interface/src/node_debug_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Debug interface to access information in a specific node. diff --git a/crates/fallible/src/copy_from_slice.rs b/crates/fallible/src/copy_from_slice.rs index 4f46bbb06e4ac..cfc46c8e64b50 100644 --- a/crates/fallible/src/copy_from_slice.rs +++ b/crates/fallible/src/copy_from_slice.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use thiserror::Error; diff --git a/crates/fallible/src/lib.rs b/crates/fallible/src/lib.rs index 82d06c482b458..1f97b58ec7504 100644 --- a/crates/fallible/src/lib.rs +++ b/crates/fallible/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod copy_from_slice; diff --git a/crates/num-variants/src/lib.rs b/crates/num-variants/src/lib.rs index f172cedfdc6c3..81a04a934d89e 100644 --- a/crates/num-variants/src/lib.rs +++ b/crates/num-variants/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Add an associated constant to an enum describing the number of variants it has. diff --git a/crates/num-variants/tests/basic.rs b/crates/num-variants/tests/basic.rs index 622fa163e5fff..f730cbe27eb7a 100644 --- a/crates/num-variants/tests/basic.rs +++ b/crates/num-variants/tests/basic.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![allow(dead_code)] diff --git a/crates/proxy/src/lib.rs b/crates/proxy/src/lib.rs index 53155a8be3fe8..8f7c7d28cd783 100644 --- a/crates/proxy/src/lib.rs +++ b/crates/proxy/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use ipnet::IpNet; diff --git a/crates/short-hex-str/src/lib.rs b/crates/short-hex-str/src/lib.rs index 8104a931786b9..ae1eb7cd423b5 100644 --- a/crates/short-hex-str/src/lib.rs +++ b/crates/short-hex-str/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use mirai_annotations::debug_checked_precondition; diff --git a/crates/transaction-emitter/src/atomic_histogram.rs b/crates/transaction-emitter/src/atomic_histogram.rs index 419a5f9318903..784a8ddae793e 100644 --- a/crates/transaction-emitter/src/atomic_histogram.rs +++ b/crates/transaction-emitter/src/atomic_histogram.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/transaction-emitter/src/cluster.rs b/crates/transaction-emitter/src/cluster.rs index 07ca29a092713..38d377e4b41b7 100644 --- a/crates/transaction-emitter/src/cluster.rs +++ b/crates/transaction-emitter/src/cluster.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/crates/transaction-emitter/src/instance.rs b/crates/transaction-emitter/src/instance.rs index 9ed23557fb02f..8a250b71bf70e 100644 --- a/crates/transaction-emitter/src/instance.rs +++ b/crates/transaction-emitter/src/instance.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{format_err, Result}; diff --git a/crates/transaction-emitter/src/lib.rs b/crates/transaction-emitter/src/lib.rs index 64393bf305643..50f7a63dbfd43 100644 --- a/crates/transaction-emitter/src/lib.rs +++ b/crates/transaction-emitter/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{format_err, Context, Result}; diff --git a/crates/transaction-emitter/src/main.rs b/crates/transaction-emitter/src/main.rs index af466e9398f54..2931f9525726d 100644 --- a/crates/transaction-emitter/src/main.rs +++ b/crates/transaction-emitter/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, format_err, Result}; diff --git a/developer-docs-site/static/examples/first_transaction.py b/developer-docs-site/static/examples/first_transaction.py index b4b8c7d256b0b..5be210413ab62 100644 --- a/developer-docs-site/static/examples/first_transaction.py +++ b/developer-docs-site/static/examples/first_transaction.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 from nacl.signing import SigningKey diff --git a/developer-docs-site/static/examples/hello_blockchain.py b/developer-docs-site/static/examples/hello_blockchain.py index 313abd6d1e434..27a27ad43aa5d 100644 --- a/developer-docs-site/static/examples/hello_blockchain.py +++ b/developer-docs-site/static/examples/hello_blockchain.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 from typing import Any, Dict, Optional, Sequence diff --git a/devtools/x-core/src/core_config.rs b/devtools/x-core/src/core_config.rs index 960c987d885c4..786e56c3fbef7 100644 --- a/devtools/x-core/src/core_config.rs +++ b/devtools/x-core/src/core_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use hakari::summaries::HakariConfig; diff --git a/devtools/x-core/src/errors.rs b/devtools/x-core/src/errors.rs index 23a925fdbf784..af375e3dce013 100644 --- a/devtools/x-core/src/errors.rs +++ b/devtools/x-core/src/errors.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use camino::{Utf8Path, Utf8PathBuf}; diff --git a/devtools/x-core/src/git.rs b/devtools/x-core/src/git.rs index 02ef6b457f559..77e5a8879d359 100644 --- a/devtools/x-core/src/git.rs +++ b/devtools/x-core/src/git.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::errors::*; diff --git a/devtools/x-core/src/graph.rs b/devtools/x-core/src/graph.rs index d51ba45b56d55..8319dd8bfcfcb 100644 --- a/devtools/x-core/src/graph.rs +++ b/devtools/x-core/src/graph.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Result, SystemError, WorkspaceSubsets, XCoreContext}; diff --git a/devtools/x-core/src/lib.rs b/devtools/x-core/src/lib.rs index d217c818460ba..dbcaadf22511b 100644 --- a/devtools/x-core/src/lib.rs +++ b/devtools/x-core/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{core_config::XCoreConfig, git::GitCli}; diff --git a/devtools/x-core/src/workspace_subset.rs b/devtools/x-core/src/workspace_subset.rs index a2cf315ca32ca..5db0ea0711dfb 100644 --- a/devtools/x-core/src/workspace_subset.rs +++ b/devtools/x-core/src/workspace_subset.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{core_config::SubsetConfig, Result, SystemError}; diff --git a/devtools/x-lint/src/content.rs b/devtools/x-lint/src/content.rs index 76a1c0e56c9bd..1c099f7b71b36 100644 --- a/devtools/x-lint/src/content.rs +++ b/devtools/x-lint/src/content.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{prelude::*, LintContext}; diff --git a/devtools/x-lint/src/file_path.rs b/devtools/x-lint/src/file_path.rs index 9045b7fa72b7b..c69c19f8b4797 100644 --- a/devtools/x-lint/src/file_path.rs +++ b/devtools/x-lint/src/file_path.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{prelude::*, LintContext}; diff --git a/devtools/x-lint/src/lib.rs b/devtools/x-lint/src/lib.rs index 05c8350960f73..dcf5f5ad852de 100644 --- a/devtools/x-lint/src/lib.rs +++ b/devtools/x-lint/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Lint engine. diff --git a/devtools/x-lint/src/package.rs b/devtools/x-lint/src/package.rs index 0f1b221594814..e812b9e86bd8c 100644 --- a/devtools/x-lint/src/package.rs +++ b/devtools/x-lint/src/package.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{prelude::*, LintContext}; diff --git a/devtools/x-lint/src/project.rs b/devtools/x-lint/src/project.rs index 4fa596f2b3e86..1e4874bff1f9f 100644 --- a/devtools/x-lint/src/project.rs +++ b/devtools/x-lint/src/project.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{prelude::*, LintContext}; diff --git a/devtools/x-lint/src/runner.rs b/devtools/x-lint/src/runner.rs index 22112a5181486..8e00408a53f9b 100644 --- a/devtools/x-lint/src/runner.rs +++ b/devtools/x-lint/src/runner.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{prelude::*, LintContext}; diff --git a/devtools/x/src/bench.rs b/devtools/x/src/bench.rs index 91e7e38328f5d..61db2b5f4cf80 100644 --- a/devtools/x/src/bench.rs +++ b/devtools/x/src/bench.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/build.rs b/devtools/x/src/build.rs index 808d6882cde99..8f03543575909 100644 --- a/devtools/x/src/build.rs +++ b/devtools/x/src/build.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ cargo::{build_args::BuildArgs, selected_package::SelectedPackageArgs, CargoCommand}, diff --git a/devtools/x/src/cargo.rs b/devtools/x/src/cargo.rs index 6f7064b97f975..98a08150cf9e1 100644 --- a/devtools/x/src/cargo.rs +++ b/devtools/x/src/cargo.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/cargo/build_args.rs b/devtools/x/src/cargo/build_args.rs index 54b99433b2102..6d8057fa6e6fd 100644 --- a/devtools/x/src/cargo/build_args.rs +++ b/devtools/x/src/cargo/build_args.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::ffi::OsString; diff --git a/devtools/x/src/cargo/selected_package.rs b/devtools/x/src/cargo/selected_package.rs index db36a1a0b3b8a..1f14c34bc24cc 100644 --- a/devtools/x/src/cargo/selected_package.rs +++ b/devtools/x/src/cargo/selected_package.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{changed_since::changed_since_impl, context::XContext, Result}; diff --git a/devtools/x/src/changed_since.rs b/devtools/x/src/changed_since.rs index b60ebd7e914d4..b2c7f3f81b68d 100644 --- a/devtools/x/src/changed_since.rs +++ b/devtools/x/src/changed_since.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{context::XContext, Result}; diff --git a/devtools/x/src/check.rs b/devtools/x/src/check.rs index bcdef2b9e77a2..a3245c07e01bd 100644 --- a/devtools/x/src/check.rs +++ b/devtools/x/src/check.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/clippy.rs b/devtools/x/src/clippy.rs index c39948b495765..9110708debccc 100644 --- a/devtools/x/src/clippy.rs +++ b/devtools/x/src/clippy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/config.rs b/devtools/x/src/config.rs index 573c7449be7b0..a96ae08639509 100644 --- a/devtools/x/src/config.rs +++ b/devtools/x/src/config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{utils::project_root, Result}; diff --git a/devtools/x/src/context.rs b/devtools/x/src/context.rs index 5a2c8f3d51307..79bdde89540c4 100644 --- a/devtools/x/src/context.rs +++ b/devtools/x/src/context.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/diff_summary.rs b/devtools/x/src/diff_summary.rs index e12321e9fbfdf..67cefaf7bb997 100644 --- a/devtools/x/src/diff_summary.rs +++ b/devtools/x/src/diff_summary.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::context::XContext; diff --git a/devtools/x/src/fix.rs b/devtools/x/src/fix.rs index 01b276c474c19..246ee70729832 100644 --- a/devtools/x/src/fix.rs +++ b/devtools/x/src/fix.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/fmt.rs b/devtools/x/src/fmt.rs index ce61f0a16c427..9d342a638cddc 100644 --- a/devtools/x/src/fmt.rs +++ b/devtools/x/src/fmt.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{cargo::Cargo, context::XContext, Result}; diff --git a/devtools/x/src/generate_summaries.rs b/devtools/x/src/generate_summaries.rs index 8a3370d036807..1ffc0352b1bb3 100644 --- a/devtools/x/src/generate_summaries.rs +++ b/devtools/x/src/generate_summaries.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::context::XContext; diff --git a/devtools/x/src/generate_workspace_hack.rs b/devtools/x/src/generate_workspace_hack.rs index 45a67eb673e1e..8177299a4a0ed 100644 --- a/devtools/x/src/generate_workspace_hack.rs +++ b/devtools/x/src/generate_workspace_hack.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{cargo::Cargo, context::XContext, Result}; diff --git a/devtools/x/src/installer.rs b/devtools/x/src/installer.rs index 8439718709297..09e963e98302c 100644 --- a/devtools/x/src/installer.rs +++ b/devtools/x/src/installer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/lint/allowed_paths.rs b/devtools/x/src/lint/allowed_paths.rs index 2cb506ad0d52b..2fec09529fe58 100644 --- a/devtools/x/src/lint/allowed_paths.rs +++ b/devtools/x/src/lint/allowed_paths.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Context; diff --git a/devtools/x/src/lint/determinator.rs b/devtools/x/src/lint/determinator.rs index e13814c44d0c9..63bfd95d092e0 100644 --- a/devtools/x/src/lint/determinator.rs +++ b/devtools/x/src/lint/determinator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Context; diff --git a/devtools/x/src/lint/guppy.rs b/devtools/x/src/lint/guppy.rs index 12a7e2171974b..269d71b4c0f53 100644 --- a/devtools/x/src/lint/guppy.rs +++ b/devtools/x/src/lint/guppy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Project and package linters that run queries on guppy. diff --git a/devtools/x/src/lint/license.rs b/devtools/x/src/lint/license.rs index 10267d40cb00e..f72aa6f6377ef 100644 --- a/devtools/x/src/lint/license.rs +++ b/devtools/x/src/lint/license.rs @@ -1,11 +1,11 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Context; use globset::{Glob, GlobSet, GlobSetBuilder}; use x_lint::prelude::*; -static LICENSE_HEADER: &str = "Copyright (c) The Aptos Foundation\n\ +static LICENSE_HEADER: &str = "Copyright (c) The Diem Core Contributors\n\ SPDX-License-Identifier: Apache-2.0\n\ "; diff --git a/devtools/x/src/lint/mod.rs b/devtools/x/src/lint/mod.rs index bc6d57af76676..087bce81d60c8 100644 --- a/devtools/x/src/lint/mod.rs +++ b/devtools/x/src/lint/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::context::XContext; diff --git a/devtools/x/src/lint/toml.rs b/devtools/x/src/lint/toml.rs index 790741d1ab516..6a11c5f078316 100644 --- a/devtools/x/src/lint/toml.rs +++ b/devtools/x/src/lint/toml.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use camino::Utf8Path; diff --git a/devtools/x/src/lint/whitespace.rs b/devtools/x/src/lint/whitespace.rs index 1a6a591a5ade6..4c40bae42ec31 100644 --- a/devtools/x/src/lint/whitespace.rs +++ b/devtools/x/src/lint/whitespace.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Context; diff --git a/devtools/x/src/lint/workspace_classify.rs b/devtools/x/src/lint/workspace_classify.rs index ddb6d72010fe6..c1c2c73908b9d 100644 --- a/devtools/x/src/lint/workspace_classify.rs +++ b/devtools/x/src/lint/workspace_classify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::config::TestOnlyConfig; diff --git a/devtools/x/src/lint/workspace_hack.rs b/devtools/x/src/lint/workspace_hack.rs index 6e1f7de2862d3..e365f8089c83a 100644 --- a/devtools/x/src/lint/workspace_hack.rs +++ b/devtools/x/src/lint/workspace_hack.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::anyhow; diff --git a/devtools/x/src/main.rs b/devtools/x/src/main.rs index 5f2ecd582cfa0..c8b41e0e2a14c 100644 --- a/devtools/x/src/main.rs +++ b/devtools/x/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/devtools/x/src/nextest.rs b/devtools/x/src/nextest.rs index 2f5a45a336dc9..e878e8a5c2375 100644 --- a/devtools/x/src/nextest.rs +++ b/devtools/x/src/nextest.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/playground.rs b/devtools/x/src/playground.rs index 1294d2ad1d4e5..366d1b7a7933f 100644 --- a/devtools/x/src/playground.rs +++ b/devtools/x/src/playground.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Playground for arbitrary code. diff --git a/devtools/x/src/test.rs b/devtools/x/src/test.rs index 6a906c40608ac..d7a96a43906ca 100644 --- a/devtools/x/src/test.rs +++ b/devtools/x/src/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/devtools/x/src/tools.rs b/devtools/x/src/tools.rs index f211d389cc394..69f0bbcc4f840 100644 --- a/devtools/x/src/tools.rs +++ b/devtools/x/src/tools.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{context::XContext, Result}; diff --git a/devtools/x/src/utils.rs b/devtools/x/src/utils.rs index fd488f7459a8a..09f7a2ab2cde4 100644 --- a/devtools/x/src/utils.rs +++ b/devtools/x/src/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{config::CargoConfig, installer::install_cargo_component_if_needed, Result}; diff --git a/docker/aptos-build.sh b/docker/aptos-build.sh index 7735c2915d435..8c05937ce25a0 100755 --- a/docker/aptos-build.sh +++ b/docker/aptos-build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/build-aws.sh b/docker/build-aws.sh index 5a3cbda089688..b155375113281 100755 --- a/docker/build-aws.sh +++ b/docker/build-aws.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # build-aws-base.sh is a common script shared by mutiple build-aws.sh scripts diff --git a/docker/build-common.sh b/docker/build-common.sh index 29669b03a3d4b..c87af10359196 100755 --- a/docker/build-common.sh +++ b/docker/build-common.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/build-push-local.sh b/docker/build-push-local.sh index 5be469055670a..90585eb82185c 100755 --- a/docker/build-push-local.sh +++ b/docker/build-push-local.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e REPO=853397791086.dkr.ecr.us-west-2.amazonaws.com diff --git a/docker/build_push.sh b/docker/build_push.sh index 20e09366fc1e3..eabce9952a2b2 100755 --- a/docker/build_push.sh +++ b/docker/build_push.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 function usage { diff --git a/docker/compose/test_docker_compose.sh b/docker/compose/test_docker_compose.sh index 51e37606337d2..59bee29c34aea 100755 --- a/docker/compose/test_docker_compose.sh +++ b/docker/compose/test_docker_compose.sh @@ -1,5 +1,5 @@ #!/usr/bin/expect -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set timeout 10 diff --git a/docker/docker_republish.sh b/docker/docker_republish.sh index eba2485be5646..75a39256d631d 100755 --- a/docker/docker_republish.sh +++ b/docker/docker_republish.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 ############################################################################################# diff --git a/docker/faucet/build.sh b/docker/faucet/build.sh index d5f3abfcc93c7..94eeac6e35252 100755 --- a/docker/faucet/build.sh +++ b/docker/faucet/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/forge/build.sh b/docker/forge/build.sh index d3fc6bd675097..ae58765ccdeb0 100755 --- a/docker/forge/build.sh +++ b/docker/forge/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/init/build.sh b/docker/init/build.sh index 36ab539989703..84e7246247d54 100755 --- a/docker/init/build.sh +++ b/docker/init/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/install-tools.sh b/docker/install-tools.sh index 83bee8cae2df7..48ce86e63067a 100755 --- a/docker/install-tools.sh +++ b/docker/install-tools.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 apt-get update diff --git a/docker/safety-rules/build.sh b/docker/safety-rules/build.sh index 870426e77140b..33a10abcac0ab 100755 --- a/docker/safety-rules/build.sh +++ b/docker/safety-rules/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/tag-and-push.sh b/docker/tag-and-push.sh index e217837b80d15..2f3a92df8f6e1 100755 --- a/docker/tag-and-push.sh +++ b/docker/tag-and-push.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # tag-and-push.sh is used tag an image with multiple tags and push them to the target repo. Use ":" as the separator # between multiple tags diff --git a/docker/tools/build.sh b/docker/tools/build.sh index 8111a245d6389..f39b5bc4edc45 100755 --- a/docker/tools/build.sh +++ b/docker/tools/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/validator/build.sh b/docker/validator/build.sh index 6f96f0723210e..1baa4a0c5f23b 100755 --- a/docker/validator/build.sh +++ b/docker/validator/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/docker/vault/run.sh b/docker/vault/run.sh index 3203424cf6de2..66f472075835f 100755 --- a/docker/vault/run.sh +++ b/docker/vault/run.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -ex diff --git a/documentation/specifications/README.md b/documentation/specifications/README.md index 3d3c023ba6b89..f7ebd9584e63c 100644 --- a/documentation/specifications/README.md +++ b/documentation/specifications/README.md @@ -10,7 +10,7 @@ The reference implementations for all LPN specifications is [Aptos Core](https:/ ## Overview -The Aptos Foundation is an independent membership organization headquartered in Geneva, Switzerland. The Association's purpose is to coordinate and provide a framework of governance decision-making for the Diem network and Reserve; to oversee the operation of the Diem payment system; to facilitate the provision of services on top of the Diem Blockchain in a safe and compliant manner; and to establish social impact grant-making in support of financial inclusion. +The Diem Core Contributors is an independent membership organization headquartered in Geneva, Switzerland. The Association's purpose is to coordinate and provide a framework of governance decision-making for the Diem network and Reserve; to oversee the operation of the Diem payment system; to facilitate the provision of services on top of the Diem Blockchain in a safe and compliant manner; and to establish social impact grant-making in support of financial inclusion. The LPN is backed by the Diem Blockchain that serves as a solid foundation for financial services, including a new global payment system that meets the daily financial needs of billions of people. The Diem blockchain was created to meet the following three requirements: @@ -79,7 +79,7 @@ The process for upgrading the LPN specifications is as follows: In order to describe the LPN upgrade process, we will define specification S with current in-production version V and next accepted version V+1. - * **Backwards-incompatible specification changes** The Aptos Foundation will publicly announce that a backwards-incompatible specification change to S is occurring with V+1 and that on a production date (e.g. 3-6 months in the future), the V+1 specification will become eligible to be deployed in production. All validators and clients will be required to have already upgraded to software that can support V+1 by that point. After the production date, the Aptos Foundation will ensure that the LPN validators have upgraded (i.e., by verifying the software versions) and after verification will submit an on-chain transaction to make V+1 active. After the transaction is committed, all clients that have upgraded will interoperate on V+1 rather than V automatically. All older software that is unable to interoperate with V+1 will fail. In summary: + * **Backwards-incompatible specification changes** The Diem Core Contributors will publicly announce that a backwards-incompatible specification change to S is occurring with V+1 and that on a production date (e.g. 3-6 months in the future), the V+1 specification will become eligible to be deployed in production. All validators and clients will be required to have already upgraded to software that can support V+1 by that point. After the production date, the Aptos Foundation will ensure that the LPN validators have upgraded (i.e., by verifying the software versions) and after verification will submit an on-chain transaction to make V+1 active. After the transaction is committed, all clients that have upgraded will interoperate on V+1 rather than V automatically. All older software that is unable to interoperate with V+1 will fail. In summary: 1. Aptos Foundation announces a production date and the software versions validators and clients need to run in order to continue to interoperate with the LPN. 2. Validators and clients upgrade to the prescribed software versions prior to the production date. diff --git a/documentation/tech-papers/lbft-verification/lbft-verification.tex b/documentation/tech-papers/lbft-verification/lbft-verification.tex index 29350b8a1bfc4..90db10d88c3db 100644 --- a/documentation/tech-papers/lbft-verification/lbft-verification.tex +++ b/documentation/tech-papers/lbft-verification/lbft-verification.tex @@ -116,7 +116,7 @@ \subsection{Motivation} \label{waypoint-motivation} A \emph{cold} node (the one that comes online for the first time, or after a long period of being disconnected), faces a problem of the initial syncup because it might no longer trust the old public keys of the historical validators it is aware of, which could have been compromised since then (the so called “long range attack”). -\emph{Waypoints} can be used as an off-chain mechanism for selecting the initial trusted set of validators and specific points in the accumulator history. Waypoints can be published by anyone. The Aptos Foundation is also expected to publish waypoints on a regular basis (e.g., on \url{https://developers.aptoslabs.com}). Any waypoint selected by clients can be embedded within the nodes (clients / full nodes / validators) as a trusted “starting point”. +\emph{Waypoints} can be used as an off-chain mechanism for selecting the initial trusted set of validators and specific points in the accumulator history. Waypoints can be published by anyone. The Aptos Foundation is also expected to publish waypoints on a regular basis (e.g., on \url{https://aptos.dev}). Any waypoint selected by clients can be embedded within the nodes (clients / full nodes / validators) as a trusted “starting point”. The trusted points in history determined by the waypoints can be used in the following situations: \begin{itemize} diff --git a/execution/db-bootstrapper/src/bin/db-bootstrapper.rs b/execution/db-bootstrapper/src/bin/db-bootstrapper.rs index cfcbe99af019d..a15def3552a05 100644 --- a/execution/db-bootstrapper/src/bin/db-bootstrapper.rs +++ b/execution/db-bootstrapper/src/bin/db-bootstrapper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{ensure, format_err, Context, Result}; diff --git a/execution/execution-correctness/src/execution_correctness.rs b/execution/execution-correctness/src/execution_correctness.rs index 334fdb93f576f..11a3e531fe0bc 100644 --- a/execution/execution-correctness/src/execution_correctness.rs +++ b/execution/execution-correctness/src/execution_correctness.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/execution/execution-correctness/src/execution_correctness_manager.rs b/execution/execution-correctness/src/execution_correctness_manager.rs index a6f8847478086..39435da392242 100644 --- a/execution/execution-correctness/src/execution_correctness_manager.rs +++ b/execution/execution-correctness/src/execution_correctness_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/execution-correctness/src/lib.rs b/execution/execution-correctness/src/lib.rs index 83494d190d503..3ab80d6138947 100644 --- a/execution/execution-correctness/src/lib.rs +++ b/execution/execution-correctness/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/execution-correctness/src/local.rs b/execution/execution-correctness/src/local.rs index 3621ffc8b2b0a..f182909c9a8bb 100644 --- a/execution/execution-correctness/src/local.rs +++ b/execution/execution-correctness/src/local.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::execution_correctness::ExecutionCorrectness; diff --git a/execution/execution-correctness/src/main.rs b/execution/execution-correctness/src/main.rs index c19d10ccda888..797f61e4c5b7e 100644 --- a/execution/execution-correctness/src/main.rs +++ b/execution/execution-correctness/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Usage: ./executor-service node.config diff --git a/execution/execution-correctness/src/process.rs b/execution/execution-correctness/src/process.rs index 16b25dc490561..b4c1292815ebd 100644 --- a/execution/execution-correctness/src/process.rs +++ b/execution/execution-correctness/src/process.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/execution-correctness/src/remote_service.rs b/execution/execution-correctness/src/remote_service.rs index 59e34e440263d..9781730d11bbd 100644 --- a/execution/execution-correctness/src/remote_service.rs +++ b/execution/execution-correctness/src/remote_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::serializer::{ diff --git a/execution/execution-correctness/src/serializer.rs b/execution/execution-correctness/src/serializer.rs index 2e51f325c87fe..d2380d712eaa6 100644 --- a/execution/execution-correctness/src/serializer.rs +++ b/execution/execution-correctness/src/serializer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::execution_correctness::ExecutionCorrectness; diff --git a/execution/execution-correctness/src/tests/local.rs b/execution/execution-correctness/src/tests/local.rs index 9c8647be7f542..449786cd28f94 100644 --- a/execution/execution-correctness/src/tests/local.rs +++ b/execution/execution-correctness/src/tests/local.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/execution-correctness/src/tests/mod.rs b/execution/execution-correctness/src/tests/mod.rs index c5840768776f3..9dc20247c925b 100644 --- a/execution/execution-correctness/src/tests/mod.rs +++ b/execution/execution-correctness/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod local; diff --git a/execution/execution-correctness/src/tests/serializer.rs b/execution/execution-correctness/src/tests/serializer.rs index 24ed69db7de9a..58cef10a84a87 100644 --- a/execution/execution-correctness/src/tests/serializer.rs +++ b/execution/execution-correctness/src/tests/serializer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/execution-correctness/src/tests/suite.rs b/execution/execution-correctness/src/tests/suite.rs index 556b9206593a5..d537ee51eb51c 100644 --- a/execution/execution-correctness/src/tests/suite.rs +++ b/execution/execution-correctness/src/tests/suite.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::execution_correctness::ExecutionCorrectness; diff --git a/execution/execution-correctness/src/tests/thread.rs b/execution/execution-correctness/src/tests/thread.rs index d10f2d6e1a48f..d02c45ec7f656 100644 --- a/execution/execution-correctness/src/tests/thread.rs +++ b/execution/execution-correctness/src/tests/thread.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/execution-correctness/src/thread.rs b/execution/execution-correctness/src/thread.rs index 4268bec97ec8b..b8019456d4709 100644 --- a/execution/execution-correctness/src/thread.rs +++ b/execution/execution-correctness/src/thread.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This provides a runtime separation between ExecutionCorrectness and the rest without requiring the diff --git a/execution/execution-correctness/tests/binary.rs b/execution/execution-correctness/tests/binary.rs index 7db40ef3c8c07..fa8654a19455f 100644 --- a/execution/execution-correctness/tests/binary.rs +++ b/execution/execution-correctness/tests/binary.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::{ diff --git a/execution/executor-benchmark/benches/executor_benchmark.rs b/execution/executor-benchmark/benches/executor_benchmark.rs index f42f580a4dc61..e122288a43bef 100644 --- a/execution/executor-benchmark/benches/executor_benchmark.rs +++ b/execution/executor-benchmark/benches/executor_benchmark.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use criterion::{criterion_group, criterion_main, measurement::Measurement, BatchSize, Criterion}; diff --git a/execution/executor-benchmark/src/db_generator.rs b/execution/executor-benchmark/src/db_generator.rs index 3db61b541f36e..12da9b19e8d0c 100644 --- a/execution/executor-benchmark/src/db_generator.rs +++ b/execution/executor-benchmark/src/db_generator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/executor-benchmark/src/lib.rs b/execution/executor-benchmark/src/lib.rs index 823bedfa1a251..9560d5d14f2a8 100644 --- a/execution/executor-benchmark/src/lib.rs +++ b/execution/executor-benchmark/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod db_generator; diff --git a/execution/executor-benchmark/src/main.rs b/execution/executor-benchmark/src/main.rs index 2004072aac3e8..b490948195d44 100644 --- a/execution/executor-benchmark/src/main.rs +++ b/execution/executor-benchmark/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_secure_push_metrics::MetricsPusher; diff --git a/execution/executor-benchmark/src/transaction_committer.rs b/execution/executor-benchmark/src/transaction_committer.rs index 236811c25794b..011b23dd0cea3 100644 --- a/execution/executor-benchmark/src/transaction_committer.rs +++ b/execution/executor-benchmark/src/transaction_committer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::hash::HashValue; diff --git a/execution/executor-benchmark/src/transaction_executor.rs b/execution/executor-benchmark/src/transaction_executor.rs index 083b7dcc4e02e..936fefc335708 100644 --- a/execution/executor-benchmark/src/transaction_executor.rs +++ b/execution/executor-benchmark/src/transaction_executor.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::hash::HashValue; diff --git a/execution/executor-benchmark/src/transaction_generator.rs b/execution/executor-benchmark/src/transaction_generator.rs index cc4c26da7d6ca..d455b33b8d4ae 100644 --- a/execution/executor-benchmark/src/transaction_generator.rs +++ b/execution/executor-benchmark/src/transaction_generator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/execution/executor-test-helpers/src/integration_test_impl.rs b/execution/executor-test-helpers/src/integration_test_impl.rs index 381a2ee54fecc..d4437a5e46017 100644 --- a/execution/executor-test-helpers/src/integration_test_impl.rs +++ b/execution/executor-test-helpers/src/integration_test_impl.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/executor-test-helpers/src/lib.rs b/execution/executor-test-helpers/src/lib.rs index 3538e0243838a..1da9eec780fee 100644 --- a/execution/executor-test-helpers/src/lib.rs +++ b/execution/executor-test-helpers/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod integration_test_impl; diff --git a/execution/executor-types/src/error.rs b/execution/executor-types/src/error.rs index 8986ba8f6ef07..8d4e03aa9b532 100644 --- a/execution/executor-types/src/error.rs +++ b/execution/executor-types/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/execution/executor-types/src/executed_chunk.rs b/execution/executor-types/src/executed_chunk.rs index addd1264b2a71..b15c28ed961b8 100644 --- a/execution/executor-types/src/executed_chunk.rs +++ b/execution/executor-types/src/executed_chunk.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor-types/src/lib.rs b/execution/executor-types/src/lib.rs index b3cc4186b3025..9408c89f7e7fe 100644 --- a/execution/executor-types/src/lib.rs +++ b/execution/executor-types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/block_executor.rs b/execution/executor/src/block_executor.rs index 27bc64bcc2e6d..17122e93d082b 100644 --- a/execution/executor/src/block_executor.rs +++ b/execution/executor/src/block_executor.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/chunk_executor.rs b/execution/executor/src/chunk_executor.rs index 632774fddba90..855282ab7eade 100644 --- a/execution/executor/src/chunk_executor.rs +++ b/execution/executor/src/chunk_executor.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/components/apply_chunk_output.rs b/execution/executor/src/components/apply_chunk_output.rs index 8ec098603c11f..95262652279f7 100644 --- a/execution/executor/src/components/apply_chunk_output.rs +++ b/execution/executor/src/components/apply_chunk_output.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/components/block_tree/mod.rs b/execution/executor/src/components/block_tree/mod.rs index 628c8639af016..8b4c68367c763 100644 --- a/execution/executor/src/components/block_tree/mod.rs +++ b/execution/executor/src/components/block_tree/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/components/block_tree/test.rs b/execution/executor/src/components/block_tree/test.rs index 43f00a9754aed..3b68105276524 100644 --- a/execution/executor/src/components/block_tree/test.rs +++ b/execution/executor/src/components/block_tree/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::components::block_tree::{epoch_genesis_block_id, BlockLookup, BlockTree}; diff --git a/execution/executor/src/components/chunk_commit_queue.rs b/execution/executor/src/components/chunk_commit_queue.rs index 548a762026360..26317126f7966 100644 --- a/execution/executor/src/components/chunk_commit_queue.rs +++ b/execution/executor/src/components/chunk_commit_queue.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/components/chunk_output.rs b/execution/executor/src/components/chunk_output.rs index 74f34217132f2..519167a108a23 100644 --- a/execution/executor/src/components/chunk_output.rs +++ b/execution/executor/src/components/chunk_output.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/components/mod.rs b/execution/executor/src/components/mod.rs index d3ebb031f2f2e..4999cb63b05bb 100644 --- a/execution/executor/src/components/mod.rs +++ b/execution/executor/src/components/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/db_bootstrapper.rs b/execution/executor/src/db_bootstrapper.rs index 568a4229f2442..0cf3be80c9f59 100644 --- a/execution/executor/src/db_bootstrapper.rs +++ b/execution/executor/src/db_bootstrapper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/fuzzing.rs b/execution/executor/src/fuzzing.rs index 026aa79878e66..99d5c258d3cbc 100644 --- a/execution/executor/src/fuzzing.rs +++ b/execution/executor/src/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{block_executor::BlockExecutor, chunk_executor::ChunkExecutor}; diff --git a/execution/executor/src/lib.rs b/execution/executor/src/lib.rs index 4b1bebb96025f..e3742f89d1f96 100644 --- a/execution/executor/src/lib.rs +++ b/execution/executor/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/logging.rs b/execution/executor/src/logging.rs index f7bf69cb1934e..fec2060524507 100644 --- a/execution/executor/src/logging.rs +++ b/execution/executor/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/execution/executor/src/metrics.rs b/execution/executor/src/metrics.rs index 566befe9b6759..b47c112896a15 100644 --- a/execution/executor/src/metrics.rs +++ b/execution/executor/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{register_histogram, register_int_counter, Histogram, IntCounter}; diff --git a/execution/executor/src/mock_vm/mock_vm_test.rs b/execution/executor/src/mock_vm/mock_vm_test.rs index 9bb7b6056a10d..694ae66469641 100644 --- a/execution/executor/src/mock_vm/mock_vm_test.rs +++ b/execution/executor/src/mock_vm/mock_vm_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::{balance_ap, encode_mint_transaction, encode_transfer_transaction, seqnum_ap, MockVM}; diff --git a/execution/executor/src/mock_vm/mod.rs b/execution/executor/src/mock_vm/mod.rs index c498e1b90787b..13d7182545d11 100644 --- a/execution/executor/src/mock_vm/mod.rs +++ b/execution/executor/src/mock_vm/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(test)] diff --git a/execution/executor/src/tests/chunk_executor_tests.rs b/execution/executor/src/tests/chunk_executor_tests.rs index 6a1fef84b4bb5..75dfc0b029bec 100644 --- a/execution/executor/src/tests/chunk_executor_tests.rs +++ b/execution/executor/src/tests/chunk_executor_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/src/tests/mod.rs b/execution/executor/src/tests/mod.rs index c034053ea3641..312de4489337e 100644 --- a/execution/executor/src/tests/mod.rs +++ b/execution/executor/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/execution/executor/tests/db_bootstrapper_test.rs b/execution/executor/tests/db_bootstrapper_test.rs index 2bdbab1dea2b4..3d716dc94251c 100644 --- a/execution/executor/tests/db_bootstrapper_test.rs +++ b/execution/executor/tests/db_bootstrapper_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/execution/executor/tests/storage_integration_test.rs b/execution/executor/tests/storage_integration_test.rs index 2779a692eb7ec..6555083e47905 100644 --- a/execution/executor/tests/storage_integration_test.rs +++ b/execution/executor/tests/storage_integration_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ed25519::*, PrivateKey, Uniform}; diff --git a/mempool/src/core_mempool/index.rs b/mempool/src/core_mempool/index.rs index 5b890afb80068..d769ba4deadd7 100644 --- a/mempool/src/core_mempool/index.rs +++ b/mempool/src/core_mempool/index.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// This module provides various indexes used by Mempool. diff --git a/mempool/src/core_mempool/mempool.rs b/mempool/src/core_mempool/mempool.rs index 3b89679cbe937..92be0d40ea007 100644 --- a/mempool/src/core_mempool/mempool.rs +++ b/mempool/src/core_mempool/mempool.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Mempool is used to track transactions which have been submitted but not yet diff --git a/mempool/src/core_mempool/mod.rs b/mempool/src/core_mempool/mod.rs index e68e9014a94eb..d7ce867a82c2c 100644 --- a/mempool/src/core_mempool/mod.rs +++ b/mempool/src/core_mempool/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod index; diff --git a/mempool/src/core_mempool/transaction.rs b/mempool/src/core_mempool/transaction.rs index 33825a1414149..9e2ee4c54b8d9 100644 --- a/mempool/src/core_mempool/transaction.rs +++ b/mempool/src/core_mempool/transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/mempool/src/core_mempool/transaction_store.rs b/mempool/src/core_mempool/transaction_store.rs index 2bef7baba6911..af3b4ae09a7c8 100644 --- a/mempool/src/core_mempool/transaction_store.rs +++ b/mempool/src/core_mempool/transaction_store.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/core_mempool/ttl_cache.rs b/mempool/src/core_mempool/ttl_cache.rs index d88ced466dcee..858041deca97c 100644 --- a/mempool/src/core_mempool/ttl_cache.rs +++ b/mempool/src/core_mempool/ttl_cache.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::{ diff --git a/mempool/src/counters.rs b/mempool/src/counters.rs index a9868734345a0..4d953d35be758 100644 --- a/mempool/src/counters.rs +++ b/mempool/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::network_id::{NetworkId, PeerNetworkId}; diff --git a/mempool/src/lib.rs b/mempool/src/lib.rs index c420c1e97efcf..49b8285093149 100644 --- a/mempool/src/lib.rs +++ b/mempool/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/mempool/src/logging.rs b/mempool/src/logging.rs index 413fbfa6ef8d0..9f31862d43379 100644 --- a/mempool/src/logging.rs +++ b/mempool/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::shared_mempool::types::{BatchId, ConsensusRequest}; diff --git a/mempool/src/shared_mempool/coordinator.rs b/mempool/src/shared_mempool/coordinator.rs index 036f0b32c046f..8220e4e0be783 100644 --- a/mempool/src/shared_mempool/coordinator.rs +++ b/mempool/src/shared_mempool/coordinator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Processes that are directly spawned by shared mempool runtime initialization diff --git a/mempool/src/shared_mempool/mod.rs b/mempool/src/shared_mempool/mod.rs index e26c302f91024..181a9fae3e89f 100644 --- a/mempool/src/shared_mempool/mod.rs +++ b/mempool/src/shared_mempool/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod network; diff --git a/mempool/src/shared_mempool/network.rs b/mempool/src/shared_mempool/network.rs index 9eb233b3a5833..1f0ba829d073b 100644 --- a/mempool/src/shared_mempool/network.rs +++ b/mempool/src/shared_mempool/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Interface between Mempool and Network layers. diff --git a/mempool/src/shared_mempool/runtime.rs b/mempool/src/shared_mempool/runtime.rs index 0fca40c9c7423..e2a912ef52483 100644 --- a/mempool/src/shared_mempool/runtime.rs +++ b/mempool/src/shared_mempool/runtime.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/shared_mempool/tasks.rs b/mempool/src/shared_mempool/tasks.rs index 0d47495098ae2..f73473ce6f05f 100644 --- a/mempool/src/shared_mempool/tasks.rs +++ b/mempool/src/shared_mempool/tasks.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Tasks that are executed by coordinators (short-lived compared to coordinators) diff --git a/mempool/src/shared_mempool/types.rs b/mempool/src/shared_mempool/types.rs index d8ab148b8af8f..cddfa73e82ae5 100644 --- a/mempool/src/shared_mempool/types.rs +++ b/mempool/src/shared_mempool/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Objects used by/related to shared mempool diff --git a/mempool/src/tests/common.rs b/mempool/src/tests/common.rs index b24df3fdd946d..64d1fe45e2ca0 100644 --- a/mempool/src/tests/common.rs +++ b/mempool/src/tests/common.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::core_mempool::{CoreMempool, TimelineState, TxnPointer}; diff --git a/mempool/src/tests/core_mempool_test.rs b/mempool/src/tests/core_mempool_test.rs index 2ee10e74ded6c..26be2d3b07e38 100644 --- a/mempool/src/tests/core_mempool_test.rs +++ b/mempool/src/tests/core_mempool_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/tests/fuzzing.rs b/mempool/src/tests/fuzzing.rs index 8440c1ee3107b..3e075ca9cea60 100644 --- a/mempool/src/tests/fuzzing.rs +++ b/mempool/src/tests/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/tests/integration_tests.rs b/mempool/src/tests/integration_tests.rs index a30f6570a69f5..b42e94786b7c3 100644 --- a/mempool/src/tests/integration_tests.rs +++ b/mempool/src/tests/integration_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::{ diff --git a/mempool/src/tests/mocks.rs b/mempool/src/tests/mocks.rs index 05bf0d294929b..c87e9d4bb1905 100644 --- a/mempool/src/tests/mocks.rs +++ b/mempool/src/tests/mocks.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/tests/mod.rs b/mempool/src/tests/mod.rs index 94c2b80470565..1af7e5e1c8c7b 100644 --- a/mempool/src/tests/mod.rs +++ b/mempool/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(test)] diff --git a/mempool/src/tests/multi_node_test.rs b/mempool/src/tests/multi_node_test.rs index 85bd5fb70ba37..a4328b9e19d3c 100644 --- a/mempool/src/tests/multi_node_test.rs +++ b/mempool/src/tests/multi_node_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/tests/node.rs b/mempool/src/tests/node.rs index 1386bacf491d6..8eab41fe5e301 100644 --- a/mempool/src/tests/node.rs +++ b/mempool/src/tests/node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/tests/shared_mempool_test.rs b/mempool/src/tests/shared_mempool_test.rs index 16172ff4b1c7e..72e9b674b58f6 100644 --- a/mempool/src/tests/shared_mempool_test.rs +++ b/mempool/src/tests/shared_mempool_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/mempool/src/tests/test_framework.rs b/mempool/src/tests/test_framework.rs index cf12018ac9cb8..4becdc260230a 100644 --- a/mempool/src/tests/test_framework.rs +++ b/mempool/src/tests/test_framework.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/builder/src/builder.rs b/network/builder/src/builder.rs index 1708eca73b64a..fa10761420e52 100644 --- a/network/builder/src/builder.rs +++ b/network/builder/src/builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Remotely authenticated vs. unauthenticated network end-points: diff --git a/network/builder/src/dummy.rs b/network/builder/src/dummy.rs index edeccfe371c2c..3c37cce87275f 100644 --- a/network/builder/src/dummy.rs +++ b/network/builder/src/dummy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Integration tests for validator_network. diff --git a/network/builder/src/lib.rs b/network/builder/src/lib.rs index 10ad9852bf606..19347c406e563 100644 --- a/network/builder/src/lib.rs +++ b/network/builder/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub use network::protocols::rpc::error::RpcError; diff --git a/network/builder/src/test.rs b/network/builder/src/test.rs index e5ea6d973235e..dfc609532e648 100644 --- a/network/builder/src/test.rs +++ b/network/builder/src/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Integration tests for validator_network. diff --git a/network/discovery/src/counters.rs b/network/discovery/src/counters.rs index fa593fd5b6824..7e1c443d5a87d 100644 --- a/network/discovery/src/counters.rs +++ b/network/discovery/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/network/discovery/src/file.rs b/network/discovery/src/file.rs index 27b56667f4e45..e4d0a894a24f3 100644 --- a/network/discovery/src/file.rs +++ b/network/discovery/src/file.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::DiscoveryError; diff --git a/network/discovery/src/lib.rs b/network/discovery/src/lib.rs index 73213cb49bc4b..f27c9c505e9c6 100644 --- a/network/discovery/src/lib.rs +++ b/network/discovery/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{counters::DISCOVERY_COUNTS, file::FileStream, validator_set::ValidatorSetStream}; diff --git a/network/discovery/src/validator_set.rs b/network/discovery/src/validator_set.rs index 2aa0269afd410..2f2261d833ab6 100644 --- a/network/discovery/src/validator_set.rs +++ b/network/discovery/src/validator_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/memsocket/src/lib.rs b/network/memsocket/src/lib.rs index 1a706a2cc51c6..39867366e70e8 100644 --- a/network/memsocket/src/lib.rs +++ b/network/memsocket/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_infallible::Mutex; diff --git a/network/memsocket/tests/memory_listener.rs b/network/memsocket/tests/memory_listener.rs index 3e2cd6d155d54..9ffe57ee56e4b 100644 --- a/network/memsocket/tests/memory_listener.rs +++ b/network/memsocket/tests/memory_listener.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use futures::{ diff --git a/network/memsocket/tests/memory_socket.rs b/network/memsocket/tests/memory_socket.rs index 0e829f3f8728a..5937f04356d9f 100644 --- a/network/memsocket/tests/memory_socket.rs +++ b/network/memsocket/tests/memory_socket.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use futures::{ diff --git a/network/netcore/src/framing.rs b/network/netcore/src/framing.rs index 93aada17849da..08048bdc2f43a 100644 --- a/network/netcore/src/framing.rs +++ b/network/netcore/src/framing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use bytes::BytesMut; diff --git a/network/netcore/src/lib.rs b/network/netcore/src/lib.rs index 2cd98f8993f62..e93f2c152fb09 100644 --- a/network/netcore/src/lib.rs +++ b/network/netcore/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Core types and traits for building Peer to Peer networks. diff --git a/network/netcore/src/transport/and_then.rs b/network/netcore/src/transport/and_then.rs index b5fd0060ff057..9a962f6cd7eac 100644 --- a/network/netcore/src/transport/and_then.rs +++ b/network/netcore/src/transport/and_then.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::transport::{ConnectionOrigin, Transport}; diff --git a/network/netcore/src/transport/boxed.rs b/network/netcore/src/transport/boxed.rs index a943cf78d0ff5..507233529881b 100644 --- a/network/netcore/src/transport/boxed.rs +++ b/network/netcore/src/transport/boxed.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::transport::Transport; diff --git a/network/netcore/src/transport/memory.rs b/network/netcore/src/transport/memory.rs index 60327cc165fae..87952ce431520 100644 --- a/network/netcore/src/transport/memory.rs +++ b/network/netcore/src/transport/memory.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::transport::Transport; diff --git a/network/netcore/src/transport/mod.rs b/network/netcore/src/transport/mod.rs index 8e5c3ae3c8f35..a030e0b4aa963 100644 --- a/network/netcore/src/transport/mod.rs +++ b/network/netcore/src/transport/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Low-level module for establishing connections with peers diff --git a/network/netcore/src/transport/proxy_protocol.rs b/network/netcore/src/transport/proxy_protocol.rs index b80a509781563..12932e6ef3197 100644 --- a/network/netcore/src/transport/proxy_protocol.rs +++ b/network/netcore/src/transport/proxy_protocol.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! # An implementation of ProxyProtocol for HAProxy diff --git a/network/netcore/src/transport/tcp.rs b/network/netcore/src/transport/tcp.rs index 07b9c6e087f6e..44b63b977c3dc 100644 --- a/network/netcore/src/transport/tcp.rs +++ b/network/netcore/src/transport/tcp.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! TCP Transport diff --git a/network/src/application/interface.rs b/network/src/application/interface.rs index f2fcb53a2b05f..c75c4f950b2be 100644 --- a/network/src/application/interface.rs +++ b/network/src/application/interface.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/application/mod.rs b/network/src/application/mod.rs index c3041f62585a9..b5f3a9d196295 100644 --- a/network/src/application/mod.rs +++ b/network/src/application/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod interface; diff --git a/network/src/application/storage.rs b/network/src/application/storage.rs index 75f89514a0490..aae6cb54179fd 100644 --- a/network/src/application/storage.rs +++ b/network/src/application/storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/application/tests.rs b/network/src/application/tests.rs index 340aa815c7ef9..a569b9fdf5ebe 100644 --- a/network/src/application/tests.rs +++ b/network/src/application/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/application/types.rs b/network/src/application/types.rs index 8059584cd0467..063def1b56ecd 100644 --- a/network/src/application/types.rs +++ b/network/src/application/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{protocols::wire::handshake::v1::ProtocolId, transport::ConnectionMetadata}; diff --git a/network/src/connectivity_manager/builder.rs b/network/src/connectivity_manager/builder.rs index 8b5c6cf7e1e08..82b7ba60801a7 100644 --- a/network/src/connectivity_manager/builder.rs +++ b/network/src/connectivity_manager/builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/connectivity_manager/mod.rs b/network/src/connectivity_manager/mod.rs index fad4373d4d4f4..713e71466c509 100644 --- a/network/src/connectivity_manager/mod.rs +++ b/network/src/connectivity_manager/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The ConnectivityManager actor is responsible for ensuring that we are diff --git a/network/src/connectivity_manager/test.rs b/network/src/connectivity_manager/test.rs index 83567245ad8e3..161dfff09cf46 100644 --- a/network/src/connectivity_manager/test.rs +++ b/network/src/connectivity_manager/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/network/src/constants.rs b/network/src/constants.rs index 38d2ae209f20f..d543d64d305ad 100644 --- a/network/src/constants.rs +++ b/network/src/constants.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// A collection of constants and default values for configuring various network components. diff --git a/network/src/counters.rs b/network/src/counters.rs index fe9d24a8b5857..4c37e68e8fa75 100644 --- a/network/src/counters.rs +++ b/network/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::protocols::wire::handshake::v1::ProtocolId; diff --git a/network/src/error.rs b/network/src/error.rs index ff76e24ebaa13..0e83540046fab 100644 --- a/network/src/error.rs +++ b/network/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::peer_manager::PeerManagerError; diff --git a/network/src/fuzzing.rs b/network/src/fuzzing.rs index ae3f7ece0488f..e8d60f23cf216 100644 --- a/network/src/fuzzing.rs +++ b/network/src/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/lib.rs b/network/src/lib.rs index a64768af60da7..05d6ad1eac948 100644 --- a/network/src/lib.rs +++ b/network/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // diff --git a/network/src/logging.rs b/network/src/logging.rs index 7891e391de8b6..e02547500b506 100644 --- a/network/src/logging.rs +++ b/network/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! diff --git a/network/src/noise/error.rs b/network/src/noise/error.rs index 7dc235db99121..d614bc6bc44a0 100644 --- a/network/src/noise/error.rs +++ b/network/src/noise/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::noise::NoiseError; diff --git a/network/src/noise/fuzzing.rs b/network/src/noise/fuzzing.rs index 47677b9c33852..119f1f233a343 100644 --- a/network/src/noise/fuzzing.rs +++ b/network/src/noise/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // diff --git a/network/src/noise/handshake.rs b/network/src/noise/handshake.rs index 15b495266b53a..f58924da4d69a 100644 --- a/network/src/noise/handshake.rs +++ b/network/src/noise/handshake.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The handshake module implements the handshake part of the protocol. diff --git a/network/src/noise/mod.rs b/network/src/noise/mod.rs index 78034b6cd40b0..bb88ee2cac733 100644 --- a/network/src/noise/mod.rs +++ b/network/src/noise/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This crate implements wrappers around our [Noise][noise] implementation. diff --git a/network/src/noise/stream.rs b/network/src/noise/stream.rs index b673c038ad3e4..68ee13bd5ec8c 100644 --- a/network/src/noise/stream.rs +++ b/network/src/noise/stream.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The socket module implements the post-handshake part of the protocol. diff --git a/network/src/peer/fuzzing.rs b/network/src/peer/fuzzing.rs index 2f0607f1b4322..2c0562d81ef96 100644 --- a/network/src/peer/fuzzing.rs +++ b/network/src/peer/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/peer/mod.rs b/network/src/peer/mod.rs index 31be6b6c0ca31..ae7e47ede82c6 100644 --- a/network/src/peer/mod.rs +++ b/network/src/peer/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! [`Peer`] manages a single connection to a remote peer after the initial connection diff --git a/network/src/peer/test.rs b/network/src/peer/test.rs index 081d3c057f24a..ae05efb2baf9b 100644 --- a/network/src/peer/test.rs +++ b/network/src/peer/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/peer_manager/builder.rs b/network/src/peer_manager/builder.rs index 52e17e9e53fd9..8971fa4e6936a 100644 --- a/network/src/peer_manager/builder.rs +++ b/network/src/peer_manager/builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/peer_manager/conn_notifs_channel.rs b/network/src/peer_manager/conn_notifs_channel.rs index 347369c511f96..3977bf0f824a6 100644 --- a/network/src/peer_manager/conn_notifs_channel.rs +++ b/network/src/peer_manager/conn_notifs_channel.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! `conn_notifs_channel` is a channel which delivers to the receiver only the last of N diff --git a/network/src/peer_manager/error.rs b/network/src/peer_manager/error.rs index 01277d8c28e8c..05a8217707eb1 100644 --- a/network/src/peer_manager/error.rs +++ b/network/src/peer_manager/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Errors that originate from the PeerManager module diff --git a/network/src/peer_manager/mod.rs b/network/src/peer_manager/mod.rs index 9937ebb2b2540..81c128df271d7 100644 --- a/network/src/peer_manager/mod.rs +++ b/network/src/peer_manager/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The PeerManager module is responsible for establishing connections between Peers and for diff --git a/network/src/peer_manager/senders.rs b/network/src/peer_manager/senders.rs index 03db46e399362..e383937e7f49e 100644 --- a/network/src/peer_manager/senders.rs +++ b/network/src/peer_manager/senders.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/peer_manager/tests.rs b/network/src/peer_manager/tests.rs index 3306603296802..9ec59f75f14a8 100644 --- a/network/src/peer_manager/tests.rs +++ b/network/src/peer_manager/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/peer_manager/transport.rs b/network/src/peer_manager/transport.rs index bd70b771abaec..6e94e5b32483d 100644 --- a/network/src/peer_manager/transport.rs +++ b/network/src/peer_manager/transport.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ counters::{self, FAILED_LABEL, SUCCEEDED_LABEL}, diff --git a/network/src/peer_manager/types.rs b/network/src/peer_manager/types.rs index b1a8c97c96d9e..88876ab24ad02 100644 --- a/network/src/peer_manager/types.rs +++ b/network/src/peer_manager/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ peer::DisconnectReason, diff --git a/network/src/protocols/direct_send/mod.rs b/network/src/protocols/direct_send/mod.rs index dc0d387cdfb64..389adf4f55e97 100644 --- a/network/src/protocols/direct_send/mod.rs +++ b/network/src/protocols/direct_send/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{protocols::network::SerializedRequest, ProtocolId}; diff --git a/network/src/protocols/health_checker/builder.rs b/network/src/protocols/health_checker/builder.rs index b4b78a481bfdd..c4d24f86d01aa 100644 --- a/network/src/protocols/health_checker/builder.rs +++ b/network/src/protocols/health_checker/builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/protocols/health_checker/interface.rs b/network/src/protocols/health_checker/interface.rs index 44360edc85a11..37930ddb26432 100644 --- a/network/src/protocols/health_checker/interface.rs +++ b/network/src/protocols/health_checker/interface.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/protocols/health_checker/mod.rs b/network/src/protocols/health_checker/mod.rs index 94124eef8bb49..2b997f53a3ea9 100644 --- a/network/src/protocols/health_checker/mod.rs +++ b/network/src/protocols/health_checker/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Protocol used to ensure peer liveness diff --git a/network/src/protocols/health_checker/test.rs b/network/src/protocols/health_checker/test.rs index 6f0978a1cea4a..c3dcb863f8344 100644 --- a/network/src/protocols/health_checker/test.rs +++ b/network/src/protocols/health_checker/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/network/src/protocols/identity.rs b/network/src/protocols/identity.rs index cf10b61ffc924..0c9df7450e304 100644 --- a/network/src/protocols/identity.rs +++ b/network/src/protocols/identity.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Protocol used to exchange supported protocol information with a remote. diff --git a/network/src/protocols/mod.rs b/network/src/protocols/mod.rs index 09e4316a403a2..6a6398b523458 100644 --- a/network/src/protocols/mod.rs +++ b/network/src/protocols/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Protocols used by network module for external APIs and internal functionality diff --git a/network/src/protocols/network/mod.rs b/network/src/protocols/network/mod.rs index a64a5cfc381dd..a68590e0eb346 100644 --- a/network/src/protocols/network/mod.rs +++ b/network/src/protocols/network/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Convenience Network API for Diem diff --git a/network/src/protocols/rpc/error.rs b/network/src/protocols/rpc/error.rs index 421ba3d5d3a64..3c38773555b9a 100644 --- a/network/src/protocols/rpc/error.rs +++ b/network/src/protocols/rpc/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Rpc protocol errors diff --git a/network/src/protocols/rpc/mod.rs b/network/src/protocols/rpc/mod.rs index a9b2889b65338..036880d9f830e 100644 --- a/network/src/protocols/rpc/mod.rs +++ b/network/src/protocols/rpc/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Implementation of the unary RPC protocol as per [AptosNet wire protocol v1]. diff --git a/network/src/protocols/wire/handshake.rs b/network/src/protocols/wire/handshake.rs index cf4607a202953..a246108d8ba64 100644 --- a/network/src/protocols/wire/handshake.rs +++ b/network/src/protocols/wire/handshake.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // v1 of the AptosNet handshake protocol. diff --git a/network/src/protocols/wire/handshake/v1/mod.rs b/network/src/protocols/wire/handshake/v1/mod.rs index 0783e8d6d9092..8d06a5ae205ab 100644 --- a/network/src/protocols/wire/handshake/v1/mod.rs +++ b/network/src/protocols/wire/handshake/v1/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines the structs transported during the network handshake protocol v1. diff --git a/network/src/protocols/wire/handshake/v1/test.rs b/network/src/protocols/wire/handshake/v1/test.rs index 7c183d1e5d465..710ba436988bb 100644 --- a/network/src/protocols/wire/handshake/v1/test.rs +++ b/network/src/protocols/wire/handshake/v1/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/network/src/protocols/wire/messaging.rs b/network/src/protocols/wire/messaging.rs index af98e723f5fdc..f49ac9c4c2809 100644 --- a/network/src/protocols/wire/messaging.rs +++ b/network/src/protocols/wire/messaging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // v1 of the AptosNet messaging protocol. diff --git a/network/src/protocols/wire/messaging/v1/mod.rs b/network/src/protocols/wire/messaging/v1/mod.rs index 70c61a101183c..0046d48cb5553 100644 --- a/network/src/protocols/wire/messaging/v1/mod.rs +++ b/network/src/protocols/wire/messaging/v1/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines the AptosNet v1 message types, how they are diff --git a/network/src/protocols/wire/messaging/v1/test.rs b/network/src/protocols/wire/messaging/v1/test.rs index 1a218b4411417..1a2ab6279d100 100644 --- a/network/src/protocols/wire/messaging/v1/test.rs +++ b/network/src/protocols/wire/messaging/v1/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/network/src/protocols/wire/mod.rs b/network/src/protocols/wire/mod.rs index 305a474db17e8..513349b5d183f 100644 --- a/network/src/protocols/wire/mod.rs +++ b/network/src/protocols/wire/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines the structs transported during the AptosNet handshake protocol and diff --git a/network/src/testutils/builder.rs b/network/src/testutils/builder.rs index 276b5df405439..b2aebd291215d 100644 --- a/network/src/testutils/builder.rs +++ b/network/src/testutils/builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::testutils::{ diff --git a/network/src/testutils/fake_socket.rs b/network/src/testutils/fake_socket.rs index f80a1c64dc132..d43e40feeef92 100644 --- a/network/src/testutils/fake_socket.rs +++ b/network/src/testutils/fake_socket.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! diff --git a/network/src/testutils/mod.rs b/network/src/testutils/mod.rs index 62d0db909c45b..b021944fab146 100644 --- a/network/src/testutils/mod.rs +++ b/network/src/testutils/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod builder; diff --git a/network/src/testutils/test_framework.rs b/network/src/testutils/test_framework.rs index ed03810588704..fa54f96727cba 100644 --- a/network/src/testutils/test_framework.rs +++ b/network/src/testutils/test_framework.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/testutils/test_node.rs b/network/src/testutils/test_node.rs index 5ce4f3e401415..bac108292700a 100644 --- a/network/src/testutils/test_node.rs +++ b/network/src/testutils/test_node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/transport/mod.rs b/network/src/transport/mod.rs index 795aed2651a8c..e460a6336d3a4 100644 --- a/network/src/transport/mod.rs +++ b/network/src/transport/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/network/src/transport/test.rs b/network/src/transport/test.rs index 03ac0d99a6c6b..f059cbf20d86f 100644 --- a/network/src/transport/test.rs +++ b/network/src/transport/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/scripts/cargo_check_dependencies.sh b/scripts/cargo_check_dependencies.sh index f5caa6f3025db..182a2856c8d55 100755 --- a/scripts/cargo_check_dependencies.sh +++ b/scripts/cargo_check_dependencies.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # This script assumes it runs in the same directory as a Cargo.toml file diff --git a/scripts/cargo_update_outdated.sh b/scripts/cargo_update_outdated.sh index b729f4e91db1a..6371fd9549ac6 100755 --- a/scripts/cargo_update_outdated.sh +++ b/scripts/cargo_update_outdated.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # This script modifies local cargo files to reflect compatibility (semver) diff --git a/scripts/changed-files.sh b/scripts/changed-files.sh index ab846a8ee087b..9e6192368c853 100755 --- a/scripts/changed-files.sh +++ b/scripts/changed-files.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/scripts/cli/start_cli_testnet.sh b/scripts/cli/start_cli_testnet.sh index 71fb8ce68b33c..12982d7a48856 100755 --- a/scripts/cli/start_cli_testnet.sh +++ b/scripts/cli/start_cli_testnet.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 print_help() diff --git a/scripts/dev_setup.sh b/scripts/dev_setup.sh index 431795d81beb1..45303df926069 100755 --- a/scripts/dev_setup.sh +++ b/scripts/dev_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # This script sets up the environment for the build by installing necessary dependencies. # diff --git a/scripts/dockerhub_prune.sh b/scripts/dockerhub_prune.sh index b530488ca32d1..5d1a5ea5a34ab 100755 --- a/scripts/dockerhub_prune.sh +++ b/scripts/dockerhub_prune.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 ###################################################################################################################### diff --git a/scripts/fgi/kube.py b/scripts/fgi/kube.py index 77b32384cbd67..6312a6e052470 100644 --- a/scripts/fgi/kube.py +++ b/scripts/fgi/kube.py @@ -1,4 +1,4 @@ -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 import json, os, random, subprocess, time diff --git a/scripts/fgi/run b/scripts/fgi/run index f1fab18e57b8a..e311977d81654 100755 --- a/scripts/fgi/run +++ b/scripts/fgi/run @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 import argparse diff --git a/scripts/git-checks.sh b/scripts/git-checks.sh index bbc455395102d..cd80c02c6b1ed 100755 --- a/scripts/git-checks.sh +++ b/scripts/git-checks.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 set -e diff --git a/scripts/run_quarantined.sh b/scripts/run_quarantined.sh index 00371c3838f81..5ab825bc499a9 100755 --- a/scripts/run_quarantined.sh +++ b/scripts/run_quarantined.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 crate= diff --git a/scripts/weekly-dep-report.sh b/scripts/weekly-dep-report.sh index 668cc8dd7213d..b0d63368e5881 100755 --- a/scripts/weekly-dep-report.sh +++ b/scripts/weekly-dep-report.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # fast fail. diff --git a/sdk/offchain/src/identifier.rs b/sdk/offchain/src/identifier.rs index 090d926a907cd..8d9d5e92e3f87 100644 --- a/sdk/offchain/src/identifier.rs +++ b/sdk/offchain/src/identifier.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::subaddress::{Subaddress, SubaddressParseError}; diff --git a/sdk/offchain/src/jws.rs b/sdk/offchain/src/jws.rs index 2ddbf4132a2d1..d133f964c8cca 100644 --- a/sdk/offchain/src/jws.rs +++ b/sdk/offchain/src/jws.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_sdk::crypto::ed25519::ed25519_dalek::{self, Signature, Signer, Verifier}; diff --git a/sdk/offchain/src/lib.rs b/sdk/offchain/src/lib.rs index 4a505cf7143cc..b431792d6e725 100644 --- a/sdk/offchain/src/lib.rs +++ b/sdk/offchain/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod identifier; diff --git a/sdk/offchain/src/payment_command.rs b/sdk/offchain/src/payment_command.rs index 19ffb8fb5d98a..f3bab65ce355d 100644 --- a/sdk/offchain/src/payment_command.rs +++ b/sdk/offchain/src/payment_command.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::types::{ diff --git a/sdk/offchain/src/subaddress.rs b/sdk/offchain/src/subaddress.rs index ccb66ae99b06a..4e770ad160961 100644 --- a/sdk/offchain/src/subaddress.rs +++ b/sdk/offchain/src/subaddress.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use hex::FromHex; diff --git a/sdk/offchain/src/types.rs b/sdk/offchain/src/types.rs index 729fa063360ab..e3a7ae31af941 100644 --- a/sdk/offchain/src/types.rs +++ b/sdk/offchain/src/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{ diff --git a/sdk/src/lib.rs b/sdk/src/lib.rs index 7cad0d4452208..adadeec57a3d2 100644 --- a/sdk/src/lib.rs +++ b/sdk/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! The official Rust SDK for Diem. diff --git a/sdk/src/transaction_builder.rs b/sdk/src/transaction_builder.rs index 48b67b9130f22..b721c619f9a8b 100644 --- a/sdk/src/transaction_builder.rs +++ b/sdk/src/transaction_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/sdk/src/types.rs b/sdk/src/types.rs index 62fdc31a395ce..8ebadb3f1fc18 100644 --- a/sdk/src/types.rs +++ b/sdk/src/types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/sdk/transaction-builder/src/aptos_stdlib.rs b/sdk/transaction-builder/src/aptos_stdlib.rs deleted file mode 120000 index 5ddca87a42cb6..0000000000000 --- a/sdk/transaction-builder/src/aptos_stdlib.rs +++ /dev/null @@ -1 +0,0 @@ -../../../aptos-move/framework/aptos-framework/releases/artifacts/current/transaction_script_builder.rs \ No newline at end of file diff --git a/sdk/transaction-builder/src/aptos_stdlib.rs b/sdk/transaction-builder/src/aptos_stdlib.rs new file mode 100644 index 0000000000000..8252a10031153 --- /dev/null +++ b/sdk/transaction-builder/src/aptos_stdlib.rs @@ -0,0 +1,355 @@ +// Copyright (c) The Diem Core Contributors +// SPDX-License-Identifier: Apache-2.0 + +// This file was generated. Do not modify! +// +// To update this code, run: `cargo run --release -p framework`. + +//! Conversion library between a structured representation of a Move script call (`ScriptCall`) and the +//! standard BCS-compatible representation used in Diem transactions (`Script`). +//! +//! This code was generated by compiling known Script interfaces ("ABIs") with the tool `transaction-builder-generator`. + +#![allow(clippy::unnecessary_wraps)] +#![allow(unused_imports)] +use aptos_types::{ + account_address::AccountAddress, + transaction::{Script, ScriptFunction, TransactionArgument, TransactionPayload, VecBytes}, +}; +use move_core_types::{ + ident_str, + language_storage::{ModuleId, TypeTag}, +}; +use std::collections::BTreeMap as Map; + +type Bytes = Vec; + +/// Structured representation of a call into a known Move script function. +/// ```ignore +/// impl ScriptFunctionCall { +/// pub fn encode(self) -> TransactionPayload { .. } +/// pub fn decode(&TransactionPayload) -> Option { .. } +/// } +/// ``` +#[derive(Clone, Debug, PartialEq, PartialOrd)] +#[cfg_attr(feature = "fuzzing", derive(proptest_derive::Arbitrary))] +#[cfg_attr(feature = "fuzzing", proptest(no_params))] +pub enum ScriptFunctionCall { + ClaimMintCapability {}, + + CreateAccount { + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + }, + + DelegateMintCapability { + addr: AccountAddress, + }, + + Mint { + addr: AccountAddress, + amount: u64, + }, + + SetGasConstants { + global_memory_per_byte_cost: u64, + global_memory_per_byte_write_cost: u64, + min_transaction_gas_units: u64, + large_transaction_cutoff: u64, + intrinsic_gas_per_byte: u64, + maximum_number_of_gas_units: u64, + min_price_per_gas_unit: u64, + max_price_per_gas_unit: u64, + max_transaction_size_in_bytes: u64, + gas_unit_scaling_factor: u64, + default_account_size: u64, + }, + + Transfer { + to: AccountAddress, + amount: u64, + }, +} + +impl ScriptFunctionCall { + /// Build a Diem `TransactionPayload` from a structured object `ScriptFunctionCall`. + pub fn encode(self) -> TransactionPayload { + use ScriptFunctionCall::*; + match self { + ClaimMintCapability {} => encode_claim_mint_capability_script_function(), + CreateAccount { + new_account_address, + auth_key_prefix, + } => encode_create_account_script_function(new_account_address, auth_key_prefix), + DelegateMintCapability { addr } => { + encode_delegate_mint_capability_script_function(addr) + } + Mint { addr, amount } => encode_mint_script_function(addr, amount), + SetGasConstants { + global_memory_per_byte_cost, + global_memory_per_byte_write_cost, + min_transaction_gas_units, + large_transaction_cutoff, + intrinsic_gas_per_byte, + maximum_number_of_gas_units, + min_price_per_gas_unit, + max_price_per_gas_unit, + max_transaction_size_in_bytes, + gas_unit_scaling_factor, + default_account_size, + } => encode_set_gas_constants_script_function( + global_memory_per_byte_cost, + global_memory_per_byte_write_cost, + min_transaction_gas_units, + large_transaction_cutoff, + intrinsic_gas_per_byte, + maximum_number_of_gas_units, + min_price_per_gas_unit, + max_price_per_gas_unit, + max_transaction_size_in_bytes, + gas_unit_scaling_factor, + default_account_size, + ), + Transfer { to, amount } => encode_transfer_script_function(to, amount), + } + } + + /// Try to recognize a Diem `TransactionPayload` and convert it into a structured object `ScriptFunctionCall`. + pub fn decode(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + match SCRIPT_FUNCTION_DECODER_MAP.get(&format!( + "{}{}", + script.module().name(), + script.function() + )) { + Some(decoder) => decoder(payload), + None => None, + } + } else { + None + } + } +} + +pub fn encode_claim_mint_capability_script_function() -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AdminScripts").to_owned(), + ), + ident_str!("claim_mint_capability").to_owned(), + vec![], + vec![], + )) +} + +pub fn encode_create_account_script_function( + new_account_address: AccountAddress, + auth_key_prefix: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("BasicScripts").to_owned(), + ), + ident_str!("create_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + ], + )) +} + +pub fn encode_delegate_mint_capability_script_function(addr: AccountAddress) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AdminScripts").to_owned(), + ), + ident_str!("delegate_mint_capability").to_owned(), + vec![], + vec![bcs::to_bytes(&addr).unwrap()], + )) +} + +pub fn encode_mint_script_function(addr: AccountAddress, amount: u64) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AdminScripts").to_owned(), + ), + ident_str!("mint").to_owned(), + vec![], + vec![ + bcs::to_bytes(&addr).unwrap(), + bcs::to_bytes(&amount).unwrap(), + ], + )) +} + +pub fn encode_set_gas_constants_script_function( + global_memory_per_byte_cost: u64, + global_memory_per_byte_write_cost: u64, + min_transaction_gas_units: u64, + large_transaction_cutoff: u64, + intrinsic_gas_per_byte: u64, + maximum_number_of_gas_units: u64, + min_price_per_gas_unit: u64, + max_price_per_gas_unit: u64, + max_transaction_size_in_bytes: u64, + gas_unit_scaling_factor: u64, + default_account_size: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AdminScripts").to_owned(), + ), + ident_str!("set_gas_constants").to_owned(), + vec![], + vec![ + bcs::to_bytes(&global_memory_per_byte_cost).unwrap(), + bcs::to_bytes(&global_memory_per_byte_write_cost).unwrap(), + bcs::to_bytes(&min_transaction_gas_units).unwrap(), + bcs::to_bytes(&large_transaction_cutoff).unwrap(), + bcs::to_bytes(&intrinsic_gas_per_byte).unwrap(), + bcs::to_bytes(&maximum_number_of_gas_units).unwrap(), + bcs::to_bytes(&min_price_per_gas_unit).unwrap(), + bcs::to_bytes(&max_price_per_gas_unit).unwrap(), + bcs::to_bytes(&max_transaction_size_in_bytes).unwrap(), + bcs::to_bytes(&gas_unit_scaling_factor).unwrap(), + bcs::to_bytes(&default_account_size).unwrap(), + ], + )) +} + +pub fn encode_transfer_script_function(to: AccountAddress, amount: u64) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("BasicScripts").to_owned(), + ), + ident_str!("transfer").to_owned(), + vec![], + vec![bcs::to_bytes(&to).unwrap(), bcs::to_bytes(&amount).unwrap()], + )) +} + +fn decode_claim_mint_capability_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(_script) = payload { + Some(ScriptFunctionCall::ClaimMintCapability {}) + } else { + None + } +} + +fn decode_create_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateAccount { + new_account_address: bcs::from_bytes(script.args().get(0)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_delegate_mint_capability_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::DelegateMintCapability { + addr: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_mint_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::Mint { + addr: bcs::from_bytes(script.args().get(0)?).ok()?, + amount: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_set_gas_constants_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::SetGasConstants { + global_memory_per_byte_cost: bcs::from_bytes(script.args().get(0)?).ok()?, + global_memory_per_byte_write_cost: bcs::from_bytes(script.args().get(1)?).ok()?, + min_transaction_gas_units: bcs::from_bytes(script.args().get(2)?).ok()?, + large_transaction_cutoff: bcs::from_bytes(script.args().get(3)?).ok()?, + intrinsic_gas_per_byte: bcs::from_bytes(script.args().get(4)?).ok()?, + maximum_number_of_gas_units: bcs::from_bytes(script.args().get(5)?).ok()?, + min_price_per_gas_unit: bcs::from_bytes(script.args().get(6)?).ok()?, + max_price_per_gas_unit: bcs::from_bytes(script.args().get(7)?).ok()?, + max_transaction_size_in_bytes: bcs::from_bytes(script.args().get(8)?).ok()?, + gas_unit_scaling_factor: bcs::from_bytes(script.args().get(9)?).ok()?, + default_account_size: bcs::from_bytes(script.args().get(10)?).ok()?, + }) + } else { + None + } +} + +fn decode_transfer_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::Transfer { + to: bcs::from_bytes(script.args().get(0)?).ok()?, + amount: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +type ScriptFunctionDecoderMap = std::collections::HashMap< + String, + Box< + dyn Fn(&TransactionPayload) -> Option + + std::marker::Sync + + std::marker::Send, + >, +>; + +static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazy = + once_cell::sync::Lazy::new(|| { + let mut map: ScriptFunctionDecoderMap = std::collections::HashMap::new(); + map.insert( + "AdminScriptsclaim_mint_capability".to_string(), + Box::new(decode_claim_mint_capability_script_function), + ); + map.insert( + "BasicScriptscreate_account".to_string(), + Box::new(decode_create_account_script_function), + ); + map.insert( + "AdminScriptsdelegate_mint_capability".to_string(), + Box::new(decode_delegate_mint_capability_script_function), + ); + map.insert( + "AdminScriptsmint".to_string(), + Box::new(decode_mint_script_function), + ); + map.insert( + "AdminScriptsset_gas_constants".to_string(), + Box::new(decode_set_gas_constants_script_function), + ); + map.insert( + "BasicScriptstransfer".to_string(), + Box::new(decode_transfer_script_function), + ); + map + }); diff --git a/sdk/transaction-builder/src/error_explain.rs b/sdk/transaction-builder/src/error_explain.rs index d3256cae31c26..84f9871b41c1f 100644 --- a/sdk/transaction-builder/src/error_explain.rs +++ b/sdk/transaction-builder/src/error_explain.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! A module for looking up the human-readable explanation of a Diem Move diff --git a/sdk/transaction-builder/src/experimental_stdlib.rs b/sdk/transaction-builder/src/experimental_stdlib.rs deleted file mode 120000 index 8ac4ebef00880..0000000000000 --- a/sdk/transaction-builder/src/experimental_stdlib.rs +++ /dev/null @@ -1 +0,0 @@ -../../../aptos-move/framework/experimental/releases/artifacts/current/transaction_script_builder.rs \ No newline at end of file diff --git a/sdk/transaction-builder/src/experimental_stdlib.rs b/sdk/transaction-builder/src/experimental_stdlib.rs new file mode 100644 index 0000000000000..950ddd90f18ef --- /dev/null +++ b/sdk/transaction-builder/src/experimental_stdlib.rs @@ -0,0 +1,1123 @@ +// Copyright (c) The Diem Core Contributors +// SPDX-License-Identifier: Apache-2.0 + +// This file was generated. Do not modify! +// +// To update this code, run: `cargo run --release -p framework`. + +//! Conversion library between a structured representation of a Move script call (`ScriptCall`) and the +//! standard BCS-compatible representation used in Diem transactions (`Script`). +//! +//! This code was generated by compiling known Script interfaces ("ABIs") with the tool `transaction-builder-generator`. + +#![allow(clippy::unnecessary_wraps)] +#![allow(unused_imports)] +use aptos_types::{ + account_address::AccountAddress, + transaction::{Script, ScriptFunction, TransactionArgument, TransactionPayload, VecBytes}, +}; +use move_core_types::{ + ident_str, + language_storage::{ModuleId, TypeTag}, +}; +use std::collections::BTreeMap as Map; + +type Bytes = Vec; + +/// Structured representation of a call into a known Move script function. +/// ```ignore +/// impl ScriptFunctionCall { +/// pub fn encode(self) -> TransactionPayload { .. } +/// pub fn decode(&TransactionPayload) -> Option { .. } +/// } +/// ``` +#[derive(Clone, Debug, PartialEq, PartialOrd)] +#[cfg_attr(feature = "fuzzing", derive(proptest_derive::Arbitrary))] +#[cfg_attr(feature = "fuzzing", proptest(no_params))] +pub enum ScriptFunctionCall { + CreateAccount { + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + }, + + /// # Summary + /// Creates a Validator account. This transaction can only be sent by the Diem + /// Root account. + /// + /// # Technical Description + /// Creates an account with a Validator role at `new_account_address`, with authentication key + /// `auth_key_prefix` | `new_account_address`. It publishes a + /// `ValidatorConfig::ValidatorConfig` resource with empty `config`, and + /// `operator_account` fields. The `human_name` field of the + /// `ValidatorConfig::ValidatorConfig` is set to the passed in `human_name`. + /// This script does not add the validator to the validator set or the system, + /// but only creates the account. + /// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// # Events + /// Successful execution will emit: + /// * A `ExperimentalAccount::CreateAccountEvent` with the `created` field being `new_account_address`, + /// and the `rold_id` field being `Roles::VALIDATOR_ROLE_ID`. This is emitted on the + /// `ExperimentalAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Validator account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the validator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + CreateValidatorAccount { + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + }, + + /// # Summary + /// Creates a Validator Operator account. This transaction can only be sent by the Diem + /// Root account. + /// + /// # Technical Description + /// Creates an account with a Validator Operator role at `new_account_address`, with authentication key + /// `auth_key_prefix` | `new_account_address`. It publishes a + /// `ValidatorOperatorConfig::ValidatorOperatorConfig` resource with the specified `human_name`. + /// This script does not assign the validator operator to any validator accounts but only creates the account. + /// Authentication key prefixes, and how to construct them from an ed25519 public key are described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// # Events + /// Successful execution will emit: + /// * A `ExperimentalAccount::CreateAccountEvent` with the `created` field being `new_account_address`, + /// and the `rold_id` field being `Roles::VALIDATOR_OPERATOR_ROLE_ID`. This is emitted on the + /// `ExperimentalAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Validator account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the validator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + CreateValidatorOperatorAccount { + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + }, + + /// gc_ballots deletes all the expired ballots of the type `Proposal` + /// under the provided address `addr`. The signer can be anybody + /// and does not need to have the same address as `addr` + GcBallots { + proposal: TypeTag, + addr: AccountAddress, + }, + + /// # Summary + /// Initializes the Diem consensus config that is stored on-chain. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Initializes the `DiemConsensusConfig` on-chain config to empty and allows future updates from DiemRoot via + /// `update_diem_consensus_config`. This doesn't emit a `Reconfiguration::NewEpochEvent`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + InitializeDiemConsensusConfig { _sliding_nonce: u64 }, + + /// BARS account mints `amount` copies of BARS tokens to the artist's account. + MintBars { + artist: AccountAddress, + artist_name: Bytes, + content_uri: Bytes, + amount: u64, + }, + + /// Initialize this module + NftInitialize {}, + + /// Call this function to set up relevant resources in order to + /// mint and receive tokens. + /// Note that this also gives BARS account a capability to mint BARS NFTs on behalf of the user. + /// (the NFTs of other types cannot be created by BARS account). + RegisterBarsUser {}, + + /// # Summary + /// Updates the gas constants stored on chain and used by the VM for gas + /// metering. This transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the on-chain config holding the `VMConfig` and emits a + /// `Reconfiguration::NewEpochEvent` to trigger a reconfiguration of the system. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `global_memory_per_byte_cost` | `u64` | The new cost to read global memory per-byte to be used for gas metering. | + /// | `global_memory_per_byte_write_cost` | `u64` | The new cost to write global memory per-byte to be used for gas metering. | + /// | `min_transaction_gas_units` | `u64` | The new flat minimum amount of gas required for any transaction. | + /// | `large_transaction_cutoff` | `u64` | The new size over which an additional charge will be assessed for each additional byte. | + /// | `intrinsic_gas_per_byte` | `u64` | The new number of units of gas that to be charged per-byte over the new `large_transaction_cutoff`. | + /// | `maximum_number_of_gas_units` | `u64` | The new maximum number of gas units that can be set in a transaction. | + /// | `min_price_per_gas_unit` | `u64` | The new minimum gas price that can be set for a transaction. | + /// | `max_price_per_gas_unit` | `u64` | The new maximum gas price that can be set for a transaction. | + /// | `max_transaction_size_in_bytes` | `u64` | The new maximum size of a transaction that can be processed. | + /// | `gas_unit_scaling_factor` | `u64` | The new scaling factor to use when scaling between external and internal gas units. | + /// | `default_account_size` | `u64` | The new default account size to use when assessing final costs for reads and writes to global storage. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_ARGUMENT` | `VMConfig::EGAS_CONSTANT_INCONSISTENCY` | The provided gas constants are inconsistent. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + SetGasConstants { + _sliding_nonce: u64, + global_memory_per_byte_cost: u64, + global_memory_per_byte_write_cost: u64, + min_transaction_gas_units: u64, + large_transaction_cutoff: u64, + intrinsic_gas_per_byte: u64, + maximum_number_of_gas_units: u64, + min_price_per_gas_unit: u64, + max_price_per_gas_unit: u64, + max_transaction_size_in_bytes: u64, + gas_unit_scaling_factor: u64, + default_account_size: u64, + }, + + /// Transfer `amount` of token with id `GUID::id(creator, creation_num)` from `owner`'s + /// balance to `to`'s balance. This operation has to be done by either the owner or an + /// approved operator of the owner. + TransferMultiTokenBetweenGalleries { + token_type: TypeTag, + to: AccountAddress, + amount: u64, + creator: AccountAddress, + creation_num: u64, + }, + + /// Transfer `amount` of token with id `GUID::id(creator, creation_num)` from `owner`'s + /// balance to `to`'s balance. This operation has to be done by either the owner or an + /// approved operator of the owner. + TransferTokenBetweenGalleries { + token_type: TypeTag, + to: AccountAddress, + amount: u64, + creator: AccountAddress, + creation_num: u64, + }, + + /// # Summary + /// Updates the Diem consensus config that is stored on-chain and is used by the Consensus. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the `DiemConsensusConfig` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger + /// a reconfiguration of the system. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `config` | `vector` | The serialized bytes of consensus config. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + UpdateDiemConsensusConfig { _sliding_nonce: u64, config: Bytes }, + + /// # Summary + /// Updates the Diem major version that is stored on-chain and is used by the VM. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the `Version` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger + /// a reconfiguration of the system. The `major` version that is passed in must be strictly greater + /// than the current major version held on-chain. The VM reads this information and can use it to + /// preserve backwards compatibility with previous major versions of the VM. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + /// | `Errors::INVALID_ARGUMENT` | `Version::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. | + UpdateDiemVersion { _sliding_nonce: u64, major: u64 }, +} + +impl ScriptFunctionCall { + /// Build a Diem `TransactionPayload` from a structured object `ScriptFunctionCall`. + pub fn encode(self) -> TransactionPayload { + use ScriptFunctionCall::*; + match self { + CreateAccount { + new_account_address, + auth_key_prefix, + } => encode_create_account_script_function(new_account_address, auth_key_prefix), + CreateValidatorAccount { + new_account_address, + auth_key_prefix, + human_name, + } => encode_create_validator_account_script_function( + new_account_address, + auth_key_prefix, + human_name, + ), + CreateValidatorOperatorAccount { + new_account_address, + auth_key_prefix, + human_name, + } => encode_create_validator_operator_account_script_function( + new_account_address, + auth_key_prefix, + human_name, + ), + GcBallots { proposal, addr } => encode_gc_ballots_script_function(proposal, addr), + InitializeDiemConsensusConfig { _sliding_nonce } => { + encode_initialize_diem_consensus_config_script_function(_sliding_nonce) + } + MintBars { + artist, + artist_name, + content_uri, + amount, + } => encode_mint_bars_script_function(artist, artist_name, content_uri, amount), + NftInitialize {} => encode_nft_initialize_script_function(), + RegisterBarsUser {} => encode_register_bars_user_script_function(), + SetGasConstants { + _sliding_nonce, + global_memory_per_byte_cost, + global_memory_per_byte_write_cost, + min_transaction_gas_units, + large_transaction_cutoff, + intrinsic_gas_per_byte, + maximum_number_of_gas_units, + min_price_per_gas_unit, + max_price_per_gas_unit, + max_transaction_size_in_bytes, + gas_unit_scaling_factor, + default_account_size, + } => encode_set_gas_constants_script_function( + _sliding_nonce, + global_memory_per_byte_cost, + global_memory_per_byte_write_cost, + min_transaction_gas_units, + large_transaction_cutoff, + intrinsic_gas_per_byte, + maximum_number_of_gas_units, + min_price_per_gas_unit, + max_price_per_gas_unit, + max_transaction_size_in_bytes, + gas_unit_scaling_factor, + default_account_size, + ), + TransferMultiTokenBetweenGalleries { + token_type, + to, + amount, + creator, + creation_num, + } => encode_transfer_multi_token_between_galleries_script_function( + token_type, + to, + amount, + creator, + creation_num, + ), + TransferTokenBetweenGalleries { + token_type, + to, + amount, + creator, + creation_num, + } => encode_transfer_token_between_galleries_script_function( + token_type, + to, + amount, + creator, + creation_num, + ), + UpdateDiemConsensusConfig { + _sliding_nonce, + config, + } => encode_update_diem_consensus_config_script_function(_sliding_nonce, config), + UpdateDiemVersion { + _sliding_nonce, + major, + } => encode_update_diem_version_script_function(_sliding_nonce, major), + } + } + + /// Try to recognize a Diem `TransactionPayload` and convert it into a structured object `ScriptFunctionCall`. + pub fn decode(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + match SCRIPT_FUNCTION_DECODER_MAP.get(&format!( + "{}{}", + script.module().name(), + script.function() + )) { + Some(decoder) => decoder(payload), + None => None, + } + } else { + None + } + } +} + +pub fn encode_create_account_script_function( + new_account_address: AccountAddress, + auth_key_prefix: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + ], + )) +} + +/// # Summary +/// Creates a Validator account. This transaction can only be sent by the Diem +/// Root account. +/// +/// # Technical Description +/// Creates an account with a Validator role at `new_account_address`, with authentication key +/// `auth_key_prefix` | `new_account_address`. It publishes a +/// `ValidatorConfig::ValidatorConfig` resource with empty `config`, and +/// `operator_account` fields. The `human_name` field of the +/// `ValidatorConfig::ValidatorConfig` is set to the passed in `human_name`. +/// This script does not add the validator to the validator set or the system, +/// but only creates the account. +/// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// # Events +/// Successful execution will emit: +/// * A `ExperimentalAccount::CreateAccountEvent` with the `created` field being `new_account_address`, +/// and the `rold_id` field being `Roles::VALIDATOR_ROLE_ID`. This is emitted on the +/// `ExperimentalAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Validator account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the validator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_create_validator_account_script_function( + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_validator_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&human_name).unwrap(), + ], + )) +} + +/// # Summary +/// Creates a Validator Operator account. This transaction can only be sent by the Diem +/// Root account. +/// +/// # Technical Description +/// Creates an account with a Validator Operator role at `new_account_address`, with authentication key +/// `auth_key_prefix` | `new_account_address`. It publishes a +/// `ValidatorOperatorConfig::ValidatorOperatorConfig` resource with the specified `human_name`. +/// This script does not assign the validator operator to any validator accounts but only creates the account. +/// Authentication key prefixes, and how to construct them from an ed25519 public key are described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// # Events +/// Successful execution will emit: +/// * A `ExperimentalAccount::CreateAccountEvent` with the `created` field being `new_account_address`, +/// and the `rold_id` field being `Roles::VALIDATOR_OPERATOR_ROLE_ID`. This is emitted on the +/// `ExperimentalAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Validator account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the validator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_create_validator_operator_account_script_function( + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_validator_operator_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&human_name).unwrap(), + ], + )) +} + +/// gc_ballots deletes all the expired ballots of the type `Proposal` +/// under the provided address `addr`. The signer can be anybody +/// and does not need to have the same address as `addr` +pub fn encode_gc_ballots_script_function( + proposal: TypeTag, + addr: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("Vote").to_owned(), + ), + ident_str!("gc_ballots").to_owned(), + vec![proposal], + vec![bcs::to_bytes(&addr).unwrap()], + )) +} + +/// # Summary +/// Initializes the Diem consensus config that is stored on-chain. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Initializes the `DiemConsensusConfig` on-chain config to empty and allows future updates from DiemRoot via +/// `update_diem_consensus_config`. This doesn't emit a `Reconfiguration::NewEpochEvent`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +pub fn encode_initialize_diem_consensus_config_script_function( + _sliding_nonce: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("initialize_diem_consensus_config").to_owned(), + vec![], + vec![bcs::to_bytes(&_sliding_nonce).unwrap()], + )) +} + +/// BARS account mints `amount` copies of BARS tokens to the artist's account. +pub fn encode_mint_bars_script_function( + artist: AccountAddress, + artist_name: Vec, + content_uri: Vec, + amount: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("BARSToken").to_owned(), + ), + ident_str!("mint_bars").to_owned(), + vec![], + vec![ + bcs::to_bytes(&artist).unwrap(), + bcs::to_bytes(&artist_name).unwrap(), + bcs::to_bytes(&content_uri).unwrap(), + bcs::to_bytes(&amount).unwrap(), + ], + )) +} + +/// Initialize this module +pub fn encode_nft_initialize_script_function() -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("NFT").to_owned(), + ), + ident_str!("nft_initialize").to_owned(), + vec![], + vec![], + )) +} + +/// Call this function to set up relevant resources in order to +/// mint and receive tokens. +/// Note that this also gives BARS account a capability to mint BARS NFTs on behalf of the user. +/// (the NFTs of other types cannot be created by BARS account). +pub fn encode_register_bars_user_script_function() -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("BARSToken").to_owned(), + ), + ident_str!("register_bars_user").to_owned(), + vec![], + vec![], + )) +} + +/// # Summary +/// Updates the gas constants stored on chain and used by the VM for gas +/// metering. This transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the on-chain config holding the `VMConfig` and emits a +/// `Reconfiguration::NewEpochEvent` to trigger a reconfiguration of the system. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `global_memory_per_byte_cost` | `u64` | The new cost to read global memory per-byte to be used for gas metering. | +/// | `global_memory_per_byte_write_cost` | `u64` | The new cost to write global memory per-byte to be used for gas metering. | +/// | `min_transaction_gas_units` | `u64` | The new flat minimum amount of gas required for any transaction. | +/// | `large_transaction_cutoff` | `u64` | The new size over which an additional charge will be assessed for each additional byte. | +/// | `intrinsic_gas_per_byte` | `u64` | The new number of units of gas that to be charged per-byte over the new `large_transaction_cutoff`. | +/// | `maximum_number_of_gas_units` | `u64` | The new maximum number of gas units that can be set in a transaction. | +/// | `min_price_per_gas_unit` | `u64` | The new minimum gas price that can be set for a transaction. | +/// | `max_price_per_gas_unit` | `u64` | The new maximum gas price that can be set for a transaction. | +/// | `max_transaction_size_in_bytes` | `u64` | The new maximum size of a transaction that can be processed. | +/// | `gas_unit_scaling_factor` | `u64` | The new scaling factor to use when scaling between external and internal gas units. | +/// | `default_account_size` | `u64` | The new default account size to use when assessing final costs for reads and writes to global storage. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_ARGUMENT` | `VMConfig::EGAS_CONSTANT_INCONSISTENCY` | The provided gas constants are inconsistent. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +pub fn encode_set_gas_constants_script_function( + _sliding_nonce: u64, + global_memory_per_byte_cost: u64, + global_memory_per_byte_write_cost: u64, + min_transaction_gas_units: u64, + large_transaction_cutoff: u64, + intrinsic_gas_per_byte: u64, + maximum_number_of_gas_units: u64, + min_price_per_gas_unit: u64, + max_price_per_gas_unit: u64, + max_transaction_size_in_bytes: u64, + gas_unit_scaling_factor: u64, + default_account_size: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("set_gas_constants").to_owned(), + vec![], + vec![ + bcs::to_bytes(&_sliding_nonce).unwrap(), + bcs::to_bytes(&global_memory_per_byte_cost).unwrap(), + bcs::to_bytes(&global_memory_per_byte_write_cost).unwrap(), + bcs::to_bytes(&min_transaction_gas_units).unwrap(), + bcs::to_bytes(&large_transaction_cutoff).unwrap(), + bcs::to_bytes(&intrinsic_gas_per_byte).unwrap(), + bcs::to_bytes(&maximum_number_of_gas_units).unwrap(), + bcs::to_bytes(&min_price_per_gas_unit).unwrap(), + bcs::to_bytes(&max_price_per_gas_unit).unwrap(), + bcs::to_bytes(&max_transaction_size_in_bytes).unwrap(), + bcs::to_bytes(&gas_unit_scaling_factor).unwrap(), + bcs::to_bytes(&default_account_size).unwrap(), + ], + )) +} + +/// Transfer `amount` of token with id `GUID::id(creator, creation_num)` from `owner`'s +/// balance to `to`'s balance. This operation has to be done by either the owner or an +/// approved operator of the owner. +pub fn encode_transfer_multi_token_between_galleries_script_function( + token_type: TypeTag, + to: AccountAddress, + amount: u64, + creator: AccountAddress, + creation_num: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("MultiTokenBalance").to_owned(), + ), + ident_str!("transfer_multi_token_between_galleries").to_owned(), + vec![token_type], + vec![ + bcs::to_bytes(&to).unwrap(), + bcs::to_bytes(&amount).unwrap(), + bcs::to_bytes(&creator).unwrap(), + bcs::to_bytes(&creation_num).unwrap(), + ], + )) +} + +/// Transfer `amount` of token with id `GUID::id(creator, creation_num)` from `owner`'s +/// balance to `to`'s balance. This operation has to be done by either the owner or an +/// approved operator of the owner. +pub fn encode_transfer_token_between_galleries_script_function( + token_type: TypeTag, + to: AccountAddress, + amount: u64, + creator: AccountAddress, + creation_num: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("NFTGallery").to_owned(), + ), + ident_str!("transfer_token_between_galleries").to_owned(), + vec![token_type], + vec![ + bcs::to_bytes(&to).unwrap(), + bcs::to_bytes(&amount).unwrap(), + bcs::to_bytes(&creator).unwrap(), + bcs::to_bytes(&creation_num).unwrap(), + ], + )) +} + +/// # Summary +/// Updates the Diem consensus config that is stored on-chain and is used by the Consensus. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the `DiemConsensusConfig` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger +/// a reconfiguration of the system. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `config` | `vector` | The serialized bytes of consensus config. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +pub fn encode_update_diem_consensus_config_script_function( + _sliding_nonce: u64, + config: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("update_diem_consensus_config").to_owned(), + vec![], + vec![ + bcs::to_bytes(&_sliding_nonce).unwrap(), + bcs::to_bytes(&config).unwrap(), + ], + )) +} + +/// # Summary +/// Updates the Diem major version that is stored on-chain and is used by the VM. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the `Version` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger +/// a reconfiguration of the system. The `major` version that is passed in must be strictly greater +/// than the current major version held on-chain. The VM reads this information and can use it to +/// preserve backwards compatibility with previous major versions of the VM. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `_sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +/// | `Errors::INVALID_ARGUMENT` | `Version::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. | +pub fn encode_update_diem_version_script_function( + _sliding_nonce: u64, + major: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("update_diem_version").to_owned(), + vec![], + vec![ + bcs::to_bytes(&_sliding_nonce).unwrap(), + bcs::to_bytes(&major).unwrap(), + ], + )) +} + +fn decode_create_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateAccount { + new_account_address: bcs::from_bytes(script.args().get(0)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_validator_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateValidatorAccount { + new_account_address: bcs::from_bytes(script.args().get(0)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(1)?).ok()?, + human_name: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_validator_operator_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateValidatorOperatorAccount { + new_account_address: bcs::from_bytes(script.args().get(0)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(1)?).ok()?, + human_name: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_gc_ballots_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::GcBallots { + proposal: script.ty_args().get(0)?.clone(), + addr: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_initialize_diem_consensus_config_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::InitializeDiemConsensusConfig { + _sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_mint_bars_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::MintBars { + artist: bcs::from_bytes(script.args().get(0)?).ok()?, + artist_name: bcs::from_bytes(script.args().get(1)?).ok()?, + content_uri: bcs::from_bytes(script.args().get(2)?).ok()?, + amount: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_nft_initialize_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(_script) = payload { + Some(ScriptFunctionCall::NftInitialize {}) + } else { + None + } +} + +fn decode_register_bars_user_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(_script) = payload { + Some(ScriptFunctionCall::RegisterBarsUser {}) + } else { + None + } +} + +fn decode_set_gas_constants_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::SetGasConstants { + _sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + global_memory_per_byte_cost: bcs::from_bytes(script.args().get(1)?).ok()?, + global_memory_per_byte_write_cost: bcs::from_bytes(script.args().get(2)?).ok()?, + min_transaction_gas_units: bcs::from_bytes(script.args().get(3)?).ok()?, + large_transaction_cutoff: bcs::from_bytes(script.args().get(4)?).ok()?, + intrinsic_gas_per_byte: bcs::from_bytes(script.args().get(5)?).ok()?, + maximum_number_of_gas_units: bcs::from_bytes(script.args().get(6)?).ok()?, + min_price_per_gas_unit: bcs::from_bytes(script.args().get(7)?).ok()?, + max_price_per_gas_unit: bcs::from_bytes(script.args().get(8)?).ok()?, + max_transaction_size_in_bytes: bcs::from_bytes(script.args().get(9)?).ok()?, + gas_unit_scaling_factor: bcs::from_bytes(script.args().get(10)?).ok()?, + default_account_size: bcs::from_bytes(script.args().get(11)?).ok()?, + }) + } else { + None + } +} + +fn decode_transfer_multi_token_between_galleries_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::TransferMultiTokenBetweenGalleries { + token_type: script.ty_args().get(0)?.clone(), + to: bcs::from_bytes(script.args().get(0)?).ok()?, + amount: bcs::from_bytes(script.args().get(1)?).ok()?, + creator: bcs::from_bytes(script.args().get(2)?).ok()?, + creation_num: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_transfer_token_between_galleries_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::TransferTokenBetweenGalleries { + token_type: script.ty_args().get(0)?.clone(), + to: bcs::from_bytes(script.args().get(0)?).ok()?, + amount: bcs::from_bytes(script.args().get(1)?).ok()?, + creator: bcs::from_bytes(script.args().get(2)?).ok()?, + creation_num: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_diem_consensus_config_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateDiemConsensusConfig { + _sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + config: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_diem_version_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateDiemVersion { + _sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + major: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +type ScriptFunctionDecoderMap = std::collections::HashMap< + String, + Box< + dyn Fn(&TransactionPayload) -> Option + + std::marker::Sync + + std::marker::Send, + >, +>; + +static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazy = + once_cell::sync::Lazy::new(|| { + let mut map: ScriptFunctionDecoderMap = std::collections::HashMap::new(); + map.insert( + "AccountCreationScriptscreate_account".to_string(), + Box::new(decode_create_account_script_function), + ); + map.insert( + "AccountCreationScriptscreate_validator_account".to_string(), + Box::new(decode_create_validator_account_script_function), + ); + map.insert( + "AccountCreationScriptscreate_validator_operator_account".to_string(), + Box::new(decode_create_validator_operator_account_script_function), + ); + map.insert( + "Votegc_ballots".to_string(), + Box::new(decode_gc_ballots_script_function), + ); + map.insert( + "SystemAdministrationScriptsinitialize_diem_consensus_config".to_string(), + Box::new(decode_initialize_diem_consensus_config_script_function), + ); + map.insert( + "BARSTokenmint_bars".to_string(), + Box::new(decode_mint_bars_script_function), + ); + map.insert( + "NFTnft_initialize".to_string(), + Box::new(decode_nft_initialize_script_function), + ); + map.insert( + "BARSTokenregister_bars_user".to_string(), + Box::new(decode_register_bars_user_script_function), + ); + map.insert( + "SystemAdministrationScriptsset_gas_constants".to_string(), + Box::new(decode_set_gas_constants_script_function), + ); + map.insert( + "MultiTokenBalancetransfer_multi_token_between_galleries".to_string(), + Box::new(decode_transfer_multi_token_between_galleries_script_function), + ); + map.insert( + "NFTGallerytransfer_token_between_galleries".to_string(), + Box::new(decode_transfer_token_between_galleries_script_function), + ); + map.insert( + "SystemAdministrationScriptsupdate_diem_consensus_config".to_string(), + Box::new(decode_update_diem_consensus_config_script_function), + ); + map.insert( + "SystemAdministrationScriptsupdate_diem_version".to_string(), + Box::new(decode_update_diem_version_script_function), + ); + map + }); diff --git a/sdk/transaction-builder/src/lib.rs b/sdk/transaction-builder/src/lib.rs index 5b3e151c212f8..716649015bd3a 100644 --- a/sdk/transaction-builder/src/lib.rs +++ b/sdk/transaction-builder/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/sdk/transaction-builder/src/stdlib.rs b/sdk/transaction-builder/src/stdlib.rs deleted file mode 120000 index cb6e283ca3631..0000000000000 --- a/sdk/transaction-builder/src/stdlib.rs +++ /dev/null @@ -1 +0,0 @@ -../../../aptos-move/framework/DPN/releases/artifacts/current/transaction_script_builder.rs \ No newline at end of file diff --git a/sdk/transaction-builder/src/stdlib.rs b/sdk/transaction-builder/src/stdlib.rs new file mode 100644 index 0000000000000..9657922823331 --- /dev/null +++ b/sdk/transaction-builder/src/stdlib.rs @@ -0,0 +1,9251 @@ +// Copyright (c) The Diem Core Contributors +// SPDX-License-Identifier: Apache-2.0 + +// This file was generated. Do not modify! +// +// To update this code, run: `cargo run --release -p framework`. + +//! Conversion library between a structured representation of a Move script call (`ScriptCall`) and the +//! standard BCS-compatible representation used in Diem transactions (`Script`). +//! +//! This code was generated by compiling known Script interfaces ("ABIs") with the tool `transaction-builder-generator`. + +#![allow(clippy::unnecessary_wraps)] +#![allow(unused_imports)] +use aptos_types::{ + account_address::AccountAddress, + transaction::{Script, ScriptFunction, TransactionArgument, TransactionPayload, VecBytes}, +}; +use move_core_types::{ + ident_str, + language_storage::{ModuleId, TypeTag}, +}; +use std::collections::BTreeMap as Map; + +type Bytes = Vec; + +/// Structured representation of a call into a known Move script. +/// ```ignore +/// impl ScriptCall { +/// pub fn encode(self) -> Script { .. } +/// pub fn decode(&Script) -> Option { .. } +/// } +/// ``` +#[derive(Clone, Debug, PartialEq, PartialOrd)] +#[cfg_attr(feature = "fuzzing", derive(proptest_derive::Arbitrary))] +#[cfg_attr(feature = "fuzzing", proptest(no_params))] +pub enum ScriptCall { + /// # Summary + /// Adds a zero `Currency` balance to the sending `account`. This will enable `account` to + /// send, receive, and hold `Diem::Diem` coins. This transaction can be + /// successfully sent by any account that is allowed to hold balances + /// (e.g., VASP, Designated Dealer). + /// + /// # Technical Description + /// After the successful execution of this transaction the sending account will have a + /// `DiemAccount::Balance` resource with zero balance published under it. Only + /// accounts that can hold balances can send this transaction, the sending account cannot + /// already have a `DiemAccount::Balance` published under it. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` being added to the sending account of the transaction. `Currency` must be an already-registered currency on-chain. | + /// | `account` | `&signer` | The signer of the sending account of the transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. | + /// | `Errors::ALREADY_PUBLISHED` | `DiemAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. | + /// + /// # Related Scripts + /// * `Script::create_child_vasp_account` + /// * `Script::create_parent_vasp_account` + /// * `Script::peer_to_peer_with_metadata` + AddCurrencyToAccount { currency: TypeTag }, + + /// # Summary + /// Stores the sending accounts ability to rotate its authentication key with a designated recovery + /// account. Both the sending and recovery accounts need to belong to the same VASP and + /// both be VASP accounts. After this transaction both the sending account and the + /// specified recovery account can rotate the sender account's authentication key. + /// + /// # Technical Description + /// Adds the `DiemAccount::KeyRotationCapability` for the sending account + /// (`to_recover_account`) to the `RecoveryAddress::RecoveryAddress` resource under + /// `recovery_address`. After this transaction has been executed successfully the account at + /// `recovery_address` and the `to_recover_account` may rotate the authentication key of + /// `to_recover_account` (the sender of this transaction). + /// + /// The sending account of this transaction (`to_recover_account`) must not have previously given away its unique key + /// rotation capability, and must be a VASP account. The account at `recovery_address` + /// must also be a VASP account belonging to the same VASP as the `to_recover_account`. + /// Additionally the account at `recovery_address` must have already initialized itself as + /// a recovery account address using the `Script::create_recovery_address` transaction script. + /// + /// The sending account's (`to_recover_account`) key rotation capability is + /// removed in this transaction and stored in the `RecoveryAddress::RecoveryAddress` + /// resource stored under the account at `recovery_address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `to_recover_account` | `&signer` | The signer reference of the sending account of this transaction. | + /// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `DiemAccount::KeyRotationCapability` will be stored. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EINVALID_KEY_ROTATION_DELEGATION` | `to_recover_account` and `recovery_address` do not belong to the same VASP. | + /// | `Errors::LIMIT_EXCEEDED` | ` RecoveryAddress::EMAX_KEYS_REGISTERED` | `RecoveryAddress::MAX_REGISTERED_KEYS` have already been registered with this `recovery_address`. | + /// + /// # Related Scripts + /// * `Script::create_recovery_address` + /// * `Script::rotate_authentication_key_with_recovery_address` + AddRecoveryRotationCapability { recovery_address: AccountAddress }, + + /// # Summary + /// Adds a validator account to the validator set, and triggers a + /// reconfiguration of the system to admit the account to the validator set for the system. This + /// transaction can only be successfully called by the Diem Root account. + /// + /// # Technical Description + /// This script adds the account at `validator_address` to the validator set. + /// This transaction emits a `DiemConfig::NewEpochEvent` event and triggers a + /// reconfiguration. Once the reconfiguration triggered by this script's + /// execution has been performed, the account at the `validator_address` is + /// considered to be a validator in the network. + /// + /// This transaction script will fail if the `validator_address` address is already in the validator set + /// or does not have a `ValidatorConfig::ValidatorConfig` resource already published under it. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | + /// | `validator_address` | `address` | The validator account address to be added to the validator set. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | + /// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. | + /// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. | + /// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::create_validator_operator_account` + /// * `Script::register_validator_config` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::set_validator_config_and_reconfigure` + AddValidatorAndReconfigure { + sliding_nonce: u64, + validator_name: Bytes, + validator_address: AccountAddress, + }, + + /// # Summary + /// Burns all coins held in the preburn resource at the specified + /// preburn address and removes them from the system. The sending account must + /// be the Treasury Compliance account. + /// The account that holds the preburn resource will normally be a Designated + /// Dealer, but there are no enforced requirements that it be one. + /// + /// # Technical Description + /// This transaction permanently destroys all the coins of `Token` type + /// stored in the `Diem::Preburn` resource published under the + /// `preburn_address` account address. + /// + /// This transaction will only succeed if the sending `account` has a + /// `Diem::BurnCapability`, and a `Diem::Preburn` resource + /// exists under `preburn_address`, with a non-zero `to_burn` field. After the successful execution + /// of this transaction the `total_value` field in the + /// `Diem::CurrencyInfo` resource published under `0xA550C18` will be + /// decremented by the value of the `to_burn` field of the preburn resource + /// under `preburn_address` immediately before this transaction, and the + /// `to_burn` field of the preburn resource will have a zero value. + /// + /// ## Events + /// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle + /// held in the `Diem::CurrencyInfo` resource's `burn_events` published under + /// `0xA550C18`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Token` | Type | The Move type for the `Token` currency being burned. `Token` must be an already-registered currency on-chain. | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction, must have a burn capability for `Token` published under it. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | + /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_EMPTY` | The `Diem::Preburn` resource is empty (has a value of 0). | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | + /// + /// # Related Scripts + /// * `Script::burn_txn_fees` + /// * `Script::cancel_burn` + /// * `Script::preburn` + Burn { + token: TypeTag, + sliding_nonce: u64, + preburn_address: AccountAddress, + }, + + /// # Summary + /// Burns the transaction fees collected in the `CoinType` currency so that the + /// Diem association may reclaim the backing coins off-chain. May only be sent + /// by the Treasury Compliance account. + /// + /// # Technical Description + /// Burns the transaction fees collected in `CoinType` so that the + /// association may reclaim the backing coins. Once this transaction has executed + /// successfully all transaction fees that will have been collected in + /// `CoinType` since the last time this script was called with that specific + /// currency. Both `balance` and `preburn` fields in the + /// `TransactionFee::TransactionFee` resource published under the `0xB1E55ED` + /// account address will have a value of 0 after the successful execution of this script. + /// + /// ## Events + /// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle + /// held in the `Diem::CurrencyInfo` resource's `burn_events` published under + /// `0xA550C18`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` being added to the sending account of the transaction. `CoinType` must be an already-registered currency on-chain. | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `TransactionFee::ETRANSACTION_FEE` | `CoinType` is not an accepted transaction fee currency. | + /// | `Errors::INVALID_ARGUMENT` | `Diem::ECOIN` | The collected fees in `CoinType` are zero. | + /// + /// # Related Scripts + /// * `Script::burn` + /// * `Script::cancel_burn` + BurnTxnFees { coin_type: TypeTag }, + + /// # Summary + /// Cancels and returns all coins held in the preburn area under + /// `preburn_address` and returns the funds to the `preburn_address`'s balance. + /// Can only be successfully sent by an account with Treasury Compliance role. + /// + /// # Technical Description + /// Cancels and returns all coins held in the `Diem::Preburn` resource under the `preburn_address` and + /// return the funds to the `preburn_address` account's `DiemAccount::Balance`. + /// The transaction must be sent by an `account` with a `Diem::BurnCapability` + /// resource published under it. The account at `preburn_address` must have a + /// `Diem::Preburn` resource published under it, and its value must be nonzero. The transaction removes + /// the entire balance held in the `Diem::Preburn` resource, and returns it back to the account's + /// `DiemAccount::Balance` under `preburn_address`. Due to this, the account at + /// `preburn_address` must already have a balance in the `Token` currency published + /// before this script is called otherwise the transaction will fail. + /// + /// ## Events + /// The successful execution of this transaction will emit: + /// * A `Diem::CancelBurnEvent` on the event handle held in the `Diem::CurrencyInfo` + /// resource's `burn_events` published under `0xA550C18`. + /// * A `DiemAccount::ReceivedPaymentEvent` on the `preburn_address`'s + /// `DiemAccount::DiemAccount` `received_events` event handle with both the `payer` and `payee` + /// being `preburn_address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Token` | Type | The Move type for the `Token` currenty that burning is being cancelled for. `Token` must be an already-registered currency on-chain. | + /// | `account` | `&signer` | The signer reference of the sending account of this transaction, must have a burn capability for `Token` published under it. | + /// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | + /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | The value held in the preburn resource was zero. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. | + /// | `Errors::INVALID_STATE` | `DualAttestation::EPAYEE_COMPLIANCE_KEY_NOT_SET` | The `account` does not have a compliance key set on it but dual attestion checking was performed. | + /// + /// # Related Scripts + /// * `Script::burn_txn_fees` + /// * `Script::burn` + /// * `Script::preburn` + CancelBurn { + token: TypeTag, + preburn_address: AccountAddress, + }, + + /// # Summary + /// Creates a Child VASP account with its parent being the sending account of the transaction. + /// The sender of the transaction must be a Parent VASP account. + /// + /// # Technical Description + /// Creates a `ChildVASP` account for the sender `parent_vasp` at `child_address` with a balance of + /// `child_initial_balance` in `CoinType` and an initial authentication key of + /// `auth_key_prefix | child_address`. + /// + /// If `add_all_currencies` is true, the child address will have a zero balance in all available + /// currencies in the system. + /// + /// The new account will be a child account of the transaction sender, which must be a + /// Parent VASP account. The child account will be recorded against the limit of + /// child accounts of the creating Parent VASP account. + /// + /// ## Events + /// Successful execution with a `child_initial_balance` greater than zero will emit: + /// * A `DiemAccount::SentPaymentEvent` with the `payer` field being the Parent VASP's address, + /// and payee field being `child_address`. This is emitted on the Parent VASP's + /// `DiemAccount::DiemAccount` `sent_events` handle. + /// * A `DiemAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address, + /// and payee field being `child_address`. This is emitted on the new Child VASPS's + /// `DiemAccount::DiemAccount` `received_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` that the child account should be created with. `CoinType` must be an already-registered currency on-chain. | + /// | `parent_vasp` | `&signer` | The signer reference of the sending account. Must be a Parent VASP account. | + /// | `child_address` | `address` | Address of the to-be-created Child VASP account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | + /// | `child_initial_balance` | `u64` | The initial balance in `CoinType` to give the child account when it's created. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending account wasn't a Parent VASP account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `child_address` address is already taken. | + /// | `Errors::LIMIT_EXCEEDED` | `VASP::ETOO_MANY_CHILDREN` | The sending account has reached the maximum number of allowed child accounts. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | + /// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. | + /// + /// # Related Scripts + /// * `Script::create_parent_vasp_account` + /// * `Script::add_currency_to_account` + /// * `Script::rotate_authentication_key` + /// * `Script::add_recovery_rotation_capability` + /// * `Script::create_recovery_address` + CreateChildVaspAccount { + coin_type: TypeTag, + child_address: AccountAddress, + auth_key_prefix: Bytes, + add_all_currencies: bool, + child_initial_balance: u64, + }, + + /// # Summary + /// Creates a Designated Dealer account with the provided information, and initializes it with + /// default mint tiers. The transaction can only be sent by the Treasury Compliance account. + /// + /// # Technical Description + /// Creates an account with the Designated Dealer role at `addr` with authentication key + /// `auth_key_prefix` | `addr` and a 0 balance of type `Currency`. If `add_all_currencies` is true, + /// 0 balances for all available currencies in the system will also be added. This can only be + /// invoked by an account with the TreasuryCompliance role. + /// + /// At the time of creation the account is also initialized with default mint tiers of (500_000, + /// 5000_000, 50_000_000, 500_000_000), and preburn areas for each currency that is added to the + /// account. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` that the Designated Dealer should be initialized with. `Currency` must be an already-registered currency on-chain. | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `addr` | `address` | Address of the to-be-created Designated Dealer account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the Designated Dealer. | + /// | `add_all_currencies` | `bool` | Whether to publish preburn, balance, and tier info resources for all known (SCS) currencies or just `Currency` when the account is created. | + /// + + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `addr` address is already taken. | + /// + /// # Related Scripts + /// * `Script::tiered_mint` + /// * `Script::peer_to_peer_with_metadata` + /// * `Script::rotate_dual_attestation_info` + CreateDesignatedDealer { + currency: TypeTag, + sliding_nonce: u64, + addr: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + add_all_currencies: bool, + }, + + /// # Summary + /// Creates a Parent VASP account with the specified human name. Must be called by the Treasury Compliance account. + /// + /// # Technical Description + /// Creates an account with the Parent VASP role at `address` with authentication key + /// `auth_key_prefix` | `new_account_address` and a 0 balance of type `CoinType`. If + /// `add_all_currencies` is true, 0 balances for all available currencies in the system will + /// also be added. This can only be invoked by an TreasuryCompliance account. + /// `sliding_nonce` is a unique nonce for operation, see `SlidingNonce` for details. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` currency that the Parent VASP account should be initialized with. `CoinType` must be an already-registered currency on-chain. | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Parent VASP account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the Parent VASP. | + /// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `Script::create_child_vasp_account` + /// * `Script::add_currency_to_account` + /// * `Script::rotate_authentication_key` + /// * `Script::add_recovery_rotation_capability` + /// * `Script::create_recovery_address` + /// * `Script::rotate_dual_attestation_info` + CreateParentVaspAccount { + coin_type: TypeTag, + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + add_all_currencies: bool, + }, + + /// # Summary + /// Initializes the sending account as a recovery address that may be used by + /// the VASP that it belongs to. The sending account must be a VASP account. + /// Multiple recovery addresses can exist for a single VASP, but accounts in + /// each must be disjoint. + /// + /// # Technical Description + /// Publishes a `RecoveryAddress::RecoveryAddress` resource under `account`. It then + /// extracts the `DiemAccount::KeyRotationCapability` for `account` and adds + /// it to the resource. After the successful execution of this transaction + /// other accounts may add their key rotation to this resource so that `account` + /// may be used as a recovery account for those accounts. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | The signer of the sending account of the transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ENOT_A_VASP` | `account` is not a VASP account. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EKEY_ROTATION_DEPENDENCY_CYCLE` | A key rotation recovery cycle would be created by adding `account`'s key rotation capability. | + /// | `Errors::ALREADY_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | A `RecoveryAddress::RecoveryAddress` resource has already been published under `account`. | + /// + /// # Related Scripts + /// * `Script::add_recovery_rotation_capability` + /// * `Script::rotate_authentication_key_with_recovery_address` + CreateRecoveryAddress {}, + + /// # Summary + /// Creates a Validator account. This transaction can only be sent by the Diem + /// Root account. + /// + /// # Technical Description + /// Creates an account with a Validator role at `new_account_address`, with authentication key + /// `auth_key_prefix` | `new_account_address`. It publishes a + /// `ValidatorConfig::ValidatorConfig` resource with empty `config`, and + /// `operator_account` fields. The `human_name` field of the + /// `ValidatorConfig::ValidatorConfig` is set to the passed in `human_name`. + /// This script does not add the validator to the validator set or the system, + /// but only creates the account. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Validator account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the validator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `Script::add_validator_and_reconfigure` + /// * `Script::create_validator_operator_account` + /// * `Script::register_validator_config` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::set_validator_config_and_reconfigure` + CreateValidatorAccount { + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + }, + + /// # Summary + /// Creates a Validator Operator account. This transaction can only be sent by the Diem + /// Root account. + /// + /// # Technical Description + /// Creates an account with a Validator Operator role at `new_account_address`, with authentication key + /// `auth_key_prefix` | `new_account_address`. It publishes a + /// `ValidatorOperatorConfig::ValidatorOperatorConfig` resource with the specified `human_name`. + /// This script does not assign the validator operator to any validator accounts but only creates the account. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Validator account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the validator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::add_validator_and_reconfigure` + /// * `Script::register_validator_config` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::set_validator_config_and_reconfigure` + CreateValidatorOperatorAccount { + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + }, + + /// # Summary + /// Freezes the account at `address`. The sending account of this transaction + /// must be the Treasury Compliance account. The account being frozen cannot be + /// the Diem Root or Treasury Compliance account. After the successful + /// execution of this transaction no transactions may be sent from the frozen + /// account, and the frozen account may not send or receive coins. + /// + /// # Technical Description + /// Sets the `AccountFreezing::FreezingBit` to `true` and emits a + /// `AccountFreezing::FreezeAccountEvent`. The transaction sender must be the + /// Treasury Compliance account, but the account at `to_freeze_account` must + /// not be either `0xA550C18` (the Diem Root address), or `0xB1E55ED` (the + /// Treasury Compliance address). Note that this is a per-account property + /// e.g., freezing a Parent VASP will not effect the status any of its child + /// accounts and vice versa. + /// + + /// ## Events + /// Successful execution of this transaction will emit a `AccountFreezing::FreezeAccountEvent` on + /// the `freeze_event_handle` held in the `AccountFreezing::FreezeEventsHolder` resource published + /// under `0xA550C18` with the `frozen_address` being the `to_freeze_account`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `to_freeze_account` | `address` | The account address to be frozen. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_TC` | `to_freeze_account` was the Treasury Compliance account (`0xB1E55ED`). | + /// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_DIEM_ROOT` | `to_freeze_account` was the Diem Root account (`0xA550C18`). | + /// + /// # Related Scripts + /// * `Script::unfreeze_account` + FreezeAccount { + sliding_nonce: u64, + to_freeze_account: AccountAddress, + }, + + /// # Summary + /// Transfers a given number of coins in a specified currency from one account to another. + /// Transfers over a specified amount defined on-chain that are between two different VASPs, or + /// other accounts that have opted-in will be subject to on-chain checks to ensure the receiver has + /// agreed to receive the coins. This transaction can be sent by any account that can hold a + /// balance, and to any account that can hold a balance. Both accounts must hold balances in the + /// currency being transacted. + /// + /// # Technical Description + /// + /// Transfers `amount` coins of type `Currency` from `payer` to `payee` with (optional) associated + /// `metadata` and an (optional) `metadata_signature` on the message + /// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`. + /// The `metadata` and `metadata_signature` parameters are only required if `amount` >= + /// `DualAttestation::get_cur_microdiem_limit` XDX and `payer` and `payee` are distinct VASPs. + /// However, a transaction sender can opt in to dual attestation even when it is not required + /// (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. + /// Standardized `metadata` BCS format can be found in `diem_types::transaction::metadata::Metadata`. + /// + /// ## Events + /// Successful execution of this script emits two events: + /// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and + /// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` being sent in this transaction. `Currency` must be an already-registered currency on-chain. | + /// | `payer` | `&signer` | The signer reference of the sending account that coins are being transferred from. | + /// | `payee` | `address` | The address of the account the coins are being transferred to. | + /// | `metadata` | `vector` | Optional metadata about this payment. | + /// | `metadata_signature` | `vector` | Optional signature over `metadata` and payment information. See | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. | + /// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. | + /// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EMALFORMED_METADATA_SIGNATURE` | `metadata_signature` is not 64 bytes. | + /// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_METADATA_SIGNATURE` | `metadata_signature` does not verify on the against the `payee'`s `DualAttestation::Credential` `compliance_public_key` public key. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. | + /// + /// # Related Scripts + /// * `Script::create_child_vasp_account` + /// * `Script::create_parent_vasp_account` + /// * `Script::add_currency_to_account` + PeerToPeerWithMetadata { + currency: TypeTag, + payee: AccountAddress, + amount: u64, + metadata: Bytes, + metadata_signature: Bytes, + }, + + /// # Summary + /// Moves a specified number of coins in a given currency from the account's + /// balance to its preburn area after which the coins may be burned. This + /// transaction may be sent by any account that holds a balance and preburn area + /// in the specified currency. + /// + /// # Technical Description + /// Moves the specified `amount` of coins in `Token` currency from the sending `account`'s + /// `DiemAccount::Balance` to the `Diem::Preburn` published under the same + /// `account`. `account` must have both of these resources published under it at the start of this + /// transaction in order for it to execute successfully. + /// + /// ## Events + /// Successful execution of this script emits two events: + /// * `DiemAccount::SentPaymentEvent ` on `account`'s `DiemAccount::DiemAccount` `sent_events` + /// handle with the `payee` and `payer` fields being `account`'s address; and + /// * A `Diem::PreburnEvent` with `Token`'s currency code on the + /// `Diem::CurrencyInfo` resource published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_OCCUPIED` | The `value` field in the `Diem::Preburn` resource under the sender is non-zero. | + /// | `Errors::NOT_PUBLISHED` | `Roles::EROLE_ID` | The `account` did not have a role assigned to it. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDESIGNATED_DEALER` | The `account` did not have the role of DesignatedDealer. | + /// + /// # Related Scripts + /// * `Script::cancel_burn` + /// * `Script::burn` + /// * `Script::burn_txn_fees` + Preburn { token: TypeTag, amount: u64 }, + + /// # Summary + /// Rotates the authentication key of the sending account to the + /// newly-specified public key and publishes a new shared authentication key + /// under the sender's account. Any account can send this transaction. + /// + /// # Technical Description + /// Rotates the authentication key of the sending account to `public_key`, + /// and publishes a `SharedEd25519PublicKey::SharedEd25519PublicKey` resource + /// containing the 32-byte ed25519 `public_key` and the `DiemAccount::KeyRotationCapability` for + /// `account` under `account`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | The signer reference of the sending account of the transaction. | + /// | `public_key` | `vector` | 32-byte Ed25519 public key for `account`' authentication key to be rotated to and stored. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability` resource. | + /// | `Errors::ALREADY_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | The `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is already published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | + /// + /// # Related Scripts + /// * `Script::rotate_shared_ed25519_public_key` + PublishSharedEd25519PublicKey { public_key: Bytes }, + + /// # Summary + /// Updates a validator's configuration. This does not reconfigure the system and will not update + /// the configuration in the validator set that is seen by other validators in the network. Can + /// only be successfully sent by a Validator Operator account that is already registered with a + /// validator. + /// + /// # Technical Description + /// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` + /// config resource held under `validator_account`. It does not emit a `DiemConfig::NewEpochEvent` + /// so the copy of this config held in the validator set will not be updated, and the changes are + /// only "locally" under the `validator_account` account address. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `validator_operator_account` | `&signer` | Signer reference of the sending account. Must be the registered validator operator for the validator at `validator_address`. | + /// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | + /// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::create_validator_operator_account` + /// * `Script::add_validator_and_reconfigure` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::set_validator_config_and_reconfigure` + RegisterValidatorConfig { + validator_account: AccountAddress, + consensus_pubkey: Bytes, + validator_network_addresses: Bytes, + fullnode_network_addresses: Bytes, + }, + + /// # Summary + /// This script removes a validator account from the validator set, and triggers a reconfiguration + /// of the system to remove the validator from the system. This transaction can only be + /// successfully called by the Diem Root account. + /// + /// # Technical Description + /// This script removes the account at `validator_address` from the validator set. This transaction + /// emits a `DiemConfig::NewEpochEvent` event. Once the reconfiguration triggered by this event + /// has been performed, the account at `validator_address` is no longer considered to be a + /// validator in the network. This transaction will fail if the validator at `validator_address` + /// is not in the validator set. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | + /// | `validator_address` | `address` | The validator account address to be removed from the validator set. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | + /// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | + /// | `Errors::INVALID_ARGUMENT` | `DiemSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::create_validator_operator_account` + /// * `Script::register_validator_config` + /// * `Script::add_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::set_validator_config_and_reconfigure` + RemoveValidatorAndReconfigure { + sliding_nonce: u64, + validator_name: Bytes, + validator_address: AccountAddress, + }, + + /// # Summary + /// Rotates the transaction sender's authentication key to the supplied new authentication key. May + /// be sent by any account. + /// + /// # Technical Description + /// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. + /// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated + /// its `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | Signer reference of the sending account of the transaction. | + /// | `new_key` | `vector` | New ed25519 public key to be used for `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `Script::rotate_authentication_key_with_nonce` + /// * `Script::rotate_authentication_key_with_nonce_admin` + /// * `Script::rotate_authentication_key_with_recovery_address` + RotateAuthenticationKey { new_key: Bytes }, + + /// # Summary + /// Rotates the sender's authentication key to the supplied new authentication key. May be sent by + /// any account that has a sliding nonce resource published under it (usually this is Treasury + /// Compliance or Diem Root accounts). + /// + /// # Technical Description + /// Rotates the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. + /// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated + /// its `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | Signer reference of the sending account of the transaction. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_key` | `vector` | New ed25519 public key to be used for `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `Script::rotate_authentication_key` + /// * `Script::rotate_authentication_key_with_nonce_admin` + /// * `Script::rotate_authentication_key_with_recovery_address` + RotateAuthenticationKeyWithNonce { sliding_nonce: u64, new_key: Bytes }, + + /// # Summary + /// Rotates the specified account's authentication key to the supplied new authentication key. May + /// only be sent by the Diem Root account as a write set transaction. + /// + /// # Technical Description + /// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. + /// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated + /// its `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. | + /// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | + /// | `new_key` | `vector` | New ed25519 public key to be used for `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `Script::rotate_authentication_key` + /// * `Script::rotate_authentication_key_with_nonce` + /// * `Script::rotate_authentication_key_with_recovery_address` + RotateAuthenticationKeyWithNonceAdmin { sliding_nonce: u64, new_key: Bytes }, + + /// # Summary + /// Rotates the authentication key of a specified account that is part of a recovery address to a + /// new authentication key. Only used for accounts that are part of a recovery address (see + /// `Script::add_recovery_rotation_capability` for account restrictions). + /// + /// # Technical Description + /// Rotates the authentication key of the `to_recover` account to `new_key` using the + /// `DiemAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource + /// published under `recovery_address`. This transaction can be sent either by the `to_recover` + /// account, or by the account where the `RecoveryAddress::RecoveryAddress` resource is published + /// that contains `to_recover`'s `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | Signer reference of the sending account of the transaction. | + /// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `DiemAccount::KeyRotationCapability` is published. | + /// | `to_recover` | `address` | The address of the account whose authentication key will be updated. | + /// | `new_key` | `vector` | New ed25519 public key to be used for the account at the `to_recover` address. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress::RecoveryAddress` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ECANNOT_ROTATE_KEY` | The address of `account` is not `recovery_address` or `to_recover`. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `DiemAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `Script::rotate_authentication_key` + /// * `Script::rotate_authentication_key_with_nonce` + /// * `Script::rotate_authentication_key_with_nonce_admin` + RotateAuthenticationKeyWithRecoveryAddress { + recovery_address: AccountAddress, + to_recover: AccountAddress, + new_key: Bytes, + }, + + /// # Summary + /// Updates the url used for off-chain communication, and the public key used to verify dual + /// attestation on-chain. Transaction can be sent by any account that has dual attestation + /// information published under it. In practice the only such accounts are Designated Dealers and + /// Parent VASPs. + /// + /// # Technical Description + /// Updates the `base_url` and `compliance_public_key` fields of the `DualAttestation::Credential` + /// resource published under `account`. The `new_key` must be a valid ed25519 public key. + /// + /// ## Events + /// Successful execution of this transaction emits two events: + /// * A `DualAttestation::ComplianceKeyRotationEvent` containing the new compliance public key, and + /// the blockchain time at which the key was updated emitted on the `DualAttestation::Credential` + /// `compliance_key_rotation_events` handle published under `account`; and + /// * A `DualAttestation::BaseUrlRotationEvent` containing the new base url to be used for + /// off-chain communication, and the blockchain time at which the url was updated emitted on the + /// `DualAttestation::Credential` `base_url_rotation_events` handle published under `account`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | Signer reference of the sending account of the transaction. | + /// | `new_url` | `vector` | ASCII-encoded url to be used for off-chain communication with `account`. | + /// | `new_key` | `vector` | New ed25519 public key to be used for on-chain dual attestation checking. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `DualAttestation::ECREDENTIAL` | A `DualAttestation::Credential` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_PUBLIC_KEY` | `new_key` is not a valid ed25519 public key. | + /// + /// # Related Scripts + /// * `Script::create_parent_vasp_account` + /// * `Script::create_designated_dealer` + /// * `Script::rotate_dual_attestation_info` + RotateDualAttestationInfo { new_url: Bytes, new_key: Bytes }, + + /// # Summary + /// Rotates the authentication key in a `SharedEd25519PublicKey`. This transaction can be sent by + /// any account that has previously published a shared ed25519 public key using + /// `Script::publish_shared_ed25519_public_key`. + /// + /// # Technical Description + /// This first rotates the public key stored in `account`'s + /// `SharedEd25519PublicKey::SharedEd25519PublicKey` resource to `public_key`, after which it + /// rotates the authentication key using the capability stored in `account`'s + /// `SharedEd25519PublicKey::SharedEd25519PublicKey` to a new value derived from `public_key` + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | The signer reference of the sending account of the transaction. | + /// | `public_key` | `vector` | 32-byte Ed25519 public key. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | A `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | + /// + /// # Related Scripts + /// * `Script::publish_shared_ed25519_public_key` + RotateSharedEd25519PublicKey { public_key: Bytes }, + + /// # Summary + /// Updates a validator's configuration, and triggers a reconfiguration of the system to update the + /// validator set with this new validator configuration. Can only be successfully sent by a + /// Validator Operator account that is already registered with a validator. + /// + /// # Technical Description + /// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` + /// config resource held under `validator_account`. It then emits a `DiemConfig::NewEpochEvent` to + /// trigger a reconfiguration of the system. This reconfiguration will update the validator set + /// on-chain with the updated `ValidatorConfig::ValidatorConfig`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `validator_operator_account` | `&signer` | Signer reference of the sending account. Must be the registered validator operator for the validator at `validator_address`. | + /// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | + /// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR_OPERATOR` | `validator_operator_account` does not have a Validator Operator role. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | + /// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::create_validator_operator_account` + /// * `Script::add_validator_and_reconfigure` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::register_validator_config` + SetValidatorConfigAndReconfigure { + validator_account: AccountAddress, + consensus_pubkey: Bytes, + validator_network_addresses: Bytes, + fullnode_network_addresses: Bytes, + }, + + /// # Summary + /// Sets the validator operator for a validator in the validator's configuration resource "locally" + /// and does not reconfigure the system. Changes from this transaction will not picked up by the + /// system until a reconfiguration of the system is triggered. May only be sent by an account with + /// Validator role. + /// + /// # Technical Description + /// Sets the account at `operator_account` address and with the specified `human_name` as an + /// operator for the sending validator account. The account at `operator_account` address must have + /// a Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` + /// resource published under it. The sending `account` must be a Validator and have a + /// `ValidatorConfig::ValidatorConfig` resource published under it. This script does not emit a + /// `DiemConfig::NewEpochEvent` and no reconfiguration of the system is initiated by this script. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | The signer reference of the sending account of the transaction. | + /// | `operator_name` | `vector` | Validator operator's human name. | + /// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | + /// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::create_validator_operator_account` + /// * `Script::register_validator_config` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::add_validator_and_reconfigure` + /// * `Script::set_validator_operator_with_nonce_admin` + /// * `Script::set_validator_config_and_reconfigure` + SetValidatorOperator { + operator_name: Bytes, + operator_account: AccountAddress, + }, + + /// # Summary + /// Sets the validator operator for a validator in the validator's configuration resource "locally" + /// and does not reconfigure the system. Changes from this transaction will not picked up by the + /// system until a reconfiguration of the system is triggered. May only be sent by the Diem Root + /// account as a write set transaction. + /// + /// # Technical Description + /// Sets the account at `operator_account` address and with the specified `human_name` as an + /// operator for the validator `account`. The account at `operator_account` address must have a + /// Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource + /// published under it. The account represented by the `account` signer must be a Validator and + /// have a `ValidatorConfig::ValidatorConfig` resource published under it. No reconfiguration of + /// the system is initiated by this script. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. | + /// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | + /// | `operator_name` | `vector` | Validator operator's human name. | + /// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | + /// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | + /// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | + /// + /// # Related Scripts + /// * `Script::create_validator_account` + /// * `Script::create_validator_operator_account` + /// * `Script::register_validator_config` + /// * `Script::remove_validator_and_reconfigure` + /// * `Script::add_validator_and_reconfigure` + /// * `Script::set_validator_operator` + /// * `Script::set_validator_config_and_reconfigure` + SetValidatorOperatorWithNonceAdmin { + sliding_nonce: u64, + operator_name: Bytes, + operator_account: AccountAddress, + }, + + /// # Summary + /// Mints a specified number of coins in a currency to a Designated Dealer. The sending account + /// must be the Treasury Compliance account, and coins can only be minted to a Designated Dealer + /// account. + /// + /// # Technical Description + /// Mints `mint_amount` of coins in the `CoinType` currency to Designated Dealer account at + /// `designated_dealer_address`. The `tier_index` parameter specifies which tier should be used to + /// check verify the off-chain approval policy, and is based in part on the on-chain tier values + /// for the specific Designated Dealer, and the number of `CoinType` coins that have been minted to + /// the dealer over the past 24 hours. Every Designated Dealer has 4 tiers for each currency that + /// they support. The sending `tc_account` must be the Treasury Compliance account, and the + /// receiver an authorized Designated Dealer account. + /// + /// ## Events + /// Successful execution of the transaction will emit two events: + /// * A `Diem::MintEvent` with the amount and currency code minted is emitted on the + /// `mint_event_handle` in the stored `Diem::CurrencyInfo` resource stored under + /// `0xA550C18`; and + /// * A `DesignatedDealer::ReceivedMintEvent` with the amount, currency code, and Designated + /// Dealer's address is emitted on the `mint_event_handle` in the stored `DesignatedDealer::Dealer` + /// resource published under the `designated_dealer_address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` being minted. `CoinType` must be an already-registered currency on-chain. | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `designated_dealer_address` | `address` | The address of the Designated Dealer account being minted to. | + /// | `mint_amount` | `u64` | The number of coins to be minted. | + /// | `tier_index` | `u64` | The mint tier index to use for the Designated Dealer account. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_MINT_AMOUNT` | `mint_amount` is zero. | + /// | `Errors::NOT_PUBLISHED` | `DesignatedDealer::EDEALER` | `DesignatedDealer::Dealer` or `DesignatedDealer::TierInfo` resource does not exist at `designated_dealer_address`. | + /// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_TIER_INDEX` | The `tier_index` is out of bounds. | + /// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_AMOUNT_FOR_TIER` | `mint_amount` exceeds the maximum allowed amount for `tier_index`. | + /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EMINT_CAPABILITY` | `tc_account` does not have a `Diem::MintCapability` resource published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. | + /// + /// # Related Scripts + /// * `Script::create_designated_dealer` + /// * `Script::peer_to_peer_with_metadata` + /// * `Script::rotate_dual_attestation_info` + TieredMint { + coin_type: TypeTag, + sliding_nonce: u64, + designated_dealer_address: AccountAddress, + mint_amount: u64, + tier_index: u64, + }, + + /// # Summary + /// Unfreezes the account at `address`. The sending account of this transaction must be the + /// Treasury Compliance account. After the successful execution of this transaction transactions + /// may be sent from the previously frozen account, and coins may be sent and received. + /// + /// # Technical Description + /// Sets the `AccountFreezing::FreezingBit` to `false` and emits a + /// `AccountFreezing::UnFreezeAccountEvent`. The transaction sender must be the Treasury Compliance + /// account. Note that this is a per-account property so unfreezing a Parent VASP will not effect + /// the status any of its child accounts and vice versa. + /// + /// ## Events + /// Successful execution of this script will emit a `AccountFreezing::UnFreezeAccountEvent` with + /// the `unfrozen_address` set the `to_unfreeze_account`'s address. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `to_unfreeze_account` | `address` | The account address to be frozen. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// + /// # Related Scripts + /// * `Script::freeze_account` + UnfreezeAccount { + sliding_nonce: u64, + to_unfreeze_account: AccountAddress, + }, + + /// # Summary + /// Updates the Diem major version that is stored on-chain and is used by the VM. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the `DiemVersion` on-chain config and emits a `DiemConfig::NewEpochEvent` to trigger + /// a reconfiguration of the system. The `major` version that is passed in must be strictly greater + /// than the current major version held on-chain. The VM reads this information and can use it to + /// preserve backwards compatibility with previous major versions of the VM. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + /// | `Errors::INVALID_ARGUMENT` | `DiemVersion::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. | + UpdateDiemVersion { sliding_nonce: u64, major: u64 }, + + /// # Summary + /// Update the dual attestation limit on-chain. Defined in terms of micro-XDX. The transaction can + /// only be sent by the Treasury Compliance account. After this transaction all inter-VASP + /// payments over this limit must be checked for dual attestation. + /// + /// # Technical Description + /// Updates the `micro_xdx_limit` field of the `DualAttestation::Limit` resource published under + /// `0xA550C18`. The amount is set in micro-XDX. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_micro_xdx_limit` | `u64` | The new dual attestation limit to be used on-chain. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// + /// # Related Scripts + /// * `Script::update_exchange_rate` + /// * `Script::update_minting_ability` + UpdateDualAttestationLimit { + sliding_nonce: u64, + new_micro_xdx_limit: u64, + }, + + /// # Summary + /// Update the rough on-chain exchange rate between a specified currency and XDX (as a conversion + /// to micro-XDX). The transaction can only be sent by the Treasury Compliance account. After this + /// transaction the updated exchange rate will be used for normalization of gas prices, and for + /// dual attestation checking. + /// + /// # Technical Description + /// Updates the on-chain exchange rate from the given `Currency` to micro-XDX. The exchange rate + /// is given by `new_exchange_rate_numerator/new_exchange_rate_denominator`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` whose exchange rate is being updated. `Currency` must be an already-registered currency on-chain. | + /// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for the transaction. | + /// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-XDX exchange rate for `Currency`. | + /// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-XDX exchange rate for `Currency`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::EDENOMINATOR` | `new_exchange_rate_denominator` is zero. | + /// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | + /// | `Errors::LIMIT_EXCEEDED` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | + /// + /// # Related Scripts + /// * `Script::update_dual_attestation_limit` + /// * `Script::update_minting_ability` + UpdateExchangeRate { + currency: TypeTag, + sliding_nonce: u64, + new_exchange_rate_numerator: u64, + new_exchange_rate_denominator: u64, + }, + + /// # Summary + /// Script to allow or disallow minting of new coins in a specified currency. This transaction can + /// only be sent by the Treasury Compliance account. Turning minting off for a currency will have + /// no effect on coins already in circulation, and coins may still be removed from the system. + /// + /// # Technical Description + /// This transaction sets the `can_mint` field of the `Diem::CurrencyInfo` resource + /// published under `0xA550C18` to the value of `allow_minting`. Minting of coins if allowed if + /// this field is set to `true` and minting of new coins in `Currency` is disallowed otherwise. + /// This transaction needs to be sent by the Treasury Compliance account. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` whose minting ability is being updated. `Currency` must be an already-registered currency on-chain. | + /// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. | + /// | `allow_minting` | `bool` | Whether to allow minting of new coins in `Currency`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. | + /// + /// # Related Scripts + /// * `Script::update_dual_attestation_limit` + /// * `Script::update_exchange_rate` + UpdateMintingAbility { + currency: TypeTag, + allow_minting: bool, + }, +} + +/// Structured representation of a call into a known Move script function. +/// ```ignore +/// impl ScriptFunctionCall { +/// pub fn encode(self) -> TransactionPayload { .. } +/// pub fn decode(&TransactionPayload) -> Option { .. } +/// } +/// ``` +#[derive(Clone, Debug, PartialEq, PartialOrd)] +#[cfg_attr(feature = "fuzzing", derive(proptest_derive::Arbitrary))] +#[cfg_attr(feature = "fuzzing", proptest(no_params))] +pub enum ScriptFunctionCall { + /// # Summary + /// Adds a zero `Currency` balance to the sending `account`. This will enable `account` to + /// send, receive, and hold `Diem::Diem` coins. This transaction can be + /// successfully sent by any account that is allowed to hold balances + /// (e.g., VASP, Designated Dealer). + /// + /// # Technical Description + /// After the successful execution of this transaction the sending account will have a + /// `DiemAccount::Balance` resource with zero balance published under it. Only + /// accounts that can hold balances can send this transaction, the sending account cannot + /// already have a `DiemAccount::Balance` published under it. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` being added to the sending account of the transaction. `Currency` must be an already-registered currency on-chain. | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. | + /// | `Errors::ALREADY_PUBLISHED` | `DiemAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_child_vasp_account` + /// * `AccountCreationScripts::create_parent_vasp_account` + /// * `PaymentScripts::peer_to_peer_with_metadata` + AddCurrencyToAccount { currency: TypeTag }, + + /// # Summary + /// Stores the sending accounts ability to rotate its authentication key with a designated recovery + /// account. Both the sending and recovery accounts need to belong to the same VASP and + /// both be VASP accounts. After this transaction both the sending account and the + /// specified recovery account can rotate the sender account's authentication key. + /// + /// # Technical Description + /// Adds the `DiemAccount::KeyRotationCapability` for the sending account + /// (`to_recover_account`) to the `RecoveryAddress::RecoveryAddress` resource under + /// `recovery_address`. After this transaction has been executed successfully the account at + /// `recovery_address` and the `to_recover_account` may rotate the authentication key of + /// `to_recover_account` (the sender of this transaction). + /// + /// The sending account of this transaction (`to_recover_account`) must not have previously given away its unique key + /// rotation capability, and must be a VASP account. The account at `recovery_address` + /// must also be a VASP account belonging to the same VASP as the `to_recover_account`. + /// Additionally the account at `recovery_address` must have already initialized itself as + /// a recovery account address using the `AccountAdministrationScripts::create_recovery_address` transaction script. + /// + /// The sending account's (`to_recover_account`) key rotation capability is + /// removed in this transaction and stored in the `RecoveryAddress::RecoveryAddress` + /// resource stored under the account at `recovery_address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `to_recover_account` | `signer` | The signer of the sending account of this transaction. | + /// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `DiemAccount::KeyRotationCapability` will be stored. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EINVALID_KEY_ROTATION_DELEGATION` | `to_recover_account` and `recovery_address` do not belong to the same VASP. | + /// | `Errors::LIMIT_EXCEEDED` | ` RecoveryAddress::EMAX_KEYS_REGISTERED` | `RecoveryAddress::MAX_REGISTERED_KEYS` have already been registered with this `recovery_address`. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::create_recovery_address` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` + AddRecoveryRotationCapability { recovery_address: AccountAddress }, + + /// # Summary + /// Adds a validator account to the validator set, and triggers a + /// reconfiguration of the system to admit the account to the validator set for the system. This + /// transaction can only be successfully called by the Diem Root account. + /// + /// # Technical Description + /// This script adds the account at `validator_address` to the validator set. + /// This transaction emits a `Reconfiguration::NewEpochEvent` event and triggers a + /// reconfiguration. Once the reconfiguration triggered by this script's + /// execution has been performed, the account at the `validator_address` is + /// considered to be a validator in the network. + /// + /// This transaction script will fail if the `validator_address` address is already in the validator set + /// or does not have a `ValidatorConfig::ValidatorConfig` resource already published under it. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | + /// | `validator_address` | `address` | The validator account address to be added to the validator set. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. | + /// | `Errors::INVALID_STATE` | `Reconfiguration::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | + /// | `Errors::LIMIT_EXCEEDED` | `ValidatorSystem::EMAX_VALIDATORS` | The validator set is already at its maximum size. The validator could not be added. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + AddValidatorAndReconfigure { + sliding_nonce: u64, + validator_name: Bytes, + validator_address: AccountAddress, + }, + + /// # Summary + /// Add a VASP domain to parent VASP account. The transaction can only be sent by + /// the Treasury Compliance account. + /// + /// # Technical Description + /// Adds a `VASPDomain::VASPDomain` to the `domains` field of the `VASPDomain::VASPDomains` resource published under + /// the account at `address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `address` | `address` | The `address` of the parent VASP account that will have have `domain` added to its domains. | + /// | `domain` | `vector` | The domain to be added. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAIN_MANAGER` | The `VASPDomain::VASPDomainManager` resource is not yet published under the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAINS_NOT_PUBLISHED` | `address` does not have a `VASPDomain::VASPDomains` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EDOMAIN_ALREADY_EXISTS` | The `domain` already exists in the list of `VASPDomain::VASPDomain`s in the `VASPDomain::VASPDomains` resource published under `address`. | + /// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EINVALID_VASP_DOMAIN` | The `domain` is greater in length than `VASPDomain::DOMAIN_LENGTH`. | + AddVaspDomain { + address: AccountAddress, + domain: Bytes, + }, + + /// # Summary + /// Burns the transaction fees collected in the `CoinType` currency so that the + /// Diem association may reclaim the backing coins off-chain. May only be sent + /// by the Treasury Compliance account. + /// + /// # Technical Description + /// Burns the transaction fees collected in `CoinType` so that the + /// association may reclaim the backing coins. Once this transaction has executed + /// successfully all transaction fees that will have been collected in + /// `CoinType` since the last time this script was called with that specific + /// currency. Both `balance` and `preburn` fields in the + /// `TransactionFee::TransactionFee` resource published under the `0xB1E55ED` + /// account address will have a value of 0 after the successful execution of this script. + /// + /// # Events + /// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle + /// held in the `Diem::CurrencyInfo` resource's `burn_events` published under + /// `0xA550C18`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` being added to the sending account of the transaction. `CoinType` must be an already-registered currency on-chain. | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `TransactionFee::ETRANSACTION_FEE` | `CoinType` is not an accepted transaction fee currency. | + /// | `Errors::INVALID_ARGUMENT` | `Diem::ECOIN` | The collected fees in `CoinType` are zero. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::burn_with_amount` + /// * `TreasuryComplianceScripts::cancel_burn_with_amount` + BurnTxnFees { coin_type: TypeTag }, + + /// # Summary + /// Burns the coins held in a preburn resource in the preburn queue at the + /// specified preburn address, which are equal to the `amount` specified in the + /// transaction. Finds the first relevant outstanding preburn request with + /// matching amount and removes the contained coins from the system. The sending + /// account must be the Treasury Compliance account. + /// The account that holds the preburn queue resource will normally be a Designated + /// Dealer, but there are no enforced requirements that it be one. + /// + /// # Technical Description + /// This transaction permanently destroys all the coins of `Token` type + /// stored in the `Diem::Preburn` resource published under the + /// `preburn_address` account address. + /// + /// This transaction will only succeed if the sending `account` has a + /// `Diem::BurnCapability`, and a `Diem::Preburn` resource + /// exists under `preburn_address`, with a non-zero `to_burn` field. After the successful execution + /// of this transaction the `total_value` field in the + /// `Diem::CurrencyInfo` resource published under `0xA550C18` will be + /// decremented by the value of the `to_burn` field of the preburn resource + /// under `preburn_address` immediately before this transaction, and the + /// `to_burn` field of the preburn resource will have a zero value. + /// + /// # Events + /// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle + /// held in the `Diem::CurrencyInfo` resource's `burn_events` published under + /// `0xA550C18`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Token` | Type | The Move type for the `Token` currency being burned. `Token` must be an already-registered currency on-chain. | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction, must have a burn capability for `Token` published under it. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | + /// | `amount` | `u64` | The amount to be burned. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_NOT_FOUND` | The `Diem::PreburnQueue` resource under `preburn_address` does not contain a preburn request with a value matching `amount`. | + /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN_QUEUE` | The account at `preburn_address` does not have a `Diem::PreburnQueue` resource published under it. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::burn_txn_fees` + /// * `TreasuryComplianceScripts::cancel_burn_with_amount` + /// * `TreasuryComplianceScripts::preburn` + BurnWithAmount { + token: TypeTag, + sliding_nonce: u64, + preburn_address: AccountAddress, + amount: u64, + }, + + /// # Summary + /// Cancels and returns the coins held in the preburn area under + /// `preburn_address`, which are equal to the `amount` specified in the transaction. Finds the first preburn + /// resource with the matching amount and returns the funds to the `preburn_address`'s balance. + /// Can only be successfully sent by an account with Treasury Compliance role. + /// + /// # Technical Description + /// Cancels and returns all coins held in the `Diem::Preburn` resource under the `preburn_address` and + /// return the funds to the `preburn_address` account's `DiemAccount::Balance`. + /// The transaction must be sent by an `account` with a `Diem::BurnCapability` + /// resource published under it. The account at `preburn_address` must have a + /// `Diem::Preburn` resource published under it, and its value must be nonzero. The transaction removes + /// the entire balance held in the `Diem::Preburn` resource, and returns it back to the account's + /// `DiemAccount::Balance` under `preburn_address`. Due to this, the account at + /// `preburn_address` must already have a balance in the `Token` currency published + /// before this script is called otherwise the transaction will fail. + /// + /// # Events + /// The successful execution of this transaction will emit: + /// * A `Diem::CancelBurnEvent` on the event handle held in the `Diem::CurrencyInfo` + /// resource's `burn_events` published under `0xA550C18`. + /// * A `DiemAccount::ReceivedPaymentEvent` on the `preburn_address`'s + /// `DiemAccount::DiemAccount` `received_events` event handle with both the `payer` and `payee` + /// being `preburn_address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Token` | Type | The Move type for the `Token` currenty that burning is being cancelled for. `Token` must be an already-registered currency on-chain. | + /// | `account` | `signer` | The signer of the sending account of this transaction, must have a burn capability for `Token` published under it. | + /// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | + /// | `amount` | `u64` | The amount to be cancelled. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_NOT_FOUND` | The `Diem::PreburnQueue` resource under `preburn_address` does not contain a preburn request with a value matching `amount`. | + /// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN_QUEUE` | The account at `preburn_address` does not have a `Diem::PreburnQueue` resource published under it. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. | + /// | `Errors::INVALID_STATE` | `DualAttestation::EPAYEE_COMPLIANCE_KEY_NOT_SET` | The `account` does not have a compliance key set on it but dual attestion checking was performed. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::burn_txn_fees` + /// * `TreasuryComplianceScripts::burn_with_amount` + /// * `TreasuryComplianceScripts::preburn` + CancelBurnWithAmount { + token: TypeTag, + preburn_address: AccountAddress, + amount: u64, + }, + + /// # Summary + /// Creates a Child VASP account with its parent being the sending account of the transaction. + /// The sender of the transaction must be a Parent VASP account. + /// + /// # Technical Description + /// Creates a `ChildVASP` account for the sender `parent_vasp` at `child_address` with a balance of + /// `child_initial_balance` in `CoinType` and an initial authentication key of + /// `auth_key_prefix | child_address`. Authentication key prefixes, and how to construct them from an ed25519 public key is described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// If `add_all_currencies` is true, the child address will have a zero balance in all available + /// currencies in the system. + /// + /// The new account will be a child account of the transaction sender, which must be a + /// Parent VASP account. The child account will be recorded against the limit of + /// child accounts of the creating Parent VASP account. + /// + /// # Events + /// Successful execution will emit: + /// * A `DiemAccount::CreateAccountEvent` with the `created` field being `child_address`, + /// and the `rold_id` field being `Roles::CHILD_VASP_ROLE_ID`. This is emitted on the + /// `DiemAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// Successful execution with a `child_initial_balance` greater than zero will additionaly emit: + /// * A `DiemAccount::SentPaymentEvent` with the `payee` field being `child_address`. + /// This is emitted on the Parent VASP's `DiemAccount::DiemAccount` `sent_events` handle. + /// * A `DiemAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address. + /// This is emitted on the new Child VASPS's `DiemAccount::DiemAccount` `received_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` that the child account should be created with. `CoinType` must be an already-registered currency on-chain. | + /// | `parent_vasp` | `signer` | The reference of the sending account. Must be a Parent VASP account. | + /// | `child_address` | `address` | Address of the to-be-created Child VASP account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | + /// | `child_initial_balance` | `u64` | The initial balance in `CoinType` to give the child account when it's created. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending account wasn't a Parent VASP account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `child_address` address is already taken. | + /// | `Errors::LIMIT_EXCEEDED` | `VASP::ETOO_MANY_CHILDREN` | The sending account has reached the maximum number of allowed child accounts. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | + /// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_parent_vasp_account` + /// * `AccountAdministrationScripts::add_currency_to_account` + /// * `AccountAdministrationScripts::rotate_authentication_key` + /// * `AccountAdministrationScripts::add_recovery_rotation_capability` + /// * `AccountAdministrationScripts::create_recovery_address` + CreateChildVaspAccount { + coin_type: TypeTag, + child_address: AccountAddress, + auth_key_prefix: Bytes, + add_all_currencies: bool, + child_initial_balance: u64, + }, + + /// # Summary + /// Creates a Designated Dealer account with the provided information, and initializes it with + /// default mint tiers. The transaction can only be sent by the Treasury Compliance account. + /// + /// # Technical Description + /// Creates an account with the Designated Dealer role at `addr` with authentication key + /// `auth_key_prefix` | `addr` and a 0 balance of type `Currency`. If `add_all_currencies` is true, + /// 0 balances for all available currencies in the system will also be added. This can only be + /// invoked by an account with the TreasuryCompliance role. + /// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// At the time of creation the account is also initialized with default mint tiers of (500_000, + /// 5000_000, 50_000_000, 500_000_000), and preburn areas for each currency that is added to the + /// account. + /// + /// # Events + /// Successful execution will emit: + /// * A `DiemAccount::CreateAccountEvent` with the `created` field being `addr`, + /// and the `rold_id` field being `Roles::DESIGNATED_DEALER_ROLE_ID`. This is emitted on the + /// `DiemAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` that the Designated Dealer should be initialized with. `Currency` must be an already-registered currency on-chain. | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `addr` | `address` | Address of the to-be-created Designated Dealer account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the Designated Dealer. | + /// | `add_all_currencies` | `bool` | Whether to publish preburn, balance, and tier info resources for all known (SCS) currencies or just `Currency` when the account is created. | + /// + + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `addr` address is already taken. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::tiered_mint` + /// * `PaymentScripts::peer_to_peer_with_metadata` + /// * `AccountAdministrationScripts::rotate_dual_attestation_info` + CreateDesignatedDealer { + currency: TypeTag, + sliding_nonce: u64, + addr: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + add_all_currencies: bool, + }, + + /// # Summary + /// Creates a Parent VASP account with the specified human name. Must be called by the Treasury Compliance account. + /// + /// # Technical Description + /// Creates an account with the Parent VASP role at `address` with authentication key + /// `auth_key_prefix` | `new_account_address` and a 0 balance of type `CoinType`. If + /// `add_all_currencies` is true, 0 balances for all available currencies in the system will + /// also be added. This can only be invoked by an TreasuryCompliance account. + /// `sliding_nonce` is a unique nonce for operation, see `SlidingNonce` for details. + /// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// # Events + /// Successful execution will emit: + /// * A `DiemAccount::CreateAccountEvent` with the `created` field being `new_account_address`, + /// and the `rold_id` field being `Roles::PARENT_VASP_ROLE_ID`. This is emitted on the + /// `DiemAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` currency that the Parent VASP account should be initialized with. `CoinType` must be an already-registered currency on-chain. | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Parent VASP account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the Parent VASP. | + /// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_child_vasp_account` + /// * `AccountAdministrationScripts::add_currency_to_account` + /// * `AccountAdministrationScripts::rotate_authentication_key` + /// * `AccountAdministrationScripts::add_recovery_rotation_capability` + /// * `AccountAdministrationScripts::create_recovery_address` + /// * `AccountAdministrationScripts::rotate_dual_attestation_info` + CreateParentVaspAccount { + coin_type: TypeTag, + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + add_all_currencies: bool, + }, + + /// # Summary + /// Initializes the sending account as a recovery address that may be used by + /// other accounts belonging to the same VASP as `account`. + /// The sending account must be a VASP account, and can be either a child or parent VASP account. + /// Multiple recovery addresses can exist for a single VASP, but accounts in + /// each must be disjoint. + /// + /// # Technical Description + /// Publishes a `RecoveryAddress::RecoveryAddress` resource under `account`. It then + /// extracts the `DiemAccount::KeyRotationCapability` for `account` and adds + /// it to the resource. After the successful execution of this transaction + /// other accounts may add their key rotation to this resource so that `account` + /// may be used as a recovery account for those accounts. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ENOT_A_VASP` | `account` is not a VASP account. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EKEY_ROTATION_DEPENDENCY_CYCLE` | A key rotation recovery cycle would be created by adding `account`'s key rotation capability. | + /// | `Errors::ALREADY_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | A `RecoveryAddress::RecoveryAddress` resource has already been published under `account`. | + /// + /// # Related Scripts + /// * `Script::add_recovery_rotation_capability` + /// * `Script::rotate_authentication_key_with_recovery_address` + CreateRecoveryAddress {}, + + /// # Summary + /// Creates a Validator account. This transaction can only be sent by the Diem + /// Root account. + /// + /// # Technical Description + /// Creates an account with a Validator role at `new_account_address`, with authentication key + /// `auth_key_prefix` | `new_account_address`. It publishes a + /// `ValidatorConfig::ValidatorConfig` resource with empty `config`, and + /// `operator_account` fields. The `human_name` field of the + /// `ValidatorConfig::ValidatorConfig` is set to the passed in `human_name`. + /// This script does not add the validator to the validator set or the system, + /// but only creates the account. + /// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// # Events + /// Successful execution will emit: + /// * A `DiemAccount::CreateAccountEvent` with the `created` field being `new_account_address`, + /// and the `rold_id` field being `Roles::VALIDATOR_ROLE_ID`. This is emitted on the + /// `DiemAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Validator account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the validator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + CreateValidatorAccount { + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + }, + + /// # Summary + /// Creates a Validator Operator account. This transaction can only be sent by the Diem + /// Root account. + /// + /// # Technical Description + /// Creates an account with a Validator Operator role at `new_account_address`, with authentication key + /// `auth_key_prefix` | `new_account_address`. It publishes a + /// `ValidatorOperatorConfig::ValidatorOperatorConfig` resource with the specified `human_name`. + /// This script does not assign the validator operator to any validator accounts but only creates the account. + /// Authentication key prefixes, and how to construct them from an ed25519 public key are described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// + /// # Events + /// Successful execution will emit: + /// * A `DiemAccount::CreateAccountEvent` with the `created` field being `new_account_address`, + /// and the `rold_id` field being `Roles::VALIDATOR_OPERATOR_ROLE_ID`. This is emitted on the + /// `DiemAccount::AccountOperationsCapability` `creation_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_account_address` | `address` | Address of the to-be-created Validator account. | + /// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | + /// | `human_name` | `vector` | ASCII-encoded human name for the validator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + CreateValidatorOperatorAccount { + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Bytes, + human_name: Bytes, + }, + + /// # Summary + /// Publishes a `VASPDomain::VASPDomains` resource under a parent VASP account. + /// The sending account must be a parent VASP account. + /// + /// # Technical Description + /// Publishes a `VASPDomain::VASPDomains` resource under `account`. + /// The The `VASPDomain::VASPDomains` resource's `domains` field is a vector + /// of VASPDomain, and will be empty on at the end of processing this transaction. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::ALREADY_PUBLISHED` | `VASPDomain::EVASP_DOMAINS` | A `VASPDomain::VASPDomains` resource has already been published under `account`. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending `account` was not a parent VASP account. | + CreateVaspDomains {}, + + /// # Summary + /// Shifts the window held by the CRSN resource published under `account` + /// by `shift_amount`. This will expire all unused slots in the CRSN at the + /// time of processing that are less than `shift_amount`. The exact + /// semantics are defined in DIP-168. + /// + /// # Technical Description + /// This shifts the slots in the published `CRSN::CRSN` resource under + /// `account` by `shift_amount`, and increments the CRSN's `min_nonce` field + /// by `shift_amount` as well. After this, it will shift the window over + /// any set bits. It is important to note that the sequence nonce of the + /// sending transaction must still lie within the range of the window in + /// order for this transaction to be processed successfully. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// | `shift_amount` | `u64` | The amount to shift the window in the CRSN under `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `CRSN::ENO_CRSN` | A `CRSN::CRSN` resource is not published under `account`. | + ForceExpire { shift_amount: u64 }, + + /// # Summary + /// Freezes the account at `address`. The sending account of this transaction + /// must be the Treasury Compliance account. The account being frozen cannot be + /// the Diem Root or Treasury Compliance account. After the successful + /// execution of this transaction no transactions may be sent from the frozen + /// account, and the frozen account may not send or receive coins. + /// + /// # Technical Description + /// Sets the `AccountFreezing::FreezingBit` to `true` and emits a + /// `AccountFreezing::FreezeAccountEvent`. The transaction sender must be the + /// Treasury Compliance account, but the account at `to_freeze_account` must + /// not be either `0xA550C18` (the Diem Root address), or `0xB1E55ED` (the + /// Treasury Compliance address). Note that this is a per-account property + /// e.g., freezing a Parent VASP will not effect the status any of its child + /// accounts and vice versa. + /// + + /// # Events + /// Successful execution of this transaction will emit a `AccountFreezing::FreezeAccountEvent` on + /// the `freeze_event_handle` held in the `AccountFreezing::FreezeEventsHolder` resource published + /// under `0xA550C18` with the `frozen_address` being the `to_freeze_account`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `to_freeze_account` | `address` | The account address to be frozen. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_TC` | `to_freeze_account` was the Treasury Compliance account (`0xB1E55ED`). | + /// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_DIEM_ROOT` | `to_freeze_account` was the Diem Root account (`0xA550C18`). | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::unfreeze_account` + FreezeAccount { + sliding_nonce: u64, + to_freeze_account: AccountAddress, + }, + + /// # Summary + /// Initializes the Diem consensus config that is stored on-chain. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Initializes the `DiemConsensusConfig` on-chain config to empty and allows future updates from DiemRoot via + /// `update_diem_consensus_config`. This doesn't emit a `Reconfiguration::NewEpochEvent`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + InitializeDiemConsensusConfig { sliding_nonce: u64 }, + + /// # Summary + /// Publishes a CRSN resource under `account` and opts the account in to + /// concurrent transaction processing. Upon successful execution of this + /// script, all further transactions sent from this account will be ordered + /// and processed according to DIP-168. + /// + /// # Technical Description + /// This publishes a `CRSN::CRSN` resource under `account` with `crsn_size` + /// number of slots. All slots will be initialized to the empty (unused) + /// state, and the CRSN resource's `min_nonce` field will be set to the transaction's + /// sequence number + 1. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// | `crsn_size` | `u64` | The the number of slots the published CRSN will have. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `CRSN::EHAS_CRSN` | A `CRSN::CRSN` resource was already published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `CRSN::EZERO_SIZE_CRSN` | The `crsn_size` was zero. | + OptInToCrsn { crsn_size: u64 }, + + /// # Summary + /// Transfers a given number of coins in a specified currency from one account to another by multi-agent transaction. + /// Transfers over a specified amount defined on-chain that are between two different VASPs, or + /// other accounts that have opted-in will be subject to on-chain checks to ensure the receiver has + /// agreed to receive the coins. This transaction can be sent by any account that can hold a + /// balance, and to any account that can hold a balance. Both accounts must hold balances in the + /// currency being transacted. + /// + /// # Technical Description + /// + /// Transfers `amount` coins of type `Currency` from `payer` to `payee` with (optional) associated + /// `metadata`. + /// Dual attestation is not applied to this script as payee is also a signer of the transaction. + /// Standardized `metadata` BCS format can be found in `aptos_types::transaction::metadata::Metadata`. + /// + /// # Events + /// Successful execution of this script emits two events: + /// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and + /// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` being sent in this transaction. `Currency` must be an already-registered currency on-chain. | + /// | `payer` | `signer` | The signer of the sending account that coins are being transferred from. | + /// | `payee` | `signer` | The signer of the receiving account that the coins are being transferred to. | + /// | `metadata` | `vector` | Optional metadata about this payment. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. | + /// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_child_vasp_account` + /// * `AccountCreationScripts::create_parent_vasp_account` + /// * `AccountAdministrationScripts::add_currency_to_account` + /// * `PaymentScripts::peer_to_peer_with_metadata` + PeerToPeerBySigners { + currency: TypeTag, + amount: u64, + metadata: Bytes, + }, + + /// # Summary + /// Transfers a given number of coins in a specified currency from one account to another. + /// Transfers over a specified amount defined on-chain that are between two different VASPs, or + /// other accounts that have opted-in will be subject to on-chain checks to ensure the receiver has + /// agreed to receive the coins. This transaction can be sent by any account that can hold a + /// balance, and to any account that can hold a balance. Both accounts must hold balances in the + /// currency being transacted. + /// + /// # Technical Description + /// + /// Transfers `amount` coins of type `Currency` from `payer` to `payee` with (optional) associated + /// `metadata` and an (optional) `metadata_signature` on the message of the form + /// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`, that + /// has been signed by the `payee`'s private key associated with the `compliance_public_key` held in + /// the `payee`'s `DualAttestation::Credential`. Both the `Signer::address_of(payer)` and `amount` fields + /// in the `metadata_signature` must be BCS-encoded bytes, and `|` denotes concatenation. + /// The `metadata` and `metadata_signature` parameters are only required if `amount` >= + /// `DualAttestation::get_cur_microdiem_limit` XDX and `payer` and `payee` are distinct VASPs. + /// However, a transaction sender can opt in to dual attestation even when it is not required + /// (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. + /// Standardized `metadata` BCS format can be found in `aptos_types::transaction::metadata::Metadata`. + /// + /// # Events + /// Successful execution of this script emits two events: + /// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and + /// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` being sent in this transaction. `Currency` must be an already-registered currency on-chain. | + /// | `payer` | `signer` | The signer of the sending account that coins are being transferred from. | + /// | `payee` | `address` | The address of the account the coins are being transferred to. | + /// | `metadata` | `vector` | Optional metadata about this payment. | + /// | `metadata_signature` | `vector` | Optional signature over `metadata` and payment information. See | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. | + /// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. | + /// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. | + /// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EMALFORMED_METADATA_SIGNATURE` | `metadata_signature` is not 64 bytes. | + /// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_METADATA_SIGNATURE` | `metadata_signature` does not verify on the against the `payee'`s `DualAttestation::Credential` `compliance_public_key` public key. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_child_vasp_account` + /// * `AccountCreationScripts::create_parent_vasp_account` + /// * `AccountAdministrationScripts::add_currency_to_account` + /// * `PaymentScripts::peer_to_peer_by_signers` + PeerToPeerWithMetadata { + currency: TypeTag, + payee: AccountAddress, + amount: u64, + metadata: Bytes, + metadata_signature: Bytes, + }, + + /// # Summary + /// Moves a specified number of coins in a given currency from the account's + /// balance to its preburn area after which the coins may be burned. This + /// transaction may be sent by any account that holds a balance and preburn area + /// in the specified currency. + /// + /// # Technical Description + /// Moves the specified `amount` of coins in `Token` currency from the sending `account`'s + /// `DiemAccount::Balance` to the `Diem::Preburn` published under the same + /// `account`. `account` must have both of these resources published under it at the start of this + /// transaction in order for it to execute successfully. + /// + /// # Events + /// Successful execution of this script emits two events: + /// * `DiemAccount::SentPaymentEvent ` on `account`'s `DiemAccount::DiemAccount` `sent_events` + /// handle with the `payee` and `payer` fields being `account`'s address; and + /// * A `Diem::PreburnEvent` with `Token`'s currency code on the + /// `Diem::CurrencyInfo` resource published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EPREBURN_OCCUPIED` | The `value` field in the `Diem::Preburn` resource under the sender is non-zero. | + /// | `Errors::NOT_PUBLISHED` | `Roles::EROLE_ID` | The `account` did not have a role assigned to it. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDESIGNATED_DEALER` | The `account` did not have the role of DesignatedDealer. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::cancel_burn_with_amount` + /// * `TreasuryComplianceScripts::burn_with_amount` + /// * `TreasuryComplianceScripts::burn_txn_fees` + Preburn { token: TypeTag, amount: u64 }, + + /// # Summary + /// Rotates the authentication key of the sending account to the newly-specified ed25519 public key and + /// publishes a new shared authentication key derived from that public key under the sender's account. + /// Any account can send this transaction. + /// + /// # Technical Description + /// Rotates the authentication key of the sending account to the + /// [authentication key derived from `public_key`](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys) + /// and publishes a `SharedEd25519PublicKey::SharedEd25519PublicKey` resource + /// containing the 32-byte ed25519 `public_key` and the `DiemAccount::KeyRotationCapability` for + /// `account` under `account`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// | `public_key` | `vector` | A valid 32-byte Ed25519 public key for `account`'s authentication key to be rotated to and stored. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability` resource. | + /// | `Errors::ALREADY_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | The `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is already published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::rotate_shared_ed25519_public_key` + PublishSharedEd25519PublicKey { public_key: Bytes }, + + /// # Summary + /// Updates a validator's configuration. This does not reconfigure the system and will not update + /// the configuration in the validator set that is seen by other validators in the network. Can + /// only be successfully sent by a Validator Operator account that is already registered with a + /// validator. + /// + /// # Technical Description + /// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` + /// config resource held under `validator_account`. It does not emit a `Reconfiguration::NewEpochEvent` + /// so the copy of this config held in the validator set will not be updated, and the changes are + /// only "locally" under the `validator_account` account address. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `validator_operator_account` | `signer` | Signer of the sending account. Must be the registered validator operator for the validator at `validator_address`. | + /// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | + /// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + RegisterValidatorConfig { + validator_account: AccountAddress, + consensus_pubkey: Bytes, + validator_network_addresses: Bytes, + fullnode_network_addresses: Bytes, + }, + + /// # Summary + /// This script removes a validator account from the validator set, and triggers a reconfiguration + /// of the system to remove the validator from the system. This transaction can only be + /// successfully called by the Diem Root account. + /// + /// # Technical Description + /// This script removes the account at `validator_address` from the validator set. This transaction + /// emits a `Reconfiguration::NewEpochEvent` event. Once the reconfiguration triggered by this event + /// has been performed, the account at `validator_address` is no longer considered to be a + /// validator in the network. This transaction will fail if the validator at `validator_address` + /// is not in the validator set. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | + /// | `validator_address` | `address` | The validator account address to be removed from the validator set. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | + /// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | + /// | `Errors::INVALID_STATE` | `Reconfiguration::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + RemoveValidatorAndReconfigure { + sliding_nonce: u64, + validator_name: Bytes, + validator_address: AccountAddress, + }, + + /// # Summary + /// Remove a VASP domain from parent VASP account. The transaction can only be sent by + /// the Treasury Compliance account. + /// + /// # Technical Description + /// Removes a `VASPDomain::VASPDomain` from the `domains` field of the `VASPDomain::VASPDomains` resource published under + /// account with `address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `address` | `address` | The `address` of parent VASP account that will update its domains. | + /// | `domain` | `vector` | The domain name. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAIN_MANAGER` | The `VASPDomain::VASPDomainManager` resource is not yet published under the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAINS_NOT_PUBLISHED` | `address` does not have a `VASPDomain::VASPDomains` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EINVALID_VASP_DOMAIN` | The `domain` is greater in length than `VASPDomain::DOMAIN_LENGTH`. | + /// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EVASP_DOMAIN_NOT_FOUND` | The `domain` does not exist in the list of `VASPDomain::VASPDomain`s in the `VASPDomain::VASPDomains` resource published under `address`. | + RemoveVaspDomain { + address: AccountAddress, + domain: Bytes, + }, + + /// # Summary + /// Rotates the `account`'s authentication key to the supplied new authentication key. May be sent by any account. + /// + /// # Technical Description + /// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` + /// field to `new_key`. `new_key` must be a valid authentication key that + /// corresponds to an ed25519 public key as described [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys), + /// and `account` must not have previously delegated its `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account of the transaction. | + /// | `new_key` | `vector` | New authentication key to be used for `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce_admin` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` + RotateAuthenticationKey { new_key: Bytes }, + + /// # Summary + /// Rotates the sender's authentication key to the supplied new authentication key. May be sent by + /// any account that has a sliding nonce resource published under it (usually this is Treasury + /// Compliance or Diem Root accounts). + /// + /// # Technical Description + /// Rotates the `account`'s `DiemAccount::DiemAccount` `authentication_key` + /// field to `new_key`. `new_key` must be a valid authentication key that + /// corresponds to an ed25519 public key as described [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys), + /// and `account` must not have previously delegated its `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account of the transaction. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_key` | `vector` | New authentication key to be used for `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::rotate_authentication_key` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce_admin` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` + RotateAuthenticationKeyWithNonce { sliding_nonce: u64, new_key: Bytes }, + + /// # Summary + /// Rotates the specified account's authentication key to the supplied new authentication key. May + /// only be sent by the Diem Root account as a write set transaction. + /// + /// # Technical Description + /// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. + /// `new_key` must be a valid authentication key that corresponds to an ed25519 + /// public key as described [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys), + /// and `account` must not have previously delegated its `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | The signer of the sending account of the write set transaction. May only be the Diem Root signer. | + /// | `account` | `signer` | Signer of account specified in the `execute_as` field of the write set transaction. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | + /// | `new_key` | `vector` | New authentication key to be used for `account`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | + /// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::rotate_authentication_key` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` + RotateAuthenticationKeyWithNonceAdmin { sliding_nonce: u64, new_key: Bytes }, + + /// # Summary + /// Rotates the authentication key of a specified account that is part of a recovery address to a + /// new authentication key. Only used for accounts that are part of a recovery address (see + /// `AccountAdministrationScripts::add_recovery_rotation_capability` for account restrictions). + /// + /// # Technical Description + /// Rotates the authentication key of the `to_recover` account to `new_key` using the + /// `DiemAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource + /// published under `recovery_address`. `new_key` must be a valide authentication key as described + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). + /// This transaction can be sent either by the `to_recover` account, or by the account where the + /// `RecoveryAddress::RecoveryAddress` resource is published that contains `to_recover`'s `DiemAccount::KeyRotationCapability`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account of the transaction. | + /// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `DiemAccount::KeyRotationCapability` is published. | + /// | `to_recover` | `address` | The address of the account whose authentication key will be updated. | + /// | `new_key` | `vector` | New authentication key to be used for the account at the `to_recover` address. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress::RecoveryAddress` resource published under it. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ECANNOT_ROTATE_KEY` | The address of `account` is not `recovery_address` or `to_recover`. | + /// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `DiemAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. | + /// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::rotate_authentication_key` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce` + /// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce_admin` + RotateAuthenticationKeyWithRecoveryAddress { + recovery_address: AccountAddress, + to_recover: AccountAddress, + new_key: Bytes, + }, + + /// # Summary + /// Updates the url used for off-chain communication, and the public key used to verify dual + /// attestation on-chain. Transaction can be sent by any account that has dual attestation + /// information published under it. In practice the only such accounts are Designated Dealers and + /// Parent VASPs. + /// + /// # Technical Description + /// Updates the `base_url` and `compliance_public_key` fields of the `DualAttestation::Credential` + /// resource published under `account`. The `new_key` must be a valid ed25519 public key. + /// + /// # Events + /// Successful execution of this transaction emits two events: + /// * A `DualAttestation::ComplianceKeyRotationEvent` containing the new compliance public key, and + /// the blockchain time at which the key was updated emitted on the `DualAttestation::Credential` + /// `compliance_key_rotation_events` handle published under `account`; and + /// * A `DualAttestation::BaseUrlRotationEvent` containing the new base url to be used for + /// off-chain communication, and the blockchain time at which the url was updated emitted on the + /// `DualAttestation::Credential` `base_url_rotation_events` handle published under `account`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account of the transaction. | + /// | `new_url` | `vector` | ASCII-encoded url to be used for off-chain communication with `account`. | + /// | `new_key` | `vector` | New ed25519 public key to be used for on-chain dual attestation checking. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `DualAttestation::ECREDENTIAL` | A `DualAttestation::Credential` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_PUBLIC_KEY` | `new_key` is not a valid ed25519 public key. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_parent_vasp_account` + /// * `AccountCreationScripts::create_designated_dealer` + /// * `AccountAdministrationScripts::rotate_dual_attestation_info` + RotateDualAttestationInfo { new_url: Bytes, new_key: Bytes }, + + /// # Summary + /// Rotates the authentication key in a `SharedEd25519PublicKey`. This transaction can be sent by + /// any account that has previously published a shared ed25519 public key using + /// `AccountAdministrationScripts::publish_shared_ed25519_public_key`. + /// + /// # Technical Description + /// `public_key` must be a valid ed25519 public key. This transaction first rotates the public key stored in `account`'s + /// `SharedEd25519PublicKey::SharedEd25519PublicKey` resource to `public_key`, after which it + /// rotates the `account`'s authentication key to the new authentication key derived from `public_key` as defined + /// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys) + /// using the `DiemAccount::KeyRotationCapability` stored in `account`'s `SharedEd25519PublicKey::SharedEd25519PublicKey`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// | `public_key` | `vector` | 32-byte Ed25519 public key. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | A `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | + /// + /// # Related Scripts + /// * `AccountAdministrationScripts::publish_shared_ed25519_public_key` + RotateSharedEd25519PublicKey { public_key: Bytes }, + + /// # Summary + /// Updates the gas constants stored on chain and used by the VM for gas + /// metering. This transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the on-chain config holding the `VMConfig` and emits a + /// `Reconfiguration::NewEpochEvent` to trigger a reconfiguration of the system. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `global_memory_per_byte_cost` | `u64` | The new cost to read global memory per-byte to be used for gas metering. | + /// | `global_memory_per_byte_write_cost` | `u64` | The new cost to write global memory per-byte to be used for gas metering. | + /// | `min_transaction_gas_units` | `u64` | The new flat minimum amount of gas required for any transaction. | + /// | `large_transaction_cutoff` | `u64` | The new size over which an additional charge will be assessed for each additional byte. | + /// | `intrinsic_gas_per_byte` | `u64` | The new number of units of gas that to be charged per-byte over the new `large_transaction_cutoff`. | + /// | `maximum_number_of_gas_units` | `u64` | The new maximum number of gas units that can be set in a transaction. | + /// | `min_price_per_gas_unit` | `u64` | The new minimum gas price that can be set for a transaction. | + /// | `max_price_per_gas_unit` | `u64` | The new maximum gas price that can be set for a transaction. | + /// | `max_transaction_size_in_bytes` | `u64` | The new maximum size of a transaction that can be processed. | + /// | `gas_unit_scaling_factor` | `u64` | The new scaling factor to use when scaling between external and internal gas units. | + /// | `default_account_size` | `u64` | The new default account size to use when assessing final costs for reads and writes to global storage. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::INVALID_ARGUMENT` | `VMConfig::EGAS_CONSTANT_INCONSISTENCY` | The provided gas constants are inconsistent. | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + SetGasConstants { + sliding_nonce: u64, + global_memory_per_byte_cost: u64, + global_memory_per_byte_write_cost: u64, + min_transaction_gas_units: u64, + large_transaction_cutoff: u64, + intrinsic_gas_per_byte: u64, + maximum_number_of_gas_units: u64, + min_price_per_gas_unit: u64, + max_price_per_gas_unit: u64, + max_transaction_size_in_bytes: u64, + gas_unit_scaling_factor: u64, + default_account_size: u64, + }, + + /// # Summary + /// Updates a validator's configuration, and triggers a reconfiguration of the system to update the + /// validator set with this new validator configuration. Can only be successfully sent by a + /// Validator Operator account that is already registered with a validator. + /// + /// # Technical Description + /// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` + /// config resource held under `validator_account`. It then emits a `Reconfiguration::NewEpochEvent` to + /// trigger a reconfiguration of the system. This reconfiguration will update the validator set + /// on-chain with the updated `ValidatorConfig::ValidatorConfig`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `validator_operator_account` | `signer` | Signer of the sending account. Must be the registered validator operator for the validator at `validator_address`. | + /// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | + /// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR_OPERATOR` | `validator_operator_account` does not have a Validator Operator role. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | + /// | `Errors::INVALID_STATE` | `Reconfiguration::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::register_validator_config` + SetValidatorConfigAndReconfigure { + validator_account: AccountAddress, + consensus_pubkey: Bytes, + validator_network_addresses: Bytes, + fullnode_network_addresses: Bytes, + }, + + /// # Summary + /// Sets the validator operator for a validator in the validator's configuration resource "locally" + /// and does not reconfigure the system. Changes from this transaction will not picked up by the + /// system until a reconfiguration of the system is triggered. May only be sent by an account with + /// Validator role. + /// + /// # Technical Description + /// Sets the account at `operator_account` address and with the specified `human_name` as an + /// operator for the sending validator account. The account at `operator_account` address must have + /// a Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` + /// resource published under it. The sending `account` must be a Validator and have a + /// `ValidatorConfig::ValidatorConfig` resource published under it. This script does not emit a + /// `Reconfiguration::NewEpochEvent` and no reconfiguration of the system is initiated by this script. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | The signer of the sending account of the transaction. | + /// | `operator_name` | `vector` | Validator operator's human name. | + /// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | + /// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + SetValidatorOperator { + operator_name: Bytes, + operator_account: AccountAddress, + }, + + /// # Summary + /// Sets the validator operator for a validator in the validator's configuration resource "locally" + /// and does not reconfigure the system. Changes from this transaction will not picked up by the + /// system until a reconfiguration of the system is triggered. May only be sent by the Diem Root + /// account as a write set transaction. + /// + /// # Technical Description + /// Sets the account at `operator_account` address and with the specified `human_name` as an + /// operator for the validator `account`. The account at `operator_account` address must have a + /// Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource + /// published under it. The account represented by the `account` signer must be a Validator and + /// have a `ValidatorConfig::ValidatorConfig` resource published under it. No reconfiguration of + /// the system is initiated by this script. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `dr_account` | `signer` | Signer of the sending account of the write set transaction. May only be the Diem Root signer. | + /// | `account` | `signer` | Signer of account specified in the `execute_as` field of the write set transaction. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | + /// | `operator_name` | `vector` | Validator operator's human name. | + /// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | + /// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | + /// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | + /// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | + /// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | + /// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_validator_account` + /// * `AccountCreationScripts::create_validator_operator_account` + /// * `ValidatorAdministrationScripts::register_validator_config` + /// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` + /// * `ValidatorAdministrationScripts::set_validator_operator` + /// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` + SetValidatorOperatorWithNonceAdmin { + sliding_nonce: u64, + operator_name: Bytes, + operator_account: AccountAddress, + }, + + /// # Summary + /// Mints a specified number of coins in a currency to a Designated Dealer. The sending account + /// must be the Treasury Compliance account, and coins can only be minted to a Designated Dealer + /// account. + /// + /// # Technical Description + /// Mints `mint_amount` of coins in the `CoinType` currency to Designated Dealer account at + /// `designated_dealer_address`. The `tier_index` parameter specifies which tier should be used to + /// check verify the off-chain approval policy, and is based in part on the on-chain tier values + /// for the specific Designated Dealer, and the number of `CoinType` coins that have been minted to + /// the dealer over the past 24 hours. Every Designated Dealer has 4 tiers for each currency that + /// they support. The sending `tc_account` must be the Treasury Compliance account, and the + /// receiver an authorized Designated Dealer account. + /// + /// # Events + /// Successful execution of the transaction will emit two events: + /// * A `Diem::MintEvent` with the amount and currency code minted is emitted on the + /// `mint_event_handle` in the stored `Diem::CurrencyInfo` resource stored under + /// `0xA550C18`; and + /// * A `DesignatedDealer::ReceivedMintEvent` with the amount, currency code, and Designated + /// Dealer's address is emitted on the `mint_event_handle` in the stored `DesignatedDealer::Dealer` + /// resource published under the `designated_dealer_address`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `CoinType` | Type | The Move type for the `CoinType` being minted. `CoinType` must be an already-registered currency on-chain. | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `designated_dealer_address` | `address` | The address of the Designated Dealer account being minted to. | + /// | `mint_amount` | `u64` | The number of coins to be minted. | + /// | `tier_index` | `u64` | [Deprecated] The mint tier index to use for the Designated Dealer account. Will be ignored | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_MINT_AMOUNT` | `mint_amount` is zero. | + /// | `Errors::NOT_PUBLISHED` | `DesignatedDealer::EDEALER` | `DesignatedDealer::Dealer` or `DesignatedDealer::TierInfo` resource does not exist at `designated_dealer_address`. | + /// | `Errors::REQUIRES_CAPABILITY` | `Diem::EMINT_CAPABILITY` | `tc_account` does not have a `Diem::MintCapability` resource published under it. | + /// | `Errors::INVALID_STATE` | `Diem::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. | + /// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. | + /// + /// # Related Scripts + /// * `AccountCreationScripts::create_designated_dealer` + /// * `PaymentScripts::peer_to_peer_with_metadata` + /// * `AccountAdministrationScripts::rotate_dual_attestation_info` + TieredMint { + coin_type: TypeTag, + sliding_nonce: u64, + designated_dealer_address: AccountAddress, + mint_amount: u64, + tier_index: u64, + }, + + /// # Summary + /// Unfreezes the account at `address`. The sending account of this transaction must be the + /// Treasury Compliance account. After the successful execution of this transaction transactions + /// may be sent from the previously frozen account, and coins may be sent and received. + /// + /// # Technical Description + /// Sets the `AccountFreezing::FreezingBit` to `false` and emits a + /// `AccountFreezing::UnFreezeAccountEvent`. The transaction sender must be the Treasury Compliance + /// account. Note that this is a per-account property so unfreezing a Parent VASP will not effect + /// the status any of its child accounts and vice versa. + /// + /// # Events + /// Successful execution of this script will emit a `AccountFreezing::UnFreezeAccountEvent` with + /// the `unfrozen_address` set the `to_unfreeze_account`'s address. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `to_unfreeze_account` | `address` | The account address to be frozen. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::freeze_account` + UnfreezeAccount { + sliding_nonce: u64, + to_unfreeze_account: AccountAddress, + }, + + /// # Summary + /// Updates the Diem consensus config that is stored on-chain and is used by the Consensus. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the `DiemConsensusConfig` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger + /// a reconfiguration of the system. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `config` | `vector` | The serialized bytes of consensus config. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + UpdateDiemConsensusConfig { sliding_nonce: u64, config: Bytes }, + + /// # Summary + /// Updates the Diem major version that is stored on-chain and is used by the VM. This + /// transaction can only be sent from the Diem Root account. + /// + /// # Technical Description + /// Updates the `Version` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger + /// a reconfiguration of the system. The `major` version that is passed in must be strictly greater + /// than the current major version held on-chain. The VM reads this information and can use it to + /// preserve backwards compatibility with previous major versions of the VM. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | + /// | `Errors::INVALID_ARGUMENT` | `Version::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. | + UpdateDiemVersion { sliding_nonce: u64, major: u64 }, + + /// # Summary + /// Update the dual attestation limit on-chain. Defined in terms of micro-XDX. The transaction can + /// only be sent by the Treasury Compliance account. After this transaction all inter-VASP + /// payments over this limit must be checked for dual attestation. + /// + /// # Technical Description + /// Updates the `micro_xdx_limit` field of the `DualAttestation::Limit` resource published under + /// `0xA550C18`. The amount is set in micro-XDX. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | + /// | `new_micro_xdx_limit` | `u64` | The new dual attestation limit to be used on-chain. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::update_exchange_rate` + /// * `TreasuryComplianceScripts::update_minting_ability` + UpdateDualAttestationLimit { + sliding_nonce: u64, + new_micro_xdx_limit: u64, + }, + + /// # Summary + /// Update the rough on-chain exchange rate between a specified currency and XDX (as a conversion + /// to micro-XDX). The transaction can only be sent by the Treasury Compliance account. After this + /// transaction the updated exchange rate will be used for normalization of gas prices, and for + /// dual attestation checking. + /// + /// # Technical Description + /// Updates the on-chain exchange rate from the given `Currency` to micro-XDX. The exchange rate + /// is given by `new_exchange_rate_numerator/new_exchange_rate_denominator`. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` whose exchange rate is being updated. `Currency` must be an already-registered currency on-chain. | + /// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | + /// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for the transaction. | + /// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-XDX exchange rate for `Currency`. | + /// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-XDX exchange rate for `Currency`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | + /// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::EDENOMINATOR` | `new_exchange_rate_denominator` is zero. | + /// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | + /// | `Errors::LIMIT_EXCEEDED` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::update_dual_attestation_limit` + /// * `TreasuryComplianceScripts::update_minting_ability` + UpdateExchangeRate { + currency: TypeTag, + sliding_nonce: u64, + new_exchange_rate_numerator: u64, + new_exchange_rate_denominator: u64, + }, + + /// # Summary + /// Script to allow or disallow minting of new coins in a specified currency. This transaction can + /// only be sent by the Treasury Compliance account. Turning minting off for a currency will have + /// no effect on coins already in circulation, and coins may still be removed from the system. + /// + /// # Technical Description + /// This transaction sets the `can_mint` field of the `Diem::CurrencyInfo` resource + /// published under `0xA550C18` to the value of `allow_minting`. Minting of coins if allowed if + /// this field is set to `true` and minting of new coins in `Currency` is disallowed otherwise. + /// This transaction needs to be sent by the Treasury Compliance account. + /// + /// # Parameters + /// | Name | Type | Description | + /// | ------ | ------ | ------------- | + /// | `Currency` | Type | The Move type for the `Currency` whose minting ability is being updated. `Currency` must be an already-registered currency on-chain. | + /// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | + /// | `allow_minting` | `bool` | Whether to allow minting of new coins in `Currency`. | + /// + /// # Common Abort Conditions + /// | Error Category | Error Reason | Description | + /// | ---------------- | -------------- | ------------- | + /// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | + /// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. | + /// + /// # Related Scripts + /// * `TreasuryComplianceScripts::update_dual_attestation_limit` + /// * `TreasuryComplianceScripts::update_exchange_rate` + UpdateMintingAbility { + currency: TypeTag, + allow_minting: bool, + }, +} + +impl ScriptCall { + /// Build a Diem `Script` from a structured object `ScriptCall`. + pub fn encode(self) -> Script { + use ScriptCall::*; + match self { + AddCurrencyToAccount { currency } => encode_add_currency_to_account_script(currency), + AddRecoveryRotationCapability { recovery_address } => { + encode_add_recovery_rotation_capability_script(recovery_address) + } + AddValidatorAndReconfigure { + sliding_nonce, + validator_name, + validator_address, + } => encode_add_validator_and_reconfigure_script( + sliding_nonce, + validator_name, + validator_address, + ), + Burn { + token, + sliding_nonce, + preburn_address, + } => encode_burn_script(token, sliding_nonce, preburn_address), + BurnTxnFees { coin_type } => encode_burn_txn_fees_script(coin_type), + CancelBurn { + token, + preburn_address, + } => encode_cancel_burn_script(token, preburn_address), + CreateChildVaspAccount { + coin_type, + child_address, + auth_key_prefix, + add_all_currencies, + child_initial_balance, + } => encode_create_child_vasp_account_script( + coin_type, + child_address, + auth_key_prefix, + add_all_currencies, + child_initial_balance, + ), + CreateDesignatedDealer { + currency, + sliding_nonce, + addr, + auth_key_prefix, + human_name, + add_all_currencies, + } => encode_create_designated_dealer_script( + currency, + sliding_nonce, + addr, + auth_key_prefix, + human_name, + add_all_currencies, + ), + CreateParentVaspAccount { + coin_type, + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + add_all_currencies, + } => encode_create_parent_vasp_account_script( + coin_type, + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + add_all_currencies, + ), + CreateRecoveryAddress {} => encode_create_recovery_address_script(), + CreateValidatorAccount { + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + } => encode_create_validator_account_script( + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + ), + CreateValidatorOperatorAccount { + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + } => encode_create_validator_operator_account_script( + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + ), + FreezeAccount { + sliding_nonce, + to_freeze_account, + } => encode_freeze_account_script(sliding_nonce, to_freeze_account), + PeerToPeerWithMetadata { + currency, + payee, + amount, + metadata, + metadata_signature, + } => encode_peer_to_peer_with_metadata_script( + currency, + payee, + amount, + metadata, + metadata_signature, + ), + Preburn { token, amount } => encode_preburn_script(token, amount), + PublishSharedEd25519PublicKey { public_key } => { + encode_publish_shared_ed25519_public_key_script(public_key) + } + RegisterValidatorConfig { + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + } => encode_register_validator_config_script( + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + ), + RemoveValidatorAndReconfigure { + sliding_nonce, + validator_name, + validator_address, + } => encode_remove_validator_and_reconfigure_script( + sliding_nonce, + validator_name, + validator_address, + ), + RotateAuthenticationKey { new_key } => encode_rotate_authentication_key_script(new_key), + RotateAuthenticationKeyWithNonce { + sliding_nonce, + new_key, + } => encode_rotate_authentication_key_with_nonce_script(sliding_nonce, new_key), + RotateAuthenticationKeyWithNonceAdmin { + sliding_nonce, + new_key, + } => encode_rotate_authentication_key_with_nonce_admin_script(sliding_nonce, new_key), + RotateAuthenticationKeyWithRecoveryAddress { + recovery_address, + to_recover, + new_key, + } => encode_rotate_authentication_key_with_recovery_address_script( + recovery_address, + to_recover, + new_key, + ), + RotateDualAttestationInfo { new_url, new_key } => { + encode_rotate_dual_attestation_info_script(new_url, new_key) + } + RotateSharedEd25519PublicKey { public_key } => { + encode_rotate_shared_ed25519_public_key_script(public_key) + } + SetValidatorConfigAndReconfigure { + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + } => encode_set_validator_config_and_reconfigure_script( + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + ), + SetValidatorOperator { + operator_name, + operator_account, + } => encode_set_validator_operator_script(operator_name, operator_account), + SetValidatorOperatorWithNonceAdmin { + sliding_nonce, + operator_name, + operator_account, + } => encode_set_validator_operator_with_nonce_admin_script( + sliding_nonce, + operator_name, + operator_account, + ), + TieredMint { + coin_type, + sliding_nonce, + designated_dealer_address, + mint_amount, + tier_index, + } => encode_tiered_mint_script( + coin_type, + sliding_nonce, + designated_dealer_address, + mint_amount, + tier_index, + ), + UnfreezeAccount { + sliding_nonce, + to_unfreeze_account, + } => encode_unfreeze_account_script(sliding_nonce, to_unfreeze_account), + UpdateDiemVersion { + sliding_nonce, + major, + } => encode_update_diem_version_script(sliding_nonce, major), + UpdateDualAttestationLimit { + sliding_nonce, + new_micro_xdx_limit, + } => encode_update_dual_attestation_limit_script(sliding_nonce, new_micro_xdx_limit), + UpdateExchangeRate { + currency, + sliding_nonce, + new_exchange_rate_numerator, + new_exchange_rate_denominator, + } => encode_update_exchange_rate_script( + currency, + sliding_nonce, + new_exchange_rate_numerator, + new_exchange_rate_denominator, + ), + UpdateMintingAbility { + currency, + allow_minting, + } => encode_update_minting_ability_script(currency, allow_minting), + } + } + + /// Try to recognize a Diem `Script` and convert it into a structured object `ScriptCall`. + pub fn decode(script: &Script) -> Option { + match TRANSACTION_SCRIPT_DECODER_MAP.get(script.code()) { + Some(decoder) => decoder(script), + None => None, + } + } + + /// Return the name of a Diem `Script` from a structured object `ScriptCall`. + pub fn name(&self) -> &'static str { + use ScriptCall::*; + match self { + AddCurrencyToAccount { .. } => "add_currency_to_account", + AddRecoveryRotationCapability { .. } => "add_recovery_rotation_capability", + AddValidatorAndReconfigure { .. } => "add_validator_and_reconfigure", + Burn { .. } => "burn", + BurnTxnFees { .. } => "burn_txn_fees", + CancelBurn { .. } => "cancel_burn", + CreateChildVaspAccount { .. } => "create_child_vasp_account", + CreateDesignatedDealer { .. } => "create_designated_dealer", + CreateParentVaspAccount { .. } => "create_parent_vasp_account", + CreateRecoveryAddress { .. } => "create_recovery_address", + CreateValidatorAccount { .. } => "create_validator_account", + CreateValidatorOperatorAccount { .. } => "create_validator_operator_account", + FreezeAccount { .. } => "freeze_account", + PeerToPeerWithMetadata { .. } => "peer_to_peer_with_metadata", + Preburn { .. } => "preburn", + PublishSharedEd25519PublicKey { .. } => "publish_shared_ed25519_public_key", + RegisterValidatorConfig { .. } => "register_validator_config", + RemoveValidatorAndReconfigure { .. } => "remove_validator_and_reconfigure", + RotateAuthenticationKey { .. } => "rotate_authentication_key", + RotateAuthenticationKeyWithNonce { .. } => "rotate_authentication_key_with_nonce", + RotateAuthenticationKeyWithNonceAdmin { .. } => { + "rotate_authentication_key_with_nonce_admin" + } + RotateAuthenticationKeyWithRecoveryAddress { .. } => { + "rotate_authentication_key_with_recovery_address" + } + RotateDualAttestationInfo { .. } => "rotate_dual_attestation_info", + RotateSharedEd25519PublicKey { .. } => "rotate_shared_ed25519_public_key", + SetValidatorConfigAndReconfigure { .. } => "set_validator_config_and_reconfigure", + SetValidatorOperator { .. } => "set_validator_operator", + SetValidatorOperatorWithNonceAdmin { .. } => "set_validator_operator_with_nonce_admin", + TieredMint { .. } => "tiered_mint", + UnfreezeAccount { .. } => "unfreeze_account", + UpdateDiemVersion { .. } => "update_diem_version", + UpdateDualAttestationLimit { .. } => "update_dual_attestation_limit", + UpdateExchangeRate { .. } => "update_exchange_rate", + UpdateMintingAbility { .. } => "update_minting_ability", + } + } +} + +impl ScriptFunctionCall { + /// Build a Diem `TransactionPayload` from a structured object `ScriptFunctionCall`. + pub fn encode(self) -> TransactionPayload { + use ScriptFunctionCall::*; + match self { + AddCurrencyToAccount { currency } => { + encode_add_currency_to_account_script_function(currency) + } + AddRecoveryRotationCapability { recovery_address } => { + encode_add_recovery_rotation_capability_script_function(recovery_address) + } + AddValidatorAndReconfigure { + sliding_nonce, + validator_name, + validator_address, + } => encode_add_validator_and_reconfigure_script_function( + sliding_nonce, + validator_name, + validator_address, + ), + AddVaspDomain { address, domain } => { + encode_add_vasp_domain_script_function(address, domain) + } + BurnTxnFees { coin_type } => encode_burn_txn_fees_script_function(coin_type), + BurnWithAmount { + token, + sliding_nonce, + preburn_address, + amount, + } => encode_burn_with_amount_script_function( + token, + sliding_nonce, + preburn_address, + amount, + ), + CancelBurnWithAmount { + token, + preburn_address, + amount, + } => encode_cancel_burn_with_amount_script_function(token, preburn_address, amount), + CreateChildVaspAccount { + coin_type, + child_address, + auth_key_prefix, + add_all_currencies, + child_initial_balance, + } => encode_create_child_vasp_account_script_function( + coin_type, + child_address, + auth_key_prefix, + add_all_currencies, + child_initial_balance, + ), + CreateDesignatedDealer { + currency, + sliding_nonce, + addr, + auth_key_prefix, + human_name, + add_all_currencies, + } => encode_create_designated_dealer_script_function( + currency, + sliding_nonce, + addr, + auth_key_prefix, + human_name, + add_all_currencies, + ), + CreateParentVaspAccount { + coin_type, + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + add_all_currencies, + } => encode_create_parent_vasp_account_script_function( + coin_type, + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + add_all_currencies, + ), + CreateRecoveryAddress {} => encode_create_recovery_address_script_function(), + CreateValidatorAccount { + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + } => encode_create_validator_account_script_function( + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + ), + CreateValidatorOperatorAccount { + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + } => encode_create_validator_operator_account_script_function( + sliding_nonce, + new_account_address, + auth_key_prefix, + human_name, + ), + CreateVaspDomains {} => encode_create_vasp_domains_script_function(), + ForceExpire { shift_amount } => encode_force_expire_script_function(shift_amount), + FreezeAccount { + sliding_nonce, + to_freeze_account, + } => encode_freeze_account_script_function(sliding_nonce, to_freeze_account), + InitializeDiemConsensusConfig { sliding_nonce } => { + encode_initialize_diem_consensus_config_script_function(sliding_nonce) + } + OptInToCrsn { crsn_size } => encode_opt_in_to_crsn_script_function(crsn_size), + PeerToPeerBySigners { + currency, + amount, + metadata, + } => encode_peer_to_peer_by_signers_script_function(currency, amount, metadata), + PeerToPeerWithMetadata { + currency, + payee, + amount, + metadata, + metadata_signature, + } => encode_peer_to_peer_with_metadata_script_function( + currency, + payee, + amount, + metadata, + metadata_signature, + ), + Preburn { token, amount } => encode_preburn_script_function(token, amount), + PublishSharedEd25519PublicKey { public_key } => { + encode_publish_shared_ed25519_public_key_script_function(public_key) + } + RegisterValidatorConfig { + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + } => encode_register_validator_config_script_function( + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + ), + RemoveValidatorAndReconfigure { + sliding_nonce, + validator_name, + validator_address, + } => encode_remove_validator_and_reconfigure_script_function( + sliding_nonce, + validator_name, + validator_address, + ), + RemoveVaspDomain { address, domain } => { + encode_remove_vasp_domain_script_function(address, domain) + } + RotateAuthenticationKey { new_key } => { + encode_rotate_authentication_key_script_function(new_key) + } + RotateAuthenticationKeyWithNonce { + sliding_nonce, + new_key, + } => { + encode_rotate_authentication_key_with_nonce_script_function(sliding_nonce, new_key) + } + RotateAuthenticationKeyWithNonceAdmin { + sliding_nonce, + new_key, + } => encode_rotate_authentication_key_with_nonce_admin_script_function( + sliding_nonce, + new_key, + ), + RotateAuthenticationKeyWithRecoveryAddress { + recovery_address, + to_recover, + new_key, + } => encode_rotate_authentication_key_with_recovery_address_script_function( + recovery_address, + to_recover, + new_key, + ), + RotateDualAttestationInfo { new_url, new_key } => { + encode_rotate_dual_attestation_info_script_function(new_url, new_key) + } + RotateSharedEd25519PublicKey { public_key } => { + encode_rotate_shared_ed25519_public_key_script_function(public_key) + } + SetGasConstants { + sliding_nonce, + global_memory_per_byte_cost, + global_memory_per_byte_write_cost, + min_transaction_gas_units, + large_transaction_cutoff, + intrinsic_gas_per_byte, + maximum_number_of_gas_units, + min_price_per_gas_unit, + max_price_per_gas_unit, + max_transaction_size_in_bytes, + gas_unit_scaling_factor, + default_account_size, + } => encode_set_gas_constants_script_function( + sliding_nonce, + global_memory_per_byte_cost, + global_memory_per_byte_write_cost, + min_transaction_gas_units, + large_transaction_cutoff, + intrinsic_gas_per_byte, + maximum_number_of_gas_units, + min_price_per_gas_unit, + max_price_per_gas_unit, + max_transaction_size_in_bytes, + gas_unit_scaling_factor, + default_account_size, + ), + SetValidatorConfigAndReconfigure { + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + } => encode_set_validator_config_and_reconfigure_script_function( + validator_account, + consensus_pubkey, + validator_network_addresses, + fullnode_network_addresses, + ), + SetValidatorOperator { + operator_name, + operator_account, + } => encode_set_validator_operator_script_function(operator_name, operator_account), + SetValidatorOperatorWithNonceAdmin { + sliding_nonce, + operator_name, + operator_account, + } => encode_set_validator_operator_with_nonce_admin_script_function( + sliding_nonce, + operator_name, + operator_account, + ), + TieredMint { + coin_type, + sliding_nonce, + designated_dealer_address, + mint_amount, + tier_index, + } => encode_tiered_mint_script_function( + coin_type, + sliding_nonce, + designated_dealer_address, + mint_amount, + tier_index, + ), + UnfreezeAccount { + sliding_nonce, + to_unfreeze_account, + } => encode_unfreeze_account_script_function(sliding_nonce, to_unfreeze_account), + UpdateDiemConsensusConfig { + sliding_nonce, + config, + } => encode_update_diem_consensus_config_script_function(sliding_nonce, config), + UpdateDiemVersion { + sliding_nonce, + major, + } => encode_update_diem_version_script_function(sliding_nonce, major), + UpdateDualAttestationLimit { + sliding_nonce, + new_micro_xdx_limit, + } => encode_update_dual_attestation_limit_script_function( + sliding_nonce, + new_micro_xdx_limit, + ), + UpdateExchangeRate { + currency, + sliding_nonce, + new_exchange_rate_numerator, + new_exchange_rate_denominator, + } => encode_update_exchange_rate_script_function( + currency, + sliding_nonce, + new_exchange_rate_numerator, + new_exchange_rate_denominator, + ), + UpdateMintingAbility { + currency, + allow_minting, + } => encode_update_minting_ability_script_function(currency, allow_minting), + } + } + + /// Try to recognize a Diem `TransactionPayload` and convert it into a structured object `ScriptFunctionCall`. + pub fn decode(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + match SCRIPT_FUNCTION_DECODER_MAP.get(&format!( + "{}{}", + script.module().name(), + script.function() + )) { + Some(decoder) => decoder(payload), + None => None, + } + } else { + None + } + } +} + +/// # Summary +/// Adds a zero `Currency` balance to the sending `account`. This will enable `account` to +/// send, receive, and hold `Diem::Diem` coins. This transaction can be +/// successfully sent by any account that is allowed to hold balances +/// (e.g., VASP, Designated Dealer). +/// +/// # Technical Description +/// After the successful execution of this transaction the sending account will have a +/// `DiemAccount::Balance` resource with zero balance published under it. Only +/// accounts that can hold balances can send this transaction, the sending account cannot +/// already have a `DiemAccount::Balance` published under it. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` being added to the sending account of the transaction. `Currency` must be an already-registered currency on-chain. | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. | +/// | `Errors::ALREADY_PUBLISHED` | `DiemAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_child_vasp_account` +/// * `AccountCreationScripts::create_parent_vasp_account` +/// * `PaymentScripts::peer_to_peer_with_metadata` +pub fn encode_add_currency_to_account_script_function(currency: TypeTag) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("add_currency_to_account").to_owned(), + vec![currency], + vec![], + )) +} + +/// # Summary +/// Stores the sending accounts ability to rotate its authentication key with a designated recovery +/// account. Both the sending and recovery accounts need to belong to the same VASP and +/// both be VASP accounts. After this transaction both the sending account and the +/// specified recovery account can rotate the sender account's authentication key. +/// +/// # Technical Description +/// Adds the `DiemAccount::KeyRotationCapability` for the sending account +/// (`to_recover_account`) to the `RecoveryAddress::RecoveryAddress` resource under +/// `recovery_address`. After this transaction has been executed successfully the account at +/// `recovery_address` and the `to_recover_account` may rotate the authentication key of +/// `to_recover_account` (the sender of this transaction). +/// +/// The sending account of this transaction (`to_recover_account`) must not have previously given away its unique key +/// rotation capability, and must be a VASP account. The account at `recovery_address` +/// must also be a VASP account belonging to the same VASP as the `to_recover_account`. +/// Additionally the account at `recovery_address` must have already initialized itself as +/// a recovery account address using the `AccountAdministrationScripts::create_recovery_address` transaction script. +/// +/// The sending account's (`to_recover_account`) key rotation capability is +/// removed in this transaction and stored in the `RecoveryAddress::RecoveryAddress` +/// resource stored under the account at `recovery_address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `to_recover_account` | `signer` | The signer of the sending account of this transaction. | +/// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `DiemAccount::KeyRotationCapability` will be stored. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EINVALID_KEY_ROTATION_DELEGATION` | `to_recover_account` and `recovery_address` do not belong to the same VASP. | +/// | `Errors::LIMIT_EXCEEDED` | ` RecoveryAddress::EMAX_KEYS_REGISTERED` | `RecoveryAddress::MAX_REGISTERED_KEYS` have already been registered with this `recovery_address`. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::create_recovery_address` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` +pub fn encode_add_recovery_rotation_capability_script_function( + recovery_address: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("add_recovery_rotation_capability").to_owned(), + vec![], + vec![bcs::to_bytes(&recovery_address).unwrap()], + )) +} + +/// # Summary +/// Adds a validator account to the validator set, and triggers a +/// reconfiguration of the system to admit the account to the validator set for the system. This +/// transaction can only be successfully called by the Diem Root account. +/// +/// # Technical Description +/// This script adds the account at `validator_address` to the validator set. +/// This transaction emits a `Reconfiguration::NewEpochEvent` event and triggers a +/// reconfiguration. Once the reconfiguration triggered by this script's +/// execution has been performed, the account at the `validator_address` is +/// considered to be a validator in the network. +/// +/// This transaction script will fail if the `validator_address` address is already in the validator set +/// or does not have a `ValidatorConfig::ValidatorConfig` resource already published under it. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | +/// | `validator_address` | `address` | The validator account address to be added to the validator set. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. | +/// | `Errors::INVALID_STATE` | `Reconfiguration::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | +/// | `Errors::LIMIT_EXCEEDED` | `ValidatorSystem::EMAX_VALIDATORS` | The validator set is already at its maximum size. The validator could not be added. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_add_validator_and_reconfigure_script_function( + sliding_nonce: u64, + validator_name: Vec, + validator_address: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("ValidatorAdministrationScripts").to_owned(), + ), + ident_str!("add_validator_and_reconfigure").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&validator_name).unwrap(), + bcs::to_bytes(&validator_address).unwrap(), + ], + )) +} + +/// # Summary +/// Add a VASP domain to parent VASP account. The transaction can only be sent by +/// the Treasury Compliance account. +/// +/// # Technical Description +/// Adds a `VASPDomain::VASPDomain` to the `domains` field of the `VASPDomain::VASPDomains` resource published under +/// the account at `address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `address` | `address` | The `address` of the parent VASP account that will have have `domain` added to its domains. | +/// | `domain` | `vector` | The domain to be added. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAIN_MANAGER` | The `VASPDomain::VASPDomainManager` resource is not yet published under the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAINS_NOT_PUBLISHED` | `address` does not have a `VASPDomain::VASPDomains` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EDOMAIN_ALREADY_EXISTS` | The `domain` already exists in the list of `VASPDomain::VASPDomain`s in the `VASPDomain::VASPDomains` resource published under `address`. | +/// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EINVALID_VASP_DOMAIN` | The `domain` is greater in length than `VASPDomain::DOMAIN_LENGTH`. | +pub fn encode_add_vasp_domain_script_function( + address: AccountAddress, + domain: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("add_vasp_domain").to_owned(), + vec![], + vec![ + bcs::to_bytes(&address).unwrap(), + bcs::to_bytes(&domain).unwrap(), + ], + )) +} + +/// # Summary +/// Burns the transaction fees collected in the `CoinType` currency so that the +/// Diem association may reclaim the backing coins off-chain. May only be sent +/// by the Treasury Compliance account. +/// +/// # Technical Description +/// Burns the transaction fees collected in `CoinType` so that the +/// association may reclaim the backing coins. Once this transaction has executed +/// successfully all transaction fees that will have been collected in +/// `CoinType` since the last time this script was called with that specific +/// currency. Both `balance` and `preburn` fields in the +/// `TransactionFee::TransactionFee` resource published under the `0xB1E55ED` +/// account address will have a value of 0 after the successful execution of this script. +/// +/// # Events +/// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle +/// held in the `Diem::CurrencyInfo` resource's `burn_events` published under +/// `0xA550C18`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` being added to the sending account of the transaction. `CoinType` must be an already-registered currency on-chain. | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `TransactionFee::ETRANSACTION_FEE` | `CoinType` is not an accepted transaction fee currency. | +/// | `Errors::INVALID_ARGUMENT` | `Diem::ECOIN` | The collected fees in `CoinType` are zero. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::burn_with_amount` +/// * `TreasuryComplianceScripts::cancel_burn_with_amount` +pub fn encode_burn_txn_fees_script_function(coin_type: TypeTag) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("burn_txn_fees").to_owned(), + vec![coin_type], + vec![], + )) +} + +/// # Summary +/// Burns the coins held in a preburn resource in the preburn queue at the +/// specified preburn address, which are equal to the `amount` specified in the +/// transaction. Finds the first relevant outstanding preburn request with +/// matching amount and removes the contained coins from the system. The sending +/// account must be the Treasury Compliance account. +/// The account that holds the preburn queue resource will normally be a Designated +/// Dealer, but there are no enforced requirements that it be one. +/// +/// # Technical Description +/// This transaction permanently destroys all the coins of `Token` type +/// stored in the `Diem::Preburn` resource published under the +/// `preburn_address` account address. +/// +/// This transaction will only succeed if the sending `account` has a +/// `Diem::BurnCapability`, and a `Diem::Preburn` resource +/// exists under `preburn_address`, with a non-zero `to_burn` field. After the successful execution +/// of this transaction the `total_value` field in the +/// `Diem::CurrencyInfo` resource published under `0xA550C18` will be +/// decremented by the value of the `to_burn` field of the preburn resource +/// under `preburn_address` immediately before this transaction, and the +/// `to_burn` field of the preburn resource will have a zero value. +/// +/// # Events +/// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle +/// held in the `Diem::CurrencyInfo` resource's `burn_events` published under +/// `0xA550C18`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Token` | Type | The Move type for the `Token` currency being burned. `Token` must be an already-registered currency on-chain. | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction, must have a burn capability for `Token` published under it. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | +/// | `amount` | `u64` | The amount to be burned. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_NOT_FOUND` | The `Diem::PreburnQueue` resource under `preburn_address` does not contain a preburn request with a value matching `amount`. | +/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN_QUEUE` | The account at `preburn_address` does not have a `Diem::PreburnQueue` resource published under it. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::burn_txn_fees` +/// * `TreasuryComplianceScripts::cancel_burn_with_amount` +/// * `TreasuryComplianceScripts::preburn` +pub fn encode_burn_with_amount_script_function( + token: TypeTag, + sliding_nonce: u64, + preburn_address: AccountAddress, + amount: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("burn_with_amount").to_owned(), + vec![token], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&preburn_address).unwrap(), + bcs::to_bytes(&amount).unwrap(), + ], + )) +} + +/// # Summary +/// Cancels and returns the coins held in the preburn area under +/// `preburn_address`, which are equal to the `amount` specified in the transaction. Finds the first preburn +/// resource with the matching amount and returns the funds to the `preburn_address`'s balance. +/// Can only be successfully sent by an account with Treasury Compliance role. +/// +/// # Technical Description +/// Cancels and returns all coins held in the `Diem::Preburn` resource under the `preburn_address` and +/// return the funds to the `preburn_address` account's `DiemAccount::Balance`. +/// The transaction must be sent by an `account` with a `Diem::BurnCapability` +/// resource published under it. The account at `preburn_address` must have a +/// `Diem::Preburn` resource published under it, and its value must be nonzero. The transaction removes +/// the entire balance held in the `Diem::Preburn` resource, and returns it back to the account's +/// `DiemAccount::Balance` under `preburn_address`. Due to this, the account at +/// `preburn_address` must already have a balance in the `Token` currency published +/// before this script is called otherwise the transaction will fail. +/// +/// # Events +/// The successful execution of this transaction will emit: +/// * A `Diem::CancelBurnEvent` on the event handle held in the `Diem::CurrencyInfo` +/// resource's `burn_events` published under `0xA550C18`. +/// * A `DiemAccount::ReceivedPaymentEvent` on the `preburn_address`'s +/// `DiemAccount::DiemAccount` `received_events` event handle with both the `payer` and `payee` +/// being `preburn_address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Token` | Type | The Move type for the `Token` currenty that burning is being cancelled for. `Token` must be an already-registered currency on-chain. | +/// | `account` | `signer` | The signer of the sending account of this transaction, must have a burn capability for `Token` published under it. | +/// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | +/// | `amount` | `u64` | The amount to be cancelled. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_NOT_FOUND` | The `Diem::PreburnQueue` resource under `preburn_address` does not contain a preburn request with a value matching `amount`. | +/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN_QUEUE` | The account at `preburn_address` does not have a `Diem::PreburnQueue` resource published under it. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. | +/// | `Errors::INVALID_STATE` | `DualAttestation::EPAYEE_COMPLIANCE_KEY_NOT_SET` | The `account` does not have a compliance key set on it but dual attestion checking was performed. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::burn_txn_fees` +/// * `TreasuryComplianceScripts::burn_with_amount` +/// * `TreasuryComplianceScripts::preburn` +pub fn encode_cancel_burn_with_amount_script_function( + token: TypeTag, + preburn_address: AccountAddress, + amount: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("cancel_burn_with_amount").to_owned(), + vec![token], + vec![ + bcs::to_bytes(&preburn_address).unwrap(), + bcs::to_bytes(&amount).unwrap(), + ], + )) +} + +/// # Summary +/// Creates a Child VASP account with its parent being the sending account of the transaction. +/// The sender of the transaction must be a Parent VASP account. +/// +/// # Technical Description +/// Creates a `ChildVASP` account for the sender `parent_vasp` at `child_address` with a balance of +/// `child_initial_balance` in `CoinType` and an initial authentication key of +/// `auth_key_prefix | child_address`. Authentication key prefixes, and how to construct them from an ed25519 public key is described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// If `add_all_currencies` is true, the child address will have a zero balance in all available +/// currencies in the system. +/// +/// The new account will be a child account of the transaction sender, which must be a +/// Parent VASP account. The child account will be recorded against the limit of +/// child accounts of the creating Parent VASP account. +/// +/// # Events +/// Successful execution will emit: +/// * A `DiemAccount::CreateAccountEvent` with the `created` field being `child_address`, +/// and the `rold_id` field being `Roles::CHILD_VASP_ROLE_ID`. This is emitted on the +/// `DiemAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// Successful execution with a `child_initial_balance` greater than zero will additionaly emit: +/// * A `DiemAccount::SentPaymentEvent` with the `payee` field being `child_address`. +/// This is emitted on the Parent VASP's `DiemAccount::DiemAccount` `sent_events` handle. +/// * A `DiemAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address. +/// This is emitted on the new Child VASPS's `DiemAccount::DiemAccount` `received_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` that the child account should be created with. `CoinType` must be an already-registered currency on-chain. | +/// | `parent_vasp` | `signer` | The reference of the sending account. Must be a Parent VASP account. | +/// | `child_address` | `address` | Address of the to-be-created Child VASP account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | +/// | `child_initial_balance` | `u64` | The initial balance in `CoinType` to give the child account when it's created. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending account wasn't a Parent VASP account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `child_address` address is already taken. | +/// | `Errors::LIMIT_EXCEEDED` | `VASP::ETOO_MANY_CHILDREN` | The sending account has reached the maximum number of allowed child accounts. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | +/// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_parent_vasp_account` +/// * `AccountAdministrationScripts::add_currency_to_account` +/// * `AccountAdministrationScripts::rotate_authentication_key` +/// * `AccountAdministrationScripts::add_recovery_rotation_capability` +/// * `AccountAdministrationScripts::create_recovery_address` +pub fn encode_create_child_vasp_account_script_function( + coin_type: TypeTag, + child_address: AccountAddress, + auth_key_prefix: Vec, + add_all_currencies: bool, + child_initial_balance: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_child_vasp_account").to_owned(), + vec![coin_type], + vec![ + bcs::to_bytes(&child_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&add_all_currencies).unwrap(), + bcs::to_bytes(&child_initial_balance).unwrap(), + ], + )) +} + +/// # Summary +/// Creates a Designated Dealer account with the provided information, and initializes it with +/// default mint tiers. The transaction can only be sent by the Treasury Compliance account. +/// +/// # Technical Description +/// Creates an account with the Designated Dealer role at `addr` with authentication key +/// `auth_key_prefix` | `addr` and a 0 balance of type `Currency`. If `add_all_currencies` is true, +/// 0 balances for all available currencies in the system will also be added. This can only be +/// invoked by an account with the TreasuryCompliance role. +/// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// At the time of creation the account is also initialized with default mint tiers of (500_000, +/// 5000_000, 50_000_000, 500_000_000), and preburn areas for each currency that is added to the +/// account. +/// +/// # Events +/// Successful execution will emit: +/// * A `DiemAccount::CreateAccountEvent` with the `created` field being `addr`, +/// and the `rold_id` field being `Roles::DESIGNATED_DEALER_ROLE_ID`. This is emitted on the +/// `DiemAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` that the Designated Dealer should be initialized with. `Currency` must be an already-registered currency on-chain. | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `addr` | `address` | Address of the to-be-created Designated Dealer account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the Designated Dealer. | +/// | `add_all_currencies` | `bool` | Whether to publish preburn, balance, and tier info resources for all known (SCS) currencies or just `Currency` when the account is created. | +/// + +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `addr` address is already taken. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::tiered_mint` +/// * `PaymentScripts::peer_to_peer_with_metadata` +/// * `AccountAdministrationScripts::rotate_dual_attestation_info` +pub fn encode_create_designated_dealer_script_function( + currency: TypeTag, + sliding_nonce: u64, + addr: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, + add_all_currencies: bool, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_designated_dealer").to_owned(), + vec![currency], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&addr).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&human_name).unwrap(), + bcs::to_bytes(&add_all_currencies).unwrap(), + ], + )) +} + +/// # Summary +/// Creates a Parent VASP account with the specified human name. Must be called by the Treasury Compliance account. +/// +/// # Technical Description +/// Creates an account with the Parent VASP role at `address` with authentication key +/// `auth_key_prefix` | `new_account_address` and a 0 balance of type `CoinType`. If +/// `add_all_currencies` is true, 0 balances for all available currencies in the system will +/// also be added. This can only be invoked by an TreasuryCompliance account. +/// `sliding_nonce` is a unique nonce for operation, see `SlidingNonce` for details. +/// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// # Events +/// Successful execution will emit: +/// * A `DiemAccount::CreateAccountEvent` with the `created` field being `new_account_address`, +/// and the `rold_id` field being `Roles::PARENT_VASP_ROLE_ID`. This is emitted on the +/// `DiemAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` currency that the Parent VASP account should be initialized with. `CoinType` must be an already-registered currency on-chain. | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Parent VASP account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the Parent VASP. | +/// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_child_vasp_account` +/// * `AccountAdministrationScripts::add_currency_to_account` +/// * `AccountAdministrationScripts::rotate_authentication_key` +/// * `AccountAdministrationScripts::add_recovery_rotation_capability` +/// * `AccountAdministrationScripts::create_recovery_address` +/// * `AccountAdministrationScripts::rotate_dual_attestation_info` +pub fn encode_create_parent_vasp_account_script_function( + coin_type: TypeTag, + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, + add_all_currencies: bool, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_parent_vasp_account").to_owned(), + vec![coin_type], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&human_name).unwrap(), + bcs::to_bytes(&add_all_currencies).unwrap(), + ], + )) +} + +/// # Summary +/// Initializes the sending account as a recovery address that may be used by +/// other accounts belonging to the same VASP as `account`. +/// The sending account must be a VASP account, and can be either a child or parent VASP account. +/// Multiple recovery addresses can exist for a single VASP, but accounts in +/// each must be disjoint. +/// +/// # Technical Description +/// Publishes a `RecoveryAddress::RecoveryAddress` resource under `account`. It then +/// extracts the `DiemAccount::KeyRotationCapability` for `account` and adds +/// it to the resource. After the successful execution of this transaction +/// other accounts may add their key rotation to this resource so that `account` +/// may be used as a recovery account for those accounts. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ENOT_A_VASP` | `account` is not a VASP account. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EKEY_ROTATION_DEPENDENCY_CYCLE` | A key rotation recovery cycle would be created by adding `account`'s key rotation capability. | +/// | `Errors::ALREADY_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | A `RecoveryAddress::RecoveryAddress` resource has already been published under `account`. | +/// +/// # Related Scripts +/// * `Script::add_recovery_rotation_capability` +/// * `Script::rotate_authentication_key_with_recovery_address` +pub fn encode_create_recovery_address_script_function() -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("create_recovery_address").to_owned(), + vec![], + vec![], + )) +} + +/// # Summary +/// Creates a Validator account. This transaction can only be sent by the Diem +/// Root account. +/// +/// # Technical Description +/// Creates an account with a Validator role at `new_account_address`, with authentication key +/// `auth_key_prefix` | `new_account_address`. It publishes a +/// `ValidatorConfig::ValidatorConfig` resource with empty `config`, and +/// `operator_account` fields. The `human_name` field of the +/// `ValidatorConfig::ValidatorConfig` is set to the passed in `human_name`. +/// This script does not add the validator to the validator set or the system, +/// but only creates the account. +/// Authentication keys, prefixes, and how to construct them from an ed25519 public key are described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// # Events +/// Successful execution will emit: +/// * A `DiemAccount::CreateAccountEvent` with the `created` field being `new_account_address`, +/// and the `rold_id` field being `Roles::VALIDATOR_ROLE_ID`. This is emitted on the +/// `DiemAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Validator account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the validator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_create_validator_account_script_function( + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_validator_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&human_name).unwrap(), + ], + )) +} + +/// # Summary +/// Creates a Validator Operator account. This transaction can only be sent by the Diem +/// Root account. +/// +/// # Technical Description +/// Creates an account with a Validator Operator role at `new_account_address`, with authentication key +/// `auth_key_prefix` | `new_account_address`. It publishes a +/// `ValidatorOperatorConfig::ValidatorOperatorConfig` resource with the specified `human_name`. +/// This script does not assign the validator operator to any validator accounts but only creates the account. +/// Authentication key prefixes, and how to construct them from an ed25519 public key are described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// +/// # Events +/// Successful execution will emit: +/// * A `DiemAccount::CreateAccountEvent` with the `created` field being `new_account_address`, +/// and the `rold_id` field being `Roles::VALIDATOR_OPERATOR_ROLE_ID`. This is emitted on the +/// `DiemAccount::AccountOperationsCapability` `creation_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Validator account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the validator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_create_validator_operator_account_script_function( + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountCreationScripts").to_owned(), + ), + ident_str!("create_validator_operator_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_account_address).unwrap(), + bcs::to_bytes(&auth_key_prefix).unwrap(), + bcs::to_bytes(&human_name).unwrap(), + ], + )) +} + +/// # Summary +/// Publishes a `VASPDomain::VASPDomains` resource under a parent VASP account. +/// The sending account must be a parent VASP account. +/// +/// # Technical Description +/// Publishes a `VASPDomain::VASPDomains` resource under `account`. +/// The The `VASPDomain::VASPDomains` resource's `domains` field is a vector +/// of VASPDomain, and will be empty on at the end of processing this transaction. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::ALREADY_PUBLISHED` | `VASPDomain::EVASP_DOMAINS` | A `VASPDomain::VASPDomains` resource has already been published under `account`. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending `account` was not a parent VASP account. | +pub fn encode_create_vasp_domains_script_function() -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("create_vasp_domains").to_owned(), + vec![], + vec![], + )) +} + +/// # Summary +/// Shifts the window held by the CRSN resource published under `account` +/// by `shift_amount`. This will expire all unused slots in the CRSN at the +/// time of processing that are less than `shift_amount`. The exact +/// semantics are defined in DIP-168. +/// +/// # Technical Description +/// This shifts the slots in the published `CRSN::CRSN` resource under +/// `account` by `shift_amount`, and increments the CRSN's `min_nonce` field +/// by `shift_amount` as well. After this, it will shift the window over +/// any set bits. It is important to note that the sequence nonce of the +/// sending transaction must still lie within the range of the window in +/// order for this transaction to be processed successfully. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// | `shift_amount` | `u64` | The amount to shift the window in the CRSN under `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `CRSN::ENO_CRSN` | A `CRSN::CRSN` resource is not published under `account`. | +pub fn encode_force_expire_script_function(shift_amount: u64) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("force_expire").to_owned(), + vec![], + vec![bcs::to_bytes(&shift_amount).unwrap()], + )) +} + +/// # Summary +/// Freezes the account at `address`. The sending account of this transaction +/// must be the Treasury Compliance account. The account being frozen cannot be +/// the Diem Root or Treasury Compliance account. After the successful +/// execution of this transaction no transactions may be sent from the frozen +/// account, and the frozen account may not send or receive coins. +/// +/// # Technical Description +/// Sets the `AccountFreezing::FreezingBit` to `true` and emits a +/// `AccountFreezing::FreezeAccountEvent`. The transaction sender must be the +/// Treasury Compliance account, but the account at `to_freeze_account` must +/// not be either `0xA550C18` (the Diem Root address), or `0xB1E55ED` (the +/// Treasury Compliance address). Note that this is a per-account property +/// e.g., freezing a Parent VASP will not effect the status any of its child +/// accounts and vice versa. +/// + +/// # Events +/// Successful execution of this transaction will emit a `AccountFreezing::FreezeAccountEvent` on +/// the `freeze_event_handle` held in the `AccountFreezing::FreezeEventsHolder` resource published +/// under `0xA550C18` with the `frozen_address` being the `to_freeze_account`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `to_freeze_account` | `address` | The account address to be frozen. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_TC` | `to_freeze_account` was the Treasury Compliance account (`0xB1E55ED`). | +/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_DIEM_ROOT` | `to_freeze_account` was the Diem Root account (`0xA550C18`). | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::unfreeze_account` +pub fn encode_freeze_account_script_function( + sliding_nonce: u64, + to_freeze_account: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("freeze_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&to_freeze_account).unwrap(), + ], + )) +} + +/// # Summary +/// Initializes the Diem consensus config that is stored on-chain. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Initializes the `DiemConsensusConfig` on-chain config to empty and allows future updates from DiemRoot via +/// `update_diem_consensus_config`. This doesn't emit a `Reconfiguration::NewEpochEvent`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +pub fn encode_initialize_diem_consensus_config_script_function( + sliding_nonce: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("initialize_diem_consensus_config").to_owned(), + vec![], + vec![bcs::to_bytes(&sliding_nonce).unwrap()], + )) +} + +/// # Summary +/// Publishes a CRSN resource under `account` and opts the account in to +/// concurrent transaction processing. Upon successful execution of this +/// script, all further transactions sent from this account will be ordered +/// and processed according to DIP-168. +/// +/// # Technical Description +/// This publishes a `CRSN::CRSN` resource under `account` with `crsn_size` +/// number of slots. All slots will be initialized to the empty (unused) +/// state, and the CRSN resource's `min_nonce` field will be set to the transaction's +/// sequence number + 1. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// | `crsn_size` | `u64` | The the number of slots the published CRSN will have. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `CRSN::EHAS_CRSN` | A `CRSN::CRSN` resource was already published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `CRSN::EZERO_SIZE_CRSN` | The `crsn_size` was zero. | +pub fn encode_opt_in_to_crsn_script_function(crsn_size: u64) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("opt_in_to_crsn").to_owned(), + vec![], + vec![bcs::to_bytes(&crsn_size).unwrap()], + )) +} + +/// # Summary +/// Transfers a given number of coins in a specified currency from one account to another by multi-agent transaction. +/// Transfers over a specified amount defined on-chain that are between two different VASPs, or +/// other accounts that have opted-in will be subject to on-chain checks to ensure the receiver has +/// agreed to receive the coins. This transaction can be sent by any account that can hold a +/// balance, and to any account that can hold a balance. Both accounts must hold balances in the +/// currency being transacted. +/// +/// # Technical Description +/// +/// Transfers `amount` coins of type `Currency` from `payer` to `payee` with (optional) associated +/// `metadata`. +/// Dual attestation is not applied to this script as payee is also a signer of the transaction. +/// Standardized `metadata` BCS format can be found in `aptos_types::transaction::metadata::Metadata`. +/// +/// # Events +/// Successful execution of this script emits two events: +/// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and +/// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` being sent in this transaction. `Currency` must be an already-registered currency on-chain. | +/// | `payer` | `signer` | The signer of the sending account that coins are being transferred from. | +/// | `payee` | `signer` | The signer of the receiving account that the coins are being transferred to. | +/// | `metadata` | `vector` | Optional metadata about this payment. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. | +/// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_child_vasp_account` +/// * `AccountCreationScripts::create_parent_vasp_account` +/// * `AccountAdministrationScripts::add_currency_to_account` +/// * `PaymentScripts::peer_to_peer_with_metadata` +pub fn encode_peer_to_peer_by_signers_script_function( + currency: TypeTag, + amount: u64, + metadata: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("PaymentScripts").to_owned(), + ), + ident_str!("peer_to_peer_by_signers").to_owned(), + vec![currency], + vec![ + bcs::to_bytes(&amount).unwrap(), + bcs::to_bytes(&metadata).unwrap(), + ], + )) +} + +/// # Summary +/// Transfers a given number of coins in a specified currency from one account to another. +/// Transfers over a specified amount defined on-chain that are between two different VASPs, or +/// other accounts that have opted-in will be subject to on-chain checks to ensure the receiver has +/// agreed to receive the coins. This transaction can be sent by any account that can hold a +/// balance, and to any account that can hold a balance. Both accounts must hold balances in the +/// currency being transacted. +/// +/// # Technical Description +/// +/// Transfers `amount` coins of type `Currency` from `payer` to `payee` with (optional) associated +/// `metadata` and an (optional) `metadata_signature` on the message of the form +/// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`, that +/// has been signed by the `payee`'s private key associated with the `compliance_public_key` held in +/// the `payee`'s `DualAttestation::Credential`. Both the `Signer::address_of(payer)` and `amount` fields +/// in the `metadata_signature` must be BCS-encoded bytes, and `|` denotes concatenation. +/// The `metadata` and `metadata_signature` parameters are only required if `amount` >= +/// `DualAttestation::get_cur_microdiem_limit` XDX and `payer` and `payee` are distinct VASPs. +/// However, a transaction sender can opt in to dual attestation even when it is not required +/// (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. +/// Standardized `metadata` BCS format can be found in `aptos_types::transaction::metadata::Metadata`. +/// +/// # Events +/// Successful execution of this script emits two events: +/// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and +/// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` being sent in this transaction. `Currency` must be an already-registered currency on-chain. | +/// | `payer` | `signer` | The signer of the sending account that coins are being transferred from. | +/// | `payee` | `address` | The address of the account the coins are being transferred to. | +/// | `metadata` | `vector` | Optional metadata about this payment. | +/// | `metadata_signature` | `vector` | Optional signature over `metadata` and payment information. See | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. | +/// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. | +/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EMALFORMED_METADATA_SIGNATURE` | `metadata_signature` is not 64 bytes. | +/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_METADATA_SIGNATURE` | `metadata_signature` does not verify on the against the `payee'`s `DualAttestation::Credential` `compliance_public_key` public key. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_child_vasp_account` +/// * `AccountCreationScripts::create_parent_vasp_account` +/// * `AccountAdministrationScripts::add_currency_to_account` +/// * `PaymentScripts::peer_to_peer_by_signers` +pub fn encode_peer_to_peer_with_metadata_script_function( + currency: TypeTag, + payee: AccountAddress, + amount: u64, + metadata: Vec, + metadata_signature: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("PaymentScripts").to_owned(), + ), + ident_str!("peer_to_peer_with_metadata").to_owned(), + vec![currency], + vec![ + bcs::to_bytes(&payee).unwrap(), + bcs::to_bytes(&amount).unwrap(), + bcs::to_bytes(&metadata).unwrap(), + bcs::to_bytes(&metadata_signature).unwrap(), + ], + )) +} + +/// # Summary +/// Moves a specified number of coins in a given currency from the account's +/// balance to its preburn area after which the coins may be burned. This +/// transaction may be sent by any account that holds a balance and preburn area +/// in the specified currency. +/// +/// # Technical Description +/// Moves the specified `amount` of coins in `Token` currency from the sending `account`'s +/// `DiemAccount::Balance` to the `Diem::Preburn` published under the same +/// `account`. `account` must have both of these resources published under it at the start of this +/// transaction in order for it to execute successfully. +/// +/// # Events +/// Successful execution of this script emits two events: +/// * `DiemAccount::SentPaymentEvent ` on `account`'s `DiemAccount::DiemAccount` `sent_events` +/// handle with the `payee` and `payer` fields being `account`'s address; and +/// * A `Diem::PreburnEvent` with `Token`'s currency code on the +/// `Diem::CurrencyInfo` resource published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_OCCUPIED` | The `value` field in the `Diem::Preburn` resource under the sender is non-zero. | +/// | `Errors::NOT_PUBLISHED` | `Roles::EROLE_ID` | The `account` did not have a role assigned to it. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDESIGNATED_DEALER` | The `account` did not have the role of DesignatedDealer. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::cancel_burn_with_amount` +/// * `TreasuryComplianceScripts::burn_with_amount` +/// * `TreasuryComplianceScripts::burn_txn_fees` +pub fn encode_preburn_script_function(token: TypeTag, amount: u64) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("preburn").to_owned(), + vec![token], + vec![bcs::to_bytes(&amount).unwrap()], + )) +} + +/// # Summary +/// Rotates the authentication key of the sending account to the newly-specified ed25519 public key and +/// publishes a new shared authentication key derived from that public key under the sender's account. +/// Any account can send this transaction. +/// +/// # Technical Description +/// Rotates the authentication key of the sending account to the +/// [authentication key derived from `public_key`](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys) +/// and publishes a `SharedEd25519PublicKey::SharedEd25519PublicKey` resource +/// containing the 32-byte ed25519 `public_key` and the `DiemAccount::KeyRotationCapability` for +/// `account` under `account`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// | `public_key` | `vector` | A valid 32-byte Ed25519 public key for `account`'s authentication key to be rotated to and stored. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability` resource. | +/// | `Errors::ALREADY_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | The `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is already published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::rotate_shared_ed25519_public_key` +pub fn encode_publish_shared_ed25519_public_key_script_function( + public_key: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("publish_shared_ed25519_public_key").to_owned(), + vec![], + vec![bcs::to_bytes(&public_key).unwrap()], + )) +} + +/// # Summary +/// Updates a validator's configuration. This does not reconfigure the system and will not update +/// the configuration in the validator set that is seen by other validators in the network. Can +/// only be successfully sent by a Validator Operator account that is already registered with a +/// validator. +/// +/// # Technical Description +/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` +/// config resource held under `validator_account`. It does not emit a `Reconfiguration::NewEpochEvent` +/// so the copy of this config held in the validator set will not be updated, and the changes are +/// only "locally" under the `validator_account` account address. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `validator_operator_account` | `signer` | Signer of the sending account. Must be the registered validator operator for the validator at `validator_address`. | +/// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | +/// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_register_validator_config_script_function( + validator_account: AccountAddress, + consensus_pubkey: Vec, + validator_network_addresses: Vec, + fullnode_network_addresses: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("ValidatorAdministrationScripts").to_owned(), + ), + ident_str!("register_validator_config").to_owned(), + vec![], + vec![ + bcs::to_bytes(&validator_account).unwrap(), + bcs::to_bytes(&consensus_pubkey).unwrap(), + bcs::to_bytes(&validator_network_addresses).unwrap(), + bcs::to_bytes(&fullnode_network_addresses).unwrap(), + ], + )) +} + +/// # Summary +/// This script removes a validator account from the validator set, and triggers a reconfiguration +/// of the system to remove the validator from the system. This transaction can only be +/// successfully called by the Diem Root account. +/// +/// # Technical Description +/// This script removes the account at `validator_address` from the validator set. This transaction +/// emits a `Reconfiguration::NewEpochEvent` event. Once the reconfiguration triggered by this event +/// has been performed, the account at `validator_address` is no longer considered to be a +/// validator in the network. This transaction will fail if the validator at `validator_address` +/// is not in the validator set. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | +/// | `validator_address` | `address` | The validator account address to be removed from the validator set. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | +/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::INVALID_STATE` | `Reconfiguration::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_remove_validator_and_reconfigure_script_function( + sliding_nonce: u64, + validator_name: Vec, + validator_address: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("ValidatorAdministrationScripts").to_owned(), + ), + ident_str!("remove_validator_and_reconfigure").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&validator_name).unwrap(), + bcs::to_bytes(&validator_address).unwrap(), + ], + )) +} + +/// # Summary +/// Remove a VASP domain from parent VASP account. The transaction can only be sent by +/// the Treasury Compliance account. +/// +/// # Technical Description +/// Removes a `VASPDomain::VASPDomain` from the `domains` field of the `VASPDomain::VASPDomains` resource published under +/// account with `address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `address` | `address` | The `address` of parent VASP account that will update its domains. | +/// | `domain` | `vector` | The domain name. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAIN_MANAGER` | The `VASPDomain::VASPDomainManager` resource is not yet published under the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `VASPDomain::EVASP_DOMAINS_NOT_PUBLISHED` | `address` does not have a `VASPDomain::VASPDomains` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EINVALID_VASP_DOMAIN` | The `domain` is greater in length than `VASPDomain::DOMAIN_LENGTH`. | +/// | `Errors::INVALID_ARGUMENT` | `VASPDomain::EVASP_DOMAIN_NOT_FOUND` | The `domain` does not exist in the list of `VASPDomain::VASPDomain`s in the `VASPDomain::VASPDomains` resource published under `address`. | +pub fn encode_remove_vasp_domain_script_function( + address: AccountAddress, + domain: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("remove_vasp_domain").to_owned(), + vec![], + vec![ + bcs::to_bytes(&address).unwrap(), + bcs::to_bytes(&domain).unwrap(), + ], + )) +} + +/// # Summary +/// Rotates the `account`'s authentication key to the supplied new authentication key. May be sent by any account. +/// +/// # Technical Description +/// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` +/// field to `new_key`. `new_key` must be a valid authentication key that +/// corresponds to an ed25519 public key as described [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys), +/// and `account` must not have previously delegated its `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account of the transaction. | +/// | `new_key` | `vector` | New authentication key to be used for `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce_admin` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` +pub fn encode_rotate_authentication_key_script_function(new_key: Vec) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("rotate_authentication_key").to_owned(), + vec![], + vec![bcs::to_bytes(&new_key).unwrap()], + )) +} + +/// # Summary +/// Rotates the sender's authentication key to the supplied new authentication key. May be sent by +/// any account that has a sliding nonce resource published under it (usually this is Treasury +/// Compliance or Diem Root accounts). +/// +/// # Technical Description +/// Rotates the `account`'s `DiemAccount::DiemAccount` `authentication_key` +/// field to `new_key`. `new_key` must be a valid authentication key that +/// corresponds to an ed25519 public key as described [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys), +/// and `account` must not have previously delegated its `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account of the transaction. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_key` | `vector` | New authentication key to be used for `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::rotate_authentication_key` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce_admin` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` +pub fn encode_rotate_authentication_key_with_nonce_script_function( + sliding_nonce: u64, + new_key: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("rotate_authentication_key_with_nonce").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_key).unwrap(), + ], + )) +} + +/// # Summary +/// Rotates the specified account's authentication key to the supplied new authentication key. May +/// only be sent by the Diem Root account as a write set transaction. +/// +/// # Technical Description +/// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. +/// `new_key` must be a valid authentication key that corresponds to an ed25519 +/// public key as described [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys), +/// and `account` must not have previously delegated its `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | The signer of the sending account of the write set transaction. May only be the Diem Root signer. | +/// | `account` | `signer` | Signer of account specified in the `execute_as` field of the write set transaction. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | +/// | `new_key` | `vector` | New authentication key to be used for `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::rotate_authentication_key` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_recovery_address` +pub fn encode_rotate_authentication_key_with_nonce_admin_script_function( + sliding_nonce: u64, + new_key: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("rotate_authentication_key_with_nonce_admin").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_key).unwrap(), + ], + )) +} + +/// # Summary +/// Rotates the authentication key of a specified account that is part of a recovery address to a +/// new authentication key. Only used for accounts that are part of a recovery address (see +/// `AccountAdministrationScripts::add_recovery_rotation_capability` for account restrictions). +/// +/// # Technical Description +/// Rotates the authentication key of the `to_recover` account to `new_key` using the +/// `DiemAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource +/// published under `recovery_address`. `new_key` must be a valide authentication key as described +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys). +/// This transaction can be sent either by the `to_recover` account, or by the account where the +/// `RecoveryAddress::RecoveryAddress` resource is published that contains `to_recover`'s `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account of the transaction. | +/// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `DiemAccount::KeyRotationCapability` is published. | +/// | `to_recover` | `address` | The address of the account whose authentication key will be updated. | +/// | `new_key` | `vector` | New authentication key to be used for the account at the `to_recover` address. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress::RecoveryAddress` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ECANNOT_ROTATE_KEY` | The address of `account` is not `recovery_address` or `to_recover`. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `DiemAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::rotate_authentication_key` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce` +/// * `AccountAdministrationScripts::rotate_authentication_key_with_nonce_admin` +pub fn encode_rotate_authentication_key_with_recovery_address_script_function( + recovery_address: AccountAddress, + to_recover: AccountAddress, + new_key: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("rotate_authentication_key_with_recovery_address").to_owned(), + vec![], + vec![ + bcs::to_bytes(&recovery_address).unwrap(), + bcs::to_bytes(&to_recover).unwrap(), + bcs::to_bytes(&new_key).unwrap(), + ], + )) +} + +/// # Summary +/// Updates the url used for off-chain communication, and the public key used to verify dual +/// attestation on-chain. Transaction can be sent by any account that has dual attestation +/// information published under it. In practice the only such accounts are Designated Dealers and +/// Parent VASPs. +/// +/// # Technical Description +/// Updates the `base_url` and `compliance_public_key` fields of the `DualAttestation::Credential` +/// resource published under `account`. The `new_key` must be a valid ed25519 public key. +/// +/// # Events +/// Successful execution of this transaction emits two events: +/// * A `DualAttestation::ComplianceKeyRotationEvent` containing the new compliance public key, and +/// the blockchain time at which the key was updated emitted on the `DualAttestation::Credential` +/// `compliance_key_rotation_events` handle published under `account`; and +/// * A `DualAttestation::BaseUrlRotationEvent` containing the new base url to be used for +/// off-chain communication, and the blockchain time at which the url was updated emitted on the +/// `DualAttestation::Credential` `base_url_rotation_events` handle published under `account`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account of the transaction. | +/// | `new_url` | `vector` | ASCII-encoded url to be used for off-chain communication with `account`. | +/// | `new_key` | `vector` | New ed25519 public key to be used for on-chain dual attestation checking. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `DualAttestation::ECREDENTIAL` | A `DualAttestation::Credential` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_PUBLIC_KEY` | `new_key` is not a valid ed25519 public key. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_parent_vasp_account` +/// * `AccountCreationScripts::create_designated_dealer` +/// * `AccountAdministrationScripts::rotate_dual_attestation_info` +pub fn encode_rotate_dual_attestation_info_script_function( + new_url: Vec, + new_key: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("rotate_dual_attestation_info").to_owned(), + vec![], + vec![ + bcs::to_bytes(&new_url).unwrap(), + bcs::to_bytes(&new_key).unwrap(), + ], + )) +} + +/// # Summary +/// Rotates the authentication key in a `SharedEd25519PublicKey`. This transaction can be sent by +/// any account that has previously published a shared ed25519 public key using +/// `AccountAdministrationScripts::publish_shared_ed25519_public_key`. +/// +/// # Technical Description +/// `public_key` must be a valid ed25519 public key. This transaction first rotates the public key stored in `account`'s +/// `SharedEd25519PublicKey::SharedEd25519PublicKey` resource to `public_key`, after which it +/// rotates the `account`'s authentication key to the new authentication key derived from `public_key` as defined +/// [here](https://developers.aptoslabs.com/docs/core/accounts/#addresses-authentication-keys-and-cryptographic-keys) +/// using the `DiemAccount::KeyRotationCapability` stored in `account`'s `SharedEd25519PublicKey::SharedEd25519PublicKey`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// | `public_key` | `vector` | 32-byte Ed25519 public key. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | A `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | +/// +/// # Related Scripts +/// * `AccountAdministrationScripts::publish_shared_ed25519_public_key` +pub fn encode_rotate_shared_ed25519_public_key_script_function( + public_key: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("AccountAdministrationScripts").to_owned(), + ), + ident_str!("rotate_shared_ed25519_public_key").to_owned(), + vec![], + vec![bcs::to_bytes(&public_key).unwrap()], + )) +} + +/// # Summary +/// Updates the gas constants stored on chain and used by the VM for gas +/// metering. This transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the on-chain config holding the `VMConfig` and emits a +/// `Reconfiguration::NewEpochEvent` to trigger a reconfiguration of the system. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `global_memory_per_byte_cost` | `u64` | The new cost to read global memory per-byte to be used for gas metering. | +/// | `global_memory_per_byte_write_cost` | `u64` | The new cost to write global memory per-byte to be used for gas metering. | +/// | `min_transaction_gas_units` | `u64` | The new flat minimum amount of gas required for any transaction. | +/// | `large_transaction_cutoff` | `u64` | The new size over which an additional charge will be assessed for each additional byte. | +/// | `intrinsic_gas_per_byte` | `u64` | The new number of units of gas that to be charged per-byte over the new `large_transaction_cutoff`. | +/// | `maximum_number_of_gas_units` | `u64` | The new maximum number of gas units that can be set in a transaction. | +/// | `min_price_per_gas_unit` | `u64` | The new minimum gas price that can be set for a transaction. | +/// | `max_price_per_gas_unit` | `u64` | The new maximum gas price that can be set for a transaction. | +/// | `max_transaction_size_in_bytes` | `u64` | The new maximum size of a transaction that can be processed. | +/// | `gas_unit_scaling_factor` | `u64` | The new scaling factor to use when scaling between external and internal gas units. | +/// | `default_account_size` | `u64` | The new default account size to use when assessing final costs for reads and writes to global storage. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_ARGUMENT` | `VMConfig::EGAS_CONSTANT_INCONSISTENCY` | The provided gas constants are inconsistent. | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +pub fn encode_set_gas_constants_script_function( + sliding_nonce: u64, + global_memory_per_byte_cost: u64, + global_memory_per_byte_write_cost: u64, + min_transaction_gas_units: u64, + large_transaction_cutoff: u64, + intrinsic_gas_per_byte: u64, + maximum_number_of_gas_units: u64, + min_price_per_gas_unit: u64, + max_price_per_gas_unit: u64, + max_transaction_size_in_bytes: u64, + gas_unit_scaling_factor: u64, + default_account_size: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("set_gas_constants").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&global_memory_per_byte_cost).unwrap(), + bcs::to_bytes(&global_memory_per_byte_write_cost).unwrap(), + bcs::to_bytes(&min_transaction_gas_units).unwrap(), + bcs::to_bytes(&large_transaction_cutoff).unwrap(), + bcs::to_bytes(&intrinsic_gas_per_byte).unwrap(), + bcs::to_bytes(&maximum_number_of_gas_units).unwrap(), + bcs::to_bytes(&min_price_per_gas_unit).unwrap(), + bcs::to_bytes(&max_price_per_gas_unit).unwrap(), + bcs::to_bytes(&max_transaction_size_in_bytes).unwrap(), + bcs::to_bytes(&gas_unit_scaling_factor).unwrap(), + bcs::to_bytes(&default_account_size).unwrap(), + ], + )) +} + +/// # Summary +/// Updates a validator's configuration, and triggers a reconfiguration of the system to update the +/// validator set with this new validator configuration. Can only be successfully sent by a +/// Validator Operator account that is already registered with a validator. +/// +/// # Technical Description +/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` +/// config resource held under `validator_account`. It then emits a `Reconfiguration::NewEpochEvent` to +/// trigger a reconfiguration of the system. This reconfiguration will update the validator set +/// on-chain with the updated `ValidatorConfig::ValidatorConfig`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `validator_operator_account` | `signer` | Signer of the sending account. Must be the registered validator operator for the validator at `validator_address`. | +/// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | +/// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR_OPERATOR` | `validator_operator_account` does not have a Validator Operator role. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | +/// | `Errors::INVALID_STATE` | `Reconfiguration::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::register_validator_config` +pub fn encode_set_validator_config_and_reconfigure_script_function( + validator_account: AccountAddress, + consensus_pubkey: Vec, + validator_network_addresses: Vec, + fullnode_network_addresses: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("ValidatorAdministrationScripts").to_owned(), + ), + ident_str!("set_validator_config_and_reconfigure").to_owned(), + vec![], + vec![ + bcs::to_bytes(&validator_account).unwrap(), + bcs::to_bytes(&consensus_pubkey).unwrap(), + bcs::to_bytes(&validator_network_addresses).unwrap(), + bcs::to_bytes(&fullnode_network_addresses).unwrap(), + ], + )) +} + +/// # Summary +/// Sets the validator operator for a validator in the validator's configuration resource "locally" +/// and does not reconfigure the system. Changes from this transaction will not picked up by the +/// system until a reconfiguration of the system is triggered. May only be sent by an account with +/// Validator role. +/// +/// # Technical Description +/// Sets the account at `operator_account` address and with the specified `human_name` as an +/// operator for the sending validator account. The account at `operator_account` address must have +/// a Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` +/// resource published under it. The sending `account` must be a Validator and have a +/// `ValidatorConfig::ValidatorConfig` resource published under it. This script does not emit a +/// `Reconfiguration::NewEpochEvent` and no reconfiguration of the system is initiated by this script. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | The signer of the sending account of the transaction. | +/// | `operator_name` | `vector` | Validator operator's human name. | +/// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | +/// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator_with_nonce_admin` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_set_validator_operator_script_function( + operator_name: Vec, + operator_account: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("ValidatorAdministrationScripts").to_owned(), + ), + ident_str!("set_validator_operator").to_owned(), + vec![], + vec![ + bcs::to_bytes(&operator_name).unwrap(), + bcs::to_bytes(&operator_account).unwrap(), + ], + )) +} + +/// # Summary +/// Sets the validator operator for a validator in the validator's configuration resource "locally" +/// and does not reconfigure the system. Changes from this transaction will not picked up by the +/// system until a reconfiguration of the system is triggered. May only be sent by the Diem Root +/// account as a write set transaction. +/// +/// # Technical Description +/// Sets the account at `operator_account` address and with the specified `human_name` as an +/// operator for the validator `account`. The account at `operator_account` address must have a +/// Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource +/// published under it. The account represented by the `account` signer must be a Validator and +/// have a `ValidatorConfig::ValidatorConfig` resource published under it. No reconfiguration of +/// the system is initiated by this script. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `signer` | Signer of the sending account of the write set transaction. May only be the Diem Root signer. | +/// | `account` | `signer` | Signer of account specified in the `execute_as` field of the write set transaction. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | +/// | `operator_name` | `vector` | Validator operator's human name. | +/// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | +/// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | +/// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_validator_account` +/// * `AccountCreationScripts::create_validator_operator_account` +/// * `ValidatorAdministrationScripts::register_validator_config` +/// * `ValidatorAdministrationScripts::remove_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::add_validator_and_reconfigure` +/// * `ValidatorAdministrationScripts::set_validator_operator` +/// * `ValidatorAdministrationScripts::set_validator_config_and_reconfigure` +pub fn encode_set_validator_operator_with_nonce_admin_script_function( + sliding_nonce: u64, + operator_name: Vec, + operator_account: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("ValidatorAdministrationScripts").to_owned(), + ), + ident_str!("set_validator_operator_with_nonce_admin").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&operator_name).unwrap(), + bcs::to_bytes(&operator_account).unwrap(), + ], + )) +} + +/// # Summary +/// Mints a specified number of coins in a currency to a Designated Dealer. The sending account +/// must be the Treasury Compliance account, and coins can only be minted to a Designated Dealer +/// account. +/// +/// # Technical Description +/// Mints `mint_amount` of coins in the `CoinType` currency to Designated Dealer account at +/// `designated_dealer_address`. The `tier_index` parameter specifies which tier should be used to +/// check verify the off-chain approval policy, and is based in part on the on-chain tier values +/// for the specific Designated Dealer, and the number of `CoinType` coins that have been minted to +/// the dealer over the past 24 hours. Every Designated Dealer has 4 tiers for each currency that +/// they support. The sending `tc_account` must be the Treasury Compliance account, and the +/// receiver an authorized Designated Dealer account. +/// +/// # Events +/// Successful execution of the transaction will emit two events: +/// * A `Diem::MintEvent` with the amount and currency code minted is emitted on the +/// `mint_event_handle` in the stored `Diem::CurrencyInfo` resource stored under +/// `0xA550C18`; and +/// * A `DesignatedDealer::ReceivedMintEvent` with the amount, currency code, and Designated +/// Dealer's address is emitted on the `mint_event_handle` in the stored `DesignatedDealer::Dealer` +/// resource published under the `designated_dealer_address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` being minted. `CoinType` must be an already-registered currency on-chain. | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `designated_dealer_address` | `address` | The address of the Designated Dealer account being minted to. | +/// | `mint_amount` | `u64` | The number of coins to be minted. | +/// | `tier_index` | `u64` | [Deprecated] The mint tier index to use for the Designated Dealer account. Will be ignored | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_MINT_AMOUNT` | `mint_amount` is zero. | +/// | `Errors::NOT_PUBLISHED` | `DesignatedDealer::EDEALER` | `DesignatedDealer::Dealer` or `DesignatedDealer::TierInfo` resource does not exist at `designated_dealer_address`. | +/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EMINT_CAPABILITY` | `tc_account` does not have a `Diem::MintCapability` resource published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. | +/// +/// # Related Scripts +/// * `AccountCreationScripts::create_designated_dealer` +/// * `PaymentScripts::peer_to_peer_with_metadata` +/// * `AccountAdministrationScripts::rotate_dual_attestation_info` +pub fn encode_tiered_mint_script_function( + coin_type: TypeTag, + sliding_nonce: u64, + designated_dealer_address: AccountAddress, + mint_amount: u64, + tier_index: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("tiered_mint").to_owned(), + vec![coin_type], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&designated_dealer_address).unwrap(), + bcs::to_bytes(&mint_amount).unwrap(), + bcs::to_bytes(&tier_index).unwrap(), + ], + )) +} + +/// # Summary +/// Unfreezes the account at `address`. The sending account of this transaction must be the +/// Treasury Compliance account. After the successful execution of this transaction transactions +/// may be sent from the previously frozen account, and coins may be sent and received. +/// +/// # Technical Description +/// Sets the `AccountFreezing::FreezingBit` to `false` and emits a +/// `AccountFreezing::UnFreezeAccountEvent`. The transaction sender must be the Treasury Compliance +/// account. Note that this is a per-account property so unfreezing a Parent VASP will not effect +/// the status any of its child accounts and vice versa. +/// +/// # Events +/// Successful execution of this script will emit a `AccountFreezing::UnFreezeAccountEvent` with +/// the `unfrozen_address` set the `to_unfreeze_account`'s address. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `to_unfreeze_account` | `address` | The account address to be frozen. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::freeze_account` +pub fn encode_unfreeze_account_script_function( + sliding_nonce: u64, + to_unfreeze_account: AccountAddress, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("unfreeze_account").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&to_unfreeze_account).unwrap(), + ], + )) +} + +/// # Summary +/// Updates the Diem consensus config that is stored on-chain and is used by the Consensus. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the `DiemConsensusConfig` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger +/// a reconfiguration of the system. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `config` | `vector` | The serialized bytes of consensus config. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +pub fn encode_update_diem_consensus_config_script_function( + sliding_nonce: u64, + config: Vec, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("update_diem_consensus_config").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&config).unwrap(), + ], + )) +} + +/// # Summary +/// Updates the Diem major version that is stored on-chain and is used by the VM. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the `Version` on-chain config and emits a `Reconfiguration::NewEpochEvent` to trigger +/// a reconfiguration of the system. The `major` version that is passed in must be strictly greater +/// than the current major version held on-chain. The VM reads this information and can use it to +/// preserve backwards compatibility with previous major versions of the VM. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +/// | `Errors::INVALID_ARGUMENT` | `Version::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. | +pub fn encode_update_diem_version_script_function( + sliding_nonce: u64, + major: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("SystemAdministrationScripts").to_owned(), + ), + ident_str!("update_diem_version").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&major).unwrap(), + ], + )) +} + +/// # Summary +/// Update the dual attestation limit on-chain. Defined in terms of micro-XDX. The transaction can +/// only be sent by the Treasury Compliance account. After this transaction all inter-VASP +/// payments over this limit must be checked for dual attestation. +/// +/// # Technical Description +/// Updates the `micro_xdx_limit` field of the `DualAttestation::Limit` resource published under +/// `0xA550C18`. The amount is set in micro-XDX. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_micro_xdx_limit` | `u64` | The new dual attestation limit to be used on-chain. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::update_exchange_rate` +/// * `TreasuryComplianceScripts::update_minting_ability` +pub fn encode_update_dual_attestation_limit_script_function( + sliding_nonce: u64, + new_micro_xdx_limit: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("update_dual_attestation_limit").to_owned(), + vec![], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_micro_xdx_limit).unwrap(), + ], + )) +} + +/// # Summary +/// Update the rough on-chain exchange rate between a specified currency and XDX (as a conversion +/// to micro-XDX). The transaction can only be sent by the Treasury Compliance account. After this +/// transaction the updated exchange rate will be used for normalization of gas prices, and for +/// dual attestation checking. +/// +/// # Technical Description +/// Updates the on-chain exchange rate from the given `Currency` to micro-XDX. The exchange rate +/// is given by `new_exchange_rate_numerator/new_exchange_rate_denominator`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` whose exchange rate is being updated. `Currency` must be an already-registered currency on-chain. | +/// | `tc_account` | `signer` | The signer of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for the transaction. | +/// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-XDX exchange rate for `Currency`. | +/// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-XDX exchange rate for `Currency`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::EDENOMINATOR` | `new_exchange_rate_denominator` is zero. | +/// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | +/// | `Errors::LIMIT_EXCEEDED` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::update_dual_attestation_limit` +/// * `TreasuryComplianceScripts::update_minting_ability` +pub fn encode_update_exchange_rate_script_function( + currency: TypeTag, + sliding_nonce: u64, + new_exchange_rate_numerator: u64, + new_exchange_rate_denominator: u64, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("update_exchange_rate").to_owned(), + vec![currency], + vec![ + bcs::to_bytes(&sliding_nonce).unwrap(), + bcs::to_bytes(&new_exchange_rate_numerator).unwrap(), + bcs::to_bytes(&new_exchange_rate_denominator).unwrap(), + ], + )) +} + +/// # Summary +/// Script to allow or disallow minting of new coins in a specified currency. This transaction can +/// only be sent by the Treasury Compliance account. Turning minting off for a currency will have +/// no effect on coins already in circulation, and coins may still be removed from the system. +/// +/// # Technical Description +/// This transaction sets the `can_mint` field of the `Diem::CurrencyInfo` resource +/// published under `0xA550C18` to the value of `allow_minting`. Minting of coins if allowed if +/// this field is set to `true` and minting of new coins in `Currency` is disallowed otherwise. +/// This transaction needs to be sent by the Treasury Compliance account. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` whose minting ability is being updated. `Currency` must be an already-registered currency on-chain. | +/// | `account` | `signer` | Signer of the sending account. Must be the Diem Root account. | +/// | `allow_minting` | `bool` | Whether to allow minting of new coins in `Currency`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. | +/// +/// # Related Scripts +/// * `TreasuryComplianceScripts::update_dual_attestation_limit` +/// * `TreasuryComplianceScripts::update_exchange_rate` +pub fn encode_update_minting_ability_script_function( + currency: TypeTag, + allow_minting: bool, +) -> TransactionPayload { + TransactionPayload::ScriptFunction(ScriptFunction::new( + ModuleId::new( + AccountAddress::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]), + ident_str!("TreasuryComplianceScripts").to_owned(), + ), + ident_str!("update_minting_ability").to_owned(), + vec![currency], + vec![bcs::to_bytes(&allow_minting).unwrap()], + )) +} + +/// # Summary +/// Adds a zero `Currency` balance to the sending `account`. This will enable `account` to +/// send, receive, and hold `Diem::Diem` coins. This transaction can be +/// successfully sent by any account that is allowed to hold balances +/// (e.g., VASP, Designated Dealer). +/// +/// # Technical Description +/// After the successful execution of this transaction the sending account will have a +/// `DiemAccount::Balance` resource with zero balance published under it. Only +/// accounts that can hold balances can send this transaction, the sending account cannot +/// already have a `DiemAccount::Balance` published under it. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` being added to the sending account of the transaction. `Currency` must be an already-registered currency on-chain. | +/// | `account` | `&signer` | The signer of the sending account of the transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EROLE_CANT_STORE_BALANCE` | The sending `account`'s role does not permit balances. | +/// | `Errors::ALREADY_PUBLISHED` | `DiemAccount::EADD_EXISTING_CURRENCY` | A balance for `Currency` is already published under the sending `account`. | +/// +/// # Related Scripts +/// * `Script::create_child_vasp_account` +/// * `Script::create_parent_vasp_account` +/// * `Script::peer_to_peer_with_metadata` +pub fn encode_add_currency_to_account_script(currency: TypeTag) -> Script { + Script::new( + ADD_CURRENCY_TO_ACCOUNT_CODE.to_vec(), + vec![currency], + vec![], + ) +} + +/// # Summary +/// Stores the sending accounts ability to rotate its authentication key with a designated recovery +/// account. Both the sending and recovery accounts need to belong to the same VASP and +/// both be VASP accounts. After this transaction both the sending account and the +/// specified recovery account can rotate the sender account's authentication key. +/// +/// # Technical Description +/// Adds the `DiemAccount::KeyRotationCapability` for the sending account +/// (`to_recover_account`) to the `RecoveryAddress::RecoveryAddress` resource under +/// `recovery_address`. After this transaction has been executed successfully the account at +/// `recovery_address` and the `to_recover_account` may rotate the authentication key of +/// `to_recover_account` (the sender of this transaction). +/// +/// The sending account of this transaction (`to_recover_account`) must not have previously given away its unique key +/// rotation capability, and must be a VASP account. The account at `recovery_address` +/// must also be a VASP account belonging to the same VASP as the `to_recover_account`. +/// Additionally the account at `recovery_address` must have already initialized itself as +/// a recovery account address using the `Script::create_recovery_address` transaction script. +/// +/// The sending account's (`to_recover_account`) key rotation capability is +/// removed in this transaction and stored in the `RecoveryAddress::RecoveryAddress` +/// resource stored under the account at `recovery_address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `to_recover_account` | `&signer` | The signer reference of the sending account of this transaction. | +/// | `recovery_address` | `address` | The account address where the `to_recover_account`'s `DiemAccount::KeyRotationCapability` will be stored. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `to_recover_account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EINVALID_KEY_ROTATION_DELEGATION` | `to_recover_account` and `recovery_address` do not belong to the same VASP. | +/// | `Errors::LIMIT_EXCEEDED` | ` RecoveryAddress::EMAX_KEYS_REGISTERED` | `RecoveryAddress::MAX_REGISTERED_KEYS` have already been registered with this `recovery_address`. | +/// +/// # Related Scripts +/// * `Script::create_recovery_address` +/// * `Script::rotate_authentication_key_with_recovery_address` +pub fn encode_add_recovery_rotation_capability_script(recovery_address: AccountAddress) -> Script { + Script::new( + ADD_RECOVERY_ROTATION_CAPABILITY_CODE.to_vec(), + vec![], + vec![TransactionArgument::Address(recovery_address)], + ) +} + +/// # Summary +/// Adds a validator account to the validator set, and triggers a +/// reconfiguration of the system to admit the account to the validator set for the system. This +/// transaction can only be successfully called by the Diem Root account. +/// +/// # Technical Description +/// This script adds the account at `validator_address` to the validator set. +/// This transaction emits a `DiemConfig::NewEpochEvent` event and triggers a +/// reconfiguration. Once the reconfiguration triggered by this script's +/// execution has been performed, the account at the `validator_address` is +/// considered to be a validator in the network. +/// +/// This transaction script will fail if the `validator_address` address is already in the validator set +/// or does not have a `ValidatorConfig::ValidatorConfig` resource already published under it. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | +/// | `validator_address` | `address` | The validator account address to be added to the validator set. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | +/// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EINVALID_PROSPECTIVE_VALIDATOR` | The validator to be added does not have a `ValidatorConfig::ValidatorConfig` resource published under it, or its `config` field is empty. | +/// | `Errors::INVALID_ARGUMENT` | `DiemSystem::EALREADY_A_VALIDATOR` | The `validator_address` account is already a registered validator. | +/// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::create_validator_operator_account` +/// * `Script::register_validator_config` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_add_validator_and_reconfigure_script( + sliding_nonce: u64, + validator_name: Vec, + validator_address: AccountAddress, +) -> Script { + Script::new( + ADD_VALIDATOR_AND_RECONFIGURE_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U8Vector(validator_name), + TransactionArgument::Address(validator_address), + ], + ) +} + +/// # Summary +/// Burns all coins held in the preburn resource at the specified +/// preburn address and removes them from the system. The sending account must +/// be the Treasury Compliance account. +/// The account that holds the preburn resource will normally be a Designated +/// Dealer, but there are no enforced requirements that it be one. +/// +/// # Technical Description +/// This transaction permanently destroys all the coins of `Token` type +/// stored in the `Diem::Preburn` resource published under the +/// `preburn_address` account address. +/// +/// This transaction will only succeed if the sending `account` has a +/// `Diem::BurnCapability`, and a `Diem::Preburn` resource +/// exists under `preburn_address`, with a non-zero `to_burn` field. After the successful execution +/// of this transaction the `total_value` field in the +/// `Diem::CurrencyInfo` resource published under `0xA550C18` will be +/// decremented by the value of the `to_burn` field of the preburn resource +/// under `preburn_address` immediately before this transaction, and the +/// `to_burn` field of the preburn resource will have a zero value. +/// +/// ## Events +/// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle +/// held in the `Diem::CurrencyInfo` resource's `burn_events` published under +/// `0xA550C18`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Token` | Type | The Move type for the `Token` currency being burned. `Token` must be an already-registered currency on-chain. | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction, must have a burn capability for `Token` published under it. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | +/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_EMPTY` | The `Diem::Preburn` resource is empty (has a value of 0). | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | +/// +/// # Related Scripts +/// * `Script::burn_txn_fees` +/// * `Script::cancel_burn` +/// * `Script::preburn` +pub fn encode_burn_script( + token: TypeTag, + sliding_nonce: u64, + preburn_address: AccountAddress, +) -> Script { + Script::new( + BURN_CODE.to_vec(), + vec![token], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(preburn_address), + ], + ) +} + +/// # Summary +/// Burns the transaction fees collected in the `CoinType` currency so that the +/// Diem association may reclaim the backing coins off-chain. May only be sent +/// by the Treasury Compliance account. +/// +/// # Technical Description +/// Burns the transaction fees collected in `CoinType` so that the +/// association may reclaim the backing coins. Once this transaction has executed +/// successfully all transaction fees that will have been collected in +/// `CoinType` since the last time this script was called with that specific +/// currency. Both `balance` and `preburn` fields in the +/// `TransactionFee::TransactionFee` resource published under the `0xB1E55ED` +/// account address will have a value of 0 after the successful execution of this script. +/// +/// ## Events +/// The successful execution of this transaction will emit a `Diem::BurnEvent` on the event handle +/// held in the `Diem::CurrencyInfo` resource's `burn_events` published under +/// `0xA550C18`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` being added to the sending account of the transaction. `CoinType` must be an already-registered currency on-chain. | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `TransactionFee::ETRANSACTION_FEE` | `CoinType` is not an accepted transaction fee currency. | +/// | `Errors::INVALID_ARGUMENT` | `Diem::ECOIN` | The collected fees in `CoinType` are zero. | +/// +/// # Related Scripts +/// * `Script::burn` +/// * `Script::cancel_burn` +pub fn encode_burn_txn_fees_script(coin_type: TypeTag) -> Script { + Script::new(BURN_TXN_FEES_CODE.to_vec(), vec![coin_type], vec![]) +} + +/// # Summary +/// Cancels and returns all coins held in the preburn area under +/// `preburn_address` and returns the funds to the `preburn_address`'s balance. +/// Can only be successfully sent by an account with Treasury Compliance role. +/// +/// # Technical Description +/// Cancels and returns all coins held in the `Diem::Preburn` resource under the `preburn_address` and +/// return the funds to the `preburn_address` account's `DiemAccount::Balance`. +/// The transaction must be sent by an `account` with a `Diem::BurnCapability` +/// resource published under it. The account at `preburn_address` must have a +/// `Diem::Preburn` resource published under it, and its value must be nonzero. The transaction removes +/// the entire balance held in the `Diem::Preburn` resource, and returns it back to the account's +/// `DiemAccount::Balance` under `preburn_address`. Due to this, the account at +/// `preburn_address` must already have a balance in the `Token` currency published +/// before this script is called otherwise the transaction will fail. +/// +/// ## Events +/// The successful execution of this transaction will emit: +/// * A `Diem::CancelBurnEvent` on the event handle held in the `Diem::CurrencyInfo` +/// resource's `burn_events` published under `0xA550C18`. +/// * A `DiemAccount::ReceivedPaymentEvent` on the `preburn_address`'s +/// `DiemAccount::DiemAccount` `received_events` event handle with both the `payer` and `payee` +/// being `preburn_address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Token` | Type | The Move type for the `Token` currenty that burning is being cancelled for. `Token` must be an already-registered currency on-chain. | +/// | `account` | `&signer` | The signer reference of the sending account of this transaction, must have a burn capability for `Token` published under it. | +/// | `preburn_address` | `address` | The address where the coins to-be-burned are currently held. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EBURN_CAPABILITY` | The sending `account` does not have a `Diem::BurnCapability` published under it. | +/// | `Errors::NOT_PUBLISHED` | `Diem::EPREBURN` | The account at `preburn_address` does not have a `Diem::Preburn` resource published under it. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The specified `Token` is not a registered currency on-chain. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | The value held in the preburn resource was zero. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | The account at `preburn_address` doesn't have a balance resource for `Token`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds held in the prebun area would exceed the `account`'s account limits. | +/// | `Errors::INVALID_STATE` | `DualAttestation::EPAYEE_COMPLIANCE_KEY_NOT_SET` | The `account` does not have a compliance key set on it but dual attestion checking was performed. | +/// +/// # Related Scripts +/// * `Script::burn_txn_fees` +/// * `Script::burn` +/// * `Script::preburn` +pub fn encode_cancel_burn_script(token: TypeTag, preburn_address: AccountAddress) -> Script { + Script::new( + CANCEL_BURN_CODE.to_vec(), + vec![token], + vec![TransactionArgument::Address(preburn_address)], + ) +} + +/// # Summary +/// Creates a Child VASP account with its parent being the sending account of the transaction. +/// The sender of the transaction must be a Parent VASP account. +/// +/// # Technical Description +/// Creates a `ChildVASP` account for the sender `parent_vasp` at `child_address` with a balance of +/// `child_initial_balance` in `CoinType` and an initial authentication key of +/// `auth_key_prefix | child_address`. +/// +/// If `add_all_currencies` is true, the child address will have a zero balance in all available +/// currencies in the system. +/// +/// The new account will be a child account of the transaction sender, which must be a +/// Parent VASP account. The child account will be recorded against the limit of +/// child accounts of the creating Parent VASP account. +/// +/// ## Events +/// Successful execution with a `child_initial_balance` greater than zero will emit: +/// * A `DiemAccount::SentPaymentEvent` with the `payer` field being the Parent VASP's address, +/// and payee field being `child_address`. This is emitted on the Parent VASP's +/// `DiemAccount::DiemAccount` `sent_events` handle. +/// * A `DiemAccount::ReceivedPaymentEvent` with the `payer` field being the Parent VASP's address, +/// and payee field being `child_address`. This is emitted on the new Child VASPS's +/// `DiemAccount::DiemAccount` `received_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` that the child account should be created with. `CoinType` must be an already-registered currency on-chain. | +/// | `parent_vasp` | `&signer` | The signer reference of the sending account. Must be a Parent VASP account. | +/// | `child_address` | `address` | Address of the to-be-created Child VASP account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | +/// | `child_initial_balance` | `u64` | The initial balance in `CoinType` to give the child account when it's created. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | The `auth_key_prefix` was not of length 32. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EPARENT_VASP` | The sending account wasn't a Parent VASP account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `child_address` address is already taken. | +/// | `Errors::LIMIT_EXCEEDED` | `VASP::ETOO_MANY_CHILDREN` | The sending account has reached the maximum number of allowed child accounts. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | +/// | `Errors::INVALID_STATE` | `DiemAccount::EWITHDRAWAL_CAPABILITY_ALREADY_EXTRACTED` | The withdrawal capability for the sending account has already been extracted. | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | The sending account doesn't have a balance in `CoinType`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | The sending account doesn't have at least `child_initial_balance` of `CoinType` balance. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECANNOT_CREATE_AT_VM_RESERVED` | The `child_address` is the reserved address 0x0. | +/// +/// # Related Scripts +/// * `Script::create_parent_vasp_account` +/// * `Script::add_currency_to_account` +/// * `Script::rotate_authentication_key` +/// * `Script::add_recovery_rotation_capability` +/// * `Script::create_recovery_address` +pub fn encode_create_child_vasp_account_script( + coin_type: TypeTag, + child_address: AccountAddress, + auth_key_prefix: Vec, + add_all_currencies: bool, + child_initial_balance: u64, +) -> Script { + Script::new( + CREATE_CHILD_VASP_ACCOUNT_CODE.to_vec(), + vec![coin_type], + vec![ + TransactionArgument::Address(child_address), + TransactionArgument::U8Vector(auth_key_prefix), + TransactionArgument::Bool(add_all_currencies), + TransactionArgument::U64(child_initial_balance), + ], + ) +} + +/// # Summary +/// Creates a Designated Dealer account with the provided information, and initializes it with +/// default mint tiers. The transaction can only be sent by the Treasury Compliance account. +/// +/// # Technical Description +/// Creates an account with the Designated Dealer role at `addr` with authentication key +/// `auth_key_prefix` | `addr` and a 0 balance of type `Currency`. If `add_all_currencies` is true, +/// 0 balances for all available currencies in the system will also be added. This can only be +/// invoked by an account with the TreasuryCompliance role. +/// +/// At the time of creation the account is also initialized with default mint tiers of (500_000, +/// 5000_000, 50_000_000, 500_000_000), and preburn areas for each currency that is added to the +/// account. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` that the Designated Dealer should be initialized with. `Currency` must be an already-registered currency on-chain. | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `addr` | `address` | Address of the to-be-created Designated Dealer account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the Designated Dealer. | +/// | `add_all_currencies` | `bool` | Whether to publish preburn, balance, and tier info resources for all known (SCS) currencies or just `Currency` when the account is created. | +/// + +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `Currency` is not a registered currency on-chain. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `addr` address is already taken. | +/// +/// # Related Scripts +/// * `Script::tiered_mint` +/// * `Script::peer_to_peer_with_metadata` +/// * `Script::rotate_dual_attestation_info` +pub fn encode_create_designated_dealer_script( + currency: TypeTag, + sliding_nonce: u64, + addr: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, + add_all_currencies: bool, +) -> Script { + Script::new( + CREATE_DESIGNATED_DEALER_CODE.to_vec(), + vec![currency], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(addr), + TransactionArgument::U8Vector(auth_key_prefix), + TransactionArgument::U8Vector(human_name), + TransactionArgument::Bool(add_all_currencies), + ], + ) +} + +/// # Summary +/// Creates a Parent VASP account with the specified human name. Must be called by the Treasury Compliance account. +/// +/// # Technical Description +/// Creates an account with the Parent VASP role at `address` with authentication key +/// `auth_key_prefix` | `new_account_address` and a 0 balance of type `CoinType`. If +/// `add_all_currencies` is true, 0 balances for all available currencies in the system will +/// also be added. This can only be invoked by an TreasuryCompliance account. +/// `sliding_nonce` is a unique nonce for operation, see `SlidingNonce` for details. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` currency that the Parent VASP account should be initialized with. `CoinType` must be an already-registered currency on-chain. | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Parent VASP account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the Parent VASP. | +/// | `add_all_currencies` | `bool` | Whether to publish balance resources for all known currencies when the account is created. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | The `CoinType` is not a registered currency on-chain. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `Script::create_child_vasp_account` +/// * `Script::add_currency_to_account` +/// * `Script::rotate_authentication_key` +/// * `Script::add_recovery_rotation_capability` +/// * `Script::create_recovery_address` +/// * `Script::rotate_dual_attestation_info` +pub fn encode_create_parent_vasp_account_script( + coin_type: TypeTag, + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, + add_all_currencies: bool, +) -> Script { + Script::new( + CREATE_PARENT_VASP_ACCOUNT_CODE.to_vec(), + vec![coin_type], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(new_account_address), + TransactionArgument::U8Vector(auth_key_prefix), + TransactionArgument::U8Vector(human_name), + TransactionArgument::Bool(add_all_currencies), + ], + ) +} + +/// # Summary +/// Initializes the sending account as a recovery address that may be used by +/// the VASP that it belongs to. The sending account must be a VASP account. +/// Multiple recovery addresses can exist for a single VASP, but accounts in +/// each must be disjoint. +/// +/// # Technical Description +/// Publishes a `RecoveryAddress::RecoveryAddress` resource under `account`. It then +/// extracts the `DiemAccount::KeyRotationCapability` for `account` and adds +/// it to the resource. After the successful execution of this transaction +/// other accounts may add their key rotation to this resource so that `account` +/// may be used as a recovery account for those accounts. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | The signer of the sending account of the transaction. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ENOT_A_VASP` | `account` is not a VASP account. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EKEY_ROTATION_DEPENDENCY_CYCLE` | A key rotation recovery cycle would be created by adding `account`'s key rotation capability. | +/// | `Errors::ALREADY_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | A `RecoveryAddress::RecoveryAddress` resource has already been published under `account`. | +/// +/// # Related Scripts +/// * `Script::add_recovery_rotation_capability` +/// * `Script::rotate_authentication_key_with_recovery_address` +pub fn encode_create_recovery_address_script() -> Script { + Script::new(CREATE_RECOVERY_ADDRESS_CODE.to_vec(), vec![], vec![]) +} + +/// # Summary +/// Creates a Validator account. This transaction can only be sent by the Diem +/// Root account. +/// +/// # Technical Description +/// Creates an account with a Validator role at `new_account_address`, with authentication key +/// `auth_key_prefix` | `new_account_address`. It publishes a +/// `ValidatorConfig::ValidatorConfig` resource with empty `config`, and +/// `operator_account` fields. The `human_name` field of the +/// `ValidatorConfig::ValidatorConfig` is set to the passed in `human_name`. +/// This script does not add the validator to the validator set or the system, +/// but only creates the account. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Validator account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the validator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `Script::add_validator_and_reconfigure` +/// * `Script::create_validator_operator_account` +/// * `Script::register_validator_config` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_create_validator_account_script( + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, +) -> Script { + Script::new( + CREATE_VALIDATOR_ACCOUNT_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(new_account_address), + TransactionArgument::U8Vector(auth_key_prefix), + TransactionArgument::U8Vector(human_name), + ], + ) +} + +/// # Summary +/// Creates a Validator Operator account. This transaction can only be sent by the Diem +/// Root account. +/// +/// # Technical Description +/// Creates an account with a Validator Operator role at `new_account_address`, with authentication key +/// `auth_key_prefix` | `new_account_address`. It publishes a +/// `ValidatorOperatorConfig::ValidatorOperatorConfig` resource with the specified `human_name`. +/// This script does not assign the validator operator to any validator accounts but only creates the account. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_account_address` | `address` | Address of the to-be-created Validator account. | +/// | `auth_key_prefix` | `vector` | The authentication key prefix that will be used initially for the newly created account. | +/// | `human_name` | `vector` | ASCII-encoded human name for the validator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::ALREADY_PUBLISHED` | `Roles::EROLE_ID` | The `new_account_address` address is already taken. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::add_validator_and_reconfigure` +/// * `Script::register_validator_config` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_create_validator_operator_account_script( + sliding_nonce: u64, + new_account_address: AccountAddress, + auth_key_prefix: Vec, + human_name: Vec, +) -> Script { + Script::new( + CREATE_VALIDATOR_OPERATOR_ACCOUNT_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(new_account_address), + TransactionArgument::U8Vector(auth_key_prefix), + TransactionArgument::U8Vector(human_name), + ], + ) +} + +/// # Summary +/// Freezes the account at `address`. The sending account of this transaction +/// must be the Treasury Compliance account. The account being frozen cannot be +/// the Diem Root or Treasury Compliance account. After the successful +/// execution of this transaction no transactions may be sent from the frozen +/// account, and the frozen account may not send or receive coins. +/// +/// # Technical Description +/// Sets the `AccountFreezing::FreezingBit` to `true` and emits a +/// `AccountFreezing::FreezeAccountEvent`. The transaction sender must be the +/// Treasury Compliance account, but the account at `to_freeze_account` must +/// not be either `0xA550C18` (the Diem Root address), or `0xB1E55ED` (the +/// Treasury Compliance address). Note that this is a per-account property +/// e.g., freezing a Parent VASP will not effect the status any of its child +/// accounts and vice versa. +/// + +/// ## Events +/// Successful execution of this transaction will emit a `AccountFreezing::FreezeAccountEvent` on +/// the `freeze_event_handle` held in the `AccountFreezing::FreezeEventsHolder` resource published +/// under `0xA550C18` with the `frozen_address` being the `to_freeze_account`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `to_freeze_account` | `address` | The account address to be frozen. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_TC` | `to_freeze_account` was the Treasury Compliance account (`0xB1E55ED`). | +/// | `Errors::INVALID_ARGUMENT` | `AccountFreezing::ECANNOT_FREEZE_DIEM_ROOT` | `to_freeze_account` was the Diem Root account (`0xA550C18`). | +/// +/// # Related Scripts +/// * `Script::unfreeze_account` +pub fn encode_freeze_account_script( + sliding_nonce: u64, + to_freeze_account: AccountAddress, +) -> Script { + Script::new( + FREEZE_ACCOUNT_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(to_freeze_account), + ], + ) +} + +/// # Summary +/// Transfers a given number of coins in a specified currency from one account to another. +/// Transfers over a specified amount defined on-chain that are between two different VASPs, or +/// other accounts that have opted-in will be subject to on-chain checks to ensure the receiver has +/// agreed to receive the coins. This transaction can be sent by any account that can hold a +/// balance, and to any account that can hold a balance. Both accounts must hold balances in the +/// currency being transacted. +/// +/// # Technical Description +/// +/// Transfers `amount` coins of type `Currency` from `payer` to `payee` with (optional) associated +/// `metadata` and an (optional) `metadata_signature` on the message +/// `metadata` | `Signer::address_of(payer)` | `amount` | `DualAttestation::DOMAIN_SEPARATOR`. +/// The `metadata` and `metadata_signature` parameters are only required if `amount` >= +/// `DualAttestation::get_cur_microdiem_limit` XDX and `payer` and `payee` are distinct VASPs. +/// However, a transaction sender can opt in to dual attestation even when it is not required +/// (e.g., a DesignatedDealer -> VASP payment) by providing a non-empty `metadata_signature`. +/// Standardized `metadata` BCS format can be found in `diem_types::transaction::metadata::Metadata`. +/// +/// ## Events +/// Successful execution of this script emits two events: +/// * A `DiemAccount::SentPaymentEvent` on `payer`'s `DiemAccount::DiemAccount` `sent_events` handle; and +/// * A `DiemAccount::ReceivedPaymentEvent` on `payee`'s `DiemAccount::DiemAccount` `received_events` handle. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` being sent in this transaction. `Currency` must be an already-registered currency on-chain. | +/// | `payer` | `&signer` | The signer reference of the sending account that coins are being transferred from. | +/// | `payee` | `address` | The address of the account the coins are being transferred to. | +/// | `metadata` | `vector` | Optional metadata about this payment. | +/// | `metadata_signature` | `vector` | Optional signature over `metadata` and payment information. See | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYER_DOESNT_HOLD_CURRENCY` | `payer` doesn't hold a balance in `Currency`. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EINSUFFICIENT_BALANCE` | `amount` is greater than `payer`'s balance in `Currency`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::ECOIN_DEPOSIT_IS_ZERO` | `amount` is zero. | +/// | `Errors::NOT_PUBLISHED` | `DiemAccount::EPAYEE_DOES_NOT_EXIST` | No account exists at the `payee` address. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EPAYEE_CANT_ACCEPT_CURRENCY_TYPE` | An account exists at `payee`, but it does not accept payments in `Currency`. | +/// | `Errors::INVALID_STATE` | `AccountFreezing::EACCOUNT_FROZEN` | The `payee` account is frozen. | +/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EMALFORMED_METADATA_SIGNATURE` | `metadata_signature` is not 64 bytes. | +/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_METADATA_SIGNATURE` | `metadata_signature` does not verify on the against the `payee'`s `DualAttestation::Credential` `compliance_public_key` public key. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EWITHDRAWAL_EXCEEDS_LIMITS` | `payer` has exceeded its daily withdrawal limits for the backing coins of XDX. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | `payee` has exceeded its daily deposit limits for XDX. | +/// +/// # Related Scripts +/// * `Script::create_child_vasp_account` +/// * `Script::create_parent_vasp_account` +/// * `Script::add_currency_to_account` +pub fn encode_peer_to_peer_with_metadata_script( + currency: TypeTag, + payee: AccountAddress, + amount: u64, + metadata: Vec, + metadata_signature: Vec, +) -> Script { + Script::new( + PEER_TO_PEER_WITH_METADATA_CODE.to_vec(), + vec![currency], + vec![ + TransactionArgument::Address(payee), + TransactionArgument::U64(amount), + TransactionArgument::U8Vector(metadata), + TransactionArgument::U8Vector(metadata_signature), + ], + ) +} + +/// # Summary +/// Moves a specified number of coins in a given currency from the account's +/// balance to its preburn area after which the coins may be burned. This +/// transaction may be sent by any account that holds a balance and preburn area +/// in the specified currency. +/// +/// # Technical Description +/// Moves the specified `amount` of coins in `Token` currency from the sending `account`'s +/// `DiemAccount::Balance` to the `Diem::Preburn` published under the same +/// `account`. `account` must have both of these resources published under it at the start of this +/// transaction in order for it to execute successfully. +/// +/// ## Events +/// Successful execution of this script emits two events: +/// * `DiemAccount::SentPaymentEvent ` on `account`'s `DiemAccount::DiemAccount` `sent_events` +/// handle with the `payee` and `payer` fields being `account`'s address; and +/// * A `Diem::PreburnEvent` with `Token`'s currency code on the +/// `Diem::CurrencyInfo` resource published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EPREBURN_OCCUPIED` | The `value` field in the `Diem::Preburn` resource under the sender is non-zero. | +/// | `Errors::NOT_PUBLISHED` | `Roles::EROLE_ID` | The `account` did not have a role assigned to it. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDESIGNATED_DEALER` | The `account` did not have the role of DesignatedDealer. | +/// +/// # Related Scripts +/// * `Script::cancel_burn` +/// * `Script::burn` +/// * `Script::burn_txn_fees` +pub fn encode_preburn_script(token: TypeTag, amount: u64) -> Script { + Script::new( + PREBURN_CODE.to_vec(), + vec![token], + vec![TransactionArgument::U64(amount)], + ) +} + +/// # Summary +/// Rotates the authentication key of the sending account to the +/// newly-specified public key and publishes a new shared authentication key +/// under the sender's account. Any account can send this transaction. +/// +/// # Technical Description +/// Rotates the authentication key of the sending account to `public_key`, +/// and publishes a `SharedEd25519PublicKey::SharedEd25519PublicKey` resource +/// containing the 32-byte ed25519 `public_key` and the `DiemAccount::KeyRotationCapability` for +/// `account` under `account`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | The signer reference of the sending account of the transaction. | +/// | `public_key` | `vector` | 32-byte Ed25519 public key for `account`' authentication key to be rotated to and stored. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability` resource. | +/// | `Errors::ALREADY_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | The `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is already published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | +/// +/// # Related Scripts +/// * `Script::rotate_shared_ed25519_public_key` +pub fn encode_publish_shared_ed25519_public_key_script(public_key: Vec) -> Script { + Script::new( + PUBLISH_SHARED_ED25519_PUBLIC_KEY_CODE.to_vec(), + vec![], + vec![TransactionArgument::U8Vector(public_key)], + ) +} + +/// # Summary +/// Updates a validator's configuration. This does not reconfigure the system and will not update +/// the configuration in the validator set that is seen by other validators in the network. Can +/// only be successfully sent by a Validator Operator account that is already registered with a +/// validator. +/// +/// # Technical Description +/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` +/// config resource held under `validator_account`. It does not emit a `DiemConfig::NewEpochEvent` +/// so the copy of this config held in the validator set will not be updated, and the changes are +/// only "locally" under the `validator_account` account address. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `validator_operator_account` | `&signer` | Signer reference of the sending account. Must be the registered validator operator for the validator at `validator_address`. | +/// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | +/// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::create_validator_operator_account` +/// * `Script::add_validator_and_reconfigure` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_register_validator_config_script( + validator_account: AccountAddress, + consensus_pubkey: Vec, + validator_network_addresses: Vec, + fullnode_network_addresses: Vec, +) -> Script { + Script::new( + REGISTER_VALIDATOR_CONFIG_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::Address(validator_account), + TransactionArgument::U8Vector(consensus_pubkey), + TransactionArgument::U8Vector(validator_network_addresses), + TransactionArgument::U8Vector(fullnode_network_addresses), + ], + ) +} + +/// # Summary +/// This script removes a validator account from the validator set, and triggers a reconfiguration +/// of the system to remove the validator from the system. This transaction can only be +/// successfully called by the Diem Root account. +/// +/// # Technical Description +/// This script removes the account at `validator_address` from the validator set. This transaction +/// emits a `DiemConfig::NewEpochEvent` event. Once the reconfiguration triggered by this event +/// has been performed, the account at `validator_address` is no longer considered to be a +/// validator in the network. This transaction will fail if the validator at `validator_address` +/// is not in the validator set. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Diem Root signer. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `validator_name` | `vector` | ASCII-encoded human name for the validator. Must match the human name in the `ValidatorConfig::ValidatorConfig` for the validator. | +/// | `validator_address` | `address` | The validator account address to be removed from the validator set. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | +/// | 0 | 0 | The provided `validator_name` does not match the already-recorded human name for the validator. | +/// | `Errors::INVALID_ARGUMENT` | `DiemSystem::ENOT_AN_ACTIVE_VALIDATOR` | The validator to be removed is not in the validator set. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EDIEM_ROOT` | The sending account is not the Diem Root account. | +/// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::create_validator_operator_account` +/// * `Script::register_validator_config` +/// * `Script::add_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_remove_validator_and_reconfigure_script( + sliding_nonce: u64, + validator_name: Vec, + validator_address: AccountAddress, +) -> Script { + Script::new( + REMOVE_VALIDATOR_AND_RECONFIGURE_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U8Vector(validator_name), + TransactionArgument::Address(validator_address), + ], + ) +} + +/// # Summary +/// Rotates the transaction sender's authentication key to the supplied new authentication key. May +/// be sent by any account. +/// +/// # Technical Description +/// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. +/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated +/// its `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | Signer reference of the sending account of the transaction. | +/// | `new_key` | `vector` | New ed25519 public key to be used for `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `Script::rotate_authentication_key_with_nonce` +/// * `Script::rotate_authentication_key_with_nonce_admin` +/// * `Script::rotate_authentication_key_with_recovery_address` +pub fn encode_rotate_authentication_key_script(new_key: Vec) -> Script { + Script::new( + ROTATE_AUTHENTICATION_KEY_CODE.to_vec(), + vec![], + vec![TransactionArgument::U8Vector(new_key)], + ) +} + +/// # Summary +/// Rotates the sender's authentication key to the supplied new authentication key. May be sent by +/// any account that has a sliding nonce resource published under it (usually this is Treasury +/// Compliance or Diem Root accounts). +/// +/// # Technical Description +/// Rotates the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. +/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated +/// its `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | Signer reference of the sending account of the transaction. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_key` | `vector` | New ed25519 public key to be used for `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `Script::rotate_authentication_key` +/// * `Script::rotate_authentication_key_with_nonce_admin` +/// * `Script::rotate_authentication_key_with_recovery_address` +pub fn encode_rotate_authentication_key_with_nonce_script( + sliding_nonce: u64, + new_key: Vec, +) -> Script { + Script::new( + ROTATE_AUTHENTICATION_KEY_WITH_NONCE_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U8Vector(new_key), + ], + ) +} + +/// # Summary +/// Rotates the specified account's authentication key to the supplied new authentication key. May +/// only be sent by the Diem Root account as a write set transaction. +/// +/// # Technical Description +/// Rotate the `account`'s `DiemAccount::DiemAccount` `authentication_key` field to `new_key`. +/// `new_key` must be a valid ed25519 public key, and `account` must not have previously delegated +/// its `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. | +/// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | +/// | `new_key` | `vector` | New ed25519 public key to be used for `account`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | +/// | `Errors::INVALID_STATE` | `DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED` | `account` has already delegated/extracted its `DiemAccount::KeyRotationCapability`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `Script::rotate_authentication_key` +/// * `Script::rotate_authentication_key_with_nonce` +/// * `Script::rotate_authentication_key_with_recovery_address` +pub fn encode_rotate_authentication_key_with_nonce_admin_script( + sliding_nonce: u64, + new_key: Vec, +) -> Script { + Script::new( + ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U8Vector(new_key), + ], + ) +} + +/// # Summary +/// Rotates the authentication key of a specified account that is part of a recovery address to a +/// new authentication key. Only used for accounts that are part of a recovery address (see +/// `Script::add_recovery_rotation_capability` for account restrictions). +/// +/// # Technical Description +/// Rotates the authentication key of the `to_recover` account to `new_key` using the +/// `DiemAccount::KeyRotationCapability` stored in the `RecoveryAddress::RecoveryAddress` resource +/// published under `recovery_address`. This transaction can be sent either by the `to_recover` +/// account, or by the account where the `RecoveryAddress::RecoveryAddress` resource is published +/// that contains `to_recover`'s `DiemAccount::KeyRotationCapability`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | Signer reference of the sending account of the transaction. | +/// | `recovery_address` | `address` | Address where `RecoveryAddress::RecoveryAddress` that holds `to_recover`'s `DiemAccount::KeyRotationCapability` is published. | +/// | `to_recover` | `address` | The address of the account whose authentication key will be updated. | +/// | `new_key` | `vector` | New ed25519 public key to be used for the account at the `to_recover` address. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `RecoveryAddress::ERECOVERY_ADDRESS` | `recovery_address` does not have a `RecoveryAddress::RecoveryAddress` resource published under it. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::ECANNOT_ROTATE_KEY` | The address of `account` is not `recovery_address` or `to_recover`. | +/// | `Errors::INVALID_ARGUMENT` | `RecoveryAddress::EACCOUNT_NOT_RECOVERABLE` | `to_recover`'s `DiemAccount::KeyRotationCapability` is not in the `RecoveryAddress::RecoveryAddress` resource published under `recovery_address`. | +/// | `Errors::INVALID_ARGUMENT` | `DiemAccount::EMALFORMED_AUTHENTICATION_KEY` | `new_key` was an invalid length. | +/// +/// # Related Scripts +/// * `Script::rotate_authentication_key` +/// * `Script::rotate_authentication_key_with_nonce` +/// * `Script::rotate_authentication_key_with_nonce_admin` +pub fn encode_rotate_authentication_key_with_recovery_address_script( + recovery_address: AccountAddress, + to_recover: AccountAddress, + new_key: Vec, +) -> Script { + Script::new( + ROTATE_AUTHENTICATION_KEY_WITH_RECOVERY_ADDRESS_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::Address(recovery_address), + TransactionArgument::Address(to_recover), + TransactionArgument::U8Vector(new_key), + ], + ) +} + +/// # Summary +/// Updates the url used for off-chain communication, and the public key used to verify dual +/// attestation on-chain. Transaction can be sent by any account that has dual attestation +/// information published under it. In practice the only such accounts are Designated Dealers and +/// Parent VASPs. +/// +/// # Technical Description +/// Updates the `base_url` and `compliance_public_key` fields of the `DualAttestation::Credential` +/// resource published under `account`. The `new_key` must be a valid ed25519 public key. +/// +/// ## Events +/// Successful execution of this transaction emits two events: +/// * A `DualAttestation::ComplianceKeyRotationEvent` containing the new compliance public key, and +/// the blockchain time at which the key was updated emitted on the `DualAttestation::Credential` +/// `compliance_key_rotation_events` handle published under `account`; and +/// * A `DualAttestation::BaseUrlRotationEvent` containing the new base url to be used for +/// off-chain communication, and the blockchain time at which the url was updated emitted on the +/// `DualAttestation::Credential` `base_url_rotation_events` handle published under `account`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | Signer reference of the sending account of the transaction. | +/// | `new_url` | `vector` | ASCII-encoded url to be used for off-chain communication with `account`. | +/// | `new_key` | `vector` | New ed25519 public key to be used for on-chain dual attestation checking. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `DualAttestation::ECREDENTIAL` | A `DualAttestation::Credential` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `DualAttestation::EINVALID_PUBLIC_KEY` | `new_key` is not a valid ed25519 public key. | +/// +/// # Related Scripts +/// * `Script::create_parent_vasp_account` +/// * `Script::create_designated_dealer` +/// * `Script::rotate_dual_attestation_info` +pub fn encode_rotate_dual_attestation_info_script(new_url: Vec, new_key: Vec) -> Script { + Script::new( + ROTATE_DUAL_ATTESTATION_INFO_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U8Vector(new_url), + TransactionArgument::U8Vector(new_key), + ], + ) +} + +/// # Summary +/// Rotates the authentication key in a `SharedEd25519PublicKey`. This transaction can be sent by +/// any account that has previously published a shared ed25519 public key using +/// `Script::publish_shared_ed25519_public_key`. +/// +/// # Technical Description +/// This first rotates the public key stored in `account`'s +/// `SharedEd25519PublicKey::SharedEd25519PublicKey` resource to `public_key`, after which it +/// rotates the authentication key using the capability stored in `account`'s +/// `SharedEd25519PublicKey::SharedEd25519PublicKey` to a new value derived from `public_key` +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | The signer reference of the sending account of the transaction. | +/// | `public_key` | `vector` | 32-byte Ed25519 public key. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SharedEd25519PublicKey::ESHARED_KEY` | A `SharedEd25519PublicKey::SharedEd25519PublicKey` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY` | `public_key` is an invalid ed25519 public key. | +/// +/// # Related Scripts +/// * `Script::publish_shared_ed25519_public_key` +pub fn encode_rotate_shared_ed25519_public_key_script(public_key: Vec) -> Script { + Script::new( + ROTATE_SHARED_ED25519_PUBLIC_KEY_CODE.to_vec(), + vec![], + vec![TransactionArgument::U8Vector(public_key)], + ) +} + +/// # Summary +/// Updates a validator's configuration, and triggers a reconfiguration of the system to update the +/// validator set with this new validator configuration. Can only be successfully sent by a +/// Validator Operator account that is already registered with a validator. +/// +/// # Technical Description +/// This updates the fields with corresponding names held in the `ValidatorConfig::ValidatorConfig` +/// config resource held under `validator_account`. It then emits a `DiemConfig::NewEpochEvent` to +/// trigger a reconfiguration of the system. This reconfiguration will update the validator set +/// on-chain with the updated `ValidatorConfig::ValidatorConfig`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `validator_operator_account` | `&signer` | Signer reference of the sending account. Must be the registered validator operator for the validator at `validator_address`. | +/// | `validator_account` | `address` | The address of the validator's `ValidatorConfig::ValidatorConfig` resource being updated. | +/// | `consensus_pubkey` | `vector` | New Ed25519 public key to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `validator_network_addresses` | `vector` | New set of `validator_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// | `fullnode_network_addresses` | `vector` | New set of `fullnode_network_addresses` to be used in the updated `ValidatorConfig::ValidatorConfig`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | `validator_address` does not have a `ValidatorConfig::ValidatorConfig` resource published under it. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR_OPERATOR` | `validator_operator_account` does not have a Validator Operator role. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_TRANSACTION_SENDER` | `validator_operator_account` is not the registered operator for the validator at `validator_address`. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::EINVALID_CONSENSUS_KEY` | `consensus_pubkey` is not a valid ed25519 public key. | +/// | `Errors::INVALID_STATE` | `DiemConfig::EINVALID_BLOCK_TIME` | An invalid time value was encountered in reconfiguration. Unlikely to occur. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::create_validator_operator_account` +/// * `Script::add_validator_and_reconfigure` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::register_validator_config` +pub fn encode_set_validator_config_and_reconfigure_script( + validator_account: AccountAddress, + consensus_pubkey: Vec, + validator_network_addresses: Vec, + fullnode_network_addresses: Vec, +) -> Script { + Script::new( + SET_VALIDATOR_CONFIG_AND_RECONFIGURE_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::Address(validator_account), + TransactionArgument::U8Vector(consensus_pubkey), + TransactionArgument::U8Vector(validator_network_addresses), + TransactionArgument::U8Vector(fullnode_network_addresses), + ], + ) +} + +/// # Summary +/// Sets the validator operator for a validator in the validator's configuration resource "locally" +/// and does not reconfigure the system. Changes from this transaction will not picked up by the +/// system until a reconfiguration of the system is triggered. May only be sent by an account with +/// Validator role. +/// +/// # Technical Description +/// Sets the account at `operator_account` address and with the specified `human_name` as an +/// operator for the sending validator account. The account at `operator_account` address must have +/// a Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` +/// resource published under it. The sending `account` must be a Validator and have a +/// `ValidatorConfig::ValidatorConfig` resource published under it. This script does not emit a +/// `DiemConfig::NewEpochEvent` and no reconfiguration of the system is initiated by this script. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | The signer reference of the sending account of the transaction. | +/// | `operator_name` | `vector` | Validator operator's human name. | +/// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | +/// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::create_validator_operator_account` +/// * `Script::register_validator_config` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::add_validator_and_reconfigure` +/// * `Script::set_validator_operator_with_nonce_admin` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_set_validator_operator_script( + operator_name: Vec, + operator_account: AccountAddress, +) -> Script { + Script::new( + SET_VALIDATOR_OPERATOR_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U8Vector(operator_name), + TransactionArgument::Address(operator_account), + ], + ) +} + +/// # Summary +/// Sets the validator operator for a validator in the validator's configuration resource "locally" +/// and does not reconfigure the system. Changes from this transaction will not picked up by the +/// system until a reconfiguration of the system is triggered. May only be sent by the Diem Root +/// account as a write set transaction. +/// +/// # Technical Description +/// Sets the account at `operator_account` address and with the specified `human_name` as an +/// operator for the validator `account`. The account at `operator_account` address must have a +/// Validator Operator role and have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource +/// published under it. The account represented by the `account` signer must be a Validator and +/// have a `ValidatorConfig::ValidatorConfig` resource published under it. No reconfiguration of +/// the system is initiated by this script. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `dr_account` | `&signer` | The signer reference of the sending account of the write set transaction. May only be the Diem Root signer. | +/// | `account` | `&signer` | Signer reference of account specified in the `execute_as` field of the write set transaction. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction for Diem Root. | +/// | `operator_name` | `vector` | Validator operator's human name. | +/// | `operator_account` | `address` | Address of the validator operator account to be added as the `account` validator's operator. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `dr_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` in `dr_account` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` in `dr_account` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` in` dr_account` has been previously recorded. | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | The sending account is not the Diem Root account or Treasury Compliance account | +/// | `Errors::NOT_PUBLISHED` | `ValidatorOperatorConfig::EVALIDATOR_OPERATOR_CONFIG` | The `ValidatorOperatorConfig::ValidatorOperatorConfig` resource is not published under `operator_account`. | +/// | 0 | 0 | The `human_name` field of the `ValidatorOperatorConfig::ValidatorOperatorConfig` resource under `operator_account` does not match the provided `human_name`. | +/// | `Errors::REQUIRES_ROLE` | `Roles::EVALIDATOR` | `account` does not have a Validator account role. | +/// | `Errors::INVALID_ARGUMENT` | `ValidatorConfig::ENOT_A_VALIDATOR_OPERATOR` | The account at `operator_account` does not have a `ValidatorOperatorConfig::ValidatorOperatorConfig` resource. | +/// | `Errors::NOT_PUBLISHED` | `ValidatorConfig::EVALIDATOR_CONFIG` | A `ValidatorConfig::ValidatorConfig` is not published under `account`. | +/// +/// # Related Scripts +/// * `Script::create_validator_account` +/// * `Script::create_validator_operator_account` +/// * `Script::register_validator_config` +/// * `Script::remove_validator_and_reconfigure` +/// * `Script::add_validator_and_reconfigure` +/// * `Script::set_validator_operator` +/// * `Script::set_validator_config_and_reconfigure` +pub fn encode_set_validator_operator_with_nonce_admin_script( + sliding_nonce: u64, + operator_name: Vec, + operator_account: AccountAddress, +) -> Script { + Script::new( + SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U8Vector(operator_name), + TransactionArgument::Address(operator_account), + ], + ) +} + +/// # Summary +/// Mints a specified number of coins in a currency to a Designated Dealer. The sending account +/// must be the Treasury Compliance account, and coins can only be minted to a Designated Dealer +/// account. +/// +/// # Technical Description +/// Mints `mint_amount` of coins in the `CoinType` currency to Designated Dealer account at +/// `designated_dealer_address`. The `tier_index` parameter specifies which tier should be used to +/// check verify the off-chain approval policy, and is based in part on the on-chain tier values +/// for the specific Designated Dealer, and the number of `CoinType` coins that have been minted to +/// the dealer over the past 24 hours. Every Designated Dealer has 4 tiers for each currency that +/// they support. The sending `tc_account` must be the Treasury Compliance account, and the +/// receiver an authorized Designated Dealer account. +/// +/// ## Events +/// Successful execution of the transaction will emit two events: +/// * A `Diem::MintEvent` with the amount and currency code minted is emitted on the +/// `mint_event_handle` in the stored `Diem::CurrencyInfo` resource stored under +/// `0xA550C18`; and +/// * A `DesignatedDealer::ReceivedMintEvent` with the amount, currency code, and Designated +/// Dealer's address is emitted on the `mint_event_handle` in the stored `DesignatedDealer::Dealer` +/// resource published under the `designated_dealer_address`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `CoinType` | Type | The Move type for the `CoinType` being minted. `CoinType` must be an already-registered currency on-chain. | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `designated_dealer_address` | `address` | The address of the Designated Dealer account being minted to. | +/// | `mint_amount` | `u64` | The number of coins to be minted. | +/// | `tier_index` | `u64` | The mint tier index to use for the Designated Dealer account. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_MINT_AMOUNT` | `mint_amount` is zero. | +/// | `Errors::NOT_PUBLISHED` | `DesignatedDealer::EDEALER` | `DesignatedDealer::Dealer` or `DesignatedDealer::TierInfo` resource does not exist at `designated_dealer_address`. | +/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_TIER_INDEX` | The `tier_index` is out of bounds. | +/// | `Errors::INVALID_ARGUMENT` | `DesignatedDealer::EINVALID_AMOUNT_FOR_TIER` | `mint_amount` exceeds the maximum allowed amount for `tier_index`. | +/// | `Errors::REQUIRES_CAPABILITY` | `Diem::EMINT_CAPABILITY` | `tc_account` does not have a `Diem::MintCapability` resource published under it. | +/// | `Errors::INVALID_STATE` | `Diem::EMINTING_NOT_ALLOWED` | Minting is not currently allowed for `CoinType` coins. | +/// | `Errors::LIMIT_EXCEEDED` | `DiemAccount::EDEPOSIT_EXCEEDS_LIMITS` | The depositing of the funds would exceed the `account`'s account limits. | +/// +/// # Related Scripts +/// * `Script::create_designated_dealer` +/// * `Script::peer_to_peer_with_metadata` +/// * `Script::rotate_dual_attestation_info` +pub fn encode_tiered_mint_script( + coin_type: TypeTag, + sliding_nonce: u64, + designated_dealer_address: AccountAddress, + mint_amount: u64, + tier_index: u64, +) -> Script { + Script::new( + TIERED_MINT_CODE.to_vec(), + vec![coin_type], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(designated_dealer_address), + TransactionArgument::U64(mint_amount), + TransactionArgument::U64(tier_index), + ], + ) +} + +/// # Summary +/// Unfreezes the account at `address`. The sending account of this transaction must be the +/// Treasury Compliance account. After the successful execution of this transaction transactions +/// may be sent from the previously frozen account, and coins may be sent and received. +/// +/// # Technical Description +/// Sets the `AccountFreezing::FreezingBit` to `false` and emits a +/// `AccountFreezing::UnFreezeAccountEvent`. The transaction sender must be the Treasury Compliance +/// account. Note that this is a per-account property so unfreezing a Parent VASP will not effect +/// the status any of its child accounts and vice versa. +/// +/// ## Events +/// Successful execution of this script will emit a `AccountFreezing::UnFreezeAccountEvent` with +/// the `unfrozen_address` set the `to_unfreeze_account`'s address. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `to_unfreeze_account` | `address` | The account address to be frozen. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | The sending account is not the Treasury Compliance account. | +/// +/// # Related Scripts +/// * `Script::freeze_account` +pub fn encode_unfreeze_account_script( + sliding_nonce: u64, + to_unfreeze_account: AccountAddress, +) -> Script { + Script::new( + UNFREEZE_ACCOUNT_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::Address(to_unfreeze_account), + ], + ) +} + +/// # Summary +/// Updates the Diem major version that is stored on-chain and is used by the VM. This +/// transaction can only be sent from the Diem Root account. +/// +/// # Technical Description +/// Updates the `DiemVersion` on-chain config and emits a `DiemConfig::NewEpochEvent` to trigger +/// a reconfiguration of the system. The `major` version that is passed in must be strictly greater +/// than the current major version held on-chain. The VM reads this information and can use it to +/// preserve backwards compatibility with previous major versions of the VM. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `major` | `u64` | The `major` version of the VM to be used from this transaction on. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::EDIEM_ROOT` | `account` is not the Diem Root account. | +/// | `Errors::INVALID_ARGUMENT` | `DiemVersion::EINVALID_MAJOR_VERSION_NUMBER` | `major` is less-than or equal to the current major version stored on-chain. | +pub fn encode_update_diem_version_script(sliding_nonce: u64, major: u64) -> Script { + Script::new( + UPDATE_DIEM_VERSION_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U64(major), + ], + ) +} + +/// # Summary +/// Update the dual attestation limit on-chain. Defined in terms of micro-XDX. The transaction can +/// only be sent by the Treasury Compliance account. After this transaction all inter-VASP +/// payments over this limit must be checked for dual attestation. +/// +/// # Technical Description +/// Updates the `micro_xdx_limit` field of the `DualAttestation::Limit` resource published under +/// `0xA550C18`. The amount is set in micro-XDX. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for this transaction. | +/// | `new_micro_xdx_limit` | `u64` | The new dual attestation limit to be used on-chain. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// +/// # Related Scripts +/// * `Script::update_exchange_rate` +/// * `Script::update_minting_ability` +pub fn encode_update_dual_attestation_limit_script( + sliding_nonce: u64, + new_micro_xdx_limit: u64, +) -> Script { + Script::new( + UPDATE_DUAL_ATTESTATION_LIMIT_CODE.to_vec(), + vec![], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U64(new_micro_xdx_limit), + ], + ) +} + +/// # Summary +/// Update the rough on-chain exchange rate between a specified currency and XDX (as a conversion +/// to micro-XDX). The transaction can only be sent by the Treasury Compliance account. After this +/// transaction the updated exchange rate will be used for normalization of gas prices, and for +/// dual attestation checking. +/// +/// # Technical Description +/// Updates the on-chain exchange rate from the given `Currency` to micro-XDX. The exchange rate +/// is given by `new_exchange_rate_numerator/new_exchange_rate_denominator`. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` whose exchange rate is being updated. `Currency` must be an already-registered currency on-chain. | +/// | `tc_account` | `&signer` | The signer reference of the sending account of this transaction. Must be the Treasury Compliance account. | +/// | `sliding_nonce` | `u64` | The `sliding_nonce` (see: `SlidingNonce`) to be used for the transaction. | +/// | `new_exchange_rate_numerator` | `u64` | The numerator for the new to micro-XDX exchange rate for `Currency`. | +/// | `new_exchange_rate_denominator` | `u64` | The denominator for the new to micro-XDX exchange rate for `Currency`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::NOT_PUBLISHED` | `SlidingNonce::ESLIDING_NONCE` | A `SlidingNonce` resource is not published under `tc_account`. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_OLD` | The `sliding_nonce` is too old and it's impossible to determine if it's duplicated or not. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_TOO_NEW` | The `sliding_nonce` is too far in the future. | +/// | `Errors::INVALID_ARGUMENT` | `SlidingNonce::ENONCE_ALREADY_RECORDED` | The `sliding_nonce` has been previously recorded. | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::REQUIRES_ROLE` | `Roles::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::EDENOMINATOR` | `new_exchange_rate_denominator` is zero. | +/// | `Errors::INVALID_ARGUMENT` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | +/// | `Errors::LIMIT_EXCEEDED` | `FixedPoint32::ERATIO_OUT_OF_RANGE` | The quotient is unrepresentable as a `FixedPoint32`. | +/// +/// # Related Scripts +/// * `Script::update_dual_attestation_limit` +/// * `Script::update_minting_ability` +pub fn encode_update_exchange_rate_script( + currency: TypeTag, + sliding_nonce: u64, + new_exchange_rate_numerator: u64, + new_exchange_rate_denominator: u64, +) -> Script { + Script::new( + UPDATE_EXCHANGE_RATE_CODE.to_vec(), + vec![currency], + vec![ + TransactionArgument::U64(sliding_nonce), + TransactionArgument::U64(new_exchange_rate_numerator), + TransactionArgument::U64(new_exchange_rate_denominator), + ], + ) +} + +/// # Summary +/// Script to allow or disallow minting of new coins in a specified currency. This transaction can +/// only be sent by the Treasury Compliance account. Turning minting off for a currency will have +/// no effect on coins already in circulation, and coins may still be removed from the system. +/// +/// # Technical Description +/// This transaction sets the `can_mint` field of the `Diem::CurrencyInfo` resource +/// published under `0xA550C18` to the value of `allow_minting`. Minting of coins if allowed if +/// this field is set to `true` and minting of new coins in `Currency` is disallowed otherwise. +/// This transaction needs to be sent by the Treasury Compliance account. +/// +/// # Parameters +/// | Name | Type | Description | +/// | ------ | ------ | ------------- | +/// | `Currency` | Type | The Move type for the `Currency` whose minting ability is being updated. `Currency` must be an already-registered currency on-chain. | +/// | `account` | `&signer` | Signer reference of the sending account. Must be the Diem Root account. | +/// | `allow_minting` | `bool` | Whether to allow minting of new coins in `Currency`. | +/// +/// # Common Abort Conditions +/// | Error Category | Error Reason | Description | +/// | ---------------- | -------------- | ------------- | +/// | `Errors::REQUIRES_ADDRESS` | `CoreAddresses::ETREASURY_COMPLIANCE` | `tc_account` is not the Treasury Compliance account. | +/// | `Errors::NOT_PUBLISHED` | `Diem::ECURRENCY_INFO` | `Currency` is not a registered currency on-chain. | +/// +/// # Related Scripts +/// * `Script::update_dual_attestation_limit` +/// * `Script::update_exchange_rate` +pub fn encode_update_minting_ability_script(currency: TypeTag, allow_minting: bool) -> Script { + Script::new( + UPDATE_MINTING_ABILITY_CODE.to_vec(), + vec![currency], + vec![TransactionArgument::Bool(allow_minting)], + ) +} + +fn decode_add_currency_to_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::AddCurrencyToAccount { + currency: script.ty_args().get(0)?.clone(), + }) + } else { + None + } +} + +fn decode_add_recovery_rotation_capability_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::AddRecoveryRotationCapability { + recovery_address: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_add_validator_and_reconfigure_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::AddValidatorAndReconfigure { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + validator_name: bcs::from_bytes(script.args().get(1)?).ok()?, + validator_address: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_add_vasp_domain_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::AddVaspDomain { + address: bcs::from_bytes(script.args().get(0)?).ok()?, + domain: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_burn_txn_fees_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::BurnTxnFees { + coin_type: script.ty_args().get(0)?.clone(), + }) + } else { + None + } +} + +fn decode_burn_with_amount_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::BurnWithAmount { + token: script.ty_args().get(0)?.clone(), + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + preburn_address: bcs::from_bytes(script.args().get(1)?).ok()?, + amount: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_cancel_burn_with_amount_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CancelBurnWithAmount { + token: script.ty_args().get(0)?.clone(), + preburn_address: bcs::from_bytes(script.args().get(0)?).ok()?, + amount: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_child_vasp_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateChildVaspAccount { + coin_type: script.ty_args().get(0)?.clone(), + child_address: bcs::from_bytes(script.args().get(0)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(1)?).ok()?, + add_all_currencies: bcs::from_bytes(script.args().get(2)?).ok()?, + child_initial_balance: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_designated_dealer_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateDesignatedDealer { + currency: script.ty_args().get(0)?.clone(), + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + addr: bcs::from_bytes(script.args().get(1)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(2)?).ok()?, + human_name: bcs::from_bytes(script.args().get(3)?).ok()?, + add_all_currencies: bcs::from_bytes(script.args().get(4)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_parent_vasp_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateParentVaspAccount { + coin_type: script.ty_args().get(0)?.clone(), + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_account_address: bcs::from_bytes(script.args().get(1)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(2)?).ok()?, + human_name: bcs::from_bytes(script.args().get(3)?).ok()?, + add_all_currencies: bcs::from_bytes(script.args().get(4)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_recovery_address_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(_script) = payload { + Some(ScriptFunctionCall::CreateRecoveryAddress {}) + } else { + None + } +} + +fn decode_create_validator_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateValidatorAccount { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_account_address: bcs::from_bytes(script.args().get(1)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(2)?).ok()?, + human_name: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_validator_operator_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::CreateValidatorOperatorAccount { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_account_address: bcs::from_bytes(script.args().get(1)?).ok()?, + auth_key_prefix: bcs::from_bytes(script.args().get(2)?).ok()?, + human_name: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_create_vasp_domains_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(_script) = payload { + Some(ScriptFunctionCall::CreateVaspDomains {}) + } else { + None + } +} + +fn decode_force_expire_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::ForceExpire { + shift_amount: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_freeze_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::FreezeAccount { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + to_freeze_account: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_initialize_diem_consensus_config_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::InitializeDiemConsensusConfig { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_opt_in_to_crsn_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::OptInToCrsn { + crsn_size: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_peer_to_peer_by_signers_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::PeerToPeerBySigners { + currency: script.ty_args().get(0)?.clone(), + amount: bcs::from_bytes(script.args().get(0)?).ok()?, + metadata: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_peer_to_peer_with_metadata_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::PeerToPeerWithMetadata { + currency: script.ty_args().get(0)?.clone(), + payee: bcs::from_bytes(script.args().get(0)?).ok()?, + amount: bcs::from_bytes(script.args().get(1)?).ok()?, + metadata: bcs::from_bytes(script.args().get(2)?).ok()?, + metadata_signature: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_preburn_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::Preburn { + token: script.ty_args().get(0)?.clone(), + amount: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_publish_shared_ed25519_public_key_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::PublishSharedEd25519PublicKey { + public_key: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_register_validator_config_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RegisterValidatorConfig { + validator_account: bcs::from_bytes(script.args().get(0)?).ok()?, + consensus_pubkey: bcs::from_bytes(script.args().get(1)?).ok()?, + validator_network_addresses: bcs::from_bytes(script.args().get(2)?).ok()?, + fullnode_network_addresses: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_remove_validator_and_reconfigure_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RemoveValidatorAndReconfigure { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + validator_name: bcs::from_bytes(script.args().get(1)?).ok()?, + validator_address: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_remove_vasp_domain_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RemoveVaspDomain { + address: bcs::from_bytes(script.args().get(0)?).ok()?, + domain: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_rotate_authentication_key_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RotateAuthenticationKey { + new_key: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_rotate_authentication_key_with_nonce_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RotateAuthenticationKeyWithNonce { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_key: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_rotate_authentication_key_with_nonce_admin_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RotateAuthenticationKeyWithNonceAdmin { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_key: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_rotate_authentication_key_with_recovery_address_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some( + ScriptFunctionCall::RotateAuthenticationKeyWithRecoveryAddress { + recovery_address: bcs::from_bytes(script.args().get(0)?).ok()?, + to_recover: bcs::from_bytes(script.args().get(1)?).ok()?, + new_key: bcs::from_bytes(script.args().get(2)?).ok()?, + }, + ) + } else { + None + } +} + +fn decode_rotate_dual_attestation_info_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RotateDualAttestationInfo { + new_url: bcs::from_bytes(script.args().get(0)?).ok()?, + new_key: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_rotate_shared_ed25519_public_key_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::RotateSharedEd25519PublicKey { + public_key: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_set_gas_constants_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::SetGasConstants { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + global_memory_per_byte_cost: bcs::from_bytes(script.args().get(1)?).ok()?, + global_memory_per_byte_write_cost: bcs::from_bytes(script.args().get(2)?).ok()?, + min_transaction_gas_units: bcs::from_bytes(script.args().get(3)?).ok()?, + large_transaction_cutoff: bcs::from_bytes(script.args().get(4)?).ok()?, + intrinsic_gas_per_byte: bcs::from_bytes(script.args().get(5)?).ok()?, + maximum_number_of_gas_units: bcs::from_bytes(script.args().get(6)?).ok()?, + min_price_per_gas_unit: bcs::from_bytes(script.args().get(7)?).ok()?, + max_price_per_gas_unit: bcs::from_bytes(script.args().get(8)?).ok()?, + max_transaction_size_in_bytes: bcs::from_bytes(script.args().get(9)?).ok()?, + gas_unit_scaling_factor: bcs::from_bytes(script.args().get(10)?).ok()?, + default_account_size: bcs::from_bytes(script.args().get(11)?).ok()?, + }) + } else { + None + } +} + +fn decode_set_validator_config_and_reconfigure_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::SetValidatorConfigAndReconfigure { + validator_account: bcs::from_bytes(script.args().get(0)?).ok()?, + consensus_pubkey: bcs::from_bytes(script.args().get(1)?).ok()?, + validator_network_addresses: bcs::from_bytes(script.args().get(2)?).ok()?, + fullnode_network_addresses: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_set_validator_operator_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::SetValidatorOperator { + operator_name: bcs::from_bytes(script.args().get(0)?).ok()?, + operator_account: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_set_validator_operator_with_nonce_admin_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::SetValidatorOperatorWithNonceAdmin { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + operator_name: bcs::from_bytes(script.args().get(1)?).ok()?, + operator_account: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_tiered_mint_script_function(payload: &TransactionPayload) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::TieredMint { + coin_type: script.ty_args().get(0)?.clone(), + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + designated_dealer_address: bcs::from_bytes(script.args().get(1)?).ok()?, + mint_amount: bcs::from_bytes(script.args().get(2)?).ok()?, + tier_index: bcs::from_bytes(script.args().get(3)?).ok()?, + }) + } else { + None + } +} + +fn decode_unfreeze_account_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UnfreezeAccount { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + to_unfreeze_account: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_diem_consensus_config_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateDiemConsensusConfig { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + config: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_diem_version_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateDiemVersion { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + major: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_dual_attestation_limit_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateDualAttestationLimit { + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_micro_xdx_limit: bcs::from_bytes(script.args().get(1)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_exchange_rate_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateExchangeRate { + currency: script.ty_args().get(0)?.clone(), + sliding_nonce: bcs::from_bytes(script.args().get(0)?).ok()?, + new_exchange_rate_numerator: bcs::from_bytes(script.args().get(1)?).ok()?, + new_exchange_rate_denominator: bcs::from_bytes(script.args().get(2)?).ok()?, + }) + } else { + None + } +} + +fn decode_update_minting_ability_script_function( + payload: &TransactionPayload, +) -> Option { + if let TransactionPayload::ScriptFunction(script) = payload { + Some(ScriptFunctionCall::UpdateMintingAbility { + currency: script.ty_args().get(0)?.clone(), + allow_minting: bcs::from_bytes(script.args().get(0)?).ok()?, + }) + } else { + None + } +} + +fn decode_add_currency_to_account_script(script: &Script) -> Option { + Some(ScriptCall::AddCurrencyToAccount { + currency: script.ty_args().get(0)?.clone(), + }) +} + +fn decode_add_recovery_rotation_capability_script(script: &Script) -> Option { + Some(ScriptCall::AddRecoveryRotationCapability { + recovery_address: decode_address_argument(script.args().get(0)?.clone())?, + }) +} + +fn decode_add_validator_and_reconfigure_script(script: &Script) -> Option { + Some(ScriptCall::AddValidatorAndReconfigure { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + validator_name: decode_u8vector_argument(script.args().get(1)?.clone())?, + validator_address: decode_address_argument(script.args().get(2)?.clone())?, + }) +} + +fn decode_burn_script(script: &Script) -> Option { + Some(ScriptCall::Burn { + token: script.ty_args().get(0)?.clone(), + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + preburn_address: decode_address_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_burn_txn_fees_script(script: &Script) -> Option { + Some(ScriptCall::BurnTxnFees { + coin_type: script.ty_args().get(0)?.clone(), + }) +} + +fn decode_cancel_burn_script(script: &Script) -> Option { + Some(ScriptCall::CancelBurn { + token: script.ty_args().get(0)?.clone(), + preburn_address: decode_address_argument(script.args().get(0)?.clone())?, + }) +} + +fn decode_create_child_vasp_account_script(script: &Script) -> Option { + Some(ScriptCall::CreateChildVaspAccount { + coin_type: script.ty_args().get(0)?.clone(), + child_address: decode_address_argument(script.args().get(0)?.clone())?, + auth_key_prefix: decode_u8vector_argument(script.args().get(1)?.clone())?, + add_all_currencies: decode_bool_argument(script.args().get(2)?.clone())?, + child_initial_balance: decode_u64_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_create_designated_dealer_script(script: &Script) -> Option { + Some(ScriptCall::CreateDesignatedDealer { + currency: script.ty_args().get(0)?.clone(), + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + addr: decode_address_argument(script.args().get(1)?.clone())?, + auth_key_prefix: decode_u8vector_argument(script.args().get(2)?.clone())?, + human_name: decode_u8vector_argument(script.args().get(3)?.clone())?, + add_all_currencies: decode_bool_argument(script.args().get(4)?.clone())?, + }) +} + +fn decode_create_parent_vasp_account_script(script: &Script) -> Option { + Some(ScriptCall::CreateParentVaspAccount { + coin_type: script.ty_args().get(0)?.clone(), + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_account_address: decode_address_argument(script.args().get(1)?.clone())?, + auth_key_prefix: decode_u8vector_argument(script.args().get(2)?.clone())?, + human_name: decode_u8vector_argument(script.args().get(3)?.clone())?, + add_all_currencies: decode_bool_argument(script.args().get(4)?.clone())?, + }) +} + +fn decode_create_recovery_address_script(_script: &Script) -> Option { + Some(ScriptCall::CreateRecoveryAddress {}) +} + +fn decode_create_validator_account_script(script: &Script) -> Option { + Some(ScriptCall::CreateValidatorAccount { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_account_address: decode_address_argument(script.args().get(1)?.clone())?, + auth_key_prefix: decode_u8vector_argument(script.args().get(2)?.clone())?, + human_name: decode_u8vector_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_create_validator_operator_account_script(script: &Script) -> Option { + Some(ScriptCall::CreateValidatorOperatorAccount { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_account_address: decode_address_argument(script.args().get(1)?.clone())?, + auth_key_prefix: decode_u8vector_argument(script.args().get(2)?.clone())?, + human_name: decode_u8vector_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_freeze_account_script(script: &Script) -> Option { + Some(ScriptCall::FreezeAccount { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + to_freeze_account: decode_address_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_peer_to_peer_with_metadata_script(script: &Script) -> Option { + Some(ScriptCall::PeerToPeerWithMetadata { + currency: script.ty_args().get(0)?.clone(), + payee: decode_address_argument(script.args().get(0)?.clone())?, + amount: decode_u64_argument(script.args().get(1)?.clone())?, + metadata: decode_u8vector_argument(script.args().get(2)?.clone())?, + metadata_signature: decode_u8vector_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_preburn_script(script: &Script) -> Option { + Some(ScriptCall::Preburn { + token: script.ty_args().get(0)?.clone(), + amount: decode_u64_argument(script.args().get(0)?.clone())?, + }) +} + +fn decode_publish_shared_ed25519_public_key_script(script: &Script) -> Option { + Some(ScriptCall::PublishSharedEd25519PublicKey { + public_key: decode_u8vector_argument(script.args().get(0)?.clone())?, + }) +} + +fn decode_register_validator_config_script(script: &Script) -> Option { + Some(ScriptCall::RegisterValidatorConfig { + validator_account: decode_address_argument(script.args().get(0)?.clone())?, + consensus_pubkey: decode_u8vector_argument(script.args().get(1)?.clone())?, + validator_network_addresses: decode_u8vector_argument(script.args().get(2)?.clone())?, + fullnode_network_addresses: decode_u8vector_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_remove_validator_and_reconfigure_script(script: &Script) -> Option { + Some(ScriptCall::RemoveValidatorAndReconfigure { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + validator_name: decode_u8vector_argument(script.args().get(1)?.clone())?, + validator_address: decode_address_argument(script.args().get(2)?.clone())?, + }) +} + +fn decode_rotate_authentication_key_script(script: &Script) -> Option { + Some(ScriptCall::RotateAuthenticationKey { + new_key: decode_u8vector_argument(script.args().get(0)?.clone())?, + }) +} + +fn decode_rotate_authentication_key_with_nonce_script(script: &Script) -> Option { + Some(ScriptCall::RotateAuthenticationKeyWithNonce { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_key: decode_u8vector_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_rotate_authentication_key_with_nonce_admin_script(script: &Script) -> Option { + Some(ScriptCall::RotateAuthenticationKeyWithNonceAdmin { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_key: decode_u8vector_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_rotate_authentication_key_with_recovery_address_script( + script: &Script, +) -> Option { + Some(ScriptCall::RotateAuthenticationKeyWithRecoveryAddress { + recovery_address: decode_address_argument(script.args().get(0)?.clone())?, + to_recover: decode_address_argument(script.args().get(1)?.clone())?, + new_key: decode_u8vector_argument(script.args().get(2)?.clone())?, + }) +} + +fn decode_rotate_dual_attestation_info_script(script: &Script) -> Option { + Some(ScriptCall::RotateDualAttestationInfo { + new_url: decode_u8vector_argument(script.args().get(0)?.clone())?, + new_key: decode_u8vector_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_rotate_shared_ed25519_public_key_script(script: &Script) -> Option { + Some(ScriptCall::RotateSharedEd25519PublicKey { + public_key: decode_u8vector_argument(script.args().get(0)?.clone())?, + }) +} + +fn decode_set_validator_config_and_reconfigure_script(script: &Script) -> Option { + Some(ScriptCall::SetValidatorConfigAndReconfigure { + validator_account: decode_address_argument(script.args().get(0)?.clone())?, + consensus_pubkey: decode_u8vector_argument(script.args().get(1)?.clone())?, + validator_network_addresses: decode_u8vector_argument(script.args().get(2)?.clone())?, + fullnode_network_addresses: decode_u8vector_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_set_validator_operator_script(script: &Script) -> Option { + Some(ScriptCall::SetValidatorOperator { + operator_name: decode_u8vector_argument(script.args().get(0)?.clone())?, + operator_account: decode_address_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_set_validator_operator_with_nonce_admin_script(script: &Script) -> Option { + Some(ScriptCall::SetValidatorOperatorWithNonceAdmin { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + operator_name: decode_u8vector_argument(script.args().get(1)?.clone())?, + operator_account: decode_address_argument(script.args().get(2)?.clone())?, + }) +} + +fn decode_tiered_mint_script(script: &Script) -> Option { + Some(ScriptCall::TieredMint { + coin_type: script.ty_args().get(0)?.clone(), + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + designated_dealer_address: decode_address_argument(script.args().get(1)?.clone())?, + mint_amount: decode_u64_argument(script.args().get(2)?.clone())?, + tier_index: decode_u64_argument(script.args().get(3)?.clone())?, + }) +} + +fn decode_unfreeze_account_script(script: &Script) -> Option { + Some(ScriptCall::UnfreezeAccount { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + to_unfreeze_account: decode_address_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_update_diem_version_script(script: &Script) -> Option { + Some(ScriptCall::UpdateDiemVersion { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + major: decode_u64_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_update_dual_attestation_limit_script(script: &Script) -> Option { + Some(ScriptCall::UpdateDualAttestationLimit { + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_micro_xdx_limit: decode_u64_argument(script.args().get(1)?.clone())?, + }) +} + +fn decode_update_exchange_rate_script(script: &Script) -> Option { + Some(ScriptCall::UpdateExchangeRate { + currency: script.ty_args().get(0)?.clone(), + sliding_nonce: decode_u64_argument(script.args().get(0)?.clone())?, + new_exchange_rate_numerator: decode_u64_argument(script.args().get(1)?.clone())?, + new_exchange_rate_denominator: decode_u64_argument(script.args().get(2)?.clone())?, + }) +} + +fn decode_update_minting_ability_script(script: &Script) -> Option { + Some(ScriptCall::UpdateMintingAbility { + currency: script.ty_args().get(0)?.clone(), + allow_minting: decode_bool_argument(script.args().get(0)?.clone())?, + }) +} + +type TransactionScriptDecoderMap = std::collections::HashMap< + Vec, + Box Option + std::marker::Sync + std::marker::Send>, +>; + +static TRANSACTION_SCRIPT_DECODER_MAP: once_cell::sync::Lazy = + once_cell::sync::Lazy::new(|| { + let mut map: TransactionScriptDecoderMap = std::collections::HashMap::new(); + map.insert( + ADD_CURRENCY_TO_ACCOUNT_CODE.to_vec(), + Box::new(decode_add_currency_to_account_script), + ); + map.insert( + ADD_RECOVERY_ROTATION_CAPABILITY_CODE.to_vec(), + Box::new(decode_add_recovery_rotation_capability_script), + ); + map.insert( + ADD_VALIDATOR_AND_RECONFIGURE_CODE.to_vec(), + Box::new(decode_add_validator_and_reconfigure_script), + ); + map.insert(BURN_CODE.to_vec(), Box::new(decode_burn_script)); + map.insert( + BURN_TXN_FEES_CODE.to_vec(), + Box::new(decode_burn_txn_fees_script), + ); + map.insert( + CANCEL_BURN_CODE.to_vec(), + Box::new(decode_cancel_burn_script), + ); + map.insert( + CREATE_CHILD_VASP_ACCOUNT_CODE.to_vec(), + Box::new(decode_create_child_vasp_account_script), + ); + map.insert( + CREATE_DESIGNATED_DEALER_CODE.to_vec(), + Box::new(decode_create_designated_dealer_script), + ); + map.insert( + CREATE_PARENT_VASP_ACCOUNT_CODE.to_vec(), + Box::new(decode_create_parent_vasp_account_script), + ); + map.insert( + CREATE_RECOVERY_ADDRESS_CODE.to_vec(), + Box::new(decode_create_recovery_address_script), + ); + map.insert( + CREATE_VALIDATOR_ACCOUNT_CODE.to_vec(), + Box::new(decode_create_validator_account_script), + ); + map.insert( + CREATE_VALIDATOR_OPERATOR_ACCOUNT_CODE.to_vec(), + Box::new(decode_create_validator_operator_account_script), + ); + map.insert( + FREEZE_ACCOUNT_CODE.to_vec(), + Box::new(decode_freeze_account_script), + ); + map.insert( + PEER_TO_PEER_WITH_METADATA_CODE.to_vec(), + Box::new(decode_peer_to_peer_with_metadata_script), + ); + map.insert(PREBURN_CODE.to_vec(), Box::new(decode_preburn_script)); + map.insert( + PUBLISH_SHARED_ED25519_PUBLIC_KEY_CODE.to_vec(), + Box::new(decode_publish_shared_ed25519_public_key_script), + ); + map.insert( + REGISTER_VALIDATOR_CONFIG_CODE.to_vec(), + Box::new(decode_register_validator_config_script), + ); + map.insert( + REMOVE_VALIDATOR_AND_RECONFIGURE_CODE.to_vec(), + Box::new(decode_remove_validator_and_reconfigure_script), + ); + map.insert( + ROTATE_AUTHENTICATION_KEY_CODE.to_vec(), + Box::new(decode_rotate_authentication_key_script), + ); + map.insert( + ROTATE_AUTHENTICATION_KEY_WITH_NONCE_CODE.to_vec(), + Box::new(decode_rotate_authentication_key_with_nonce_script), + ); + map.insert( + ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_CODE.to_vec(), + Box::new(decode_rotate_authentication_key_with_nonce_admin_script), + ); + map.insert( + ROTATE_AUTHENTICATION_KEY_WITH_RECOVERY_ADDRESS_CODE.to_vec(), + Box::new(decode_rotate_authentication_key_with_recovery_address_script), + ); + map.insert( + ROTATE_DUAL_ATTESTATION_INFO_CODE.to_vec(), + Box::new(decode_rotate_dual_attestation_info_script), + ); + map.insert( + ROTATE_SHARED_ED25519_PUBLIC_KEY_CODE.to_vec(), + Box::new(decode_rotate_shared_ed25519_public_key_script), + ); + map.insert( + SET_VALIDATOR_CONFIG_AND_RECONFIGURE_CODE.to_vec(), + Box::new(decode_set_validator_config_and_reconfigure_script), + ); + map.insert( + SET_VALIDATOR_OPERATOR_CODE.to_vec(), + Box::new(decode_set_validator_operator_script), + ); + map.insert( + SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_CODE.to_vec(), + Box::new(decode_set_validator_operator_with_nonce_admin_script), + ); + map.insert( + TIERED_MINT_CODE.to_vec(), + Box::new(decode_tiered_mint_script), + ); + map.insert( + UNFREEZE_ACCOUNT_CODE.to_vec(), + Box::new(decode_unfreeze_account_script), + ); + map.insert( + UPDATE_DIEM_VERSION_CODE.to_vec(), + Box::new(decode_update_diem_version_script), + ); + map.insert( + UPDATE_DUAL_ATTESTATION_LIMIT_CODE.to_vec(), + Box::new(decode_update_dual_attestation_limit_script), + ); + map.insert( + UPDATE_EXCHANGE_RATE_CODE.to_vec(), + Box::new(decode_update_exchange_rate_script), + ); + map.insert( + UPDATE_MINTING_ABILITY_CODE.to_vec(), + Box::new(decode_update_minting_ability_script), + ); + map + }); + +type ScriptFunctionDecoderMap = std::collections::HashMap< + String, + Box< + dyn Fn(&TransactionPayload) -> Option + + std::marker::Sync + + std::marker::Send, + >, +>; + +static SCRIPT_FUNCTION_DECODER_MAP: once_cell::sync::Lazy = + once_cell::sync::Lazy::new(|| { + let mut map: ScriptFunctionDecoderMap = std::collections::HashMap::new(); + map.insert( + "AccountAdministrationScriptsadd_currency_to_account".to_string(), + Box::new(decode_add_currency_to_account_script_function), + ); + map.insert( + "AccountAdministrationScriptsadd_recovery_rotation_capability".to_string(), + Box::new(decode_add_recovery_rotation_capability_script_function), + ); + map.insert( + "ValidatorAdministrationScriptsadd_validator_and_reconfigure".to_string(), + Box::new(decode_add_validator_and_reconfigure_script_function), + ); + map.insert( + "TreasuryComplianceScriptsadd_vasp_domain".to_string(), + Box::new(decode_add_vasp_domain_script_function), + ); + map.insert( + "TreasuryComplianceScriptsburn_txn_fees".to_string(), + Box::new(decode_burn_txn_fees_script_function), + ); + map.insert( + "TreasuryComplianceScriptsburn_with_amount".to_string(), + Box::new(decode_burn_with_amount_script_function), + ); + map.insert( + "TreasuryComplianceScriptscancel_burn_with_amount".to_string(), + Box::new(decode_cancel_burn_with_amount_script_function), + ); + map.insert( + "AccountCreationScriptscreate_child_vasp_account".to_string(), + Box::new(decode_create_child_vasp_account_script_function), + ); + map.insert( + "AccountCreationScriptscreate_designated_dealer".to_string(), + Box::new(decode_create_designated_dealer_script_function), + ); + map.insert( + "AccountCreationScriptscreate_parent_vasp_account".to_string(), + Box::new(decode_create_parent_vasp_account_script_function), + ); + map.insert( + "AccountAdministrationScriptscreate_recovery_address".to_string(), + Box::new(decode_create_recovery_address_script_function), + ); + map.insert( + "AccountCreationScriptscreate_validator_account".to_string(), + Box::new(decode_create_validator_account_script_function), + ); + map.insert( + "AccountCreationScriptscreate_validator_operator_account".to_string(), + Box::new(decode_create_validator_operator_account_script_function), + ); + map.insert( + "AccountAdministrationScriptscreate_vasp_domains".to_string(), + Box::new(decode_create_vasp_domains_script_function), + ); + map.insert( + "AccountAdministrationScriptsforce_expire".to_string(), + Box::new(decode_force_expire_script_function), + ); + map.insert( + "TreasuryComplianceScriptsfreeze_account".to_string(), + Box::new(decode_freeze_account_script_function), + ); + map.insert( + "SystemAdministrationScriptsinitialize_diem_consensus_config".to_string(), + Box::new(decode_initialize_diem_consensus_config_script_function), + ); + map.insert( + "AccountAdministrationScriptsopt_in_to_crsn".to_string(), + Box::new(decode_opt_in_to_crsn_script_function), + ); + map.insert( + "PaymentScriptspeer_to_peer_by_signers".to_string(), + Box::new(decode_peer_to_peer_by_signers_script_function), + ); + map.insert( + "PaymentScriptspeer_to_peer_with_metadata".to_string(), + Box::new(decode_peer_to_peer_with_metadata_script_function), + ); + map.insert( + "TreasuryComplianceScriptspreburn".to_string(), + Box::new(decode_preburn_script_function), + ); + map.insert( + "AccountAdministrationScriptspublish_shared_ed25519_public_key".to_string(), + Box::new(decode_publish_shared_ed25519_public_key_script_function), + ); + map.insert( + "ValidatorAdministrationScriptsregister_validator_config".to_string(), + Box::new(decode_register_validator_config_script_function), + ); + map.insert( + "ValidatorAdministrationScriptsremove_validator_and_reconfigure".to_string(), + Box::new(decode_remove_validator_and_reconfigure_script_function), + ); + map.insert( + "TreasuryComplianceScriptsremove_vasp_domain".to_string(), + Box::new(decode_remove_vasp_domain_script_function), + ); + map.insert( + "AccountAdministrationScriptsrotate_authentication_key".to_string(), + Box::new(decode_rotate_authentication_key_script_function), + ); + map.insert( + "AccountAdministrationScriptsrotate_authentication_key_with_nonce".to_string(), + Box::new(decode_rotate_authentication_key_with_nonce_script_function), + ); + map.insert( + "AccountAdministrationScriptsrotate_authentication_key_with_nonce_admin".to_string(), + Box::new(decode_rotate_authentication_key_with_nonce_admin_script_function), + ); + map.insert( + "AccountAdministrationScriptsrotate_authentication_key_with_recovery_address" + .to_string(), + Box::new(decode_rotate_authentication_key_with_recovery_address_script_function), + ); + map.insert( + "AccountAdministrationScriptsrotate_dual_attestation_info".to_string(), + Box::new(decode_rotate_dual_attestation_info_script_function), + ); + map.insert( + "AccountAdministrationScriptsrotate_shared_ed25519_public_key".to_string(), + Box::new(decode_rotate_shared_ed25519_public_key_script_function), + ); + map.insert( + "SystemAdministrationScriptsset_gas_constants".to_string(), + Box::new(decode_set_gas_constants_script_function), + ); + map.insert( + "ValidatorAdministrationScriptsset_validator_config_and_reconfigure".to_string(), + Box::new(decode_set_validator_config_and_reconfigure_script_function), + ); + map.insert( + "ValidatorAdministrationScriptsset_validator_operator".to_string(), + Box::new(decode_set_validator_operator_script_function), + ); + map.insert( + "ValidatorAdministrationScriptsset_validator_operator_with_nonce_admin".to_string(), + Box::new(decode_set_validator_operator_with_nonce_admin_script_function), + ); + map.insert( + "TreasuryComplianceScriptstiered_mint".to_string(), + Box::new(decode_tiered_mint_script_function), + ); + map.insert( + "TreasuryComplianceScriptsunfreeze_account".to_string(), + Box::new(decode_unfreeze_account_script_function), + ); + map.insert( + "SystemAdministrationScriptsupdate_diem_consensus_config".to_string(), + Box::new(decode_update_diem_consensus_config_script_function), + ); + map.insert( + "SystemAdministrationScriptsupdate_diem_version".to_string(), + Box::new(decode_update_diem_version_script_function), + ); + map.insert( + "TreasuryComplianceScriptsupdate_dual_attestation_limit".to_string(), + Box::new(decode_update_dual_attestation_limit_script_function), + ); + map.insert( + "TreasuryComplianceScriptsupdate_exchange_rate".to_string(), + Box::new(decode_update_exchange_rate_script_function), + ); + map.insert( + "TreasuryComplianceScriptsupdate_minting_ability".to_string(), + Box::new(decode_update_minting_ability_script_function), + ); + map + }); + +fn decode_bool_argument(arg: TransactionArgument) -> Option { + match arg { + TransactionArgument::Bool(value) => Some(value), + _ => None, + } +} + +fn decode_u64_argument(arg: TransactionArgument) -> Option { + match arg { + TransactionArgument::U64(value) => Some(value), + _ => None, + } +} + +fn decode_address_argument(arg: TransactionArgument) -> Option { + match arg { + TransactionArgument::Address(value) => Some(value), + _ => None, + } +} + +fn decode_u8vector_argument(arg: TransactionArgument) -> Option> { + match arg { + TransactionArgument::U8Vector(value) => Some(value), + _ => None, + } +} + +const ADD_CURRENCY_TO_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 7, 7, 17, 25, 8, 42, 16, 0, + 0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 6, 12, 0, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, + 110, 116, 12, 97, 100, 100, 95, 99, 117, 114, 114, 101, 110, 99, 121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 3, 11, 0, 56, 0, 2, +]; + +const ADD_RECOVERY_ROTATION_CAPABILITY_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 10, 5, 18, 15, 7, 33, 106, 8, 139, 1, + 16, 0, 0, 0, 1, 0, 2, 1, 0, 0, 3, 0, 1, 0, 1, 4, 2, 3, 0, 1, 6, 12, 1, 8, 0, 2, 8, 0, 5, 0, 2, + 6, 12, 5, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 15, 82, 101, 99, 111, 118, + 101, 114, 121, 65, 100, 100, 114, 101, 115, 115, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, + 111, 110, 67, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, + 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, + 108, 105, 116, 121, 23, 97, 100, 100, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, + 112, 97, 98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 3, + 5, 11, 0, 17, 0, 10, 1, 17, 1, 2, +]; + +const ADD_VALIDATOR_AND_RECONFIGURE_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 24, 7, 45, 91, 8, 136, 1, 16, 0, 0, + 0, 1, 0, 2, 1, 3, 0, 1, 0, 2, 4, 2, 3, 0, 0, 5, 4, 1, 0, 2, 6, 12, 3, 0, 1, 5, 1, 10, 2, 2, 6, + 12, 5, 4, 6, 12, 3, 10, 2, 5, 2, 1, 3, 10, 68, 105, 101, 109, 83, 121, 115, 116, 101, 109, 12, + 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 15, 86, 97, 108, 105, 100, 97, 116, + 111, 114, 67, 111, 110, 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, + 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97, 110, + 95, 110, 97, 109, 101, 13, 97, 100, 100, 95, 118, 97, 108, 105, 100, 97, 116, 111, 114, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 6, 18, 10, 0, 10, 1, 17, 0, 10, 3, 17, 1, 11, + 2, 33, 12, 4, 11, 4, 3, 14, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, 0, 10, 3, 17, 2, 2, +]; + +const BURN_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 17, 7, 34, 45, 8, 79, 16, + 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 2, 6, 12, 5, 3, 6, 12, 3, 5, + 1, 9, 0, 4, 68, 105, 101, 109, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, + 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, + 116, 4, 98, 117, 114, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 7, 10, + 0, 10, 1, 17, 0, 11, 0, 10, 2, 56, 0, 2, +]; + +const BURN_TXN_FEES_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 7, 7, 17, 25, 8, 42, 16, 0, + 0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 6, 12, 0, 1, 9, 0, 14, 84, 114, 97, 110, 115, 97, 99, 116, 105, + 111, 110, 70, 101, 101, 9, 98, 117, 114, 110, 95, 102, 101, 101, 115, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 3, 11, 0, 56, 0, 2, +]; + +const CANCEL_BURN_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 8, 7, 18, 24, 8, 42, 16, 0, + 0, 0, 1, 0, 1, 1, 1, 0, 2, 2, 6, 12, 5, 0, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, + 117, 110, 116, 11, 99, 97, 110, 99, 101, 108, 95, 98, 117, 114, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 4, 11, 0, 10, 1, 56, 0, 2, +]; + +const CREATE_CHILD_VASP_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 8, 1, 0, 2, 2, 2, 4, 3, 6, 22, 4, 28, 4, 5, 32, 35, 7, 67, 122, + 8, 189, 1, 16, 6, 205, 1, 4, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 1, 1, 0, 3, 2, 3, 0, 0, 4, 4, 1, 1, + 1, 0, 5, 3, 1, 0, 0, 6, 2, 6, 4, 6, 12, 5, 10, 2, 1, 0, 1, 6, 12, 1, 8, 0, 5, 6, 8, 0, 5, 3, + 10, 2, 10, 2, 5, 6, 12, 5, 10, 2, 1, 3, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, + 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, 108, 105, 116, + 121, 25, 99, 114, 101, 97, 116, 101, 95, 99, 104, 105, 108, 100, 95, 118, 97, 115, 112, 95, 97, + 99, 99, 111, 117, 110, 116, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116, 104, 100, + 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 8, 112, 97, 121, 95, 102, 114, + 111, 109, 27, 114, 101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95, + 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 10, 2, 1, 0, 1, 1, 5, 3, 25, 10, 0, 10, 1, 11, 2, 10, 3, 56, 0, 10, 4, 6, 0, 0, 0, 0, 0, 0, 0, + 0, 36, 3, 10, 5, 22, 11, 0, 17, 1, 12, 5, 14, 5, 10, 1, 10, 4, 7, 0, 7, 0, 56, 1, 11, 5, 17, 3, + 5, 24, 11, 0, 1, 2, +]; + +const CREATE_DESIGNATED_DEALER_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 27, 7, 44, 72, 8, 116, 16, + 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 5, 6, 12, 5, 10, 2, 10, 2, + 1, 6, 6, 12, 3, 5, 10, 2, 10, 2, 1, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, + 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, + 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 99, 114, 101, 97, + 116, 101, 95, 100, 101, 115, 105, 103, 110, 97, 116, 101, 100, 95, 100, 101, 97, 108, 101, 114, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 10, 10, 0, 10, 1, 17, 0, 11, 0, 10, + 2, 11, 3, 11, 4, 10, 5, 56, 0, 2, +]; + +const CREATE_PARENT_VASP_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 27, 7, 44, 74, 8, 118, 16, + 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 5, 6, 12, 5, 10, 2, 10, 2, + 1, 6, 6, 12, 3, 5, 10, 2, 10, 2, 1, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, + 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, + 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 26, 99, 114, 101, 97, + 116, 101, 95, 112, 97, 114, 101, 110, 116, 95, 118, 97, 115, 112, 95, 97, 99, 99, 111, 117, + 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 10, 10, 0, 10, 1, 17, 0, + 11, 0, 10, 2, 11, 3, 11, 4, 10, 5, 56, 0, 2, +]; + +const CREATE_RECOVERY_ADDRESS_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 10, 5, 18, 12, 7, 30, 90, 8, 120, 16, + 0, 0, 0, 1, 0, 2, 1, 0, 0, 3, 0, 1, 0, 1, 4, 2, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 12, 8, 0, 0, 11, + 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 15, 82, 101, 99, 111, 118, 101, 114, 121, + 65, 100, 100, 114, 101, 115, 115, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, + 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, + 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, + 121, 7, 112, 117, 98, 108, 105, 115, 104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, + 3, 5, 10, 0, 11, 0, 17, 0, 17, 1, 2, +]; + +const CREATE_VALIDATOR_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 22, 7, 36, 72, 8, 108, 16, 0, 0, 0, + 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 2, 6, 12, 3, 0, 4, 6, 12, 5, 10, 2, 10, 2, 5, 6, 12, 3, 5, 10, + 2, 10, 2, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, + 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, + 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 99, 114, 101, 97, 116, 101, 95, 118, 97, 108, 105, + 100, 97, 116, 111, 114, 95, 97, 99, 99, 111, 117, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 0, 3, 1, 9, 10, 0, 10, 1, 17, 0, 11, 0, 10, 2, 11, 3, 11, 4, 17, 1, 2, +]; + +const CREATE_VALIDATOR_OPERATOR_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 22, 7, 36, 81, 8, 117, 16, 0, 0, 0, + 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 2, 6, 12, 3, 0, 4, 6, 12, 5, 10, 2, 10, 2, 5, 6, 12, 3, 5, 10, + 2, 10, 2, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, + 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, + 95, 111, 114, 95, 97, 98, 111, 114, 116, 33, 99, 114, 101, 97, 116, 101, 95, 118, 97, 108, 105, + 100, 97, 116, 111, 114, 95, 111, 112, 101, 114, 97, 116, 111, 114, 95, 97, 99, 99, 111, 117, + 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 1, 9, 10, 0, 10, 1, 17, 0, 11, + 0, 10, 2, 11, 3, 11, 4, 17, 1, 2, +]; + +const FREEZE_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 14, 7, 28, 66, 8, 94, 16, 0, 0, 0, + 1, 0, 2, 0, 1, 0, 1, 3, 2, 1, 0, 2, 6, 12, 5, 0, 2, 6, 12, 3, 3, 6, 12, 3, 5, 15, 65, 99, 99, + 111, 117, 110, 116, 70, 114, 101, 101, 122, 105, 110, 103, 12, 83, 108, 105, 100, 105, 110, + 103, 78, 111, 110, 99, 101, 14, 102, 114, 101, 101, 122, 101, 95, 97, 99, 99, 111, 117, 110, + 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, + 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 1, 7, 10, 0, 10, 1, 17, 1, + 11, 0, 10, 2, 17, 0, 2, +]; + +const PEER_TO_PEER_WITH_METADATA_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 2, 2, 2, 4, 3, 6, 16, 4, 22, 2, 5, 24, 29, 7, 53, 96, 8, + 149, 1, 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 2, 3, 1, 1, 0, 4, 1, 3, 0, 1, 5, 1, 6, 12, + 1, 8, 0, 5, 6, 8, 0, 5, 3, 10, 2, 10, 2, 0, 5, 6, 12, 5, 3, 10, 2, 10, 2, 1, 9, 0, 11, 68, 105, + 101, 109, 65, 99, 99, 111, 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, + 112, 97, 98, 105, 108, 105, 116, 121, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116, + 104, 100, 114, 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 8, 112, 97, 121, 95, + 102, 114, 111, 109, 27, 114, 101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114, + 97, 119, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 4, 1, 12, 11, 0, 17, 0, 12, 5, 14, 5, 10, 1, 10, 2, 11, 3, 11, 4, 56, 0, 11, + 5, 17, 2, 2, +]; + +const PREBURN_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 2, 2, 2, 4, 3, 6, 16, 4, 22, 2, 5, 24, 21, 7, 45, 95, 8, + 140, 1, 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 2, 3, 1, 1, 0, 4, 1, 3, 0, 1, 5, 1, 6, 12, + 1, 8, 0, 3, 6, 12, 6, 8, 0, 3, 0, 2, 6, 12, 3, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, + 117, 110, 116, 18, 87, 105, 116, 104, 100, 114, 97, 119, 67, 97, 112, 97, 98, 105, 108, 105, + 116, 121, 27, 101, 120, 116, 114, 97, 99, 116, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95, + 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 7, 112, 114, 101, 98, 117, 114, 110, 27, 114, + 101, 115, 116, 111, 114, 101, 95, 119, 105, 116, 104, 100, 114, 97, 119, 95, 99, 97, 112, 97, + 98, 105, 108, 105, 116, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4, 1, 10, + 10, 0, 17, 0, 12, 2, 11, 0, 14, 2, 10, 1, 56, 0, 11, 2, 17, 2, 2, +]; + +const PUBLISH_SHARED_ED25519_PUBLIC_KEY_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 2, 3, 2, 5, 5, 7, 6, 7, 13, 31, 8, 44, 16, 0, 0, 0, 1, + 0, 1, 0, 2, 6, 12, 10, 2, 0, 22, 83, 104, 97, 114, 101, 100, 69, 100, 50, 53, 53, 49, 57, 80, + 117, 98, 108, 105, 99, 75, 101, 121, 7, 112, 117, 98, 108, 105, 115, 104, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 4, 11, 0, 11, 1, 17, 0, 2, +]; + +const REGISTER_VALIDATOR_CONFIG_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 2, 3, 2, 5, 5, 7, 11, 7, 18, 27, 8, 45, 16, 0, 0, 0, 1, + 0, 1, 0, 5, 6, 12, 5, 10, 2, 10, 2, 10, 2, 0, 15, 86, 97, 108, 105, 100, 97, 116, 111, 114, 67, + 111, 110, 102, 105, 103, 10, 115, 101, 116, 95, 99, 111, 110, 102, 105, 103, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 7, 11, 0, 10, 1, 11, 2, 11, 3, 11, 4, 17, 0, 2, +]; + +const REMOVE_VALIDATOR_AND_RECONFIGURE_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 24, 7, 45, 94, 8, 139, 1, 16, 0, 0, + 0, 1, 0, 2, 1, 3, 0, 1, 0, 2, 4, 2, 3, 0, 0, 5, 4, 1, 0, 2, 6, 12, 3, 0, 1, 5, 1, 10, 2, 2, 6, + 12, 5, 4, 6, 12, 3, 10, 2, 5, 2, 1, 3, 10, 68, 105, 101, 109, 83, 121, 115, 116, 101, 109, 12, + 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 15, 86, 97, 108, 105, 100, 97, 116, + 111, 114, 67, 111, 110, 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, + 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97, 110, + 95, 110, 97, 109, 101, 16, 114, 101, 109, 111, 118, 101, 95, 118, 97, 108, 105, 100, 97, 116, + 111, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 6, 18, 10, 0, 10, 1, 17, 0, 10, + 3, 17, 1, 11, 2, 33, 12, 4, 11, 4, 3, 14, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, 0, 10, + 3, 17, 2, 2, +]; + +const ROTATE_AUTHENTICATION_KEY_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 2, 2, 4, 3, 6, 15, 5, 21, 18, 7, 39, 124, 8, 163, 1, + 16, 0, 0, 0, 1, 1, 0, 0, 2, 0, 1, 0, 0, 3, 1, 2, 0, 0, 4, 3, 2, 0, 1, 6, 12, 1, 8, 0, 0, 2, 6, + 8, 0, 10, 2, 2, 6, 12, 10, 2, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 21, 75, + 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98, 105, 108, 105, 116, 121, + 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, + 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101, 115, 116, 111, 114, 101, + 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, + 108, 105, 116, 121, 25, 114, 111, 116, 97, 116, 101, 95, 97, 117, 116, 104, 101, 110, 116, 105, + 99, 97, 116, 105, 111, 110, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, + 0, 4, 1, 9, 11, 0, 17, 0, 12, 2, 14, 2, 11, 1, 17, 2, 11, 2, 17, 1, 2, +]; + +const ROTATE_AUTHENTICATION_KEY_WITH_NONCE_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 20, 5, 28, 23, 7, 51, 159, 1, 8, 210, + 1, 16, 0, 0, 0, 1, 0, 3, 1, 0, 1, 2, 0, 1, 0, 0, 4, 2, 3, 0, 0, 5, 3, 1, 0, 0, 6, 4, 1, 0, 2, + 6, 12, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 8, 0, 10, 2, 3, 6, 12, 3, 10, 2, 11, 68, 105, 101, 109, + 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, + 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, 111, + 114, 116, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98, 105, + 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111, 116, + 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101, 115, + 116, 111, 114, 101, 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, 97, + 112, 97, 98, 105, 108, 105, 116, 121, 25, 114, 111, 116, 97, 116, 101, 95, 97, 117, 116, 104, + 101, 110, 116, 105, 99, 97, 116, 105, 111, 110, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 5, 3, 12, 10, 0, 10, 1, 17, 0, 11, 0, 17, 1, 12, 3, 14, 3, 11, 2, 17, + 3, 11, 3, 17, 2, 2, +]; + +const ROTATE_AUTHENTICATION_KEY_WITH_NONCE_ADMIN_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 2, 4, 4, 3, 8, 20, 5, 28, 25, 7, 53, 159, 1, 8, 212, + 1, 16, 0, 0, 0, 1, 0, 3, 1, 0, 1, 2, 0, 1, 0, 0, 4, 2, 3, 0, 0, 5, 3, 1, 0, 0, 6, 4, 1, 0, 2, + 6, 12, 3, 0, 1, 6, 12, 1, 8, 0, 2, 6, 8, 0, 10, 2, 4, 6, 12, 6, 12, 3, 10, 2, 11, 68, 105, 101, + 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, + 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, 98, + 111, 114, 116, 21, 75, 101, 121, 82, 111, 116, 97, 116, 105, 111, 110, 67, 97, 112, 97, 98, + 105, 108, 105, 116, 121, 31, 101, 120, 116, 114, 97, 99, 116, 95, 107, 101, 121, 95, 114, 111, + 116, 97, 116, 105, 111, 110, 95, 99, 97, 112, 97, 98, 105, 108, 105, 116, 121, 31, 114, 101, + 115, 116, 111, 114, 101, 95, 107, 101, 121, 95, 114, 111, 116, 97, 116, 105, 111, 110, 95, 99, + 97, 112, 97, 98, 105, 108, 105, 116, 121, 25, 114, 111, 116, 97, 116, 101, 95, 97, 117, 116, + 104, 101, 110, 116, 105, 99, 97, 116, 105, 111, 110, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 3, 12, 11, 0, 10, 2, 17, 0, 11, 1, 17, 1, 12, 4, 14, 4, 11, 3, + 17, 3, 11, 4, 17, 2, 2, +]; + +const ROTATE_AUTHENTICATION_KEY_WITH_RECOVERY_ADDRESS_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 2, 3, 2, 5, 5, 7, 8, 7, 15, 42, 8, 57, 16, 0, 0, 0, 1, + 0, 1, 0, 4, 6, 12, 5, 5, 10, 2, 0, 15, 82, 101, 99, 111, 118, 101, 114, 121, 65, 100, 100, 114, + 101, 115, 115, 25, 114, 111, 116, 97, 116, 101, 95, 97, 117, 116, 104, 101, 110, 116, 105, 99, + 97, 116, 105, 111, 110, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 1, 6, 11, 0, 10, 1, 10, 2, 11, 3, 17, 0, 2, +]; + +const ROTATE_DUAL_ATTESTATION_INFO_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 2, 3, 2, 10, 5, 12, 13, 7, 25, 61, 8, 86, 16, 0, 0, 0, + 1, 0, 1, 0, 0, 2, 0, 1, 0, 2, 6, 12, 10, 2, 0, 3, 6, 12, 10, 2, 10, 2, 15, 68, 117, 97, 108, + 65, 116, 116, 101, 115, 116, 97, 116, 105, 111, 110, 15, 114, 111, 116, 97, 116, 101, 95, 98, + 97, 115, 101, 95, 117, 114, 108, 28, 114, 111, 116, 97, 116, 101, 95, 99, 111, 109, 112, 108, + 105, 97, 110, 99, 101, 95, 112, 117, 98, 108, 105, 99, 95, 107, 101, 121, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 11, 1, 17, 0, 11, 0, 11, 2, 17, 1, 2, +]; + +const ROTATE_SHARED_ED25519_PUBLIC_KEY_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 2, 3, 2, 5, 5, 7, 6, 7, 13, 34, 8, 47, 16, 0, 0, 0, 1, + 0, 1, 0, 2, 6, 12, 10, 2, 0, 22, 83, 104, 97, 114, 101, 100, 69, 100, 50, 53, 53, 49, 57, 80, + 117, 98, 108, 105, 99, 75, 101, 121, 10, 114, 111, 116, 97, 116, 101, 95, 107, 101, 121, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 4, 11, 0, 11, 1, 17, 0, 2, +]; + +const SET_VALIDATOR_CONFIG_AND_RECONFIGURE_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 15, 7, 29, 68, 8, 97, 16, 0, 0, 0, + 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 5, 6, 12, 5, 10, 2, 10, 2, 10, 2, 0, 2, 6, 12, 5, 10, 68, 105, + 101, 109, 83, 121, 115, 116, 101, 109, 15, 86, 97, 108, 105, 100, 97, 116, 111, 114, 67, 111, + 110, 102, 105, 103, 10, 115, 101, 116, 95, 99, 111, 110, 102, 105, 103, 29, 117, 112, 100, 97, + 116, 101, 95, 99, 111, 110, 102, 105, 103, 95, 97, 110, 100, 95, 114, 101, 99, 111, 110, 102, + 105, 103, 117, 114, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 10, 10, 0, + 10, 1, 11, 2, 11, 3, 11, 4, 17, 0, 11, 0, 10, 1, 17, 1, 2, +]; + +const SET_VALIDATOR_OPERATOR_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 19, 7, 33, 68, 8, 101, 16, 0, 0, 0, + 1, 1, 2, 0, 1, 0, 0, 3, 2, 3, 0, 1, 5, 1, 10, 2, 2, 6, 12, 5, 0, 3, 6, 12, 10, 2, 5, 2, 1, 3, + 15, 86, 97, 108, 105, 100, 97, 116, 111, 114, 67, 111, 110, 102, 105, 103, 23, 86, 97, 108, + 105, 100, 97, 116, 111, 114, 79, 112, 101, 114, 97, 116, 111, 114, 67, 111, 110, 102, 105, 103, + 14, 103, 101, 116, 95, 104, 117, 109, 97, 110, 95, 110, 97, 109, 101, 12, 115, 101, 116, 95, + 111, 112, 101, 114, 97, 116, 111, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 4, 5, + 15, 10, 2, 17, 0, 11, 1, 33, 12, 3, 11, 3, 3, 11, 11, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, + 0, 10, 2, 17, 1, 2, +]; + +const SET_VALIDATOR_OPERATOR_WITH_NONCE_ADMIN_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 6, 3, 6, 15, 5, 21, 26, 7, 47, 103, 8, 150, 1, 16, 0, 0, + 0, 1, 0, 2, 0, 3, 0, 1, 0, 2, 4, 2, 3, 0, 1, 5, 4, 1, 0, 2, 6, 12, 3, 0, 1, 5, 1, 10, 2, 2, 6, + 12, 5, 5, 6, 12, 6, 12, 3, 10, 2, 5, 2, 1, 3, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, + 110, 99, 101, 15, 86, 97, 108, 105, 100, 97, 116, 111, 114, 67, 111, 110, 102, 105, 103, 23, + 86, 97, 108, 105, 100, 97, 116, 111, 114, 79, 112, 101, 114, 97, 116, 111, 114, 67, 111, 110, + 102, 105, 103, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, + 97, 98, 111, 114, 116, 14, 103, 101, 116, 95, 104, 117, 109, 97, 110, 95, 110, 97, 109, 101, + 12, 115, 101, 116, 95, 111, 112, 101, 114, 97, 116, 111, 114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 5, 6, 18, 11, 0, 10, 2, 17, 0, 10, 4, 17, 1, 11, 3, 33, 12, 5, 11, 5, 3, 14, + 11, 1, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 39, 11, 1, 10, 4, 17, 2, 2, +]; + +const TIERED_MINT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 4, 3, 4, 11, 4, 15, 2, 5, 17, 21, 7, 38, 59, 8, 97, 16, + 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 3, 2, 1, 1, 1, 1, 4, 2, 6, 12, 3, 0, 4, 6, 12, 5, 3, 3, 5, 6, 12, + 3, 5, 3, 3, 1, 9, 0, 11, 68, 105, 101, 109, 65, 99, 99, 111, 117, 110, 116, 12, 83, 108, 105, + 100, 105, 110, 103, 78, 111, 110, 99, 101, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, + 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 11, 116, 105, 101, 114, 101, 100, 95, 109, + 105, 110, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 3, 1, 9, 10, 0, 10, 1, 17, + 0, 11, 0, 10, 2, 10, 3, 10, 4, 56, 0, 2, +]; + +const UNFREEZE_ACCOUNT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 14, 7, 28, 68, 8, 96, 16, 0, 0, 0, + 1, 0, 2, 0, 1, 0, 1, 3, 2, 1, 0, 2, 6, 12, 5, 0, 2, 6, 12, 3, 3, 6, 12, 3, 5, 15, 65, 99, 99, + 111, 117, 110, 116, 70, 114, 101, 101, 122, 105, 110, 103, 12, 83, 108, 105, 100, 105, 110, + 103, 78, 111, 110, 99, 101, 16, 117, 110, 102, 114, 101, 101, 122, 101, 95, 97, 99, 99, 111, + 117, 110, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, + 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 1, 7, 10, 0, 10, + 1, 17, 1, 11, 0, 10, 2, 17, 0, 2, +]; + +const UPDATE_DIEM_VERSION_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 10, 7, 24, 51, 8, 75, 16, 0, 0, 0, + 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 6, 12, 3, 0, 3, 6, 12, 3, 3, 11, 68, 105, 101, 109, 86, + 101, 114, 115, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, 99, 101, 3, + 115, 101, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, + 97, 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 10, + 1, 17, 1, 11, 0, 10, 2, 17, 0, 2, +]; + +const UPDATE_DUAL_ATTESTATION_LIMIT_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 5, 1, 0, 4, 3, 4, 10, 5, 14, 10, 7, 24, 71, 8, 95, 16, 0, 0, 0, + 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 2, 6, 12, 3, 0, 3, 6, 12, 3, 3, 15, 68, 117, 97, 108, 65, 116, + 116, 101, 115, 116, 97, 116, 105, 111, 110, 12, 83, 108, 105, 100, 105, 110, 103, 78, 111, 110, + 99, 101, 19, 115, 101, 116, 95, 109, 105, 99, 114, 111, 100, 105, 101, 109, 95, 108, 105, 109, + 105, 116, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, 99, 101, 95, 111, 114, 95, 97, + 98, 111, 114, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 7, 10, 0, 10, 1, + 17, 1, 11, 0, 10, 2, 17, 0, 2, +]; + +const UPDATE_EXCHANGE_RATE_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 7, 1, 0, 6, 2, 6, 4, 3, 10, 16, 4, 26, 2, 5, 28, 25, 7, 53, 99, + 8, 152, 1, 16, 0, 0, 0, 1, 0, 2, 1, 1, 2, 0, 1, 3, 0, 1, 0, 2, 4, 2, 3, 0, 0, 5, 4, 3, 1, 1, 2, + 6, 2, 3, 3, 1, 8, 0, 2, 6, 12, 3, 0, 2, 6, 12, 8, 0, 4, 6, 12, 3, 3, 3, 1, 9, 0, 4, 68, 105, + 101, 109, 12, 70, 105, 120, 101, 100, 80, 111, 105, 110, 116, 51, 50, 12, 83, 108, 105, 100, + 105, 110, 103, 78, 111, 110, 99, 101, 20, 99, 114, 101, 97, 116, 101, 95, 102, 114, 111, 109, + 95, 114, 97, 116, 105, 111, 110, 97, 108, 21, 114, 101, 99, 111, 114, 100, 95, 110, 111, 110, + 99, 101, 95, 111, 114, 95, 97, 98, 111, 114, 116, 24, 117, 112, 100, 97, 116, 101, 95, 120, + 100, 120, 95, 101, 120, 99, 104, 97, 110, 103, 101, 95, 114, 97, 116, 101, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 5, 1, 11, 10, 0, 10, 1, 17, 1, 10, 2, 10, 3, 17, 0, 12, 4, 11, + 0, 11, 4, 56, 0, 2, +]; + +const UPDATE_MINTING_ABILITY_CODE: &[u8] = &[ + 161, 28, 235, 11, 1, 0, 0, 0, 6, 1, 0, 2, 3, 2, 6, 4, 8, 2, 5, 10, 8, 7, 18, 28, 8, 46, 16, 0, + 0, 0, 1, 0, 1, 1, 1, 0, 2, 2, 6, 12, 1, 0, 1, 9, 0, 4, 68, 105, 101, 109, 22, 117, 112, 100, + 97, 116, 101, 95, 109, 105, 110, 116, 105, 110, 103, 95, 97, 98, 105, 108, 105, 116, 121, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 4, 11, 0, 10, 1, 56, 0, 2, +]; diff --git a/secure/net/src/lib.rs b/secure/net/src/lib.rs index ff96a51545b64..7069d012b09d9 100644 --- a/secure/net/src/lib.rs +++ b/secure/net/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/secure/push-metrics/src/lib.rs b/secure/push-metrics/src/lib.rs index b90240ad04ab1..f023b8adb8789 100644 --- a/secure/push-metrics/src/lib.rs +++ b/secure/push-metrics/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/secure/storage/github/src/lib.rs b/secure/storage/github/src/lib.rs index 95c45a98e94f0..0d81104196d43 100644 --- a/secure/storage/github/src/lib.rs +++ b/secure/storage/github/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/secure/storage/src/crypto_kv_storage.rs b/secure/storage/src/crypto_kv_storage.rs index 6c11561ed0344..048fdc3bcb7fe 100644 --- a/secure/storage/src/crypto_kv_storage.rs +++ b/secure/storage/src/crypto_kv_storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{CryptoStorage, Error, KVStorage, PublicKeyResponse}; diff --git a/secure/storage/src/crypto_storage.rs b/secure/storage/src/crypto_storage.rs index 3c5dcf273c19e..a6c2ced5a009c 100644 --- a/secure/storage/src/crypto_storage.rs +++ b/secure/storage/src/crypto_storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Error; diff --git a/secure/storage/src/error.rs b/secure/storage/src/error.rs index 6848bf3291b82..31a5ae83cf120 100644 --- a/secure/storage/src/error.rs +++ b/secure/storage/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/secure/storage/src/github.rs b/secure/storage/src/github.rs index 76b3edb4989d5..4f01e76ab9dd7 100644 --- a/secure/storage/src/github.rs +++ b/secure/storage/src/github.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{CryptoKVStorage, Error, GetResponse, KVStorage}; diff --git a/secure/storage/src/in_memory.rs b/secure/storage/src/in_memory.rs index b096a38b66923..3420aec4f0e1b 100644 --- a/secure/storage/src/in_memory.rs +++ b/secure/storage/src/in_memory.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{CryptoKVStorage, Error, GetResponse, KVStorage}; diff --git a/secure/storage/src/kv_storage.rs b/secure/storage/src/kv_storage.rs index 3371845d48b24..61ca085a06137 100644 --- a/secure/storage/src/kv_storage.rs +++ b/secure/storage/src/kv_storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Error; diff --git a/secure/storage/src/lib.rs b/secure/storage/src/lib.rs index 4db39ee3693f8..9f6ecb88f275c 100644 --- a/secure/storage/src/lib.rs +++ b/secure/storage/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/secure/storage/src/namespaced.rs b/secure/storage/src/namespaced.rs index 75f9a1d9ef945..ea964e65a7045 100644 --- a/secure/storage/src/namespaced.rs +++ b/secure/storage/src/namespaced.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{CryptoStorage, Error, GetResponse, KVStorage, PublicKeyResponse}; diff --git a/secure/storage/src/on_disk.rs b/secure/storage/src/on_disk.rs index 041c7198fa5a2..82191e4a0bbdb 100644 --- a/secure/storage/src/on_disk.rs +++ b/secure/storage/src/on_disk.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{CryptoKVStorage, Error, GetResponse, KVStorage}; diff --git a/secure/storage/src/policy.rs b/secure/storage/src/policy.rs index 67523379b0449..3992f5f346981 100644 --- a/secure/storage/src/policy.rs +++ b/secure/storage/src/policy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/secure/storage/src/storage.rs b/secure/storage/src/storage.rs index 163e608ecc3c5..19685ee987f82 100644 --- a/secure/storage/src/storage.rs +++ b/secure/storage/src/storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ CryptoStorage, Error, GetResponse, GitHubStorage, InMemoryStorage, KVStorage, Namespaced, diff --git a/secure/storage/src/tests/github.rs b/secure/storage/src/tests/github.rs index e916c5ab17d00..e59c35a4f4313 100644 --- a/secure/storage/src/tests/github.rs +++ b/secure/storage/src/tests/github.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{tests::suite, GitHubStorage, Storage}; diff --git a/secure/storage/src/tests/in_memory.rs b/secure/storage/src/tests/in_memory.rs index 917246cb3ff08..c6d9529aa06a7 100644 --- a/secure/storage/src/tests/in_memory.rs +++ b/secure/storage/src/tests/in_memory.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{tests::suite, InMemoryStorage, Storage}; diff --git a/secure/storage/src/tests/mod.rs b/secure/storage/src/tests/mod.rs index f73aecb3673ae..589a41dee2d4b 100644 --- a/secure/storage/src/tests/mod.rs +++ b/secure/storage/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod github; diff --git a/secure/storage/src/tests/on_disk.rs b/secure/storage/src/tests/on_disk.rs index 248980866dab5..10177be8e9014 100644 --- a/secure/storage/src/tests/on_disk.rs +++ b/secure/storage/src/tests/on_disk.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{tests::suite, OnDiskStorage, Storage}; diff --git a/secure/storage/src/tests/suite.rs b/secure/storage/src/tests/suite.rs index ea74419fda86d..a18ac037776d2 100644 --- a/secure/storage/src/tests/suite.rs +++ b/secure/storage/src/tests/suite.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{CryptoStorage, Error, KVStorage, Storage}; diff --git a/secure/storage/src/tests/vault.rs b/secure/storage/src/tests/vault.rs index 9e8fb78785996..2b93bc3ac0b99 100644 --- a/secure/storage/src/tests/vault.rs +++ b/secure/storage/src/tests/vault.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/secure/storage/src/vault.rs b/secure/storage/src/vault.rs index 8e93ee45f16de..abca75938c21c 100644 --- a/secure/storage/src/vault.rs +++ b/secure/storage/src/vault.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/secure/storage/vault/src/dev.rs b/secure/storage/vault/src/dev.rs index bc497a73fe46d..265c37c690654 100644 --- a/secure/storage/vault/src/dev.rs +++ b/secure/storage/vault/src/dev.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Client; diff --git a/secure/storage/vault/src/fuzzing.rs b/secure/storage/vault/src/fuzzing.rs index 1904a470d1908..5540c6d3acea9 100644 --- a/secure/storage/vault/src/fuzzing.rs +++ b/secure/storage/vault/src/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/secure/storage/vault/src/lib.rs b/secure/storage/vault/src/lib.rs index 299a0237eb8ab..329608e2e3c63 100644 --- a/secure/storage/vault/src/lib.rs +++ b/secure/storage/vault/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/aptos-data-client/src/aptosnet/logging.rs b/state-sync/aptos-data-client/src/aptosnet/logging.rs index 9813f61fc76a1..3dd44cfec78f3 100644 --- a/state-sync/aptos-data-client/src/aptosnet/logging.rs +++ b/state-sync/aptos-data-client/src/aptosnet/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Error; diff --git a/state-sync/aptos-data-client/src/aptosnet/metrics.rs b/state-sync/aptos-data-client/src/aptosnet/metrics.rs index 7aacc5d864295..821d2682abcff 100644 --- a/state-sync/aptos-data-client/src/aptosnet/metrics.rs +++ b/state-sync/aptos-data-client/src/aptosnet/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::_once_cell::sync::Lazy; diff --git a/state-sync/aptos-data-client/src/aptosnet/mod.rs b/state-sync/aptos-data-client/src/aptosnet/mod.rs index 59dc812f05bf7..d04e2c8257734 100644 --- a/state-sync/aptos-data-client/src/aptosnet/mod.rs +++ b/state-sync/aptos-data-client/src/aptosnet/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/aptos-data-client/src/aptosnet/state.rs b/state-sync/aptos-data-client/src/aptosnet/state.rs index 842f5b97e3202..e16c3af3ee43b 100644 --- a/state-sync/aptos-data-client/src/aptosnet/state.rs +++ b/state-sync/aptos-data-client/src/aptosnet/state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/aptos-data-client/src/aptosnet/tests.rs b/state-sync/aptos-data-client/src/aptosnet/tests.rs index 7610fcf2eabab..b0fa30dacfe0c 100644 --- a/state-sync/aptos-data-client/src/aptosnet/tests.rs +++ b/state-sync/aptos-data-client/src/aptosnet/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::{AptosDataClient, AptosNetDataClient, DataSummaryPoller, Error}; diff --git a/state-sync/aptos-data-client/src/lib.rs b/state-sync/aptos-data-client/src/lib.rs index 92e13f67bc7c8..e175fdb765d1f 100644 --- a/state-sync/aptos-data-client/src/lib.rs +++ b/state-sync/aptos-data-client/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/inter-component/consensus-notifications/src/lib.rs b/state-sync/inter-component/consensus-notifications/src/lib.rs index b32bb16dd7edb..263053c04cfa9 100644 --- a/state-sync/inter-component/consensus-notifications/src/lib.rs +++ b/state-sync/inter-component/consensus-notifications/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/inter-component/event-notifications/src/lib.rs b/state-sync/inter-component/event-notifications/src/lib.rs index 49c7bc2378940..f7252dfb30841 100644 --- a/state-sync/inter-component/event-notifications/src/lib.rs +++ b/state-sync/inter-component/event-notifications/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/inter-component/event-notifications/src/tests.rs b/state-sync/inter-component/event-notifications/src/tests.rs index 7266a1d86dcd8..d4e0a2e47026f 100644 --- a/state-sync/inter-component/event-notifications/src/tests.rs +++ b/state-sync/inter-component/event-notifications/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/inter-component/mempool-notifications/src/lib.rs b/state-sync/inter-component/mempool-notifications/src/lib.rs index 7227869ca281a..8ce7bcdadf08b 100644 --- a/state-sync/inter-component/mempool-notifications/src/lib.rs +++ b/state-sync/inter-component/mempool-notifications/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/state-sync-v1/src/bootstrapper.rs b/state-sync/state-sync-v1/src/bootstrapper.rs index 896641c74ab7a..bbea225b93a10 100644 --- a/state-sync/state-sync-v1/src/bootstrapper.rs +++ b/state-sync/state-sync-v1/src/bootstrapper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ client::{CoordinatorMessage, StateSyncClient}, diff --git a/state-sync/state-sync-v1/src/chunk_request.rs b/state-sync/state-sync-v1/src/chunk_request.rs index bd6773824d8f2..cdbd34792c6b4 100644 --- a/state-sync/state-sync-v1/src/chunk_request.rs +++ b/state-sync/state-sync-v1/src/chunk_request.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ledger_info::LedgerInfoWithSignatures, transaction::Version}; diff --git a/state-sync/state-sync-v1/src/chunk_response.rs b/state-sync/state-sync-v1/src/chunk_response.rs index 4362ab0d80d7b..3d0c051fb7e0c 100644 --- a/state-sync/state-sync-v1/src/chunk_response.rs +++ b/state-sync/state-sync-v1/src/chunk_response.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ diff --git a/state-sync/state-sync-v1/src/client.rs b/state-sync/state-sync-v1/src/client.rs index e58eb71302473..4cdbf80d32e4b 100644 --- a/state-sync/state-sync-v1/src/client.rs +++ b/state-sync/state-sync-v1/src/client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{error::Error, shared_components::SyncState}; diff --git a/state-sync/state-sync-v1/src/coordinator.rs b/state-sync/state-sync-v1/src/coordinator.rs index 54b8843b726c2..4ab584d4a91ef 100644 --- a/state-sync/state-sync-v1/src/coordinator.rs +++ b/state-sync/state-sync-v1/src/coordinator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v1/src/counters.rs b/state-sync/state-sync-v1/src/counters.rs index aa83f51ded209..ac1aec3c0a1b6 100644 --- a/state-sync/state-sync-v1/src/counters.rs +++ b/state-sync/state-sync-v1/src/counters.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/state-sync/state-sync-v1/src/error.rs b/state-sync/state-sync-v1/src/error.rs index 67381edf99f9a..bfe130f3ab4cb 100644 --- a/state-sync/state-sync-v1/src/error.rs +++ b/state-sync/state-sync-v1/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::Version; diff --git a/state-sync/state-sync-v1/src/executor_proxy.rs b/state-sync/state-sync-v1/src/executor_proxy.rs index 10d4ce4c5302c..32838aa02f7fc 100644 --- a/state-sync/state-sync-v1/src/executor_proxy.rs +++ b/state-sync/state-sync-v1/src/executor_proxy.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v1/src/fuzzing.rs b/state-sync/state-sync-v1/src/fuzzing.rs index 4123ffe50dd1d..9034022cbf508 100644 --- a/state-sync/state-sync-v1/src/fuzzing.rs +++ b/state-sync/state-sync-v1/src/fuzzing.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v1/src/lib.rs b/state-sync/state-sync-v1/src/lib.rs index c09675138633b..41b6cece28650 100644 --- a/state-sync/state-sync-v1/src/lib.rs +++ b/state-sync/state-sync-v1/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/state-sync-v1/src/logging.rs b/state-sync/state-sync-v1/src/logging.rs index d1dc2a40c254c..993e8fdf34ccf 100644 --- a/state-sync/state-sync-v1/src/logging.rs +++ b/state-sync/state-sync-v1/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v1/src/network.rs b/state-sync/state-sync-v1/src/network.rs index 62444b8fb8841..2b532920346ee 100644 --- a/state-sync/state-sync-v1/src/network.rs +++ b/state-sync/state-sync-v1/src/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Interface between State Sync and Network layers. diff --git a/state-sync/state-sync-v1/src/request_manager.rs b/state-sync/state-sync-v1/src/request_manager.rs index 57df6252eac12..6e557f296ae18 100644 --- a/state-sync/state-sync-v1/src/request_manager.rs +++ b/state-sync/state-sync-v1/src/request_manager.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v1/src/shared_components.rs b/state-sync/state-sync-v1/src/shared_components.rs index c0c42209d2f11..3c336956bb384 100644 --- a/state-sync/state-sync-v1/src/shared_components.rs +++ b/state-sync/state-sync-v1/src/shared_components.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::{ diff --git a/state-sync/state-sync-v1/tests/integration_tests.rs b/state-sync/state-sync-v1/tests/integration_tests.rs index f93cbcaaa4924..eb36c1c31ddfa 100644 --- a/state-sync/state-sync-v1/tests/integration_tests.rs +++ b/state-sync/state-sync-v1/tests/integration_tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::test_harness::default_handler; diff --git a/state-sync/state-sync-v1/tests/test_harness.rs b/state-sync/state-sync-v1/tests/test_harness.rs index 100f10543e6fb..d30954f3763e7 100644 --- a/state-sync/state-sync-v1/tests/test_harness.rs +++ b/state-sync/state-sync-v1/tests/test_harness.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/data_notification.rs b/state-sync/state-sync-v2/data-streaming-service/src/data_notification.rs index cda95f8f2a1e6..656640c6f9fc1 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/data_notification.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/data_notification.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::streaming_client::Epoch; diff --git a/state-sync/state-sync-v2/data-streaming-service/src/data_stream.rs b/state-sync/state-sync-v2/data-streaming-service/src/data_stream.rs index 123911e23a8b6..6e02b583cfcc2 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/data_stream.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/data_stream.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/error.rs b/state-sync/state-sync-v2/data-streaming-service/src/error.rs index dd697810a6348..c543b63c071a7 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/error.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use futures::channel::{mpsc::SendError, oneshot::Canceled}; diff --git a/state-sync/state-sync-v2/data-streaming-service/src/lib.rs b/state-sync/state-sync-v2/data-streaming-service/src/lib.rs index 418dd2f51416a..bbd71a3c1dd70 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/lib.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/state-sync-v2/data-streaming-service/src/logging.rs b/state-sync/state-sync-v2/data-streaming-service/src/logging.rs index e52ee78568257..12939e96a3a03 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/logging.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::Error; diff --git a/state-sync/state-sync-v2/data-streaming-service/src/metrics.rs b/state-sync/state-sync-v2/data-streaming-service/src/metrics.rs index 413f1dc5cf25c..da448d77ebc07 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/metrics.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/stream_engine.rs b/state-sync/state-sync-v2/data-streaming-service/src/stream_engine.rs index fd9cc7dd5837b..d7ca7c753e148 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/stream_engine.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/stream_engine.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/streaming_client.rs b/state-sync/state-sync-v2/data-streaming-service/src/streaming_client.rs index 03cc51fb1c389..e2d4272a3d3d2 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/streaming_client.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/streaming_client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{data_notification::NotificationId, data_stream::DataStreamListener, error::Error}; diff --git a/state-sync/state-sync-v2/data-streaming-service/src/streaming_service.rs b/state-sync/state-sync-v2/data-streaming-service/src/streaming_service.rs index f0bd7561b3666..4d63160f210bf 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/streaming_service.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/streaming_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/tests/data_stream.rs b/state-sync/state-sync-v2/data-streaming-service/src/tests/data_stream.rs index 7fa2e05dd61af..246dcdca90d84 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/tests/data_stream.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/tests/data_stream.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/tests/mod.rs b/state-sync/state-sync-v2/data-streaming-service/src/tests/mod.rs index af161cac5bd91..06bd98b116909 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/tests/mod.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod data_stream; diff --git a/state-sync/state-sync-v2/data-streaming-service/src/tests/stream_engine.rs b/state-sync/state-sync-v2/data-streaming-service/src/tests/stream_engine.rs index b9cb6010e77d8..832c59e9f709c 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/tests/stream_engine.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/tests/stream_engine.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_client.rs b/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_client.rs index 56701d1dd2824..77189dc0db82f 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_client.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_service.rs b/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_service.rs index 1f3708dd77a86..f3c6e63c76fe0 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_service.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/tests/streaming_service.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/data-streaming-service/src/tests/utils.rs b/state-sync/state-sync-v2/data-streaming-service/src/tests/utils.rs index ef5c1d10455fd..b20c169c95c12 100644 --- a/state-sync/state-sync-v2/data-streaming-service/src/tests/utils.rs +++ b/state-sync/state-sync-v2/data-streaming-service/src/tests/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{data_notification::DataNotification, data_stream::DataStreamListener, error::Error}; diff --git a/state-sync/state-sync-v2/state-sync-driver/src/bootstrapper.rs b/state-sync/state-sync-v2/state-sync-driver/src/bootstrapper.rs index fc9f6c118814f..ad0470acda955 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/bootstrapper.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/bootstrapper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/state-sync-driver/src/continuous_syncer.rs b/state-sync/state-sync-v2/state-sync-driver/src/continuous_syncer.rs index 2566f3077be09..be523fd25b1a8 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/continuous_syncer.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/continuous_syncer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/state-sync-driver/src/driver.rs b/state-sync/state-sync-v2/state-sync-driver/src/driver.rs index 2633641d82653..67a2d4df1eab5 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/driver.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/driver.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/state-sync-driver/src/driver_client.rs b/state-sync/state-sync-v2/state-sync-driver/src/driver_client.rs index f13ff898a7c74..16e789a4a3b63 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/driver_client.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/driver_client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::Error; diff --git a/state-sync/state-sync-v2/state-sync-driver/src/driver_factory.rs b/state-sync/state-sync-v2/state-sync-driver/src/driver_factory.rs index dd7db23213d2c..4847dc3aad30d 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/driver_factory.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/driver_factory.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/state-sync-driver/src/error.rs b/state-sync/state-sync-v2/state-sync-driver/src/error.rs index de67dc45f2797..d280a6a31c90c 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/error.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/error.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::Version; diff --git a/state-sync/state-sync-v2/state-sync-driver/src/lib.rs b/state-sync/state-sync-v2/state-sync-driver/src/lib.rs index b5696058a72bc..1eba3d71a74ea 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/lib.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/state-sync-v2/state-sync-driver/src/notification_handlers.rs b/state-sync/state-sync-v2/state-sync-driver/src/notification_handlers.rs index cce7ee0a6805b..9f2418f5830c2 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/notification_handlers.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/notification_handlers.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::Error; diff --git a/state-sync/state-sync-v2/state-sync-driver/src/storage_synchronizer.rs b/state-sync/state-sync-v2/state-sync-driver/src/storage_synchronizer.rs index 987977e5c3597..4b538d665dceb 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/storage_synchronizer.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/storage_synchronizer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/state-sync/state-sync-v2/state-sync-driver/src/tests/driver.rs b/state-sync/state-sync-v2/state-sync-driver/src/tests/driver.rs index e3d915f7298f8..66c571eae3195 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/tests/driver.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/tests/driver.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::tests::{ diff --git a/state-sync/state-sync-v2/state-sync-driver/src/tests/mod.rs b/state-sync/state-sync-v2/state-sync-driver/src/tests/mod.rs index ecf6e74c510a2..e37609fd0583c 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/tests/mod.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod driver; diff --git a/state-sync/state-sync-v2/state-sync-driver/src/tests/utils.rs b/state-sync/state-sync-v2/state-sync-driver/src/tests/utils.rs index bf82f4c87b129..9ced7482bff69 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/tests/utils.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/tests/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::driver_factory::DriverFactory; diff --git a/state-sync/state-sync-v2/state-sync-driver/src/utils.rs b/state-sync/state-sync-v2/state-sync-driver/src/utils.rs index 1e44ace1f9bb0..33f399fc3dfa2 100644 --- a/state-sync/state-sync-v2/state-sync-driver/src/utils.rs +++ b/state-sync/state-sync-v2/state-sync-driver/src/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::error::Error; diff --git a/state-sync/state-sync-v2/state-sync-multiplexer/src/lib.rs b/state-sync/state-sync-v2/state-sync-multiplexer/src/lib.rs index 7d7fdc990e739..c5e559449a25d 100644 --- a/state-sync/state-sync-v2/state-sync-multiplexer/src/lib.rs +++ b/state-sync/state-sync-v2/state-sync-multiplexer/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/storage-service/client/src/lib.rs b/state-sync/storage-service/client/src/lib.rs index e02c271e3dd7d..d394d2457d153 100644 --- a/state-sync/storage-service/client/src/lib.rs +++ b/state-sync/storage-service/client/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/storage-service/server/src/lib.rs b/state-sync/storage-service/server/src/lib.rs index 401ea55926687..6b3d278b61048 100644 --- a/state-sync/storage-service/server/src/lib.rs +++ b/state-sync/storage-service/server/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/storage-service/server/src/logging.rs b/state-sync/storage-service/server/src/logging.rs index 86a4a030ae449..3157f4301fac5 100644 --- a/state-sync/storage-service/server/src/logging.rs +++ b/state-sync/storage-service/server/src/logging.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Error; diff --git a/state-sync/storage-service/server/src/metrics.rs b/state-sync/storage-service/server/src/metrics.rs index 5fa572ff8189b..3e0aa252b1a43 100644 --- a/state-sync/storage-service/server/src/metrics.rs +++ b/state-sync/storage-service/server/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/state-sync/storage-service/server/src/network.rs b/state-sync/storage-service/server/src/network.rs index 908b3e097d5c1..b809fde7ead83 100644 --- a/state-sync/storage-service/server/src/network.rs +++ b/state-sync/storage-service/server/src/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::metrics; diff --git a/state-sync/storage-service/server/src/tests.rs b/state-sync/storage-service/server/src/tests.rs index 4a1586c9a51ee..7e9098bdac87a 100644 --- a/state-sync/storage-service/server/src/tests.rs +++ b/state-sync/storage-service/server/src/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/state-sync/storage-service/types/src/lib.rs b/state-sync/storage-service/types/src/lib.rs index 3768958d3d3be..3f05d81beae14 100644 --- a/state-sync/storage-service/types/src/lib.rs +++ b/state-sync/storage-service/types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/accumulator/src/lib.rs b/storage/accumulator/src/lib.rs index f21b09fa2a4db..ef9676754378f 100644 --- a/storage/accumulator/src/lib.rs +++ b/storage/accumulator/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/accumulator/src/test_helpers.rs b/storage/accumulator/src/test_helpers.rs index 24306e7f3417b..9320622104913 100644 --- a/storage/accumulator/src/test_helpers.rs +++ b/storage/accumulator/src/test_helpers.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{HashReader, MerkleAccumulator, MerkleAccumulatorView}; diff --git a/storage/accumulator/src/tests/mod.rs b/storage/accumulator/src/tests/mod.rs index a82248500258d..c9b456c53be2a 100644 --- a/storage/accumulator/src/tests/mod.rs +++ b/storage/accumulator/src/tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod proof_test; diff --git a/storage/accumulator/src/tests/proof_test.rs b/storage/accumulator/src/tests/proof_test.rs index e1e8a0cc1c3e4..63f856ab3eec1 100644 --- a/storage/accumulator/src/tests/proof_test.rs +++ b/storage/accumulator/src/tests/proof_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/accumulator/src/tests/write_test.rs b/storage/accumulator/src/tests/write_test.rs index 6af47e04dc9ef..682fe01757ffa 100644 --- a/storage/accumulator/src/tests/write_test.rs +++ b/storage/accumulator/src/tests/write_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/aptosdb_test.rs b/storage/aptosdb/src/aptosdb_test.rs index 6a8963be2271a..892e4bb736016 100644 --- a/storage/aptosdb/src/aptosdb_test.rs +++ b/storage/aptosdb/src/aptosdb_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/aptossum/mod.rs b/storage/aptosdb/src/aptossum/mod.rs index 6387d16f57aba..eec9bde2193a3 100644 --- a/storage/aptosdb/src/aptossum/mod.rs +++ b/storage/aptosdb/src/aptossum/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{AptosDB, Order, MAX_LIMIT}; diff --git a/storage/aptosdb/src/backup/backup_handler.rs b/storage/aptosdb/src/backup/backup_handler.rs index 99e39f791fd85..baba0827e1933 100644 --- a/storage/aptosdb/src/backup/backup_handler.rs +++ b/storage/aptosdb/src/backup/backup_handler.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/aptosdb/src/backup/mod.rs b/storage/aptosdb/src/backup/mod.rs index 64a26f4c908b1..c089254be1bc3 100644 --- a/storage/aptosdb/src/backup/mod.rs +++ b/storage/aptosdb/src/backup/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup_handler; diff --git a/storage/aptosdb/src/backup/restore_handler.rs b/storage/aptosdb/src/backup/restore_handler.rs index ffc650814870e..0ebbe8cd7ba54 100644 --- a/storage/aptosdb/src/backup/restore_handler.rs +++ b/storage/aptosdb/src/backup/restore_handler.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/aptosdb/src/backup/test.rs b/storage/aptosdb/src/backup/test.rs index 80741139b1c59..acd11b3a7e768 100644 --- a/storage/aptosdb/src/backup/test.rs +++ b/storage/aptosdb/src/backup/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{test_helper::arb_blocks_to_commit, AptosDB}; diff --git a/storage/aptosdb/src/change_set.rs b/storage/aptosdb/src/change_set.rs index 556d636458e01..4ef53365aa06f 100644 --- a/storage/aptosdb/src/change_set.rs +++ b/storage/aptosdb/src/change_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::ledger_counters::LedgerCounterBumps; diff --git a/storage/aptosdb/src/errors.rs b/storage/aptosdb/src/errors.rs index 5520220a5b5d2..8448bbf39250a 100644 --- a/storage/aptosdb/src/errors.rs +++ b/storage/aptosdb/src/errors.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines error types used by [`AptosDB`](crate::AptosDB). diff --git a/storage/aptosdb/src/event_store/mod.rs b/storage/aptosdb/src/event_store/mod.rs index de0459929a5b7..730dd5248ac0d 100644 --- a/storage/aptosdb/src/event_store/mod.rs +++ b/storage/aptosdb/src/event_store/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file defines event store APIs that are related to the event accumulator and events diff --git a/storage/aptosdb/src/event_store/test.rs b/storage/aptosdb/src/event_store/test.rs index 2071629b43252..6a4c323a2d467 100644 --- a/storage/aptosdb/src/event_store/test.rs +++ b/storage/aptosdb/src/event_store/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/ledger_counters/mod.rs b/storage/aptosdb/src/ledger_counters/mod.rs index 604ff3f84b29a..805c11c9aad22 100644 --- a/storage/aptosdb/src/ledger_counters/mod.rs +++ b/storage/aptosdb/src/ledger_counters/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::metrics::DIEM_STORAGE_LEDGER; diff --git a/storage/aptosdb/src/ledger_counters/test.rs b/storage/aptosdb/src/ledger_counters/test.rs index 44a822095c696..fa7759c1d68b8 100644 --- a/storage/aptosdb/src/ledger_counters/test.rs +++ b/storage/aptosdb/src/ledger_counters/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/ledger_store/ledger_info_test.rs b/storage/aptosdb/src/ledger_store/ledger_info_test.rs index 2d182476be52d..fb47736f3b9a9 100644 --- a/storage/aptosdb/src/ledger_store/ledger_info_test.rs +++ b/storage/aptosdb/src/ledger_store/ledger_info_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/ledger_store/mod.rs b/storage/aptosdb/src/ledger_store/mod.rs index 06313d83662c4..df0d5a91fbd66 100644 --- a/storage/aptosdb/src/ledger_store/mod.rs +++ b/storage/aptosdb/src/ledger_store/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file defines ledger store APIs that are related to the main ledger accumulator, from the diff --git a/storage/aptosdb/src/ledger_store/transaction_info_test.rs b/storage/aptosdb/src/ledger_store/transaction_info_test.rs index d508d19f94e40..f868082f18bfa 100644 --- a/storage/aptosdb/src/ledger_store/transaction_info_test.rs +++ b/storage/aptosdb/src/ledger_store/transaction_info_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/lib.rs b/storage/aptosdb/src/lib.rs index c922eba5bec9a..828190c6d7a5f 100644 --- a/storage/aptosdb/src/lib.rs +++ b/storage/aptosdb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/aptosdb/src/metrics.rs b/storage/aptosdb/src/metrics.rs index 38ebba9dcb3f7..4b8ec2897dfe7 100644 --- a/storage/aptosdb/src/metrics.rs +++ b/storage/aptosdb/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/storage/aptosdb/src/pruner/mod.rs b/storage/aptosdb/src/pruner/mod.rs index e53d33ed75ed4..c176f47bfd9c1 100644 --- a/storage/aptosdb/src/pruner/mod.rs +++ b/storage/aptosdb/src/pruner/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides `Pruner` which manages a thread pruning old data in the background and is diff --git a/storage/aptosdb/src/pruner/test.rs b/storage/aptosdb/src/pruner/test.rs index 2377fab46ca18..3974b28c95fca 100644 --- a/storage/aptosdb/src/pruner/test.rs +++ b/storage/aptosdb/src/pruner/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/epoch_by_version/mod.rs b/storage/aptosdb/src/schema/epoch_by_version/mod.rs index d639618eb6c53..c69e6a6dc1737 100644 --- a/storage/aptosdb/src/schema/epoch_by_version/mod.rs +++ b/storage/aptosdb/src/schema/epoch_by_version/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for an index to help us find out which epoch a diff --git a/storage/aptosdb/src/schema/epoch_by_version/test.rs b/storage/aptosdb/src/schema/epoch_by_version/test.rs index ef5f194775297..bd4fbcc67be35 100644 --- a/storage/aptosdb/src/schema/epoch_by_version/test.rs +++ b/storage/aptosdb/src/schema/epoch_by_version/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/event/mod.rs b/storage/aptosdb/src/schema/event/mod.rs index d480d0de98f34..4202914cefe63 100644 --- a/storage/aptosdb/src/schema/event/mod.rs +++ b/storage/aptosdb/src/schema/event/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for the contract events. diff --git a/storage/aptosdb/src/schema/event/test.rs b/storage/aptosdb/src/schema/event/test.rs index 78adfbfc61f88..1d5a09d4c6ed1 100644 --- a/storage/aptosdb/src/schema/event/test.rs +++ b/storage/aptosdb/src/schema/event/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/event_accumulator/mod.rs b/storage/aptosdb/src/schema/event_accumulator/mod.rs index 02cd0580184c3..9159ad60074b7 100644 --- a/storage/aptosdb/src/schema/event_accumulator/mod.rs +++ b/storage/aptosdb/src/schema/event_accumulator/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for the event accumulator. diff --git a/storage/aptosdb/src/schema/event_accumulator/test.rs b/storage/aptosdb/src/schema/event_accumulator/test.rs index 6c37081b1c0a7..f72eda8028e82 100644 --- a/storage/aptosdb/src/schema/event_accumulator/test.rs +++ b/storage/aptosdb/src/schema/event_accumulator/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/event_by_key/mod.rs b/storage/aptosdb/src/schema/event_by_key/mod.rs index 90cdac2650ae4..e3250667734b5 100644 --- a/storage/aptosdb/src/schema/event_by_key/mod.rs +++ b/storage/aptosdb/src/schema/event_by_key/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for an event index via which a ContractEvent ( diff --git a/storage/aptosdb/src/schema/event_by_key/test.rs b/storage/aptosdb/src/schema/event_by_key/test.rs index 4fc1f2ed66e44..c349f4bebd832 100644 --- a/storage/aptosdb/src/schema/event_by_key/test.rs +++ b/storage/aptosdb/src/schema/event_by_key/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/event_by_version/mod.rs b/storage/aptosdb/src/schema/event_by_version/mod.rs index 5e86f09c80646..b312d574a01d7 100644 --- a/storage/aptosdb/src/schema/event_by_version/mod.rs +++ b/storage/aptosdb/src/schema/event_by_version/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for an event index via which a ContractEvent ( diff --git a/storage/aptosdb/src/schema/event_by_version/test.rs b/storage/aptosdb/src/schema/event_by_version/test.rs index 91969db2e20c3..315c54e13aab3 100644 --- a/storage/aptosdb/src/schema/event_by_version/test.rs +++ b/storage/aptosdb/src/schema/event_by_version/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/jellyfish_merkle_node/mod.rs b/storage/aptosdb/src/schema/jellyfish_merkle_node/mod.rs index d019305de26c6..e7f1b4415901e 100644 --- a/storage/aptosdb/src/schema/jellyfish_merkle_node/mod.rs +++ b/storage/aptosdb/src/schema/jellyfish_merkle_node/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for nodes in the state Jellyfish Merkle Tree. diff --git a/storage/aptosdb/src/schema/jellyfish_merkle_node/test.rs b/storage/aptosdb/src/schema/jellyfish_merkle_node/test.rs index e8a83cfbbce47..4a430a4626d0b 100644 --- a/storage/aptosdb/src/schema/jellyfish_merkle_node/test.rs +++ b/storage/aptosdb/src/schema/jellyfish_merkle_node/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/ledger_counters/mod.rs b/storage/aptosdb/src/schema/ledger_counters/mod.rs index 863f4b5e6dd33..9dc80cc521963 100644 --- a/storage/aptosdb/src/schema/ledger_counters/mod.rs +++ b/storage/aptosdb/src/schema/ledger_counters/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for system counters associated with ledger versions. diff --git a/storage/aptosdb/src/schema/ledger_counters/test.rs b/storage/aptosdb/src/schema/ledger_counters/test.rs index 812bad3c04113..4d1d90022ce44 100644 --- a/storage/aptosdb/src/schema/ledger_counters/test.rs +++ b/storage/aptosdb/src/schema/ledger_counters/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/ledger_info/mod.rs b/storage/aptosdb/src/schema/ledger_info/mod.rs index c1cfb39e35045..4f60c3568a5fd 100644 --- a/storage/aptosdb/src/schema/ledger_info/mod.rs +++ b/storage/aptosdb/src/schema/ledger_info/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for LedgerInfoWithSignatures structure. diff --git a/storage/aptosdb/src/schema/ledger_info/test.rs b/storage/aptosdb/src/schema/ledger_info/test.rs index 6573c28858b55..bbb3d9bb802a4 100644 --- a/storage/aptosdb/src/schema/ledger_info/test.rs +++ b/storage/aptosdb/src/schema/ledger_info/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/mod.rs b/storage/aptosdb/src/schema/mod.rs index be1d712ee5eb7..6bfa2324c2659 100644 --- a/storage/aptosdb/src/schema/mod.rs +++ b/storage/aptosdb/src/schema/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines representation of Diem core data structures at physical level via schemas diff --git a/storage/aptosdb/src/schema/stale_node_index/mod.rs b/storage/aptosdb/src/schema/stale_node_index/mod.rs index 0f80b8b2d40fd..a312ba51be636 100644 --- a/storage/aptosdb/src/schema/stale_node_index/mod.rs +++ b/storage/aptosdb/src/schema/stale_node_index/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines the physical storage schema for information related to outdated state diff --git a/storage/aptosdb/src/schema/stale_node_index/test.rs b/storage/aptosdb/src/schema/stale_node_index/test.rs index 2da5f8eef01a8..752c7d90b5a0c 100644 --- a/storage/aptosdb/src/schema/stale_node_index/test.rs +++ b/storage/aptosdb/src/schema/stale_node_index/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/transaction/mod.rs b/storage/aptosdb/src/schema/transaction/mod.rs index c57dc40da7042..ba2a727a0dc5c 100644 --- a/storage/aptosdb/src/schema/transaction/mod.rs +++ b/storage/aptosdb/src/schema/transaction/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for signed transactions. diff --git a/storage/aptosdb/src/schema/transaction/test.rs b/storage/aptosdb/src/schema/transaction/test.rs index 049e0f1162582..15b9dee9d21e6 100644 --- a/storage/aptosdb/src/schema/transaction/test.rs +++ b/storage/aptosdb/src/schema/transaction/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/transaction_accumulator/mod.rs b/storage/aptosdb/src/schema/transaction_accumulator/mod.rs index a372dbb4af8be..670a5f197c487 100644 --- a/storage/aptosdb/src/schema/transaction_accumulator/mod.rs +++ b/storage/aptosdb/src/schema/transaction_accumulator/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for the transaction accumulator. diff --git a/storage/aptosdb/src/schema/transaction_accumulator/test.rs b/storage/aptosdb/src/schema/transaction_accumulator/test.rs index 103808d709c45..45b81076ef883 100644 --- a/storage/aptosdb/src/schema/transaction_accumulator/test.rs +++ b/storage/aptosdb/src/schema/transaction_accumulator/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/transaction_by_account/mod.rs b/storage/aptosdb/src/schema/transaction_by_account/mod.rs index 7fb2be7d271f0..b4083002e9509 100644 --- a/storage/aptosdb/src/schema/transaction_by_account/mod.rs +++ b/storage/aptosdb/src/schema/transaction_by_account/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for a transaction index via which the version of a diff --git a/storage/aptosdb/src/schema/transaction_by_account/test.rs b/storage/aptosdb/src/schema/transaction_by_account/test.rs index 5ab486c74ef3e..ffa5a175d8a4e 100644 --- a/storage/aptosdb/src/schema/transaction_by_account/test.rs +++ b/storage/aptosdb/src/schema/transaction_by_account/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/transaction_by_hash/mod.rs b/storage/aptosdb/src/schema/transaction_by_hash/mod.rs index 308b7356b392e..3091eeb771c8c 100644 --- a/storage/aptosdb/src/schema/transaction_by_hash/mod.rs +++ b/storage/aptosdb/src/schema/transaction_by_hash/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema mapping transaction hash to its version. diff --git a/storage/aptosdb/src/schema/transaction_by_hash/test.rs b/storage/aptosdb/src/schema/transaction_by_hash/test.rs index 3afca9d3ce60d..01a7fc6d2650b 100644 --- a/storage/aptosdb/src/schema/transaction_by_hash/test.rs +++ b/storage/aptosdb/src/schema/transaction_by_hash/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/transaction_info/mod.rs b/storage/aptosdb/src/schema/transaction_info/mod.rs index 1b2ad2f5a422c..6c4eabde65101 100644 --- a/storage/aptosdb/src/schema/transaction_info/mod.rs +++ b/storage/aptosdb/src/schema/transaction_info/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for TransactionInfo structure. diff --git a/storage/aptosdb/src/schema/transaction_info/test.rs b/storage/aptosdb/src/schema/transaction_info/test.rs index 7aad679fec262..38b7b4e414081 100644 --- a/storage/aptosdb/src/schema/transaction_info/test.rs +++ b/storage/aptosdb/src/schema/transaction_info/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/schema/write_set/mod.rs b/storage/aptosdb/src/schema/write_set/mod.rs index 3548b96558862..c333e468a2d96 100644 --- a/storage/aptosdb/src/schema/write_set/mod.rs +++ b/storage/aptosdb/src/schema/write_set/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines physical storage schema for write set emited by each transaction diff --git a/storage/aptosdb/src/schema/write_set/test.rs b/storage/aptosdb/src/schema/write_set/test.rs index fd8f5a0f88877..c869f6db39dca 100644 --- a/storage/aptosdb/src/schema/write_set/test.rs +++ b/storage/aptosdb/src/schema/write_set/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/state_store/mod.rs b/storage/aptosdb/src/state_store/mod.rs index 997719141b275..bdbcd20314487 100644 --- a/storage/aptosdb/src/state_store/mod.rs +++ b/storage/aptosdb/src/state_store/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file defines state store APIs that are related account state Merkle tree. diff --git a/storage/aptosdb/src/state_store/state_store_test.rs b/storage/aptosdb/src/state_store/state_store_test.rs index ed6cd4d48a1ab..5dacc91cc923b 100644 --- a/storage/aptosdb/src/state_store/state_store_test.rs +++ b/storage/aptosdb/src/state_store/state_store_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/system_store/mod.rs b/storage/aptosdb/src/system_store/mod.rs index 9af386fd4524e..13557b317bc97 100644 --- a/storage/aptosdb/src/system_store/mod.rs +++ b/storage/aptosdb/src/system_store/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file defines system store APIs that operates data not part of the Diem core data diff --git a/storage/aptosdb/src/system_store/test.rs b/storage/aptosdb/src/system_store/test.rs index 13442ff80eb44..71690ecc47593 100644 --- a/storage/aptosdb/src/system_store/test.rs +++ b/storage/aptosdb/src/system_store/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptosdb/src/test_helper.rs b/storage/aptosdb/src/test_helper.rs index be21beb8138b6..2a6d4f8b4ade4 100644 --- a/storage/aptosdb/src/test_helper.rs +++ b/storage/aptosdb/src/test_helper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 ///! This module provides reusable helpers in tests. diff --git a/storage/aptosdb/src/transaction_store/mod.rs b/storage/aptosdb/src/transaction_store/mod.rs index c66ee6f3893bc..23491f4179110 100644 --- a/storage/aptosdb/src/transaction_store/mod.rs +++ b/storage/aptosdb/src/transaction_store/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file defines transaction store APIs that are related to committed signed transactions. diff --git a/storage/aptosdb/src/transaction_store/test.rs b/storage/aptosdb/src/transaction_store/test.rs index 4b50dce6b1e7c..05deb103cc417 100644 --- a/storage/aptosdb/src/transaction_store/test.rs +++ b/storage/aptosdb/src/transaction_store/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/aptossum/src/main.rs b/storage/aptossum/src/main.rs index 29873889f1508..922b07bee4539 100644 --- a/storage/aptossum/src/main.rs +++ b/storage/aptossum/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![allow(dead_code)] diff --git a/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs b/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs index 54bafabb2124e..1b227d7b89cd3 100644 --- a/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs +++ b/storage/backup/backup-cli/src/backup_types/epoch_ending/backup.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs b/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs index a609ee6deb3d8..a445934b7def1 100644 --- a/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs +++ b/storage/backup/backup-cli/src/backup_types/epoch_ending/manifest.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::storage::FileHandle; diff --git a/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs b/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs index caa09dfe88258..a658028fb9759 100644 --- a/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs +++ b/storage/backup/backup-cli/src/backup_types/epoch_ending/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup; diff --git a/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs b/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs index aba62eb4a8383..40f1a3c82ffb7 100644 --- a/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs +++ b/storage/backup/backup-cli/src/backup_types/epoch_ending/restore.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs b/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs index 838f20cf406ec..c64411a396c3d 100644 --- a/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs +++ b/storage/backup/backup-cli/src/backup_types/epoch_ending/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/mod.rs b/storage/backup/backup-cli/src/backup_types/mod.rs index 7c8164173a8fb..024c05eeeea48 100644 --- a/storage/backup/backup-cli/src/backup_types/mod.rs +++ b/storage/backup/backup-cli/src/backup_types/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod epoch_ending; diff --git a/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs b/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs index fc28caf5b85fd..cdf722d1fb5ae 100644 --- a/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs +++ b/storage/backup/backup-cli/src/backup_types/state_snapshot/backup.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs b/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs index 294c23fe78aa1..74cd21dda14e3 100644 --- a/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs +++ b/storage/backup/backup-cli/src/backup_types/state_snapshot/manifest.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::storage::FileHandle; diff --git a/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs b/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs index caa09dfe88258..a658028fb9759 100644 --- a/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs +++ b/storage/backup/backup-cli/src/backup_types/state_snapshot/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup; diff --git a/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs b/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs index 07715e03b4852..dd6b6022823c0 100644 --- a/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs +++ b/storage/backup/backup-cli/src/backup_types/state_snapshot/restore.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs b/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs index 6e9809708877b..23be72ab00092 100644 --- a/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs +++ b/storage/backup/backup-cli/src/backup_types/state_snapshot/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/tests.rs b/storage/backup/backup-cli/src/backup_types/tests.rs index a1ff603f12114..5eb1b1ce09a4e 100644 --- a/storage/backup/backup-cli/src/backup_types/tests.rs +++ b/storage/backup/backup-cli/src/backup_types/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/transaction/backup.rs b/storage/backup/backup-cli/src/backup_types/transaction/backup.rs index 28ea5ba10a0dd..a0893ba4c175c 100644 --- a/storage/backup/backup-cli/src/backup_types/transaction/backup.rs +++ b/storage/backup/backup-cli/src/backup_types/transaction/backup.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs b/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs index 6427b70875d8a..96ea7f2b75171 100644 --- a/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs +++ b/storage/backup/backup-cli/src/backup_types/transaction/manifest.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::storage::FileHandle; diff --git a/storage/backup/backup-cli/src/backup_types/transaction/mod.rs b/storage/backup/backup-cli/src/backup_types/transaction/mod.rs index caa09dfe88258..a658028fb9759 100644 --- a/storage/backup/backup-cli/src/backup_types/transaction/mod.rs +++ b/storage/backup/backup-cli/src/backup_types/transaction/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup; diff --git a/storage/backup/backup-cli/src/backup_types/transaction/restore.rs b/storage/backup/backup-cli/src/backup_types/transaction/restore.rs index 6824483fe9c58..0d57744c9b981 100644 --- a/storage/backup/backup-cli/src/backup_types/transaction/restore.rs +++ b/storage/backup/backup-cli/src/backup_types/transaction/restore.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/backup_types/transaction/tests.rs b/storage/backup/backup-cli/src/backup_types/transaction/tests.rs index 1d1e0e9453d18..9be34759a7016 100644 --- a/storage/backup/backup-cli/src/backup_types/transaction/tests.rs +++ b/storage/backup/backup-cli/src/backup_types/transaction/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/bin/db-backup-verify.rs b/storage/backup/backup-cli/src/bin/db-backup-verify.rs index cd7b04b3f2ddf..e895d06490856 100644 --- a/storage/backup/backup-cli/src/bin/db-backup-verify.rs +++ b/storage/backup/backup-cli/src/bin/db-backup-verify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/storage/backup/backup-cli/src/bin/db-backup.rs b/storage/backup/backup-cli/src/bin/db-backup.rs index 17ad3d94de852..988015e648e55 100644 --- a/storage/backup/backup-cli/src/bin/db-backup.rs +++ b/storage/backup/backup-cli/src/bin/db-backup.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::sync::Arc; diff --git a/storage/backup/backup-cli/src/bin/db-restore.rs b/storage/backup/backup-cli/src/bin/db-restore.rs index dfa1d35297cc8..397bc83548915 100644 --- a/storage/backup/backup-cli/src/bin/db-restore.rs +++ b/storage/backup/backup-cli/src/bin/db-restore.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/storage/backup/backup-cli/src/bin/replay-verify.rs b/storage/backup/backup-cli/src/bin/replay-verify.rs index 2a46985ddd582..a08589c54a105 100644 --- a/storage/backup/backup-cli/src/bin/replay-verify.rs +++ b/storage/backup/backup-cli/src/bin/replay-verify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/storage/backup/backup-cli/src/coordinators/backup.rs b/storage/backup/backup-cli/src/coordinators/backup.rs index 18002551d8358..300289bb737d9 100644 --- a/storage/backup/backup-cli/src/coordinators/backup.rs +++ b/storage/backup/backup-cli/src/coordinators/backup.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/coordinators/mod.rs b/storage/backup/backup-cli/src/coordinators/mod.rs index e3d1ab420fdf6..e7b8485e46b9d 100644 --- a/storage/backup/backup-cli/src/coordinators/mod.rs +++ b/storage/backup/backup-cli/src/coordinators/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup; diff --git a/storage/backup/backup-cli/src/coordinators/replay_verify.rs b/storage/backup/backup-cli/src/coordinators/replay_verify.rs index 304c6834df956..46710fd6c9ed2 100644 --- a/storage/backup/backup-cli/src/coordinators/replay_verify.rs +++ b/storage/backup/backup-cli/src/coordinators/replay_verify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/coordinators/restore.rs b/storage/backup/backup-cli/src/coordinators/restore.rs index 35465b695b7a2..0f8d291a7ae6c 100644 --- a/storage/backup/backup-cli/src/coordinators/restore.rs +++ b/storage/backup/backup-cli/src/coordinators/restore.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/coordinators/verify.rs b/storage/backup/backup-cli/src/coordinators/verify.rs index fc78e2a112722..5b1603de385c2 100644 --- a/storage/backup/backup-cli/src/coordinators/verify.rs +++ b/storage/backup/backup-cli/src/coordinators/verify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/lib.rs b/storage/backup/backup-cli/src/lib.rs index dc999b9cb76d7..144425e735c7c 100644 --- a/storage/backup/backup-cli/src/lib.rs +++ b/storage/backup/backup-cli/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![allow(clippy::integer_arithmetic)] diff --git a/storage/backup/backup-cli/src/metadata/cache.rs b/storage/backup/backup-cli/src/metadata/cache.rs index 86de5948912ae..2ea090f9faa73 100644 --- a/storage/backup/backup-cli/src/metadata/cache.rs +++ b/storage/backup/backup-cli/src/metadata/cache.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/metadata/mod.rs b/storage/backup/backup-cli/src/metadata/mod.rs index 2f07af8c6f32e..e5e3212109083 100644 --- a/storage/backup/backup-cli/src/metadata/mod.rs +++ b/storage/backup/backup-cli/src/metadata/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod cache; diff --git a/storage/backup/backup-cli/src/metadata/view.rs b/storage/backup/backup-cli/src/metadata/view.rs index 6bd77549ab3c2..46ff19ad5dbcf 100644 --- a/storage/backup/backup-cli/src/metadata/view.rs +++ b/storage/backup/backup-cli/src/metadata/view.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::metadata::{ diff --git a/storage/backup/backup-cli/src/metrics/backup.rs b/storage/backup/backup-cli/src/metrics/backup.rs index 850bc71cbb92f..4723e942ca9ba 100644 --- a/storage/backup/backup-cli/src/metrics/backup.rs +++ b/storage/backup/backup-cli/src/metrics/backup.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_secure_push_metrics::{register_int_gauge, IntGauge}; diff --git a/storage/backup/backup-cli/src/metrics/metadata.rs b/storage/backup/backup-cli/src/metrics/metadata.rs index 0ad94612bbf8e..5b4ad55e5901b 100644 --- a/storage/backup/backup-cli/src/metrics/metadata.rs +++ b/storage/backup/backup-cli/src/metrics/metadata.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_secure_push_metrics::{register_int_gauge, IntGauge}; diff --git a/storage/backup/backup-cli/src/metrics/mod.rs b/storage/backup/backup-cli/src/metrics/mod.rs index 1c5fc27936264..355e5bcdb83d4 100644 --- a/storage/backup/backup-cli/src/metrics/mod.rs +++ b/storage/backup/backup-cli/src/metrics/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup; diff --git a/storage/backup/backup-cli/src/metrics/restore.rs b/storage/backup/backup-cli/src/metrics/restore.rs index 3aca02c29436c..1c23bb3007ff5 100644 --- a/storage/backup/backup-cli/src/metrics/restore.rs +++ b/storage/backup/backup-cli/src/metrics/restore.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_secure_push_metrics::{register_int_gauge, IntGauge}; diff --git a/storage/backup/backup-cli/src/metrics/verify.rs b/storage/backup/backup-cli/src/metrics/verify.rs index c7d9e2dea7bb4..ecbb3a6f7d1de 100644 --- a/storage/backup/backup-cli/src/metrics/verify.rs +++ b/storage/backup/backup-cli/src/metrics/verify.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_secure_push_metrics::{register_int_gauge, IntGauge}; diff --git a/storage/backup/backup-cli/src/storage/command_adapter/command.rs b/storage/backup/backup-cli/src/storage/command_adapter/command.rs index b9cdeb186f043..536d7bc8f1e46 100644 --- a/storage/backup/backup-cli/src/storage/command_adapter/command.rs +++ b/storage/backup/backup-cli/src/storage/command_adapter/command.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{storage::command_adapter::config::EnvVar, utils::error_notes::ErrorNotes}; diff --git a/storage/backup/backup-cli/src/storage/command_adapter/config.rs b/storage/backup/backup-cli/src/storage/command_adapter/config.rs index 9587eaa8ed736..a62404ec53557 100644 --- a/storage/backup/backup-cli/src/storage/command_adapter/config.rs +++ b/storage/backup/backup-cli/src/storage/command_adapter/config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/storage/command_adapter/mod.rs b/storage/backup/backup-cli/src/storage/command_adapter/mod.rs index d654fe2de419f..216e5daf315d8 100644 --- a/storage/backup/backup-cli/src/storage/command_adapter/mod.rs +++ b/storage/backup/backup-cli/src/storage/command_adapter/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod command; diff --git a/storage/backup/backup-cli/src/storage/command_adapter/tests.rs b/storage/backup/backup-cli/src/storage/command_adapter/tests.rs index 32fe1b303a3a9..b2ae58afe976a 100644 --- a/storage/backup/backup-cli/src/storage/command_adapter/tests.rs +++ b/storage/backup/backup-cli/src/storage/command_adapter/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/backup/backup-cli/src/storage/local_fs/mod.rs b/storage/backup/backup-cli/src/storage/local_fs/mod.rs index ebe48c06c7c5c..72d3b9ab4c773 100644 --- a/storage/backup/backup-cli/src/storage/local_fs/mod.rs +++ b/storage/backup/backup-cli/src/storage/local_fs/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(test)] diff --git a/storage/backup/backup-cli/src/storage/local_fs/tests.rs b/storage/backup/backup-cli/src/storage/local_fs/tests.rs index ae35916311d7c..371b13033761a 100644 --- a/storage/backup/backup-cli/src/storage/local_fs/tests.rs +++ b/storage/backup/backup-cli/src/storage/local_fs/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/backup/backup-cli/src/storage/mod.rs b/storage/backup/backup-cli/src/storage/mod.rs index bebe2f2d4ca92..45c173e2ef35b 100644 --- a/storage/backup/backup-cli/src/storage/mod.rs +++ b/storage/backup/backup-cli/src/storage/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod command_adapter; diff --git a/storage/backup/backup-cli/src/storage/test_util.rs b/storage/backup/backup-cli/src/storage/test_util.rs index 269a865a40e7e..68aed996dadcc 100644 --- a/storage/backup/backup-cli/src/storage/test_util.rs +++ b/storage/backup/backup-cli/src/storage/test_util.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/backup/backup-cli/src/storage/tests.rs b/storage/backup/backup-cli/src/storage/tests.rs index b1a804079b98f..40c25f1d68ebe 100644 --- a/storage/backup/backup-cli/src/storage/tests.rs +++ b/storage/backup/backup-cli/src/storage/tests.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::storage::ShellSafeName; diff --git a/storage/backup/backup-cli/src/utils/backup_service_client.rs b/storage/backup/backup-cli/src/utils/backup_service_client.rs index 01f69eee6d974..621977e6e9591 100644 --- a/storage/backup/backup-cli/src/utils/backup_service_client.rs +++ b/storage/backup/backup-cli/src/utils/backup_service_client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::utils::error_notes::ErrorNotes; diff --git a/storage/backup/backup-cli/src/utils/error_notes.rs b/storage/backup/backup-cli/src/utils/error_notes.rs index ad4ed576db884..18be64e96812c 100644 --- a/storage/backup/backup-cli/src/utils/error_notes.rs +++ b/storage/backup/backup-cli/src/utils/error_notes.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_logger::error; diff --git a/storage/backup/backup-cli/src/utils/mod.rs b/storage/backup/backup-cli/src/utils/mod.rs index ed78b62947466..4368ebfef2b0b 100644 --- a/storage/backup/backup-cli/src/utils/mod.rs +++ b/storage/backup/backup-cli/src/utils/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod backup_service_client; diff --git a/storage/backup/backup-cli/src/utils/read_record_bytes.rs b/storage/backup/backup-cli/src/utils/read_record_bytes.rs index b13af49d755de..b7b3571e4a0f1 100644 --- a/storage/backup/backup-cli/src/utils/read_record_bytes.rs +++ b/storage/backup/backup-cli/src/utils/read_record_bytes.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::utils::error_notes::ErrorNotes; diff --git a/storage/backup/backup-cli/src/utils/storage_ext.rs b/storage/backup/backup-cli/src/utils/storage_ext.rs index 44392f8ef3466..61986f5b27787 100644 --- a/storage/backup/backup-cli/src/utils/storage_ext.rs +++ b/storage/backup/backup-cli/src/utils/storage_ext.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::storage::{BackupHandle, BackupStorage, FileHandleRef}; diff --git a/storage/backup/backup-cli/src/utils/stream/buffered_x.rs b/storage/backup/backup-cli/src/utils/stream/buffered_x.rs index 86c4ef7cf0065..d9c25093f95c0 100644 --- a/storage/backup/backup-cli/src/utils/stream/buffered_x.rs +++ b/storage/backup/backup-cli/src/utils/stream/buffered_x.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 ///! This is a copy of `futures::stream::buffered` from `futures 0.3.6`, except that it uses diff --git a/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs b/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs index 22899e13f6f93..28346037b9c82 100644 --- a/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs +++ b/storage/backup/backup-cli/src/utils/stream/futures_ordered_x.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// This is a copy of `futures::stream::futures_ordered` from `futures 0.3.6`, except that it uses diff --git a/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs b/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs index bcdf09cc6563d..b380e8d06969b 100644 --- a/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs +++ b/storage/backup/backup-cli/src/utils/stream/futures_unordered_x.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 /// This wraps around `futures::stream::futures_unorderd::FuturesUnordered` to provide similar diff --git a/storage/backup/backup-cli/src/utils/stream/mod.rs b/storage/backup/backup-cli/src/utils/stream/mod.rs index bcc99fba8b917..40c29188ef438 100644 --- a/storage/backup/backup-cli/src/utils/stream/mod.rs +++ b/storage/backup/backup-cli/src/utils/stream/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod buffered_x; diff --git a/storage/backup/backup-cli/src/utils/stream/try_buffered_x.rs b/storage/backup/backup-cli/src/utils/stream/try_buffered_x.rs index 006fc2e49270b..742fd45bb53e7 100644 --- a/storage/backup/backup-cli/src/utils/stream/try_buffered_x.rs +++ b/storage/backup/backup-cli/src/utils/stream/try_buffered_x.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 ///! This is a copy of `futures::try_stream::try_buffered` from `futures 0.3.16`, except that it uses diff --git a/storage/backup/backup-cli/src/utils/test_utils.rs b/storage/backup/backup-cli/src/utils/test_utils.rs index 2235f63616b51..c7b3f207649eb 100644 --- a/storage/backup/backup-cli/src/utils/test_utils.rs +++ b/storage/backup/backup-cli/src/utils/test_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::utils::get_available_port; diff --git a/storage/backup/backup-service/src/handlers/mod.rs b/storage/backup/backup-service/src/handlers/mod.rs index b59527be97364..8d8b0b9417a7a 100644 --- a/storage/backup/backup-service/src/handlers/mod.rs +++ b/storage/backup/backup-service/src/handlers/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod utils; diff --git a/storage/backup/backup-service/src/handlers/utils.rs b/storage/backup/backup-service/src/handlers/utils.rs index 5e7e606403e6d..fbfdecb0f54bb 100644 --- a/storage/backup/backup-service/src/handlers/utils.rs +++ b/storage/backup/backup-service/src/handlers/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/storage/backup/backup-service/src/lib.rs b/storage/backup/backup-service/src/lib.rs index 034b06d6ed122..ff9916d78aea0 100644 --- a/storage/backup/backup-service/src/lib.rs +++ b/storage/backup/backup-service/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod handlers; diff --git a/storage/inspector/src/main.rs b/storage/inspector/src/main.rs index fbc6f255ea08b..55f56512de875 100644 --- a/storage/inspector/src/main.rs +++ b/storage/inspector/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/jellyfish-merkle/src/iterator/iterator_test.rs b/storage/jellyfish-merkle/src/iterator/iterator_test.rs index e1bb1ea993587..7024ab9c8a653 100644 --- a/storage/jellyfish-merkle/src/iterator/iterator_test.rs +++ b/storage/jellyfish-merkle/src/iterator/iterator_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/jellyfish-merkle/src/iterator/mod.rs b/storage/jellyfish-merkle/src/iterator/mod.rs index 5bb4fb09e5291..3136955af1e48 100644 --- a/storage/jellyfish-merkle/src/iterator/mod.rs +++ b/storage/jellyfish-merkle/src/iterator/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module implements `JellyfishMerkleIterator`. Initialized with a version and a key, the diff --git a/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs b/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs index 2005ccee28d3f..33791dafa0840 100644 --- a/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs +++ b/storage/jellyfish-merkle/src/jellyfish_merkle_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/jellyfish-merkle/src/lib.rs b/storage/jellyfish-merkle/src/lib.rs index 4e9ab1d556245..6c6ed6f08cb8b 100644 --- a/storage/jellyfish-merkle/src/lib.rs +++ b/storage/jellyfish-merkle/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/jellyfish-merkle/src/metrics.rs b/storage/jellyfish-merkle/src/metrics.rs index b3479558f94ce..159a92e6e6749 100644 --- a/storage/jellyfish-merkle/src/metrics.rs +++ b/storage/jellyfish-merkle/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{register_int_counter, IntCounter}; diff --git a/storage/jellyfish-merkle/src/mock_tree_store.rs b/storage/jellyfish-merkle/src/mock_tree_store.rs index bb1d29a0d5d49..caa2312ed642b 100644 --- a/storage/jellyfish-merkle/src/mock_tree_store.rs +++ b/storage/jellyfish-merkle/src/mock_tree_store.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/jellyfish-merkle/src/node_type/mod.rs b/storage/jellyfish-merkle/src/node_type/mod.rs index 5ab19662c63bd..3c97a1d6b77f5 100644 --- a/storage/jellyfish-merkle/src/node_type/mod.rs +++ b/storage/jellyfish-merkle/src/node_type/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Node types of [`JellyfishMerkleTree`](crate::JellyfishMerkleTree) diff --git a/storage/jellyfish-merkle/src/node_type/node_type_test.rs b/storage/jellyfish-merkle/src/node_type/node_type_test.rs index 45ee761c4bfc9..b2ff430645297 100644 --- a/storage/jellyfish-merkle/src/node_type/node_type_test.rs +++ b/storage/jellyfish-merkle/src/node_type/node_type_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::{ diff --git a/storage/jellyfish-merkle/src/restore/mod.rs b/storage/jellyfish-merkle/src/restore/mod.rs index d46818933584d..d0d83c8493ddd 100644 --- a/storage/jellyfish-merkle/src/restore/mod.rs +++ b/storage/jellyfish-merkle/src/restore/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module implements the functionality to restore a `JellyfishMerkleTree` from small chunks diff --git a/storage/jellyfish-merkle/src/restore/restore_test.rs b/storage/jellyfish-merkle/src/restore/restore_test.rs index a715a0d6c89d9..ff13943c2056a 100644 --- a/storage/jellyfish-merkle/src/restore/restore_test.rs +++ b/storage/jellyfish-merkle/src/restore/restore_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/jellyfish-merkle/src/test_helper.rs b/storage/jellyfish-merkle/src/test_helper.rs index 49cf055e3cd46..9af8a378e954c 100644 --- a/storage/jellyfish-merkle/src/test_helper.rs +++ b/storage/jellyfish-merkle/src/test_helper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{mock_tree_store::MockTreeStore, node_type::LeafNode, JellyfishMerkleTree}; diff --git a/storage/jellyfish-merkle/src/tree_cache/mod.rs b/storage/jellyfish-merkle/src/tree_cache/mod.rs index d3ccd9a32339e..cb959a1a42666 100644 --- a/storage/jellyfish-merkle/src/tree_cache/mod.rs +++ b/storage/jellyfish-merkle/src/tree_cache/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! A transaction can have multiple operations on state. For example, it might update values diff --git a/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs b/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs index 271cd0f931233..dfa8415c46304 100644 --- a/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs +++ b/storage/jellyfish-merkle/src/tree_cache/tree_cache_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/schemadb/src/lib.rs b/storage/schemadb/src/lib.rs index a5ab7450c4845..b369d873c6edb 100644 --- a/storage/schemadb/src/lib.rs +++ b/storage/schemadb/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/schemadb/src/metrics.rs b/storage/schemadb/src/metrics.rs index 985e6872d649c..76788a166d54a 100644 --- a/storage/schemadb/src/metrics.rs +++ b/storage/schemadb/src/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_metrics::{ diff --git a/storage/schemadb/src/schema.rs b/storage/schemadb/src/schema.rs index 2e3e13c9b0dd7..2076fe3a46199 100644 --- a/storage/schemadb/src/schema.rs +++ b/storage/schemadb/src/schema.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides traits that define the behavior of a schema and its associated key and diff --git a/storage/schemadb/tests/db.rs b/storage/schemadb/tests/db.rs index 48b78d83adffc..52fbbc3ee8a4a 100644 --- a/storage/schemadb/tests/db.rs +++ b/storage/schemadb/tests/db.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/storage/schemadb/tests/iterator.rs b/storage/schemadb/tests/iterator.rs index 301deb1a73ed3..42a33c4401674 100644 --- a/storage/schemadb/tests/iterator.rs +++ b/storage/schemadb/tests/iterator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/storage/scratchpad/benches/sparse_merkle.rs b/storage/scratchpad/benches/sparse_merkle.rs index f9c7c7058fa05..f456ea1fb835b 100644 --- a/storage/scratchpad/benches/sparse_merkle.rs +++ b/storage/scratchpad/benches/sparse_merkle.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{hash::SPARSE_MERKLE_PLACEHOLDER_HASH, HashValue}; diff --git a/storage/scratchpad/src/lib.rs b/storage/scratchpad/src/lib.rs index 9814c29a3289d..24faee32e4930 100644 --- a/storage/scratchpad/src/lib.rs +++ b/storage/scratchpad/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This crate provides in-memory representation of Diem core data structures used by the executor. diff --git a/storage/scratchpad/src/sparse_merkle/batches_update.rs b/storage/scratchpad/src/sparse_merkle/batches_update.rs index 12bcb222544b8..42a960ba7dfae 100644 --- a/storage/scratchpad/src/sparse_merkle/batches_update.rs +++ b/storage/scratchpad/src/sparse_merkle/batches_update.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/scratchpad/src/sparse_merkle/metrics.rs b/storage/scratchpad/src/sparse_merkle/metrics.rs index cd52fa7286aff..841558e1e4ef3 100644 --- a/storage/scratchpad/src/sparse_merkle/metrics.rs +++ b/storage/scratchpad/src/sparse_merkle/metrics.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/scratchpad/src/sparse_merkle/mod.rs b/storage/scratchpad/src/sparse_merkle/mod.rs index c5eca21b701da..db495581ad0b2 100644 --- a/storage/scratchpad/src/sparse_merkle/mod.rs +++ b/storage/scratchpad/src/sparse_merkle/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module implements an in-memory Sparse Merkle Tree that is similar to what we use in diff --git a/storage/scratchpad/src/sparse_merkle/node.rs b/storage/scratchpad/src/sparse_merkle/node.rs index 87cbb5e1b81f2..ee757d8abab59 100644 --- a/storage/scratchpad/src/sparse_merkle/node.rs +++ b/storage/scratchpad/src/sparse_merkle/node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module defines all kinds of structures in the Sparse Merkle Tree maintained in scratch pad. diff --git a/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs b/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs index b85826ea57515..4e88706ba02bb 100644 --- a/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs +++ b/storage/scratchpad/src/sparse_merkle/sparse_merkle_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/storage/scratchpad/src/sparse_merkle/test_utils/mod.rs b/storage/scratchpad/src/sparse_merkle/test_utils/mod.rs index 45bad8c4aee55..cc05ccccb7ce9 100644 --- a/storage/scratchpad/src/sparse_merkle/test_utils/mod.rs +++ b/storage/scratchpad/src/sparse_merkle/test_utils/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(any(test, feature = "bench", feature = "fuzzing"))] diff --git a/storage/scratchpad/src/sparse_merkle/test_utils/naive_smt.rs b/storage/scratchpad/src/sparse_merkle/test_utils/naive_smt.rs index 257924915ede2..5ddc11cbdc4db 100644 --- a/storage/scratchpad/src/sparse_merkle/test_utils/naive_smt.rs +++ b/storage/scratchpad/src/sparse_merkle/test_utils/naive_smt.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::sparse_merkle::utils::partition; diff --git a/storage/scratchpad/src/sparse_merkle/test_utils/proof_reader.rs b/storage/scratchpad/src/sparse_merkle/test_utils/proof_reader.rs index d51361179780f..cb39a11fda4e2 100644 --- a/storage/scratchpad/src/sparse_merkle/test_utils/proof_reader.rs +++ b/storage/scratchpad/src/sparse_merkle/test_utils/proof_reader.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::ProofRead; diff --git a/storage/scratchpad/src/sparse_merkle/test_utils/proptest_helpers.rs b/storage/scratchpad/src/sparse_merkle/test_utils/proptest_helpers.rs index 3e72a893cdd14..a97fa60d88b8f 100644 --- a/storage/scratchpad/src/sparse_merkle/test_utils/proptest_helpers.rs +++ b/storage/scratchpad/src/sparse_merkle/test_utils/proptest_helpers.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/scratchpad/src/sparse_merkle/updater.rs b/storage/scratchpad/src/sparse_merkle/updater.rs index 44f279b7f0df1..400274c4e105f 100644 --- a/storage/scratchpad/src/sparse_merkle/updater.rs +++ b/storage/scratchpad/src/sparse_merkle/updater.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/storage/scratchpad/src/sparse_merkle/utils.rs b/storage/scratchpad/src/sparse_merkle/utils.rs index 29332baece1a7..387239996f3b8 100644 --- a/storage/scratchpad/src/sparse_merkle/utils.rs +++ b/storage/scratchpad/src/sparse_merkle/utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::HashValue; diff --git a/storage/state-view/src/lib.rs b/storage/state-view/src/lib.rs index aa74c668034b2..9f140f3856d27 100644 --- a/storage/state-view/src/lib.rs +++ b/storage/state-view/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/storage-client/src/lib.rs b/storage/storage-client/src/lib.rs index b18c64487e3ab..b241dbaa9d5ba 100644 --- a/storage/storage-client/src/lib.rs +++ b/storage/storage-client/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/storage-interface/src/lib.rs b/storage/storage-interface/src/lib.rs index a1f752153f000..6e73f3b17cbf3 100644 --- a/storage/storage-interface/src/lib.rs +++ b/storage/storage-interface/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{format_err, Result}; diff --git a/storage/storage-interface/src/mock.rs b/storage/storage-interface/src/mock.rs index ebd0015e01457..5bd56dd0dc822 100644 --- a/storage/storage-interface/src/mock.rs +++ b/storage/storage-interface/src/mock.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides mock dbreader for tests. diff --git a/storage/storage-interface/src/state_view.rs b/storage/storage-interface/src/state_view.rs index ca47128bd5e4a..f82d3e5f8b452 100644 --- a/storage/storage-interface/src/state_view.rs +++ b/storage/storage-interface/src/state_view.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::DbReader; diff --git a/storage/storage-service/src/lib.rs b/storage/storage-service/src/lib.rs index c1ad0264b69b0..11dfb529ab55e 100644 --- a/storage/storage-service/src/lib.rs +++ b/storage/storage-service/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/storage/storage-service/src/storage_service_test.rs b/storage/storage-service/src/storage_service_test.rs index f29453ed9c8c3..2ff18f1e27515 100644 --- a/storage/storage-service/src/storage_service_test.rs +++ b/storage/storage-service/src/storage_service_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::*; diff --git a/testsuite/aptos-fuzzer/fuzz/build.rs b/testsuite/aptos-fuzzer/fuzz/build.rs index 3aa503bb9aa1c..c4646de62eeee 100644 --- a/testsuite/aptos-fuzzer/fuzz/build.rs +++ b/testsuite/aptos-fuzzer/fuzz/build.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::{env, fs::File, io::prelude::*, path::PathBuf}; diff --git a/testsuite/aptos-fuzzer/fuzz/fuzz_targets/fuzz_runner.rs b/testsuite/aptos-fuzzer/fuzz/fuzz_targets/fuzz_runner.rs index f6b7c56bdc3e5..b76d3f69e27dd 100644 --- a/testsuite/aptos-fuzzer/fuzz/fuzz_targets/fuzz_runner.rs +++ b/testsuite/aptos-fuzzer/fuzz/fuzz_targets/fuzz_runner.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![no_main] diff --git a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build.sh b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build.sh index 06ba7c1297906..8270f9a82f267 100755 --- a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build.sh +++ b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -eux -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # This build script is used with Google OSS-Fuzz to build fuzzer with their docker container. diff --git a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_corpus.sh b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_corpus.sh index 0a0490a69393d..899d5be02049e 100755 --- a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_corpus.sh +++ b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_corpus.sh @@ -1,5 +1,5 @@ #!/bin/bash -eux -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # this file generates 128 corpus files for a target, zips it all, and move zipfile to an outdir diff --git a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_fuzzer.sh b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_fuzzer.sh index 86a9f43fb5727..681cdbb488d3e 100755 --- a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_fuzzer.sh +++ b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/build_fuzzer.sh @@ -1,5 +1,5 @@ #!/bin/bash -eux -# Copyright (c) The Aptos Foundation +# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 # this file builds a single fuzzer target diff --git a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/fuzzer_builder.rs b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/fuzzer_builder.rs index 98840bdeff712..334e7e45ef534 100755 --- a/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/fuzzer_builder.rs +++ b/testsuite/aptos-fuzzer/fuzz/google-oss-fuzz/fuzzer_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![no_main] diff --git a/testsuite/aptos-fuzzer/src/bin/flamegraph.rs b/testsuite/aptos-fuzzer/src/bin/flamegraph.rs index 6bd2818fd37b6..6adf2e254affb 100644 --- a/testsuite/aptos-fuzzer/src/bin/flamegraph.rs +++ b/testsuite/aptos-fuzzer/src/bin/flamegraph.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_fuzzer::FuzzTarget; diff --git a/testsuite/aptos-fuzzer/src/bin/investigate.rs b/testsuite/aptos-fuzzer/src/bin/investigate.rs index 97ba12ef8b76c..97a756bb877dd 100644 --- a/testsuite/aptos-fuzzer/src/bin/investigate.rs +++ b/testsuite/aptos-fuzzer/src/bin/investigate.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_fuzzer::FuzzTarget; @@ -8,7 +8,7 @@ use structopt::StructOpt; #[derive(Debug, StructOpt)] #[structopt( name = "Diem-Fuzzer Investigator", - author = "The Aptos Foundation", + author = "The Diem Core Contributors", about = "Utility tool to investigate fuzzing artifacts" )] struct Args { diff --git a/testsuite/aptos-fuzzer/src/commands.rs b/testsuite/aptos-fuzzer/src/commands.rs index 1d53bb996cfe6..607c5c96e1229 100644 --- a/testsuite/aptos-fuzzer/src/commands.rs +++ b/testsuite/aptos-fuzzer/src/commands.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::FuzzTarget; diff --git a/testsuite/aptos-fuzzer/src/coverage.rs b/testsuite/aptos-fuzzer/src/coverage.rs index f52d3200d4331..1bb6807b32b20 100644 --- a/testsuite/aptos-fuzzer/src/coverage.rs +++ b/testsuite/aptos-fuzzer/src/coverage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::FuzzTarget; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets.rs b/testsuite/aptos-fuzzer/src/fuzz_targets.rs index df6398459bc26..f512b777e9415 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{FuzzTarget, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/consensus.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/consensus.rs index 63e6e59ef4722..e84324247ff0a 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/consensus.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/consensus.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::FuzzTargetImpl; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/executor.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/executor.rs index 41d7211f05dc5..71f4a8c5d6369 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/executor.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/executor.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/mempool.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/mempool.rs index 070ca34fadf6a..4bdb082a059ae 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/mempool.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/mempool.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs index ebd678f56b247..19401d2ad5241 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/move_vm.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::FuzzTargetImpl; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/network.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/network.rs index 5c0e0a058a42f..3a940eec847f2 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/network.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/proof.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/proof.rs index f2717cbeff973..fc1e50a61a6b3 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/proof.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/proof.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/safety_rules.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/safety_rules.rs index ef4f9f1151e11..e84aa3721bb9e 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/safety_rules.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/safety_rules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/secure_storage_vault.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/secure_storage_vault.rs index 9a4d56f329a65..24f23452a0716 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/secure_storage_vault.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/secure_storage_vault.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/state_sync.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/state_sync.rs index 0f8e34a877b82..a784c06eb7344 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/state_sync.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/state_sync.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs index 009baf33d6cf7..03e1e0079a0fa 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/transaction.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/transaction.rs index b07525285851b..55a6dcedeb926 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/transaction.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{corpus_from_strategy, fuzz_data_to_value, FuzzTargetImpl}; diff --git a/testsuite/aptos-fuzzer/src/fuzz_targets/vm.rs b/testsuite/aptos-fuzzer/src/fuzz_targets/vm.rs index eb02d518e787e..3a46bb9f830ed 100644 --- a/testsuite/aptos-fuzzer/src/fuzz_targets/vm.rs +++ b/testsuite/aptos-fuzzer/src/fuzz_targets/vm.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::FuzzTargetImpl; diff --git a/testsuite/aptos-fuzzer/src/lib.rs b/testsuite/aptos-fuzzer/src/lib.rs index bd7d71e8ca6cf..c47ed9aea51a0 100644 --- a/testsuite/aptos-fuzzer/src/lib.rs +++ b/testsuite/aptos-fuzzer/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_proptest_helpers::ValueGenerator; diff --git a/testsuite/aptos-fuzzer/src/main.rs b/testsuite/aptos-fuzzer/src/main.rs index 2ccba74c003a6..77e71d3e2968e 100644 --- a/testsuite/aptos-fuzzer/src/main.rs +++ b/testsuite/aptos-fuzzer/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Helpers for fuzz testing. diff --git a/testsuite/aptos-fuzzer/tests/artifacts.rs b/testsuite/aptos-fuzzer/tests/artifacts.rs index 18cf1efab7d26..116d8138a862a 100644 --- a/testsuite/aptos-fuzzer/tests/artifacts.rs +++ b/testsuite/aptos-fuzzer/tests/artifacts.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Test artifacts: examples known to have crashed in the past. diff --git a/testsuite/forge-cli/src/lib.rs b/testsuite/forge-cli/src/lib.rs index 26a0504a48478..1cc54db1297c4 100644 --- a/testsuite/forge-cli/src/lib.rs +++ b/testsuite/forge-cli/src/lib.rs @@ -1,2 +1,2 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 diff --git a/testsuite/forge-cli/src/main.rs b/testsuite/forge-cli/src/main.rs index 0eeb89e16b46d..be7bc6e6d0f0d 100644 --- a/testsuite/forge-cli/src/main.rs +++ b/testsuite/forge-cli/src/main.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_rest_client::Client as RestClient; diff --git a/testsuite/forge/src/backend/k8s/cluster_helper.rs b/testsuite/forge/src/backend/k8s/cluster_helper.rs index d679c7c6f38be..664a78b3fa499 100644 --- a/testsuite/forge/src/backend/k8s/cluster_helper.rs +++ b/testsuite/forge/src/backend/k8s/cluster_helper.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{get_validators, k8s_retry_strategy, nodes_healthcheck, Result}; diff --git a/testsuite/forge/src/backend/k8s/mod.rs b/testsuite/forge/src/backend/k8s/mod.rs index cdfaff989db11..68e1fa87cef78 100644 --- a/testsuite/forge/src/backend/k8s/mod.rs +++ b/testsuite/forge/src/backend/k8s/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Factory, GenesisConfig, Result, Swarm, Version}; diff --git a/testsuite/forge/src/backend/k8s/node.rs b/testsuite/forge/src/backend/k8s/node.rs index 74ee957f6320c..9022e5c40d1ee 100644 --- a/testsuite/forge/src/backend/k8s/node.rs +++ b/testsuite/forge/src/backend/k8s/node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/forge/src/backend/k8s/swarm.rs b/testsuite/forge/src/backend/k8s/swarm.rs index f7b546f484724..d12f9d6e53f53 100644 --- a/testsuite/forge/src/backend/k8s/swarm.rs +++ b/testsuite/forge/src/backend/k8s/swarm.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/forge/src/backend/local/cargo.rs b/testsuite/forge/src/backend/local/cargo.rs index 05f8c6918754a..ea9ae70bc4c48 100644 --- a/testsuite/forge/src/backend/local/cargo.rs +++ b/testsuite/forge/src/backend/local/cargo.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Result; diff --git a/testsuite/forge/src/backend/local/mod.rs b/testsuite/forge/src/backend/local/mod.rs index 642ae5e26889a..3fda2af332c57 100644 --- a/testsuite/forge/src/backend/local/mod.rs +++ b/testsuite/forge/src/backend/local/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Factory, GenesisConfig, Result, Swarm, Version}; diff --git a/testsuite/forge/src/backend/local/node.rs b/testsuite/forge/src/backend/local/node.rs index 01d3d8feb23b6..4d825a7a2e868 100644 --- a/testsuite/forge/src/backend/local/node.rs +++ b/testsuite/forge/src/backend/local/node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{FullNode, HealthCheckError, LocalVersion, Node, NodeExt, Validator, Version}; diff --git a/testsuite/forge/src/backend/local/swarm.rs b/testsuite/forge/src/backend/local/swarm.rs index 8f7483cb32f2d..baf62f13bbb4e 100644 --- a/testsuite/forge/src/backend/local/swarm.rs +++ b/testsuite/forge/src/backend/local/swarm.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/forge/src/backend/mod.rs b/testsuite/forge/src/backend/mod.rs index 3c5cfba1afe4d..d1a2fdbe32355 100644 --- a/testsuite/forge/src/backend/mod.rs +++ b/testsuite/forge/src/backend/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod local; diff --git a/testsuite/forge/src/github.rs b/testsuite/forge/src/github.rs index 64f399d616b23..b15d03945681a 100644 --- a/testsuite/forge/src/github.rs +++ b/testsuite/forge/src/github.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/testsuite/forge/src/interface/admin.rs b/testsuite/forge/src/interface/admin.rs index 328603752812f..37507fa638285 100644 --- a/testsuite/forge/src/interface/admin.rs +++ b/testsuite/forge/src/interface/admin.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::{ChainInfo, CoreContext, Test}; diff --git a/testsuite/forge/src/interface/aptos.rs b/testsuite/forge/src/interface/aptos.rs index 845b2df148c4f..356387cb3afed 100644 --- a/testsuite/forge/src/interface/aptos.rs +++ b/testsuite/forge/src/interface/aptos.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::Test; diff --git a/testsuite/forge/src/interface/chain_info.rs b/testsuite/forge/src/interface/chain_info.rs index 31dfdc23a4593..70d5e54f32cda 100644 --- a/testsuite/forge/src/interface/chain_info.rs +++ b/testsuite/forge/src/interface/chain_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{AptosPublicInfo, Coffer, NFTPublicInfo, PublicInfo, Result}; diff --git a/testsuite/forge/src/interface/factory.rs b/testsuite/forge/src/interface/factory.rs index 6660bf28a0b47..0a0af4733a6dc 100644 --- a/testsuite/forge/src/interface/factory.rs +++ b/testsuite/forge/src/interface/factory.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::{GenesisConfig, Swarm, Version}; diff --git a/testsuite/forge/src/interface/mod.rs b/testsuite/forge/src/interface/mod.rs index c917b88587afa..67d135e899fcf 100644 --- a/testsuite/forge/src/interface/mod.rs +++ b/testsuite/forge/src/interface/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod admin; diff --git a/testsuite/forge/src/interface/network.rs b/testsuite/forge/src/interface/network.rs index 50e75cb72c54a..3c2568c4c84d8 100644 --- a/testsuite/forge/src/interface/network.rs +++ b/testsuite/forge/src/interface/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::Test; diff --git a/testsuite/forge/src/interface/nft.rs b/testsuite/forge/src/interface/nft.rs index 2c6e2e9aa2a9a..882b66b75410a 100644 --- a/testsuite/forge/src/interface/nft.rs +++ b/testsuite/forge/src/interface/nft.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::Test; diff --git a/testsuite/forge/src/interface/node.rs b/testsuite/forge/src/interface/node.rs index 65b24ad1bac35..3ddf369b74c49 100644 --- a/testsuite/forge/src/interface/node.rs +++ b/testsuite/forge/src/interface/node.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{Result, Version}; diff --git a/testsuite/forge/src/interface/public.rs b/testsuite/forge/src/interface/public.rs index c7aaf4c59cbd7..0b5fd55c670fb 100644 --- a/testsuite/forge/src/interface/public.rs +++ b/testsuite/forge/src/interface/public.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::Test; diff --git a/testsuite/forge/src/interface/swarm.rs b/testsuite/forge/src/interface/swarm.rs index 24be45b4db8a0..f7c6727e1665e 100644 --- a/testsuite/forge/src/interface/swarm.rs +++ b/testsuite/forge/src/interface/swarm.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ChainInfo, FullNode, NodeExt, Result, Validator, Version}; diff --git a/testsuite/forge/src/interface/test.rs b/testsuite/forge/src/interface/test.rs index 2800b1b897803..dc6dceae00004 100644 --- a/testsuite/forge/src/interface/test.rs +++ b/testsuite/forge/src/interface/test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use rand::SeedableRng; diff --git a/testsuite/forge/src/lib.rs b/testsuite/forge/src/lib.rs index 97572f1d26b2e..2a09352766320 100644 --- a/testsuite/forge/src/lib.rs +++ b/testsuite/forge/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Forge is a framework for writing and running end-to-end tests in Aptos diff --git a/testsuite/forge/src/report.rs b/testsuite/forge/src/report.rs index 628de7318a664..1e4ba654b6e57 100644 --- a/testsuite/forge/src/report.rs +++ b/testsuite/forge/src/report.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::TxnStats; diff --git a/testsuite/forge/src/runner.rs b/testsuite/forge/src/runner.rs index adc9b3bcd79c2..0f5c5073d73b0 100644 --- a/testsuite/forge/src/runner.rs +++ b/testsuite/forge/src/runner.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::*; diff --git a/testsuite/forge/src/slack.rs b/testsuite/forge/src/slack.rs index 0f15c14eefdd6..8a5b11d35a1ac 100644 --- a/testsuite/forge/src/slack.rs +++ b/testsuite/forge/src/slack.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/testsuite/generate-format/src/aptos.rs b/testsuite/generate-format/src/aptos.rs index c2e4e54d79e2f..62126b961462a 100644 --- a/testsuite/generate-format/src/aptos.rs +++ b/testsuite/generate-format/src/aptos.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/testsuite/generate-format/src/compute.rs b/testsuite/generate-format/src/compute.rs index 7ae0fe86fbca0..6c1ae620aff2a 100644 --- a/testsuite/generate-format/src/compute.rs +++ b/testsuite/generate-format/src/compute.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use generate_format::Corpus; diff --git a/testsuite/generate-format/src/consensus.rs b/testsuite/generate-format/src/consensus.rs index b0d88d12b9c0c..cabe756f2ce12 100644 --- a/testsuite/generate-format/src/consensus.rs +++ b/testsuite/generate-format/src/consensus.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/testsuite/generate-format/src/lib.rs b/testsuite/generate-format/src/lib.rs index ef148b9ce3def..9203aaa44cf1a 100644 --- a/testsuite/generate-format/src/lib.rs +++ b/testsuite/generate-format/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! How and where to record the Serde format of interesting Aptos types. diff --git a/testsuite/generate-format/src/linter.rs b/testsuite/generate-format/src/linter.rs index 384a211adedbe..ea89b19b08bc3 100644 --- a/testsuite/generate-format/src/linter.rs +++ b/testsuite/generate-format/src/linter.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde_reflection::{ContainerFormat, Error, Format, FormatHolder, Result}; diff --git a/testsuite/generate-format/src/move_abi.rs b/testsuite/generate-format/src/move_abi.rs index 5dc5fc1f1915a..41aa101dcc5b2 100644 --- a/testsuite/generate-format/src/move_abi.rs +++ b/testsuite/generate-format/src/move_abi.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction; diff --git a/testsuite/generate-format/src/network.rs b/testsuite/generate-format/src/network.rs index b1e24d99ef3d4..b46365de23cdc 100644 --- a/testsuite/generate-format/src/network.rs +++ b/testsuite/generate-format/src/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/testsuite/generate-format/tests/detect_format_change.rs b/testsuite/generate-format/tests/detect_format_change.rs index 77844522b9cc2..15598b8dbce5a 100644 --- a/testsuite/generate-format/tests/detect_format_change.rs +++ b/testsuite/generate-format/tests/detect_format_change.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use generate_format::Corpus; diff --git a/testsuite/generate-format/tests/linter.rs b/testsuite/generate-format/tests/linter.rs index deeca9b557999..0f842f75f2f11 100644 --- a/testsuite/generate-format/tests/linter.rs +++ b/testsuite/generate-format/tests/linter.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use generate_format::lint_bcs_format; diff --git a/testsuite/smoke-test/src/aptos/account_creation.rs b/testsuite/smoke-test/src/aptos/account_creation.rs index b48587bf06de6..1d04e7074c4b5 100644 --- a/testsuite/smoke-test/src/aptos/account_creation.rs +++ b/testsuite/smoke-test/src/aptos/account_creation.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::aptos_stdlib; diff --git a/testsuite/smoke-test/src/aptos/gas_check.rs b/testsuite/smoke-test/src/aptos/gas_check.rs index 3aff1b52119cb..b8c2aaf413e12 100644 --- a/testsuite/smoke-test/src/aptos/gas_check.rs +++ b/testsuite/smoke-test/src/aptos/gas_check.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_sdk::move_types::gas_schedule::{GasAlgebra, GasConstants}; diff --git a/testsuite/smoke-test/src/aptos/mint_transfer.rs b/testsuite/smoke-test/src/aptos/mint_transfer.rs index 1d453fe4449d2..173c9ecada6ef 100644 --- a/testsuite/smoke-test/src/aptos/mint_transfer.rs +++ b/testsuite/smoke-test/src/aptos/mint_transfer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_transaction_builder::aptos_stdlib; diff --git a/testsuite/smoke-test/src/aptos/mod.rs b/testsuite/smoke-test/src/aptos/mod.rs index 3b696235db529..34f0fcc93a157 100644 --- a/testsuite/smoke-test/src/aptos/mod.rs +++ b/testsuite/smoke-test/src/aptos/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod account_creation; diff --git a/testsuite/smoke-test/src/aptos/module_publish.rs b/testsuite/smoke-test/src/aptos/module_publish.rs index 6cda5b3f8d1b8..6b1ef9c03df9c 100644 --- a/testsuite/smoke-test/src/aptos/module_publish.rs +++ b/testsuite/smoke-test/src/aptos/module_publish.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_types::transaction::{ModuleBundle, TransactionPayload}; diff --git a/testsuite/smoke-test/src/client.rs b/testsuite/smoke-test/src/client.rs index 6085fee43909d..66e75ad8b8059 100644 --- a/testsuite/smoke-test/src/client.rs +++ b/testsuite/smoke-test/src/client.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/consensus.rs b/testsuite/smoke-test/src/consensus.rs index fed98fdaf7c03..b18f815164014 100644 --- a/testsuite/smoke-test/src/consensus.rs +++ b/testsuite/smoke-test/src/consensus.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/dev_modules/module.move b/testsuite/smoke-test/src/dev_modules/module.move index 3d999cbe0486a..4050315053ab0 100644 --- a/testsuite/smoke-test/src/dev_modules/module.move +++ b/testsuite/smoke-test/src/dev_modules/module.move @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Note: If this test file fails to run, it is possible that the diff --git a/testsuite/smoke-test/src/dev_modules/script.move b/testsuite/smoke-test/src/dev_modules/script.move index ce972596c47c0..aae31d311808f 100644 --- a/testsuite/smoke-test/src/dev_modules/script.move +++ b/testsuite/smoke-test/src/dev_modules/script.move @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Note: If this test file fails to run, it is possible that the diff --git a/testsuite/smoke-test/src/full_nodes.rs b/testsuite/smoke-test/src/full_nodes.rs index 862faabd01ceb..623b32f7f2f52 100644 --- a/testsuite/smoke-test/src/full_nodes.rs +++ b/testsuite/smoke-test/src/full_nodes.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/fullnode.rs b/testsuite/smoke-test/src/fullnode.rs index 7ace726f565b1..3d15afcbaa6eb 100644 --- a/testsuite/smoke-test/src/fullnode.rs +++ b/testsuite/smoke-test/src/fullnode.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use std::time::{Duration, Instant}; diff --git a/testsuite/smoke-test/src/genesis.rs b/testsuite/smoke-test/src/genesis.rs index 19a5da4072283..dfa1c03e07449 100644 --- a/testsuite/smoke-test/src/genesis.rs +++ b/testsuite/smoke-test/src/genesis.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/lib.rs b/testsuite/smoke-test/src/lib.rs index b47d4acb955fa..224e9aa1953f5 100644 --- a/testsuite/smoke-test/src/lib.rs +++ b/testsuite/smoke-test/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 // Defines Forge Tests diff --git a/testsuite/smoke-test/src/network.rs b/testsuite/smoke-test/src/network.rs index 9891c8389021a..9cc1f94efcc3f 100644 --- a/testsuite/smoke-test/src/network.rs +++ b/testsuite/smoke-test/src/network.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::smoke_test_environment::new_local_swarm; diff --git a/testsuite/smoke-test/src/nft_transaction.rs b/testsuite/smoke-test/src/nft_transaction.rs index 8a342bc3489df..153c35b89da19 100644 --- a/testsuite/smoke-test/src/nft_transaction.rs +++ b/testsuite/smoke-test/src/nft_transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_rest_client::Client as RestClient; diff --git a/testsuite/smoke-test/src/operational_tooling.rs b/testsuite/smoke-test/src/operational_tooling.rs index 5651034639fcc..d3431d5d1efae 100644 --- a/testsuite/smoke-test/src/operational_tooling.rs +++ b/testsuite/smoke-test/src/operational_tooling.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/rest_api.rs b/testsuite/smoke-test/src/rest_api.rs index 11b4b71f30a96..614bf1e62e215 100644 --- a/testsuite/smoke-test/src/rest_api.rs +++ b/testsuite/smoke-test/src/rest_api.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_rest_client::Client; diff --git a/testsuite/smoke-test/src/scripts_and_modules.rs b/testsuite/smoke-test/src/scripts_and_modules.rs index 181096ec485fb..ddd2a34e8c2e6 100644 --- a/testsuite/smoke-test/src/scripts_and_modules.rs +++ b/testsuite/smoke-test/src/scripts_and_modules.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{bail, format_err}; diff --git a/testsuite/smoke-test/src/smoke_test_environment.rs b/testsuite/smoke-test/src/smoke_test_environment.rs index 8c4e7bd470414..70ee6f24b736a 100644 --- a/testsuite/smoke-test/src/smoke_test_environment.rs +++ b/testsuite/smoke-test/src/smoke_test_environment.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use forge::{LocalFactory, LocalSwarm}; diff --git a/testsuite/smoke-test/src/state_sync.rs b/testsuite/smoke-test/src/state_sync.rs index 077bc49faed3e..abe8ce26a37cb 100644 --- a/testsuite/smoke-test/src/state_sync.rs +++ b/testsuite/smoke-test/src/state_sync.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/state_sync_v2.rs b/testsuite/smoke-test/src/state_sync_v2.rs index 0534e6790d327..77d61e296999a 100644 --- a/testsuite/smoke-test/src/state_sync_v2.rs +++ b/testsuite/smoke-test/src/state_sync_v2.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/storage.rs b/testsuite/smoke-test/src/storage.rs index 32824d28c8eb9..42fa30233aa77 100644 --- a/testsuite/smoke-test/src/storage.rs +++ b/testsuite/smoke-test/src/storage.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/testsuite/smoke-test/src/test_utils.rs b/testsuite/smoke-test/src/test_utils.rs index a34f46a4afeec..a90a8be862b93 100644 --- a/testsuite/smoke-test/src/test_utils.rs +++ b/testsuite/smoke-test/src/test_utils.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_config::config::{Identity, NodeConfig, SecureBackend}; diff --git a/testsuite/smoke-test/src/transaction.rs b/testsuite/smoke-test/src/transaction.rs index 338a2997db9f2..000981f4dac3d 100644 --- a/testsuite/smoke-test/src/transaction.rs +++ b/testsuite/smoke-test/src/transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::bail; diff --git a/testsuite/smoke-test/src/workspace_builder.rs b/testsuite/smoke-test/src/workspace_builder.rs index b0495d6762cbb..f2a7c3bd74703 100644 --- a/testsuite/smoke-test/src/workspace_builder.rs +++ b/testsuite/smoke-test/src/workspace_builder.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! DO NOT USE OUTSIDE OF SMOKE_TEST CRATE diff --git a/testsuite/smoke-test/tests/forge-aptos.rs b/testsuite/smoke-test/tests/forge-aptos.rs index 8367ba6b5b11c..601f4fb0ab0ab 100644 --- a/testsuite/smoke-test/tests/forge-aptos.rs +++ b/testsuite/smoke-test/tests/forge-aptos.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use forge::{forge_main, ForgeConfig, LocalFactory, Options, Result}; diff --git a/testsuite/smoke-test/tests/forge-nft.rs b/testsuite/smoke-test/tests/forge-nft.rs index e34516533296e..7f4bab662310d 100644 --- a/testsuite/smoke-test/tests/forge-nft.rs +++ b/testsuite/smoke-test/tests/forge-nft.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use forge::{forge_main, ForgeConfig, LocalFactory, Options, Result}; diff --git a/testsuite/smoke-test/tests/forge.rs b/testsuite/smoke-test/tests/forge.rs index 55da063d0c485..3fdfc3ad8407e 100644 --- a/testsuite/smoke-test/tests/forge.rs +++ b/testsuite/smoke-test/tests/forge.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use forge::{forge_main, ForgeConfig, LocalFactory, Options, Result}; diff --git a/testsuite/testcases/src/compatibility_test.rs b/testsuite/testcases/src/compatibility_test.rs index a85d873afed5b..2014a52b75c2c 100644 --- a/testsuite/testcases/src/compatibility_test.rs +++ b/testsuite/testcases/src/compatibility_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{batch_update, generate_traffic}; diff --git a/testsuite/testcases/src/fixed_tps_test.rs b/testsuite/testcases/src/fixed_tps_test.rs index 539c3c4be1fae..fea1bce12f734 100644 --- a/testsuite/testcases/src/fixed_tps_test.rs +++ b/testsuite/testcases/src/fixed_tps_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::generate_traffic; diff --git a/testsuite/testcases/src/gas_price_test.rs b/testsuite/testcases/src/gas_price_test.rs index ab012d92a3563..413adceceae17 100644 --- a/testsuite/testcases/src/gas_price_test.rs +++ b/testsuite/testcases/src/gas_price_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::generate_traffic; diff --git a/testsuite/testcases/src/lib.rs b/testsuite/testcases/src/lib.rs index 1ba8402ab596b..f113b4c0b11f4 100644 --- a/testsuite/testcases/src/lib.rs +++ b/testsuite/testcases/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod compatibility_test; diff --git a/testsuite/testcases/src/partial_nodes_down_test.rs b/testsuite/testcases/src/partial_nodes_down_test.rs index 1a682672571b7..528f205fd1615 100644 --- a/testsuite/testcases/src/partial_nodes_down_test.rs +++ b/testsuite/testcases/src/partial_nodes_down_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::generate_traffic; diff --git a/testsuite/testcases/src/performance_test.rs b/testsuite/testcases/src/performance_test.rs index 3009d19e399df..666b722ad8073 100644 --- a/testsuite/testcases/src/performance_test.rs +++ b/testsuite/testcases/src/performance_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::generate_traffic; diff --git a/testsuite/testcases/src/reconfiguration_test.rs b/testsuite/testcases/src/reconfiguration_test.rs index 2ff732bd28161..f24b9c7a75279 100644 --- a/testsuite/testcases/src/reconfiguration_test.rs +++ b/testsuite/testcases/src/reconfiguration_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::ensure; diff --git a/testsuite/testcases/src/state_sync_performance.rs b/testsuite/testcases/src/state_sync_performance.rs index b8c2271882c8d..dcda5e870ee75 100644 --- a/testsuite/testcases/src/state_sync_performance.rs +++ b/testsuite/testcases/src/state_sync_performance.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::generate_traffic; diff --git a/testsuite/testcases/tests/forge-local-compatibility.rs b/testsuite/testcases/tests/forge-local-compatibility.rs index 56033ff76b9ce..9adbbd0f6ad96 100644 --- a/testsuite/testcases/tests/forge-local-compatibility.rs +++ b/testsuite/testcases/tests/forge-local-compatibility.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use forge::{forge_main, ForgeConfig, InitialVersion, LocalFactory, Options, Result}; diff --git a/testsuite/testcases/tests/forge-local-performance.rs b/testsuite/testcases/tests/forge-local-performance.rs index d6e062a7f6a25..56e914aa45d85 100644 --- a/testsuite/testcases/tests/forge-local-performance.rs +++ b/testsuite/testcases/tests/forge-local-performance.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use forge::{forge_main, ForgeConfig, InitialVersion, LocalFactory, Options, Result}; diff --git a/types/src/access_path.rs b/types/src/access_path.rs index 5ddc14644c6f6..292e9361f3082 100644 --- a/types/src/access_path.rs +++ b/types/src/access_path.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Suppose we have the following data structure in a smart contract: diff --git a/types/src/account_address.rs b/types/src/account_address.rs index ad137abe54a92..533a753d4e85e 100644 --- a/types/src/account_address.rs +++ b/types/src/account_address.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::transaction::authenticator::AuthenticationKey; use aptos_crypto::{ diff --git a/types/src/account_config/constants/account.rs b/types/src/account_config/constants/account.rs index eb8dea1e7eb46..cd9dc62164c69 100644 --- a/types/src/account_config/constants/account.rs +++ b/types/src/account_config/constants/account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub use move_core_types::vm_status::known_locations::{ diff --git a/types/src/account_config/constants/addresses.rs b/types/src/account_config/constants/addresses.rs index 79e86f87e2524..fb3f763a41b0d 100644 --- a/types/src/account_config/constants/addresses.rs +++ b/types/src/account_config/constants/addresses.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_address::AccountAddress; diff --git a/types/src/account_config/constants/coins.rs b/types/src/account_config/constants/coins.rs index 36c07dd18aed1..7f917ffad294c 100644 --- a/types/src/account_config/constants/coins.rs +++ b/types/src/account_config/constants/coins.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::constants::{from_currency_code_string, CORE_CODE_ADDRESS}; diff --git a/types/src/account_config/constants/designated_dealer.rs b/types/src/account_config/constants/designated_dealer.rs index 46d01b070e4ab..7f0a80383da78 100644 --- a/types/src/account_config/constants/designated_dealer.rs +++ b/types/src/account_config/constants/designated_dealer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub use move_core_types::vm_status::known_locations::{ diff --git a/types/src/account_config/constants/diem.rs b/types/src/account_config/constants/diem.rs index 4ee51afade4ff..d983e2506ba12 100644 --- a/types/src/account_config/constants/diem.rs +++ b/types/src/account_config/constants/diem.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::constants::CORE_CODE_ADDRESS; diff --git a/types/src/account_config/constants/event.rs b/types/src/account_config/constants/event.rs index ad465057e462d..94ec42ce1988e 100644 --- a/types/src/account_config/constants/event.rs +++ b/types/src/account_config/constants/event.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::constants::CORE_CODE_ADDRESS; diff --git a/types/src/account_config/constants/mod.rs b/types/src/account_config/constants/mod.rs index ba04e445a2df3..4b6c732e16cbc 100644 --- a/types/src/account_config/constants/mod.rs +++ b/types/src/account_config/constants/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod account; diff --git a/types/src/account_config/events/admin_transaction.rs b/types/src/account_config/events/admin_transaction.rs index 9dfc6c1cf20df..dff5ae13ab494 100644 --- a/types/src/account_config/events/admin_transaction.rs +++ b/types/src/account_config/events/admin_transaction.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::DIEM_ACCOUNT_MODULE_IDENTIFIER; diff --git a/types/src/account_config/events/base_url_rotation.rs b/types/src/account_config/events/base_url_rotation.rs index db4e0783987a0..a6b2702671f67 100644 --- a/types/src/account_config/events/base_url_rotation.rs +++ b/types/src/account_config/events/base_url_rotation.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/types/src/account_config/events/burn.rs b/types/src/account_config/events/burn.rs index ffcf537f9b4e3..c11b239a650eb 100644 --- a/types/src/account_config/events/burn.rs +++ b/types/src/account_config/events/burn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, account_config::DIEM_MODULE_IDENTIFIER}; diff --git a/types/src/account_config/events/cancel_burn.rs b/types/src/account_config/events/cancel_burn.rs index c1cc809d3848f..e58c4ae2ef19f 100644 --- a/types/src/account_config/events/cancel_burn.rs +++ b/types/src/account_config/events/cancel_burn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, account_config::DIEM_MODULE_IDENTIFIER}; diff --git a/types/src/account_config/events/compliance_key_rotation.rs b/types/src/account_config/events/compliance_key_rotation.rs index 2debc2be43477..c81674bbb4894 100644 --- a/types/src/account_config/events/compliance_key_rotation.rs +++ b/types/src/account_config/events/compliance_key_rotation.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/types/src/account_config/events/create_account.rs b/types/src/account_config/events/create_account.rs index 945d528e09e85..b94c8b925b2aa 100644 --- a/types/src/account_config/events/create_account.rs +++ b/types/src/account_config/events/create_account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/events/exchange_rate_update.rs b/types/src/account_config/events/exchange_rate_update.rs index 756e264ca4cc1..978b360171a78 100644 --- a/types/src/account_config/events/exchange_rate_update.rs +++ b/types/src/account_config/events/exchange_rate_update.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::DIEM_MODULE_IDENTIFIER; diff --git a/types/src/account_config/events/force_shift.rs b/types/src/account_config/events/force_shift.rs index 8bf542ddafb0a..ae1c7ed2e9098 100644 --- a/types/src/account_config/events/force_shift.rs +++ b/types/src/account_config/events/force_shift.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result; diff --git a/types/src/account_config/events/mint.rs b/types/src/account_config/events/mint.rs index 66c5f8ceaf71d..51a1def529ccf 100644 --- a/types/src/account_config/events/mint.rs +++ b/types/src/account_config/events/mint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::DIEM_MODULE_IDENTIFIER; diff --git a/types/src/account_config/events/mod.rs b/types/src/account_config/events/mod.rs index 9ee66d047e568..783bb50ff5f8d 100644 --- a/types/src/account_config/events/mod.rs +++ b/types/src/account_config/events/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod admin_transaction; diff --git a/types/src/account_config/events/new_block.rs b/types/src/account_config/events/new_block.rs index e46247c8751ad..f49f2ce6b8351 100644 --- a/types/src/account_config/events/new_block.rs +++ b/types/src/account_config/events/new_block.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_address::AccountAddress; diff --git a/types/src/account_config/events/new_epoch.rs b/types/src/account_config/events/new_epoch.rs index 9d35550858d69..2d5f83b5b5ad2 100644 --- a/types/src/account_config/events/new_epoch.rs +++ b/types/src/account_config/events/new_epoch.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::event::EventKey; diff --git a/types/src/account_config/events/preburn.rs b/types/src/account_config/events/preburn.rs index 993dcaf84353c..c8e756ed4889c 100644 --- a/types/src/account_config/events/preburn.rs +++ b/types/src/account_config/events/preburn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, account_config::DIEM_MODULE_IDENTIFIER}; diff --git a/types/src/account_config/events/received_mint.rs b/types/src/account_config/events/received_mint.rs index 00fff315489e8..9e8c8c90f78a4 100644 --- a/types/src/account_config/events/received_mint.rs +++ b/types/src/account_config/events/received_mint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, account_config::DESIGNATED_DEALER_MODULE_IDENTIFIER}; diff --git a/types/src/account_config/events/received_payment.rs b/types/src/account_config/events/received_payment.rs index e5d1743765cac..4085c0f0a190b 100644 --- a/types/src/account_config/events/received_payment.rs +++ b/types/src/account_config/events/received_payment.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/events/sent_payment.rs b/types/src/account_config/events/sent_payment.rs index 65c9c5ae9c97a..6722b96a5def9 100644 --- a/types/src/account_config/events/sent_payment.rs +++ b/types/src/account_config/events/sent_payment.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/mod.rs b/types/src/account_config/mod.rs index a60cd2a221086..815ec8835ba6c 100644 --- a/types/src/account_config/mod.rs +++ b/types/src/account_config/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod constants; diff --git a/types/src/account_config/resources/account.rs b/types/src/account_config/resources/account.rs index 98356058a4a6c..7b07b61ae0ad0 100644 --- a/types/src/account_config/resources/account.rs +++ b/types/src/account_config/resources/account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/balance.rs b/types/src/account_config/resources/balance.rs index 115d71292f863..88b3cf99c6958 100644 --- a/types/src/account_config/resources/balance.rs +++ b/types/src/account_config/resources/balance.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/chain_account_info.rs b/types/src/account_config/resources/chain_account_info.rs index 95e667680a62b..40b48950bf5c4 100644 --- a/types/src/account_config/resources/chain_account_info.rs +++ b/types/src/account_config/resources/chain_account_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::constants::{ diff --git a/types/src/account_config/resources/chain_id.rs b/types/src/account_config/resources/chain_id.rs index 7327b93810405..a574d0096ed0d 100644 --- a/types/src/account_config/resources/chain_id.rs +++ b/types/src/account_config/resources/chain_id.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::chain_id::ChainId; diff --git a/types/src/account_config/resources/core_account.rs b/types/src/account_config/resources/core_account.rs index 1a37bb63f795e..37dfd43edbe91 100644 --- a/types/src/account_config/resources/core_account.rs +++ b/types/src/account_config/resources/core_account.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::constants::CORE_ACCOUNT_MODULE_IDENTIFIER; diff --git a/types/src/account_config/resources/crsn.rs b/types/src/account_config/resources/crsn.rs index 9175391749d9e..38b679942de0b 100644 --- a/types/src/account_config/resources/crsn.rs +++ b/types/src/account_config/resources/crsn.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_core_types::{ diff --git a/types/src/account_config/resources/currency_info.rs b/types/src/account_config/resources/currency_info.rs index 1d436c2dfc628..83b3dfbc4b316 100644 --- a/types/src/account_config/resources/currency_info.rs +++ b/types/src/account_config/resources/currency_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/designated_dealer.rs b/types/src/account_config/resources/designated_dealer.rs index 553c92c490e6c..71a0c30790fb8 100644 --- a/types/src/account_config/resources/designated_dealer.rs +++ b/types/src/account_config/resources/designated_dealer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/dual_attestation.rs b/types/src/account_config/resources/dual_attestation.rs index 47f612c1d655d..0dcfaa4ad8060 100644 --- a/types/src/account_config/resources/dual_attestation.rs +++ b/types/src/account_config/resources/dual_attestation.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{event::EventHandle, on_chain_config::OnChainConfig}; diff --git a/types/src/account_config/resources/freezing_bit.rs b/types/src/account_config/resources/freezing_bit.rs index 3d5d4f4b21a80..ed0923c256ddc 100644 --- a/types/src/account_config/resources/freezing_bit.rs +++ b/types/src/account_config/resources/freezing_bit.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_core_types::{ diff --git a/types/src/account_config/resources/key_rotation_capability.rs b/types/src/account_config/resources/key_rotation_capability.rs index d276bef9455dd..e294ec1ae9c05 100644 --- a/types/src/account_config/resources/key_rotation_capability.rs +++ b/types/src/account_config/resources/key_rotation_capability.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/mod.rs b/types/src/account_config/resources/mod.rs index 9a2e8a9ae9df8..255a5ce45eedd 100644 --- a/types/src/account_config/resources/mod.rs +++ b/types/src/account_config/resources/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod account; diff --git a/types/src/account_config/resources/preburn_balance.rs b/types/src/account_config/resources/preburn_balance.rs index f02bc1f1edc38..24246145640fe 100644 --- a/types/src/account_config/resources/preburn_balance.rs +++ b/types/src/account_config/resources/preburn_balance.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/preburn_queue.rs b/types/src/account_config/resources/preburn_queue.rs index 6015e3953bb6e..40bae067d70c4 100644 --- a/types/src/account_config/resources/preburn_queue.rs +++ b/types/src/account_config/resources/preburn_queue.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/preburn_with_metadata.rs b/types/src/account_config/resources/preburn_with_metadata.rs index eba620185b7d5..97c62795966c0 100644 --- a/types/src/account_config/resources/preburn_with_metadata.rs +++ b/types/src/account_config/resources/preburn_with_metadata.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/role.rs b/types/src/account_config/resources/role.rs index 558c979f80ae9..7eaf783def66e 100644 --- a/types/src/account_config/resources/role.rs +++ b/types/src/account_config/resources/role.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::resources::{ diff --git a/types/src/account_config/resources/vasp.rs b/types/src/account_config/resources/vasp.rs index c8ecf6fbcbfd0..3d995c6c13a6a 100644 --- a/types/src/account_config/resources/vasp.rs +++ b/types/src/account_config/resources/vasp.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_address::AccountAddress; diff --git a/types/src/account_config/resources/vasp_domain.rs b/types/src/account_config/resources/vasp_domain.rs index 4756c70718f8b..0033b590f446d 100644 --- a/types/src/account_config/resources/vasp_domain.rs +++ b/types/src/account_config/resources/vasp_domain.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_config/resources/withdraw_capability.rs b/types/src/account_config/resources/withdraw_capability.rs index efd26b1fcbe80..f9145366f68d8 100644 --- a/types/src/account_config/resources/withdraw_capability.rs +++ b/types/src/account_config/resources/withdraw_capability.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_state.rs b/types/src/account_state.rs index d7079143cc428..9922c2123ee49 100644 --- a/types/src/account_state.rs +++ b/types/src/account_state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/account_state_blob.rs b/types/src/account_state_blob.rs index eed645237c75b..6a4fa1a098f6f 100644 --- a/types/src/account_state_blob.rs +++ b/types/src/account_state_blob.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/block_info.rs b/types/src/block_info.rs index 677fc1b8ff7bd..6b14ad3666af1 100644 --- a/types/src/block_info.rs +++ b/types/src/block_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{epoch_state::EpochState, on_chain_config::ValidatorSet, transaction::Version}; diff --git a/types/src/block_metadata.rs b/types/src/block_metadata.rs index 83c680a05209f..e8336bbb1ba72 100644 --- a/types/src/block_metadata.rs +++ b/types/src/block_metadata.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/chain_id.rs b/types/src/chain_id.rs index 4f655108db51e..63d04a4f986a6 100644 --- a/types/src/chain_id.rs +++ b/types/src/chain_id.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::{ensure, format_err, Error, Result}; use serde::{de::Visitor, Deserialize, Deserializer, Serialize}; diff --git a/types/src/contract_event.rs b/types/src/contract_event.rs index 3f41b45a738f1..f8a3b0ebb52d8 100644 --- a/types/src/contract_event.rs +++ b/types/src/contract_event.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/diem_id_identifier.rs b/types/src/diem_id_identifier.rs index e16efa6608e5c..a061a5d991fdb 100644 --- a/types/src/diem_id_identifier.rs +++ b/types/src/diem_id_identifier.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file implements length and character set limited string types needed diff --git a/types/src/epoch_change.rs b/types/src/epoch_change.rs index 8b0aa652e4d55..ae2fe56307246 100644 --- a/types/src/epoch_change.rs +++ b/types/src/epoch_change.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/types/src/epoch_state.rs b/types/src/epoch_state.rs index f5b5e2f8cb378..3598f89172734 100644 --- a/types/src/epoch_state.rs +++ b/types/src/epoch_state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/event.rs b/types/src/event.rs index 986dd846a863c..54a119d5733be 100644 --- a/types/src/event.rs +++ b/types/src/event.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_address::AccountAddress; diff --git a/types/src/ledger_info.rs b/types/src/ledger_info.rs index 0a68027a7b7d4..ac9ff9d66cb87 100644 --- a/types/src/ledger_info.rs +++ b/types/src/ledger_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/lib.rs b/types/src/lib.rs index c75ec1d7d8274..20ee31306d577 100644 --- a/types/src/lib.rs +++ b/types/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/types/src/mempool_status.rs b/types/src/mempool_status.rs index ab3bd485032b5..62f43b96cea4c 100644 --- a/types/src/mempool_status.rs +++ b/types/src/mempool_status.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![allow(clippy::unit_arg)] diff --git a/types/src/move_resource.rs b/types/src/move_resource.rs index 2c2e8ed7191d7..40dd48b76fb99 100644 --- a/types/src/move_resource.rs +++ b/types/src/move_resource.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{access_path::AccessPath, on_chain_config::ConfigID, transaction::Version}; diff --git a/types/src/network_address/mod.rs b/types/src/network_address/mod.rs index de0ac20f85b49..bffd8c4311b86 100644 --- a/types/src/network_address/mod.rs +++ b/types/src/network_address/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use aptos_crypto::{ diff --git a/types/src/nft/mod.rs b/types/src/nft/mod.rs index e6f8cb665e7e9..34f980d2ff27e 100644 --- a/types/src/nft/mod.rs +++ b/types/src/nft/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod tokens; diff --git a/types/src/nft/tokens.rs b/types/src/nft/tokens.rs index 2881bf1389087..9ce310a39d32c 100644 --- a/types/src/nft/tokens.rs +++ b/types/src/nft/tokens.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_core_types::{ diff --git a/types/src/nibble/mod.rs b/types/src/nibble/mod.rs index c34c830ee6475..4ce5c451ba9bd 100644 --- a/types/src/nibble/mod.rs +++ b/types/src/nibble/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/types/src/nibble/nibble_path/mod.rs b/types/src/nibble/nibble_path/mod.rs index 7a910bddf59ce..17a94c7900604 100644 --- a/types/src/nibble/nibble_path/mod.rs +++ b/types/src/nibble/nibble_path/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! NibblePath library simplify operations with nibbles in a compact format for modified sparse diff --git a/types/src/nibble/nibble_path/nibble_path_test.rs b/types/src/nibble/nibble_path/nibble_path_test.rs index 961fc805e0e4e..be8e7ed7f584c 100644 --- a/types/src/nibble/nibble_path/nibble_path_test.rs +++ b/types/src/nibble/nibble_path/nibble_path_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::{arb_internal_nibble_path, skip_common_prefix, NibblePath}; diff --git a/types/src/on_chain_config/consensus_config.rs b/types/src/on_chain_config/consensus_config.rs index cca030b16af9a..ff76d4ca70a1c 100644 --- a/types/src/on_chain_config/consensus_config.rs +++ b/types/src/on_chain_config/consensus_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; diff --git a/types/src/on_chain_config/diem_version.rs b/types/src/on_chain_config/diem_version.rs index 545362e28a045..fc35cd23f8aad 100644 --- a/types/src/on_chain_config/diem_version.rs +++ b/types/src/on_chain_config/diem_version.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; diff --git a/types/src/on_chain_config/mod.rs b/types/src/on_chain_config/mod.rs index 29529cd805586..662eb1009bde4 100644 --- a/types/src/on_chain_config/mod.rs +++ b/types/src/on_chain_config/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/on_chain_config/parallel_execution_config.rs b/types/src/on_chain_config/parallel_execution_config.rs index e606f71025a0e..a8800997ffb15 100644 --- a/types/src/on_chain_config/parallel_execution_config.rs +++ b/types/src/on_chain_config/parallel_execution_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; diff --git a/types/src/on_chain_config/registered_currencies.rs b/types/src/on_chain_config/registered_currencies.rs index ee625c10cbe95..701b1d743049b 100644 --- a/types/src/on_chain_config/registered_currencies.rs +++ b/types/src/on_chain_config/registered_currencies.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; diff --git a/types/src/on_chain_config/validator_set.rs b/types/src/on_chain_config/validator_set.rs index 608bbb08dbfbe..ee44126e33185 100644 --- a/types/src/on_chain_config/validator_set.rs +++ b/types/src/on_chain_config/validator_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{on_chain_config::OnChainConfig, validator_info::ValidatorInfo}; diff --git a/types/src/on_chain_config/vm_config.rs b/types/src/on_chain_config/vm_config.rs index 135aae86431fd..dd7bec7096bbe 100644 --- a/types/src/on_chain_config/vm_config.rs +++ b/types/src/on_chain_config/vm_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; diff --git a/types/src/on_chain_config/vm_publishing_option.rs b/types/src/on_chain_config/vm_publishing_option.rs index fb48e3c365020..f37b230f6670d 100644 --- a/types/src/on_chain_config/vm_publishing_option.rs +++ b/types/src/on_chain_config/vm_publishing_option.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::OnChainConfig; diff --git a/types/src/proof/accumulator/accumulator_test.rs b/types/src/proof/accumulator/accumulator_test.rs index 1caf824264218..94442b192bb72 100644 --- a/types/src/proof/accumulator/accumulator_test.rs +++ b/types/src/proof/accumulator/accumulator_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use super::InMemoryAccumulator; diff --git a/types/src/proof/accumulator/mock.rs b/types/src/proof/accumulator/mock.rs index 81cd4c2de8341..675732a349660 100644 --- a/types/src/proof/accumulator/mock.rs +++ b/types/src/proof/accumulator/mock.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/proof/accumulator/mod.rs b/types/src/proof/accumulator/mod.rs index dc3cbcc578d4e..5de853988368b 100644 --- a/types/src/proof/accumulator/mod.rs +++ b/types/src/proof/accumulator/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module implements an in-memory Merkle Accumulator that is similar to what we use in diff --git a/types/src/proof/definition.rs b/types/src/proof/definition.rs index ebbd6f5dac92a..1ea12a910a6e3 100644 --- a/types/src/proof/definition.rs +++ b/types/src/proof/definition.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module has definition of various proofs. diff --git a/types/src/proof/mod.rs b/types/src/proof/mod.rs index 645b97a7b51b8..6867806163d73 100644 --- a/types/src/proof/mod.rs +++ b/types/src/proof/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod accumulator; diff --git a/types/src/proof/position/mod.rs b/types/src/proof/position/mod.rs index 4592120ac368b..14846c2c430b7 100644 --- a/types/src/proof/position/mod.rs +++ b/types/src/proof/position/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This module provides an abstraction for positioning a node in a binary tree, diff --git a/types/src/proof/position/position_test.rs b/types/src/proof/position/position_test.rs index 487d066a7706f..a8bf16517b981 100644 --- a/types/src/proof/position/position_test.rs +++ b/types/src/proof/position/position_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::proof::position::*; diff --git a/types/src/proof/proptest_proof.rs b/types/src/proof/proptest_proof.rs index 5e7fd80442290..14489ade9c916 100644 --- a/types/src/proof/proptest_proof.rs +++ b/types/src/proof/proptest_proof.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! All proofs generated in this module are not valid proofs. They are only for the purpose of diff --git a/types/src/proof/unit_tests/mod.rs b/types/src/proof/unit_tests/mod.rs index 0f2065ae672b0..dfd9b00813589 100644 --- a/types/src/proof/unit_tests/mod.rs +++ b/types/src/proof/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod proof_conversion_test; diff --git a/types/src/proof/unit_tests/proof_conversion_test.rs b/types/src/proof/unit_tests/proof_conversion_test.rs index 816f6418c7979..06c226537cfa4 100644 --- a/types/src/proof/unit_tests/proof_conversion_test.rs +++ b/types/src/proof/unit_tests/proof_conversion_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/proof/unit_tests/proof_test.rs b/types/src/proof/unit_tests/proof_test.rs index 2227ba869c1f7..2018eed657d6b 100644 --- a/types/src/proof/unit_tests/proof_test.rs +++ b/types/src/proof/unit_tests/proof_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/proptest_types.rs b/types/src/proptest_types.rs index 3a32723cf05d1..ff2b089f4f9ff 100644 --- a/types/src/proptest_types.rs +++ b/types/src/proptest_types.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/serde_helper/mod.rs b/types/src/serde_helper/mod.rs index 27c346c54232f..4ca69d6dd61d5 100644 --- a/types/src/serde_helper/mod.rs +++ b/types/src/serde_helper/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod vec_bytes; diff --git a/types/src/serde_helper/vec_bytes.rs b/types/src/serde_helper/vec_bytes.rs index 3f891270d8637..6e6847512abeb 100644 --- a/types/src/serde_helper/vec_bytes.rs +++ b/types/src/serde_helper/vec_bytes.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{ diff --git a/types/src/state_proof.rs b/types/src/state_proof.rs index 16c42bd299324..62efbbc1eea6f 100644 --- a/types/src/state_proof.rs +++ b/types/src/state_proof.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/test_helpers/mod.rs b/types/src/test_helpers/mod.rs index a8eed9d773449..f260d4e0b870a 100644 --- a/types/src/test_helpers/mod.rs +++ b/types/src/test_helpers/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod transaction_test_helpers; diff --git a/types/src/test_helpers/transaction_test_helpers.rs b/types/src/test_helpers/transaction_test_helpers.rs index 77fade3256b34..ace63713013a7 100644 --- a/types/src/test_helpers/transaction_test_helpers.rs +++ b/types/src/test_helpers/transaction_test_helpers.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/timestamp.rs b/types/src/timestamp.rs index 40c526bd0c849..789e166d35ac0 100644 --- a/types/src/timestamp.rs +++ b/types/src/timestamp.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use move_core_types::{ diff --git a/types/src/transaction/authenticator.rs b/types/src/transaction/authenticator.rs index f07a59449e988..b7c5a80eb2f82 100644 --- a/types/src/transaction/authenticator.rs +++ b/types/src/transaction/authenticator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/transaction/change_set.rs b/types/src/transaction/change_set.rs index 5d14a00009b5f..fcf03460a9dfc 100644 --- a/types/src/transaction/change_set.rs +++ b/types/src/transaction/change_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{contract_event::ContractEvent, write_set::WriteSet}; diff --git a/types/src/transaction/helpers.rs b/types/src/transaction/helpers.rs index 0d0db49ffebf7..14dd01b5846d8 100644 --- a/types/src/transaction/helpers.rs +++ b/types/src/transaction/helpers.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/transaction/metadata.rs b/types/src/transaction/metadata.rs index 3af9d1a054905..2ceb1b52bfcd9 100644 --- a/types/src/transaction/metadata.rs +++ b/types/src/transaction/metadata.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! This file implements Diem transaction metadata types to allow diff --git a/types/src/transaction/mod.rs b/types/src/transaction/mod.rs index 74eb53de9228c..55c03726bf646 100644 --- a/types/src/transaction/mod.rs +++ b/types/src/transaction/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/transaction/module.rs b/types/src/transaction/module.rs index ee390aae162b9..bc2e79301e033 100644 --- a/types/src/transaction/module.rs +++ b/types/src/transaction/module.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use serde::{Deserialize, Serialize}; diff --git a/types/src/transaction/script.rs b/types/src/transaction/script.rs index 837fd371705d5..140d4b5120da9 100644 --- a/types/src/transaction/script.rs +++ b/types/src/transaction/script.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{serde_helper::vec_bytes, transaction::transaction_argument::TransactionArgument}; diff --git a/types/src/transaction/transaction_argument.rs b/types/src/transaction/transaction_argument.rs index 4e51dcec9b63b..bf67ffac9a38e 100644 --- a/types/src/transaction/transaction_argument.rs +++ b/types/src/transaction/transaction_argument.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub use move_core_types::{ diff --git a/types/src/trusted_state.rs b/types/src/trusted_state.rs index bff7ebd25e699..d668f39cf6cbc 100644 --- a/types/src/trusted_state.rs +++ b/types/src/trusted_state.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/unit_tests/access_path_test.rs b/types/src/unit_tests/access_path_test.rs index d06a0bfff0840..2076e02d013df 100644 --- a/types/src/unit_tests/access_path_test.rs +++ b/types/src/unit_tests/access_path_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{access_path::AccessPath, account_address::AccountAddress}; diff --git a/types/src/unit_tests/block_metadata_test.rs b/types/src/unit_tests/block_metadata_test.rs index 72abfa8d7f4ea..77e0025579655 100644 --- a/types/src/unit_tests/block_metadata_test.rs +++ b/types/src/unit_tests/block_metadata_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::block_metadata::BlockMetadata; diff --git a/types/src/unit_tests/canonical_serialization_examples.rs b/types/src/unit_tests/canonical_serialization_examples.rs index 238c8d0dd53b2..c044f666d5762 100644 --- a/types/src/unit_tests/canonical_serialization_examples.rs +++ b/types/src/unit_tests/canonical_serialization_examples.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! These tests verify the behavior of BCS against some known test vectors with various types. diff --git a/types/src/unit_tests/code_debug_fmt_test.rs b/types/src/unit_tests/code_debug_fmt_test.rs index 539a8e5a15d0e..9e223ea57ff16 100644 --- a/types/src/unit_tests/code_debug_fmt_test.rs +++ b/types/src/unit_tests/code_debug_fmt_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::transaction::Script; diff --git a/types/src/unit_tests/contract_event_test.rs b/types/src/unit_tests/contract_event_test.rs index 576cbc1ca51ca..f9cba5c0c9cb8 100644 --- a/types/src/unit_tests/contract_event_test.rs +++ b/types/src/unit_tests/contract_event_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/unit_tests/currency_code_test.rs b/types/src/unit_tests/currency_code_test.rs index 676b7a2a1cd03..339e5cf0d32f5 100644 --- a/types/src/unit_tests/currency_code_test.rs +++ b/types/src/unit_tests/currency_code_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_config::allowed_currency_code_string; diff --git a/types/src/unit_tests/mod.rs b/types/src/unit_tests/mod.rs index e2a31940d69f0..32e844c605844 100644 --- a/types/src/unit_tests/mod.rs +++ b/types/src/unit_tests/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 mod access_path_test; diff --git a/types/src/unit_tests/transaction_test.rs b/types/src/unit_tests/transaction_test.rs index 10ee93faae6c9..1f8117030a5d5 100644 --- a/types/src/unit_tests/transaction_test.rs +++ b/types/src/unit_tests/transaction_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/unit_tests/trusted_state_test.rs b/types/src/unit_tests/trusted_state_test.rs index d43da61d02401..d9d18abfa1e7e 100644 --- a/types/src/unit_tests/trusted_state_test.rs +++ b/types/src/unit_tests/trusted_state_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/unit_tests/validator_set_test.rs b/types/src/unit_tests/validator_set_test.rs index 0fd8d31cb79ba..1e06fed5a1739 100644 --- a/types/src/unit_tests/validator_set_test.rs +++ b/types/src/unit_tests/validator_set_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::on_chain_config::ValidatorSet; diff --git a/types/src/unit_tests/write_set_test.rs b/types/src/unit_tests/write_set_test.rs index 728cefc38ec6b..5ae343aeee9ad 100644 --- a/types/src/unit_tests/write_set_test.rs +++ b/types/src/unit_tests/write_set_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::write_set::WriteSet; diff --git a/types/src/validator_config.rs b/types/src/validator_config.rs index 4b1f4b2cd9591..9ee4a9e498dbb 100644 --- a/types/src/validator_config.rs +++ b/types/src/validator_config.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, network_address::NetworkAddress}; diff --git a/types/src/validator_info.rs b/types/src/validator_info.rs index e6113dd132cf9..0eeb21b24eb6f 100644 --- a/types/src/validator_info.rs +++ b/types/src/validator_info.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #[cfg(any(test, feature = "fuzzing"))] diff --git a/types/src/validator_signer.rs b/types/src/validator_signer.rs index 984c44c36f2ef..70d48cdcac3e6 100644 --- a/types/src/validator_signer.rs +++ b/types/src/validator_signer.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::account_address::AccountAddress; diff --git a/types/src/validator_verifier.rs b/types/src/validator_verifier.rs index ea73a17be45bf..4cdec84aafb86 100644 --- a/types/src/validator_verifier.rs +++ b/types/src/validator_verifier.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{account_address::AccountAddress, on_chain_config::ValidatorSet}; diff --git a/types/src/vm_status.rs b/types/src/vm_status.rs index de6ef030cfcfb..d6c8343434b01 100644 --- a/types/src/vm_status.rs +++ b/types/src/vm_status.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub use move_core_types::vm_status::{ known_locations, sub_status, AbortLocation, DiscardedVMStatus, KeptVMStatus, StatusCode, diff --git a/types/src/waypoint.rs b/types/src/waypoint.rs index 9192d3a7ce8eb..7f3ef08ea7461 100644 --- a/types/src/waypoint.rs +++ b/types/src/waypoint.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ diff --git a/types/src/write_set.rs b/types/src/write_set.rs index 8be0fbe5dda81..bb457af3b3f82 100644 --- a/types/src/write_set.rs +++ b/types/src/write_set.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! For each transaction the VM executes, the VM will output a `WriteSet` that contains each access diff --git a/vm-validator/src/lib.rs b/vm-validator/src/lib.rs index d042f44cdfbfc..46555ebcb7d08 100644 --- a/vm-validator/src/lib.rs +++ b/vm-validator/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] diff --git a/vm-validator/src/mocks/mock_vm_validator.rs b/vm-validator/src/mocks/mock_vm_validator.rs index 663d2e9a178ac..ec4efc6a39599 100644 --- a/vm-validator/src/mocks/mock_vm_validator.rs +++ b/vm-validator/src/mocks/mock_vm_validator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::vm_validator::TransactionValidation; diff --git a/vm-validator/src/mocks/mod.rs b/vm-validator/src/mocks/mod.rs index e8793657262f2..d10d297a30d4e 100644 --- a/vm-validator/src/mocks/mod.rs +++ b/vm-validator/src/mocks/mod.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 pub mod mock_vm_validator; diff --git a/vm-validator/src/unit_tests/vm_validator_test.rs b/vm-validator/src/unit_tests/vm_validator_test.rs index b841b4a6b8ac6..28727e2322f14 100644 --- a/vm-validator/src/unit_tests/vm_validator_test.rs +++ b/vm-validator/src/unit_tests/vm_validator_test.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::vm_validator::{TransactionValidation, VMValidator}; diff --git a/vm-validator/src/vm_validator.rs b/vm-validator/src/vm_validator.rs index ba31ca07ebf3b..f1964907757e2 100644 --- a/vm-validator/src/vm_validator.rs +++ b/vm-validator/src/vm_validator.rs @@ -1,4 +1,4 @@ -// Copyright (c) The Aptos Foundation +// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use anyhow::Result;