-
Notifications
You must be signed in to change notification settings - Fork 27
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
16 changed files
with
2,680 additions
and
2,680 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,61 +1,61 @@ | ||
//# init -n dev | ||
|
||
//# faucet --addr alice --amount 10000000 | ||
|
||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::STC::STC; | ||
use StarcoinFramework::Account; | ||
use StarcoinFramework::DAOAccount; | ||
use StarcoinFramework::Signer; | ||
|
||
fun main(sender: signer) { | ||
let dao_cap = DAOAccount::create_account(&sender); | ||
let dao_signer = DAOAccount::dao_signer(&dao_cap); | ||
let dao_address= Signer::address_of(&dao_signer); | ||
Account::pay_from<STC>(&sender, dao_address, 10000); | ||
let dao_balance = Account::balance<STC>(dao_address); | ||
assert!(dao_balance == 10000, 1001); | ||
DAOAccount::restore_dao_account_cap(&sender, dao_cap); | ||
} | ||
} | ||
// check: EXECUTED | ||
|
||
|
||
|
||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::DAOAccount; | ||
use StarcoinFramework::Vector; | ||
|
||
fun main(sender: signer) { | ||
let dao_cap = DAOAccount::extract_dao_account_cap(&sender); | ||
let package_hash = Vector::empty<u8>(); | ||
DAOAccount::submit_upgrade_plan(&dao_cap, package_hash, 2, false); | ||
DAOAccount::restore_dao_account_cap(&sender, dao_cap); | ||
} | ||
} | ||
// check: EXECUTED | ||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::DAOAccount; | ||
|
||
fun main(sender: signer) { | ||
let dao_cap = DAOAccount::create_account(&sender); | ||
DAOAccount::restore_dao_account_cap(&sender, dao_cap); | ||
} | ||
} | ||
// check: ABORT, code 25862. Reason: alice already has a DAOAccountCap | ||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::DAOAccount; | ||
|
||
fun main(sender: signer) { | ||
DAOAccount::create_account_entry(sender); | ||
} | ||
} | ||
//# init -n dev | ||
|
||
//# faucet --addr alice --amount 10000000 | ||
|
||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::STC::STC; | ||
use StarcoinFramework::Account; | ||
use StarcoinFramework::DAOAccount; | ||
use StarcoinFramework::Signer; | ||
|
||
fun main(sender: signer) { | ||
let dao_cap = DAOAccount::create_account(&sender); | ||
let dao_signer = DAOAccount::dao_signer(&dao_cap); | ||
let dao_address= Signer::address_of(&dao_signer); | ||
Account::pay_from<STC>(&sender, dao_address, 10000); | ||
let dao_balance = Account::balance<STC>(dao_address); | ||
assert!(dao_balance == 10000, 1001); | ||
DAOAccount::restore_dao_account_cap(&sender, dao_cap); | ||
} | ||
} | ||
// check: EXECUTED | ||
|
||
|
||
|
||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::DAOAccount; | ||
use StarcoinFramework::Vector; | ||
|
||
fun main(sender: signer) { | ||
let dao_cap = DAOAccount::extract_dao_account_cap(&sender); | ||
let package_hash = Vector::empty<u8>(); | ||
DAOAccount::submit_upgrade_plan(&dao_cap, package_hash, 2, false); | ||
DAOAccount::restore_dao_account_cap(&sender, dao_cap); | ||
} | ||
} | ||
// check: EXECUTED | ||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::DAOAccount; | ||
|
||
fun main(sender: signer) { | ||
let dao_cap = DAOAccount::create_account(&sender); | ||
DAOAccount::restore_dao_account_cap(&sender, dao_cap); | ||
} | ||
} | ||
// check: ABORT, code 25862. Reason: alice already has a DAOAccountCap | ||
|
||
//# run --signers alice | ||
script { | ||
use StarcoinFramework::DAOAccount; | ||
|
||
fun main(sender: signer) { | ||
DAOAccount::create_account_entry(sender); | ||
} | ||
} | ||
// check: ABORT, code 25862. Reason: alice already has a DAOAccountCap |
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,67 +1,67 @@ | ||
processed 16 tasks | ||
|
||
task 5 'run'. lines 13-21: | ||
{ | ||
"gas_used": 491764, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
|
||
task 8 'run'. lines 99-108: | ||
{ | ||
"gas_used": 1157874, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
|
||
task 9 'run'. lines 110-129: | ||
{ | ||
"gas_used": 315396, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
|
||
task 10 'run'. lines 131-165: | ||
{ | ||
"gas_used": 561697, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
|
||
task 12 'run'. lines 169-181: | ||
{ | ||
"gas_used": 52853, | ||
"status": { | ||
"Keep": { | ||
"MoveAbort": [ | ||
{ | ||
"Module": { | ||
"address": "0x00000000000000000000000000000001", | ||
"name": "DAOSpace" | ||
} | ||
}, | ||
77319 | ||
] | ||
} | ||
} | ||
} | ||
|
||
task 13 'run'. lines 183-203: | ||
{ | ||
"gas_used": 241369, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
|
||
task 15 'run'. lines 207-227: | ||
{ | ||
"gas_used": 229003, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
processed 16 tasks | ||
task 5 'run'. lines 13-21: | ||
{ | ||
"gas_used": 491764, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
task 8 'run'. lines 99-108: | ||
{ | ||
"gas_used": 1157874, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
task 9 'run'. lines 110-129: | ||
{ | ||
"gas_used": 315396, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
task 10 'run'. lines 131-165: | ||
{ | ||
"gas_used": 561697, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
task 12 'run'. lines 169-181: | ||
{ | ||
"gas_used": 52853, | ||
"status": { | ||
"Keep": { | ||
"MoveAbort": [ | ||
{ | ||
"Module": { | ||
"address": "0x00000000000000000000000000000001", | ||
"name": "DAOSpace" | ||
} | ||
}, | ||
77319 | ||
] | ||
} | ||
} | ||
} | ||
task 13 'run'. lines 183-203: | ||
{ | ||
"gas_used": 241369, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} | ||
task 15 'run'. lines 207-227: | ||
{ | ||
"gas_used": 229003, | ||
"status": { | ||
"Keep": "Executed" | ||
} | ||
} |
Oops, something went wrong.