diff --git a/src/nondet.rs b/src/nondet.rs index c515de3..635414d 100644 --- a/src/nondet.rs +++ b/src/nondet.rs @@ -153,7 +153,7 @@ impl NondetValue for Constructor { fn nondet_info(&self, ctx: &mut Context, ident: &str) -> NondetInfo { if self.fields.is_empty() { // If the constuctor has no field, it can only contain one value, and that is deterministic - return (vec![], self.name.clone()); + return (vec!["".to_string()], self.name.clone()); } let (defs, record) = self.fields.nondet_info(ctx, ident); diff --git a/tests/snapshots/integration_tests__ctf01.snap b/tests/snapshots/integration_tests__ctf01.snap index 86a991e..2e4d5b8 100644 --- a/tests/snapshots/integration_tests__ctf01.snap +++ b/tests/snapshots/integration_tests__ctf01.snap @@ -39,7 +39,8 @@ module oaksecurity_cosmwasm_ctf_01 { action deposit_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Deposit.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Deposit execute_message(message, max_funds) } pure def withdraw(state: ContractState, env: Env, info: MessageInfo, ids: List[int]): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) diff --git a/tests/snapshots/integration_tests__ctf02.snap b/tests/snapshots/integration_tests__ctf02.snap index ffe5bc1..12af37e 100644 --- a/tests/snapshots/integration_tests__ctf02.snap +++ b/tests/snapshots/integration_tests__ctf02.snap @@ -43,7 +43,8 @@ module oaksecurity_cosmwasm_ctf_02 { action deposit_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Deposit.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Deposit execute_message(message, max_funds) } pure def withdraw(state: ContractState, info: MessageInfo, amount: int): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) diff --git a/tests/snapshots/integration_tests__ctf03.snap b/tests/snapshots/integration_tests__ctf03.snap index 0537d94..a76fdb1 100644 --- a/tests/snapshots/integration_tests__ctf03.snap +++ b/tests/snapshots/integration_tests__ctf03.snap @@ -37,7 +37,8 @@ module flash_loan { action flash_loan_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorForflash_loan.oneOf() + + pure val message: UnknownType = ConstructorForflash_loan execute_message(message, max_funds) } pure def settle_loan(state: ContractState, env: Env, info: MessageInfo): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -45,7 +46,8 @@ module flash_loan { action settle_loan_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorForsettle_loan.oneOf() + + pure val message: UnknownType = ConstructorForsettle_loan execute_message(message, max_funds) } pure def set_proxy_addr(state: ContractState, info: MessageInfo, proxy_addr: str): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -53,7 +55,8 @@ module flash_loan { action set_proxy_addr_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorForset_proxy_addr.oneOf() + + pure val message: UnknownType = ConstructorForset_proxy_addr execute_message(message, max_funds) } pure def withdraw_funds(state: ContractState, env: Env, info: MessageInfo, recipient: Addr): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -61,7 +64,8 @@ module flash_loan { action withdraw_funds_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorForwithdraw_funds.oneOf() + + pure val message: UnknownType = ConstructorForwithdraw_funds execute_message(message, max_funds) } pure def transfer_owner(state: ContractState, info: MessageInfo, new_owner: Addr): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -69,7 +73,8 @@ module flash_loan { action transfer_owner_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorFortransfer_owner.oneOf() + + pure val message: UnknownType = ConstructorFortransfer_owner execute_message(message, max_funds) } pure def is_trusted(sender: Addr, config: Config): bool = trusted @@ -183,7 +188,8 @@ module mock_arb { action arbitrage_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorForarbitrage.oneOf() + + pure val message: UnknownType = ConstructorForarbitrage execute_message(message, max_funds) } pure val DENOM = "uawesome" @@ -290,7 +296,8 @@ module proxy { action request_flash_loan_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: UnknownType = ConstructorForrequest_flash_loan.oneOf() + + pure val message: UnknownType = ConstructorForrequest_flash_loan execute_message(message, max_funds) } pure val DENOM = "uawesome" diff --git a/tests/snapshots/integration_tests__ctf04.snap b/tests/snapshots/integration_tests__ctf04.snap index 41f2a4c..c267c88 100644 --- a/tests/snapshots/integration_tests__ctf04.snap +++ b/tests/snapshots/integration_tests__ctf04.snap @@ -40,7 +40,8 @@ module oaksecurity_cosmwasm_ctf_04 { action mint_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Mint.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Mint execute_message(message, max_funds) } pure def burn(state: ContractState, env: Env, info: MessageInfo, shares: int): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) diff --git a/tests/snapshots/integration_tests__ctf05.snap b/tests/snapshots/integration_tests__ctf05.snap index 7a3c194..c8b271d 100644 --- a/tests/snapshots/integration_tests__ctf05.snap +++ b/tests/snapshots/integration_tests__ctf05.snap @@ -47,7 +47,8 @@ module oaksecurity_cosmwasm_ctf_05 { action deposit_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Deposit.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Deposit execute_message(message, max_funds) } pure def withdraw(state: ContractState, info: MessageInfo, amount: int): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -82,7 +83,8 @@ module oaksecurity_cosmwasm_ctf_05 { action accept_owner_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_AcceptOwnership.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_AcceptOwnership execute_message(message, max_funds) } pure def drop_owner(state: ContractState, info: MessageInfo): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -90,7 +92,8 @@ module oaksecurity_cosmwasm_ctf_05 { action drop_owner_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_DropOwnershipProposal.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_DropOwnershipProposal execute_message(message, max_funds) } pure def assert_owner(store: , sender: Addr): Result[(), ContractError] = Ok(()) diff --git a/tests/snapshots/integration_tests__ctf06.snap b/tests/snapshots/integration_tests__ctf06.snap index 3a83d3d..7518a5a 100644 --- a/tests/snapshots/integration_tests__ctf06.snap +++ b/tests/snapshots/integration_tests__ctf06.snap @@ -46,7 +46,8 @@ module oaksecurity_cosmwasm_ctf_06 { action receive_cw20_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Receive.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Receive execute_message(message, max_funds) } pure def propose(state: ContractState, env: Env, info: MessageInfo): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -54,7 +55,8 @@ module oaksecurity_cosmwasm_ctf_06 { action propose_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Propose.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Propose execute_message(message, max_funds) } pure def resolve_proposal(state: ContractState, env: Env, _info: MessageInfo): (Result[Response, ContractError], ContractState) = (Ok(response), state) @@ -62,7 +64,8 @@ module oaksecurity_cosmwasm_ctf_06 { action resolve_proposal_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_ResolveProposal.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_ResolveProposal execute_message(message, max_funds) } pure def owner_action(state: ContractState, info: MessageInfo, msg: CosmosMsg): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) diff --git a/tests/snapshots/integration_tests__ctf07.snap b/tests/snapshots/integration_tests__ctf07.snap index 21df84f..c0e34c2 100644 --- a/tests/snapshots/integration_tests__ctf07.snap +++ b/tests/snapshots/integration_tests__ctf07.snap @@ -43,7 +43,8 @@ module oaksecurity_cosmwasm_ctf_07 { action deposit_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Deposit.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Deposit execute_message(message, max_funds) } pure def withdraw(state: ContractState, info: MessageInfo, amount: int): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) diff --git a/tests/snapshots/integration_tests__ctf09.snap b/tests/snapshots/integration_tests__ctf09.snap index f5d6f70..11c3aa6 100644 --- a/tests/snapshots/integration_tests__ctf09.snap +++ b/tests/snapshots/integration_tests__ctf09.snap @@ -44,7 +44,8 @@ module oaksecurity_cosmwasm_ctf_09 { action increase_reward_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_IncreaseReward.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_IncreaseReward execute_message(message, max_funds) } pure def deposit(state: ContractState, info: MessageInfo): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -52,7 +53,8 @@ module oaksecurity_cosmwasm_ctf_09 { action deposit_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Deposit.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Deposit execute_message(message, max_funds) } pure def withdraw(state: ContractState, info: MessageInfo, amount: int): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state) @@ -69,7 +71,8 @@ module oaksecurity_cosmwasm_ctf_09 { action claim_rewards_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_ClaimRewards.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_ClaimRewards execute_message(message, max_funds) } pure val DENOM = "uawesome" diff --git a/tests/snapshots/integration_tests__ctf10.snap b/tests/snapshots/integration_tests__ctf10.snap index f050e8c..1090f62 100644 --- a/tests/snapshots/integration_tests__ctf10.snap +++ b/tests/snapshots/integration_tests__ctf10.snap @@ -38,7 +38,8 @@ module oaksecurity_cosmwasm_ctf_10 { action mint_action = { // TODO: Change next line according to fund expectations pure val max_funds = MAX_AMOUNT - nondet message: ExecuteMsg = ExecuteMsg_Mint.oneOf() + + pure val message: ExecuteMsg = ExecuteMsg_Mint execute_message(message, max_funds) } pure def reply(state: ContractState, _env: Env, reply: Reply): (Result[Response, ContractError], ContractState) = (Ok(Response_new), state)