Skip to content

Commit

Permalink
Fix tests, update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Dec 12, 2023
1 parent a73d749 commit 332b589
Show file tree
Hide file tree
Showing 4 changed files with 1,001 additions and 30 deletions.
1 change: 1 addition & 0 deletions ci/integration-tests/src/tests/cw_vesting_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ fn test_cw_vesting_staking(chain: &mut Chain) {
total: Uint128::new(100_000_000),
denom: cw_vesting::UncheckedDenom::Native("ujunox".to_string()),

dao_staking: None,
schedule: Schedule::SaturatingLinear,
start_time: None,
vesting_duration_seconds: 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,21 @@
},
"additionalProperties": false
},
"DaoStakingLimits": {
"type": "object",
"required": [
"staking_contract_allowlist"
],
"properties": {
"staking_contract_allowlist": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Expiration": {
"description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)",
"oneOf": [
Expand Down Expand Up @@ -241,6 +256,17 @@
"vesting_duration_seconds"
],
"properties": {
"dao_staking": {
"description": "TODO support limits for native staked tokens as well? Optionally enabling this vesting contract to stake in token DAOs. Set to None if vesting a native token.",
"anyOf": [
{
"$ref": "#/definitions/DaoStakingLimits"
},
{
"type": "null"
}
]
},
"denom": {
"description": "The type and denom of token being vested.",
"allOf": [
Expand Down
5 changes: 5 additions & 0 deletions contracts/external/cw-payroll-factory/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ pub fn test_instantiate_native_payroll_contract() {
vesting_duration_seconds: 200,
unbonding_duration_seconds: 2592000, // 30 days
start_time: None,
dao_staking: None,
},
label: "Payroll".to_string(),
};
Expand Down Expand Up @@ -275,6 +276,7 @@ pub fn test_instantiate_cw20_payroll_contract() {
vesting_duration_seconds: 200,
unbonding_duration_seconds: 2592000, // 30 days
start_time: None,
dao_staking: None,
};

// Attempting to call InstantiatePayrollContract directly with cw20 fails
Expand Down Expand Up @@ -397,6 +399,7 @@ fn test_instantiate_wrong_ownership_native() {
vesting_duration_seconds: 200,
unbonding_duration_seconds: 2592000, // 30 days
start_time: None,
dao_staking: None,
},
label: "vesting".to_string(),
},
Expand Down Expand Up @@ -481,6 +484,7 @@ fn test_update_vesting_code_id() {
vesting_duration_seconds: 200,
unbonding_duration_seconds: 2592000, // 30 days
start_time: None,
dao_staking: None,
},
label: "Payroll".to_string(),
};
Expand Down Expand Up @@ -571,6 +575,7 @@ pub fn test_inconsistent_cw20_amount() {
vesting_duration_seconds: 200,
unbonding_duration_seconds: 2592000, // 30 days
start_time: None,
dao_staking: None,
};
let err: ContractError = app
.execute_contract(
Expand Down
Loading

0 comments on commit 332b589

Please sign in to comment.