Commit 7d19156e authored by Satyam Agrawal's avatar Satyam Agrawal Committed by Andrew Jones
Browse files

[core] add set_now, set_block_number, set_balance api for test env (#145)

parent f54fac81
......@@ -37,6 +37,21 @@ pub fn set_caller<T: EnvTypes>(address: T::AccountId) {
/// Sets the timestamp for the next contract invocation.
pub fn set_now<T: EnvTypes>(timestamp: T::Moment) {
/// Sets the current block number for the next contract invocation.
pub fn set_block_number<T: EnvTypes>(block_number: T::BlockNumber) {
/// Sets the contract balance for the next contract invocation.
pub fn set_balance<T: EnvTypes>(balance: T::Balance) {
/// Returns an iterator over the uninterpreted bytes of all past emitted events.
pub fn emitted_events<T: EnvTypes>() -> impl Iterator<Item = Vec<u8>> {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment