From 87390f8ee46eb56f9c4ae8833eab2a1b367c5b06 Mon Sep 17 00:00:00 2001 From: Yashvardhan Nevatia Date: Thu, 26 Mar 2026 11:16:43 +0000 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"Remove=20aptos=20(moved=20t?= =?UTF-8?q?o=20capabilities-development=20branch)=20(#316=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ad04ed6d891e0349a00c8e96920e95f5d5adf39f. --- .../blockchain/aptos/v1alpha/client.proto | 192 ----------------- cre/go/installer/pkg/embedded_gen.go | 198 ------------------ 2 files changed, 390 deletions(-) delete mode 100644 cre/capabilities/blockchain/aptos/v1alpha/client.proto diff --git a/cre/capabilities/blockchain/aptos/v1alpha/client.proto b/cre/capabilities/blockchain/aptos/v1alpha/client.proto deleted file mode 100644 index 4eab040e..00000000 --- a/cre/capabilities/blockchain/aptos/v1alpha/client.proto +++ /dev/null @@ -1,192 +0,0 @@ -syntax = "proto3"; -package capabilities.blockchain.aptos.v1alpha; - -import "sdk/v1alpha/sdk.proto"; -import "tools/generator/v1alpha/cre_metadata.proto"; - -// Transaction execution status returned by the forwarder. -enum TxStatus { - TX_STATUS_FATAL = 0; // unrecoverable failure - TX_STATUS_ABORTED = 1; // not executed / dropped - TX_STATUS_SUCCESS = 2; // executed successfully -} - -// ========== AccountAPTBalance ========== - -message AccountAPTBalanceRequest { - bytes address = 1; // 32-byte address -} - -message AccountAPTBalanceReply { - uint64 value = 1; -} - -// ========== View ========== - -message ViewRequest { - ViewPayload payload = 1; - optional uint64 ledger_version = 2; // nil means use latest ledger version -} - -message ViewReply { - bytes data = 1; -} - -message ViewPayload { - ModuleID module = 1; - string function = 2; - repeated TypeTag arg_types = 3; - repeated bytes args = 4; -} - -message ModuleID { - bytes address = 1; // 32-byte address - string name = 2; -} - -message TypeTag { - TypeTagKind kind = 1; - oneof value { - VectorTag vector = 2; - StructTag struct = 3; - GenericTag generic = 4; - } -} - -enum TypeTagKind { - TYPE_TAG_KIND_BOOL = 0; - TYPE_TAG_KIND_U8 = 1; - TYPE_TAG_KIND_U16 = 2; - TYPE_TAG_KIND_U32 = 3; - TYPE_TAG_KIND_U64 = 4; - TYPE_TAG_KIND_U128 = 5; - TYPE_TAG_KIND_U256 = 6; - TYPE_TAG_KIND_ADDRESS = 7; - TYPE_TAG_KIND_SIGNER = 8; - TYPE_TAG_KIND_VECTOR = 9; - TYPE_TAG_KIND_STRUCT = 10; - TYPE_TAG_KIND_GENERIC = 11; -} - -message VectorTag { - TypeTag element_type = 1; -} - -message StructTag { - bytes address = 1; // 32-byte address - string module = 2; - string name = 3; - repeated TypeTag type_params = 4; -} - -message GenericTag { - uint32 index = 1; -} - -// ========== TransactionByHash ========== - -message TransactionByHashRequest { - string hash = 1; // Transaction hash (hex string with 0x prefix) -} - -message TransactionByHashReply { - optional Transaction transaction = 1; -} - -enum TransactionVariant { - TRANSACTION_VARIANT_PENDING = 0; - TRANSACTION_VARIANT_USER = 1; - TRANSACTION_VARIANT_GENESIS = 2; - TRANSACTION_VARIANT_BLOCK_METADATA = 3; - TRANSACTION_VARIANT_BLOCK_EPILOGUE = 4; - TRANSACTION_VARIANT_STATE_CHECKPOINT = 5; - TRANSACTION_VARIANT_VALIDATOR = 6; - TRANSACTION_VARIANT_UNKNOWN = 7; -} - -message Transaction { - TransactionVariant type = 1; - string hash = 2; - optional uint64 version = 3; // nil for pending transactions - optional bool success = 4; // nil for pending/genesis transactions - bytes data = 5; // Raw transaction data -} - -// ========== AccountTransactions ========== - -message AccountTransactionsRequest { - bytes address = 1; // 32-byte address - optional uint64 start = 2; // Starting version number; nil for most recent - optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) -} - -message AccountTransactionsReply { - repeated Transaction transactions = 1; -} - -// ========== SubmitTransaction ========== - -message SubmitTransactionRequest { - ModuleID receiver_module_id = 1; - bytes encoded_payload = 2; - optional GasConfig gas_config = 3; -} - -message SubmitTransactionReply { - TxStatus tx_status = 1; - string tx_hash = 2; - string tx_idempotency_key = 3; -} - -message GasConfig { - uint64 max_gas_amount = 1; // Maximum gas units willing to pay - uint64 gas_unit_price = 2; // Price per gas unit in octas -} - -// ========== WriteReport ========== - -message WriteReportRequest { - bytes receiver = 1; // 32-byte Aptos account address of the receiver module - optional GasConfig gas_config = 2; // optional gas configuration - sdk.v1alpha.ReportResponse report = 3; // signed report from consensus -} - -message WriteReportReply { - TxStatus tx_status = 1; - optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) - optional uint64 transaction_fee = 3; // gas used in octas - optional string error_message = 4; -} - -// ========== Service ========== - -service Client { - option (tools.generator.v1alpha.capability) = { - mode: MODE_DON - capability_id: "aptos@1.0.0" - labels: { - // from https://github.com/smartcontractkit/chain-selectors/blob/main/selectors_aptos.yml - key: "ChainSelector" - value: { - uint64_label: { - defaults: [ - { - key: "aptos-mainnet" - value: 4741433654826277614 - }, - { - key: "aptos-testnet" - value: 743186221051783445 - } - ] - } - } - } - }; - - rpc AccountAPTBalance(AccountAPTBalanceRequest) returns (AccountAPTBalanceReply); - rpc View(ViewRequest) returns (ViewReply); - rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashReply); - rpc AccountTransactions(AccountTransactionsRequest) returns (AccountTransactionsReply); - rpc WriteReport(WriteReportRequest) returns (WriteReportReply); -} diff --git a/cre/go/installer/pkg/embedded_gen.go b/cre/go/installer/pkg/embedded_gen.go index f0d3f502..c52246cd 100755 --- a/cre/go/installer/pkg/embedded_gen.go +++ b/cre/go/installer/pkg/embedded_gen.go @@ -1,200 +1,6 @@ // Code generated by github.com/smartcontractkit/chainlink-protos/cre/go/installer/bootstrap. DO NOT EDIT.\n") package pkg -const blockchainAptosV1alphaClientEmbedded = `syntax = "proto3"; -package capabilities.blockchain.aptos.v1alpha; - -import "sdk/v1alpha/sdk.proto"; -import "tools/generator/v1alpha/cre_metadata.proto"; - -// Transaction execution status returned by the forwarder. -enum TxStatus { - TX_STATUS_FATAL = 0; // unrecoverable failure - TX_STATUS_ABORTED = 1; // not executed / dropped - TX_STATUS_SUCCESS = 2; // executed successfully -} - -// ========== AccountAPTBalance ========== - -message AccountAPTBalanceRequest { - bytes address = 1; // 32-byte address -} - -message AccountAPTBalanceReply { - uint64 value = 1; -} - -// ========== View ========== - -message ViewRequest { - ViewPayload payload = 1; - optional uint64 ledger_version = 2; // nil means use latest ledger version -} - -message ViewReply { - bytes data = 1; -} - -message ViewPayload { - ModuleID module = 1; - string function = 2; - repeated TypeTag arg_types = 3; - repeated bytes args = 4; -} - -message ModuleID { - bytes address = 1; // 32-byte address - string name = 2; -} - -message TypeTag { - TypeTagKind kind = 1; - oneof value { - VectorTag vector = 2; - StructTag struct = 3; - GenericTag generic = 4; - } -} - -enum TypeTagKind { - TYPE_TAG_KIND_BOOL = 0; - TYPE_TAG_KIND_U8 = 1; - TYPE_TAG_KIND_U16 = 2; - TYPE_TAG_KIND_U32 = 3; - TYPE_TAG_KIND_U64 = 4; - TYPE_TAG_KIND_U128 = 5; - TYPE_TAG_KIND_U256 = 6; - TYPE_TAG_KIND_ADDRESS = 7; - TYPE_TAG_KIND_SIGNER = 8; - TYPE_TAG_KIND_VECTOR = 9; - TYPE_TAG_KIND_STRUCT = 10; - TYPE_TAG_KIND_GENERIC = 11; -} - -message VectorTag { - TypeTag element_type = 1; -} - -message StructTag { - bytes address = 1; // 32-byte address - string module = 2; - string name = 3; - repeated TypeTag type_params = 4; -} - -message GenericTag { - uint32 index = 1; -} - -// ========== TransactionByHash ========== - -message TransactionByHashRequest { - string hash = 1; // Transaction hash (hex string with 0x prefix) -} - -message TransactionByHashReply { - optional Transaction transaction = 1; -} - -enum TransactionVariant { - TRANSACTION_VARIANT_PENDING = 0; - TRANSACTION_VARIANT_USER = 1; - TRANSACTION_VARIANT_GENESIS = 2; - TRANSACTION_VARIANT_BLOCK_METADATA = 3; - TRANSACTION_VARIANT_BLOCK_EPILOGUE = 4; - TRANSACTION_VARIANT_STATE_CHECKPOINT = 5; - TRANSACTION_VARIANT_VALIDATOR = 6; - TRANSACTION_VARIANT_UNKNOWN = 7; -} - -message Transaction { - TransactionVariant type = 1; - string hash = 2; - optional uint64 version = 3; // nil for pending transactions - optional bool success = 4; // nil for pending/genesis transactions - bytes data = 5; // Raw transaction data -} - -// ========== AccountTransactions ========== - -message AccountTransactionsRequest { - bytes address = 1; // 32-byte address - optional uint64 start = 2; // Starting version number; nil for most recent - optional uint64 limit = 3; // Number of transactions to return; nil for default (~100) -} - -message AccountTransactionsReply { - repeated Transaction transactions = 1; -} - -// ========== SubmitTransaction ========== - -message SubmitTransactionRequest { - ModuleID receiver_module_id = 1; - bytes encoded_payload = 2; - optional GasConfig gas_config = 3; -} - -message SubmitTransactionReply { - TxStatus tx_status = 1; - string tx_hash = 2; - string tx_idempotency_key = 3; -} - -message GasConfig { - uint64 max_gas_amount = 1; // Maximum gas units willing to pay - uint64 gas_unit_price = 2; // Price per gas unit in octas -} - -// ========== WriteReport ========== - -message WriteReportRequest { - bytes receiver = 1; // 32-byte Aptos account address of the receiver module - optional GasConfig gas_config = 2; // optional gas configuration - sdk.v1alpha.ReportResponse report = 3; // signed report from consensus -} - -message WriteReportReply { - TxStatus tx_status = 1; - optional string tx_hash = 2; // transaction hash (hex string with 0x prefix) - optional uint64 transaction_fee = 3; // gas used in octas - optional string error_message = 4; -} - -// ========== Service ========== - -service Client { - option (tools.generator.v1alpha.capability) = { - mode: MODE_DON - capability_id: "aptos@1.0.0" - labels: { - // from https://github.com/smartcontractkit/chain-selectors/blob/main/selectors_aptos.yml - key: "ChainSelector" - value: { - uint64_label: { - defaults: [ - { - key: "aptos-mainnet" - value: 4741433654826277614 - }, - { - key: "aptos-testnet" - value: 743186221051783445 - } - ] - } - } - } - }; - - rpc AccountAPTBalance(AccountAPTBalanceRequest) returns (AccountAPTBalanceReply); - rpc View(ViewRequest) returns (ViewReply); - rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashReply); - rpc AccountTransactions(AccountTransactionsRequest) returns (AccountTransactionsReply); - rpc WriteReport(WriteReportRequest) returns (WriteReportReply); -} -` - const blockchainEvmV1alphaClientEmbedded = `syntax = "proto3"; package capabilities.blockchain.evm.v1alpha; @@ -1509,10 +1315,6 @@ message Decimal { ` var allFiles = []*embeddedFile{ - { - name: "capabilities/blockchain/aptos/v1alpha/client.proto", - content: blockchainAptosV1alphaClientEmbedded, - }, { name: "capabilities/blockchain/evm/v1alpha/client.proto", content: blockchainEvmV1alphaClientEmbedded,