Skip to content

Commit

Permalink
fix test cases who's capability migrated to StarcoinDAO
Browse files Browse the repository at this point in the history
  • Loading branch information
pause125 committed Sep 20, 2022
1 parent 51db488 commit 89f98c0
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 75 deletions.
2 changes: 1 addition & 1 deletion build/StarcoinFramework/BuildInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ compiled_package_info:
? address: "0x00000000000000000000000000000001"
name: YieldFarmingV2
: StarcoinFramework
source_digest: 76C7CCA2A91E023ECA3D6B1F32C82A4B3EA31FE6F6DC8736BE75FB0F56B35C3F
source_digest: 21BD0B3EFD8919DF47A4942C642C6000866ED794732F869D3E08D4EC2D50FD13
build_flags:
dev_mode: false
test_mode: false
Expand Down
24 changes: 12 additions & 12 deletions integration-tests/daospaceplugin/mint_proposal_plugin.exp
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
processed 29 tasks

task 8 'run'. lines 80-94:
task 8 'run'. lines 71-85:
{
"gas_used": 125914,
"status": "Executed"
}

task 9 'run'. lines 96-105:
task 9 'run'. lines 87-96:
{
"gas_used": 1162585,
"status": "Executed"
}

task 10 'run'. lines 107-117:
task 10 'run'. lines 98-108:
{
"gas_used": 53739,
"status": "Executed"
}

task 11 'run'. lines 119-132:
task 11 'run'. lines 110-123:
{
"gas_used": 8525,
"status": {
Expand All @@ -35,46 +35,46 @@ task 11 'run'. lines 119-132:
}
}

task 12 'run'. lines 134-148:
task 12 'run'. lines 125-139:
{
"gas_used": 264828,
"status": "Executed"
}

task 16 'run'. lines 156-167:
task 16 'run'. lines 147-158:
{
"gas_used": 101440,
"status": "Executed"
}

task 19 'run'. lines 173-182:
task 19 'run'. lines 164-173:
{
"gas_used": 575872,
"status": "Executed"
}

task 20 'run'. lines 184-215:
task 20 'run'. lines 175-206:
{
"gas_used": 450230,
"status": "Executed"
}

task 22 'call'. lines 219-219:
task 22 'call'. lines 210-210:
"0xa7dcef9aef26202fce82a7c7d6672afb/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x00000000000000000000000000000001::DAOSpace::DAOMember<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::XDAO::XDAO>,0x00000000000000000000000000000001::DAOSpace::DAOMemberBody<0x662ba5a1a1da0f1c70a9762c7eeb7aaf::XDAO::XDAO>>"

task 24 'run'. lines 223-237:
task 24 'run'. lines 214-228:
{
"gas_used": 8799122,
"status": "Executed"
}

task 26 'run'. lines 241-255:
task 26 'run'. lines 232-246:
{
"gas_used": 173636,
"status": "Executed"
}

task 28 'run'. lines 259-280:
task 28 'run'. lines 250-271:
{
"gas_used": 514254,
"status": "Executed"
Expand Down
15 changes: 13 additions & 2 deletions integration-tests/on_chain_config/test_onchain_config_dao.exp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ task 11 'run'. lines 67-87:

task 13 'run'. lines 92-106:
{
"gas_used": 119263,
"status": "Executed"
"gas_used": 68033,
"status": {
"ExecutionFailure": {
"location": {
"Module": {
"address": "0x00000000000000000000000000000001",
"name": "OnChainConfigDao"
}
},
"function": 1,
"code_offset": 6
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ script {
assert!(TransactionPublishOption::is_script_allowed(@StarcoinFramework), 402);
}
}
// check: EXECUTED
// check: ExecutionFailure, WrappedConfigModifyCapability is migrate to StarcoinDAO

28 changes: 11 additions & 17 deletions integration-tests/starcoin_dao/starcoin_onchain_config.exp
Original file line number Diff line number Diff line change
@@ -1,57 +1,51 @@
processed 24 tasks
processed 23 tasks

task 4 'run'. lines 9-17:
task 4 'run'. lines 19-34:
{
"gas_used": 6479978,
"gas_used": 875200,
"status": "Executed"
}

task 5 'run'. lines 19-33:
{
"gas_used": 590106,
"status": "Executed"
}

task 9 'run'. lines 42-53:
task 8 'run'. lines 43-54:
{
"gas_used": 101440,
"status": "Executed"
}

task 12 'run'. lines 60-69:
task 11 'run'. lines 61-70:
{
"gas_used": 575872,
"status": "Executed"
}

task 13 'run'. lines 72-81:
task 12 'run'. lines 73-82:
{
"gas_used": 448939,
"status": "Executed"
}

task 15 'call'. lines 85-85:
task 14 'call'. lines 86-86:
"0xa7dcef9aef26202fce82a7c7d6672afb/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x00000000000000000000000000000001::DAOSpace::DAOMember<0x00000000000000000000000000000001::StarcoinDAO::StarcoinDAO>,0x00000000000000000000000000000001::DAOSpace::DAOMemberBody<0x00000000000000000000000000000001::StarcoinDAO::StarcoinDAO>>"

task 17 'run'. lines 90-100:
task 16 'run'. lines 91-101:
{
"gas_used": 6111871,
"status": "Executed"
}

task 19 'run'. lines 104-112:
task 18 'run'. lines 105-113:
{
"gas_used": 72156,
"status": "Executed"
}

task 21 'run'. lines 116-125:
task 20 'run'. lines 117-126:
{
"gas_used": 173612,
"status": "Executed"
}

task 23 'run'. lines 129-145:
task 22 'run'. lines 130-146:
{
"gas_used": 495761,
"status": "Executed"
Expand Down
10 changes: 1 addition & 9 deletions integration-tests/starcoin_dao/starcoin_onchain_config.move
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@

//# block --author 0x1 --timestamp 86400000

// //# run --signers Genesis
// script{
// use StarcoinFramework::StdlibUpgradeScripts;

// fun main(){
// StdlibUpgradeScripts::upgrade_from_v12_to_v12_1();
// }
// }
// // check: EXECUTED

//# run --signers alice
script {
Expand All @@ -27,6 +18,7 @@ script {
fun stake_and_check(sender: signer) {
let token = Account::withdraw<STC::STC>(
&sender, 1000 * Token::scaling_factor<STC::STC>());
StakeToSBTPlugin::install_event<StarcoinDAO>();
StakeToSBTPlugin::stake<StarcoinDAO, STC::STC>(&sender, token, 60000);
}
}
Expand Down
28 changes: 11 additions & 17 deletions integration-tests/starcoin_dao/starcoin_upgrade_module.exp
Original file line number Diff line number Diff line change
@@ -1,57 +1,51 @@
processed 27 tasks
processed 26 tasks

task 4 'run'. lines 9-17:
task 4 'run'. lines 9-24:
{
"gas_used": 6479978,
"gas_used": 875200,
"status": "Executed"
}

task 5 'run'. lines 19-33:
{
"gas_used": 590106,
"status": "Executed"
}

task 9 'run'. lines 41-52:
task 8 'run'. lines 32-43:
{
"gas_used": 101440,
"status": "Executed"
}

task 12 'run'. lines 59-68:
task 11 'run'. lines 50-59:
{
"gas_used": 575872,
"status": "Executed"
}

task 14 'run'. lines 75-85:
task 13 'run'. lines 66-76:
{
"gas_used": 434673,
"status": "Executed"
}

task 16 'call'. lines 90-90:
task 15 'call'. lines 81-81:
"0xa7dcef9aef26202fce82a7c7d6672afb/1/0x00000000000000000000000000000001::IdentifierNFT::IdentifierNFT<0x00000000000000000000000000000001::DAOSpace::DAOMember<0x00000000000000000000000000000001::StarcoinDAO::StarcoinDAO>,0x00000000000000000000000000000001::DAOSpace::DAOMemberBody<0x00000000000000000000000000000001::StarcoinDAO::StarcoinDAO>>"

task 18 'run'. lines 95-105:
task 17 'run'. lines 86-96:
{
"gas_used": 6111871,
"status": "Executed"
}

task 20 'run'. lines 110-118:
task 19 'run'. lines 101-109:
{
"gas_used": 72156,
"status": "Executed"
}

task 22 'run'. lines 122-131:
task 21 'run'. lines 113-122:
{
"gas_used": 173612,
"status": "Executed"
}

task 24 'run'. lines 135-147:
task 23 'run'. lines 126-138:
{
"gas_used": 505499,
"status": "Executed"
Expand Down
11 changes: 1 addition & 10 deletions integration-tests/starcoin_dao/starcoin_upgrade_module.move
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@

//# block --author 0x1 --timestamp 86400000

// //# run --signers Genesis
// script{
// use StarcoinFramework::StdlibUpgradeScripts;

// fun main(){
// StdlibUpgradeScripts::upgrade_from_v12_to_v12_1();
// }
// }
// // check: EXECUTED

//# run --signers alice
script {
use StarcoinFramework::StakeToSBTPlugin;
Expand All @@ -27,6 +17,7 @@ script {
fun stake_and_check(sender: signer) {
let token = Account::withdraw<STC::STC>(
&sender, 1000 * Token::scaling_factor<STC::STC>());
StakeToSBTPlugin::install_event<StarcoinDAO>();
StakeToSBTPlugin::stake<StarcoinDAO, STC::STC>(&sender, token, 60000);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ task 9 'run'. lines 66-83:

task 11 'run'. lines 87-99:
{
"gas_used": 87133,
"status": "Executed"
"gas_used": 54480,
"status": {
"ExecutionFailure": {
"location": {
"Module": {
"address": "0x00000000000000000000000000000001",
"name": "OnChainConfigDao"
}
},
"function": 1,
"code_offset": 6
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ script {
);
}
}
// check: ExecutionFailure, WrappedConfigModifyCapability is migrate to StarcoinDAO
7 changes: 4 additions & 3 deletions integration-tests/upgrade_module_dao_proposal/basic.exp
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,17 @@ task 10 'run'. lines 95-108:

task 11 'run'. lines 110-129:
{
"gas_used": 21895,
"gas_used": 11530,
"status": {
"MoveAbort": {
"ExecutionFailure": {
"location": {
"Module": {
"address": "0x00000000000000000000000000000001",
"name": "UpgradeModuleDaoProposal"
}
},
"abort_code": "102916"
"function": 2,
"code_offset": 1
}
}
}
Expand Down
1 change: 1 addition & 0 deletions integration-tests/upgrade_module_dao_proposal/basic.move
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ script {
);
}
}
// check: ExecutionFailure, UpgradeModuleCapability is move to StarcoinDAO

//# run --signers alice
script {
Expand Down
2 changes: 1 addition & 1 deletion scripts/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Z3_VERSION=4.8.13
CVC5_VERSION=0.0.3
DOTNET_VERSION=5.0
BOOGIE_VERSION=2.9.6
MPM_VERSION=v1.12.3
MPM_VERSION=v1.12.4


SCRIPT_PATH="$( cd "$( dirname "$0" )" >/dev/null 2>&1 && pwd )"
Expand Down

0 comments on commit 89f98c0

Please sign in to comment.