-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(types): change account id to newtype and deprecate ValidAccountId #448
Changes from all commits
3ad2d55
07c1fec
26a9f8d
51c2782
05e57ed
17475b0
3e858be
2c4e449
7cae165
71fa951
d36276c
082c5d5
148d39a
f007efd
a409a25
b5388f6
3bf1cae
a0f4c25
8e704b9
e7112fc
1376e92
e8e06dd
36e6708
28f1d39
d38e251
a13c8f2
11c42fb
afbc330
f22bdb5
3d050be
3e24240
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use near_sdk::AccountId; | ||
use near_sdk_sim::{ | ||
call, deploy, init_simulator, to_yocto, view, ContractAccount, UserAccount, DEFAULT_GAS, | ||
STORAGE_AMOUNT, | ||
|
@@ -25,7 +26,8 @@ fn init( | |
bytes: &TOKEN_WASM_BYTES, | ||
signer_account: master_account | ||
}; | ||
let alice = master_account.create_user("alice".to_string(), initial_balance); | ||
let alice = | ||
master_account.create_user(AccountId::new_unchecked("alice".to_string()), initial_balance); | ||
(master_account, contract_account, alice) | ||
} | ||
|
||
|
@@ -39,7 +41,7 @@ fn check_promise() { | |
let (master_account, contract, _alice) = init(to_yocto("10000")); | ||
let res = view!(contract.promise_checked()); | ||
assert_eq!(res.unwrap_json::<bool>(), false); | ||
let status_id = "status".to_string(); | ||
let status_id: near_sdk::AccountId = "status".parse().unwrap(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if these unwraps are to blame for additional bloat? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll check around the code size in a bit. Committing the wasm files was a mistake and how I built them also causes a difference on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, and as we discussed in this morning's meeting, this is capture in #465 |
||
let status_amt = to_yocto("35"); | ||
let res = call!( | ||
master_account, | ||
|
@@ -64,7 +66,7 @@ fn test_sim_transfer() { | |
// let transfer_amount = to_yocto("100"); | ||
let initial_balance = to_yocto("100000"); | ||
let (master_account, contract, _alice) = init(initial_balance); | ||
let status_id = "status".to_string(); | ||
let status_id: near_sdk::AccountId = "status".parse().unwrap(); | ||
let status_amt = to_yocto("35"); | ||
let res = call!( | ||
master_account, | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need cross_contract_high_level.wasm and cross_contract_low_level.wasm blobs here, and why they grew by several kbs?