This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
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
c2f1f46
commit a4fc44c
Showing
1 changed file
with
29 additions
and
15 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
// use near_sdk_sim::{call, deploy, init_simulator}; | ||
// | ||
// /// Load in contract bytes | ||
// near_sdk_sim::lazy_static! { | ||
// static ref EVM_WASM_BYTES: &'static [u8] = include_bytes!("../res/evm.wasm").as_ref(); | ||
// } | ||
// | ||
// fn init() { | ||
// let master_account = init_simulator(); | ||
// } | ||
// | ||
// #[test] | ||
// fn test_upgrade() { | ||
// init(); | ||
// } | ||
use near_sdk_sim::{call, deploy, ContractAccount}; | ||
|
||
/// Load in contract bytes | ||
near_sdk_sim::lazy_static! { | ||
static ref EVM_WASM_BYTES: &'static [u8] = include_bytes!("../res/evm.wasm").as_ref(); | ||
} | ||
|
||
// Deploy | ||
// init with owner | ||
// change owner | ||
// fail to change from another account | ||
// stage contract | ||
// upload contract | ||
fn init() { | ||
let master_account = near_sdk_sim::init_simulator(None); | ||
let initial_balance = near_sdk_sim::to_yocto("100_000"); | ||
let contract_user = deploy!( | ||
contract: todo!(), // Where is this from? | ||
contract_id: "evm_contract", | ||
bytes: &EVM_WASM_BYTES, | ||
signer_accounts: master_account, | ||
init_method: near_sdk_sim::new(master_account.account_id(), initial_balance.into()) | ||
); | ||
} | ||
|
||
#[test] | ||
fn test_upgrade() { | ||
init(); | ||
} |