-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
199dc0c
commit 921e356
Showing
72 changed files
with
1,371 additions
and
1,276 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//! A crate that shares common types and utilities between the Wasm executor and the Wasm interface. | ||
pub mod flags; | ||
pub mod keyspace; | ||
pub mod leb128; | ||
pub mod manifest; | ||
pub mod selector; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "casper-executor-wasm-host" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
num-traits = "0.2.18" | ||
num-derive = "0.4.2" | ||
casper-storage = { path = "../../storage" } | ||
casper-types = { path = "../../types" } | ||
safe-transmute = "0.11.2" | ||
tracing = "0.1.40" | ||
casper-executor-wasm-common = { path = "../wasm-common" } | ||
casper-executor-wasm-interface = { path = "../wasm-interface" } | ||
bytes = "1.6.0" | ||
parking_lot = "0.12.3" | ||
thiserror = "1.0.61" |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use std::sync::Arc; | ||
|
||
use bytes::Bytes; | ||
use casper_executor_wasm_interface::executor::Executor; | ||
use casper_storage::{global_state::GlobalStateReader, AddressGenerator, TrackingCopy}; | ||
use casper_types::{account::AccountHash, Key, TransactionHash}; | ||
use parking_lot::RwLock; | ||
|
||
/// Container that holds all relevant modules necessary to process an execution request. | ||
pub struct Context<S: GlobalStateReader, E: Executor> { | ||
/// The address of the account that initiated the contract or session code. | ||
pub initiator: AccountHash, | ||
/// The address of the addressable entity that is currently executing the contract or session | ||
/// code. | ||
pub caller: Key, | ||
/// The address of the addressable entity that is being called. | ||
pub callee: Key, | ||
/// The state of the global state at the time of the call based on the currently executing | ||
/// contract or session address. | ||
// pub state_address: Address, | ||
/// The amount of tokens that were send to the contract's purse at the time of the call. | ||
pub value: u128, | ||
pub tracking_copy: TrackingCopy<S>, | ||
pub executor: E, // TODO: This could be part of the caller | ||
pub transaction_hash: TransactionHash, | ||
pub address_generator: Arc<RwLock<AddressGenerator>>, | ||
pub chain_name: Arc<str>, | ||
pub input: Bytes, | ||
} |
Oops, something went wrong.