generated from keep-starknet-strange/alexandria
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Showing
3 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ pub mod math; | |
pub mod rlp; | ||
pub mod serialization; | ||
pub mod set; | ||
pub mod snip9; | ||
|
||
mod test_data; | ||
|
||
|
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,23 @@ | ||
use core::starknet::ContractAddress; | ||
use core::starknet::account::Call; | ||
|
||
#[derive(Copy, Drop, Serde)] | ||
pub struct OutsideExecution { | ||
pub caller: ContractAddress, | ||
pub nonce: u64, | ||
pub execute_after: u64, | ||
pub execute_before: u64, | ||
pub calls: Span<Call> | ||
} | ||
|
||
#[starknet::interface] | ||
pub trait IOutsideExecution<TContractState> { | ||
/// @notice This method allows anyone to submit a transaction on behalf of the account as long | ||
/// as they have the relevant signatures. | ||
/// | ||
/// @param `outside_execution` The parameters of the transaction to execute | ||
/// @param `signature` a valid signature on the message encoding of `outside_execution` | ||
fn execute_from_outside( | ||
ref self: TContractState, outside_execution: OutsideExecution, signature: Span<felt252>, | ||
) -> Array<Span<felt252>>; | ||
} |