mirror of
https://github.com/logos-blockchain/logos-execution-zone-module.git
synced 2026-07-08 19:49:26 +00:00
Merge pull request #38 from logos-blockchain/schouhy/bump-version
Update version to last release
This commit is contained in:
commit
d70225ced6
8
flake.lock
generated
8
flake.lock
generated
@ -1582,17 +1582,17 @@
|
||||
"rust-rapidsnark": "rust-rapidsnark"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782310268,
|
||||
"narHash": "sha256-tIIIO+V+w/C/KLtKnLIv8O8/GoJ4PzgJSWrlQCXJ2P4=",
|
||||
"lastModified": 1782428741,
|
||||
"narHash": "sha256-ltLcysXUdVUXAe25Tl8x7e7ZsTzj1sHlyS3glp97TAo=",
|
||||
"owner": "logos-blockchain",
|
||||
"repo": "logos-execution-zone",
|
||||
"rev": "fb8cbac40e0bda4f152415ff4f181cdc6bca6d4a",
|
||||
"rev": "e37876a64028a335eb693198a1ed6a0e875ec5b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "logos-blockchain",
|
||||
"repo": "logos-execution-zone",
|
||||
"rev": "fb8cbac40e0bda4f152415ff4f181cdc6bca6d4a",
|
||||
"rev": "e37876a64028a335eb693198a1ed6a0e875ec5b4",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
inputs = {
|
||||
logos-module-builder.url = "github:logos-co/logos-module-builder";
|
||||
nix-bundle-lgx.url = "github:logos-co/nix-bundle-lgx";
|
||||
logos-execution-zone.url = "github:logos-blockchain/logos-execution-zone?rev=fb8cbac40e0bda4f152415ff4f181cdc6bca6d4a"; # lez-core-v0.2.0
|
||||
logos-execution-zone.url = "github:logos-blockchain/logos-execution-zone?rev=e37876a64028a335eb693198a1ed6a0e875ec5b4"; # v0.2.0-rc6
|
||||
};
|
||||
|
||||
outputs = inputs@{ logos-module-builder, ... }:
|
||||
|
||||
@ -969,10 +969,9 @@ std::vector<uint8_t> LogosExecutionZoneWalletModule::authenticated_transfer_elf(
|
||||
|
||||
std::string LogosExecutionZoneWalletModule::send_generic_public_transaction(
|
||||
const std::vector<std::string>& account_ids,
|
||||
const std::vector<bool>& signing_requirements,
|
||||
const std::vector<bool>& signing_requirements,
|
||||
const std::vector<uint32_t>& instruction,
|
||||
const std::vector<uint8_t>& program_elf,
|
||||
const std::vector<std::vector<uint8_t>>& program_dependencies
|
||||
const std::string& program_id_hex
|
||||
) {
|
||||
std::vector<FfiAccountIdentity> identities_resolved;
|
||||
identities_resolved.reserve(account_ids.size());
|
||||
@ -1000,47 +999,23 @@ std::string LogosExecutionZoneWalletModule::send_generic_public_transaction(
|
||||
const uint32_t* input_instruction_data = instruction.data();
|
||||
uintptr_t input_instruction_data_size = static_cast<uintptr_t>(instruction.size());
|
||||
|
||||
FfiProgram main_program {};
|
||||
|
||||
const uint8_t *program_elf_data = program_elf.data();
|
||||
uintptr_t program_elf_size = static_cast<uintptr_t>(program_elf.size());
|
||||
|
||||
main_program.elf_data = program_elf_data;
|
||||
main_program.elf_size = program_elf_size;
|
||||
|
||||
std::vector<FfiProgram> ffi_program_dependencies;
|
||||
ffi_program_dependencies.reserve(program_dependencies.size());
|
||||
|
||||
for (int i = 0; i < program_dependencies.size(); ++i) {
|
||||
FfiProgram program{};
|
||||
|
||||
const uint8_t *program_elf_data = program_dependencies[i].data();
|
||||
uintptr_t program_elf_size = static_cast<uintptr_t>(program_dependencies[i].size());
|
||||
|
||||
program.elf_data = program_elf_data;
|
||||
program.elf_size = program_elf_size;
|
||||
|
||||
ffi_program_dependencies.push_back(program);
|
||||
std::vector<uint8_t> program_id_bytes;
|
||||
if (!hexToBytes(program_id_hex, program_id_bytes, 32)) {
|
||||
fprintf(stderr, "send_generic_public_transaction: invalid program_id_hex");
|
||||
return transferResultToJson(nullptr, std::string("send_generic_public_transaction: invalid program_id_hex"));
|
||||
}
|
||||
|
||||
const FfiProgram *dependencies_data = ffi_program_dependencies.data();
|
||||
uintptr_t dependencies_size = static_cast<uintptr_t>(ffi_program_dependencies.size());
|
||||
|
||||
FfiProgramWithDependencies program_with_dependencies {};
|
||||
|
||||
program_with_dependencies.program = main_program;
|
||||
program_with_dependencies.deps = dependencies_data;
|
||||
program_with_dependencies.deps_size = dependencies_size;
|
||||
FfiProgramId program_id{};
|
||||
memcpy(program_id.data, program_id_bytes.data(), 32);
|
||||
|
||||
FfiTransactionResult result {};
|
||||
|
||||
const WalletFfiError error = wallet_ffi_send_generic_public_transaction(
|
||||
walletHandle,
|
||||
walletHandle,
|
||||
account_identities,
|
||||
account_identities_size,
|
||||
input_instruction_data,
|
||||
input_instruction_data,
|
||||
input_instruction_data_size,
|
||||
&program_with_dependencies,
|
||||
program_id,
|
||||
&result
|
||||
);
|
||||
|
||||
|
||||
@ -77,13 +77,7 @@ public:
|
||||
std::vector<uint8_t> amm_elf();
|
||||
std::vector<uint8_t> ata_elf();
|
||||
|
||||
std::string send_generic_public_transaction(
|
||||
const std::vector<std::string>& account_ids,
|
||||
const std::vector<bool>& signing_requirements,
|
||||
const std::vector<uint32_t>& instruction,
|
||||
const std::vector<uint8_t>& program_elf,
|
||||
const std::vector<std::vector<uint8_t>>& program_dependencies
|
||||
);
|
||||
std::string send_generic_public_transaction(const std::vector<std::string>& account_ids, const std::vector<bool>& signing_requirements, const std::vector<uint32_t>& instruction, const std::string& program_id_hex);
|
||||
std::string send_generic_private_transaction(
|
||||
const std::vector<std::string>& account_ids,
|
||||
const std::vector<uint32_t>& instruction,
|
||||
|
||||
@ -472,7 +472,7 @@ void wallet_ffi_free_ffi_program(FfiProgram *ffi_program) {
|
||||
|
||||
WalletFfiError wallet_ffi_send_generic_public_transaction(WalletHandle *handle, const FfiAccountIdentity *account_identities,
|
||||
uintptr_t account_identities_size, const uint32_t *instruction_words, uintptr_t instruction_words_size,
|
||||
const FfiProgramWithDependencies *program_with_dependencies, FfiTransactionResult *out_result) {
|
||||
FfiProgramId program_id, FfiTransactionResult *out_result) {
|
||||
LOGOS_CMOCK_RECORD("wallet_ffi_send_generic_public_transaction");
|
||||
return fillTransactionResult("wallet_ffi_send_generic_public_transaction", out_result);
|
||||
}
|
||||
|
||||
@ -31,6 +31,11 @@ typedef struct FfiBytes32 {
|
||||
uint8_t data[32];
|
||||
} FfiBytes32;
|
||||
|
||||
// Program ID - 8 u32 values (32 bytes total).
|
||||
typedef struct FfiProgramId {
|
||||
uint32_t data[8];
|
||||
} FfiProgramId;
|
||||
|
||||
// 16-byte value (balance / nonce, little-endian u128).
|
||||
typedef struct FfiBytes16 {
|
||||
uint8_t data[16];
|
||||
@ -43,7 +48,7 @@ typedef struct FfiU128 {
|
||||
|
||||
// Full account record.
|
||||
typedef struct FfiAccount {
|
||||
FfiBytes32 program_owner;
|
||||
FfiProgramId program_owner;
|
||||
FfiBytes16 balance;
|
||||
FfiBytes16 nonce;
|
||||
uint8_t* data;
|
||||
@ -266,7 +271,7 @@ WalletFfiError wallet_ffi_send_generic_public_transaction(WalletHandle *handle,
|
||||
uintptr_t account_identities_size,
|
||||
const uint32_t *instruction_words,
|
||||
uintptr_t instruction_words_size,
|
||||
const FfiProgramWithDependencies *program_with_dependencies,
|
||||
FfiProgramId program_id,
|
||||
FfiTransactionResult *out_result);
|
||||
|
||||
WalletFfiError wallet_ffi_send_generic_private_transaction(WalletHandle *handle,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user