mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Updated deposit scenarios
This commit is contained in:
parent
3c3e4d146a
commit
547c95dc1a
|
@ -127,32 +127,64 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"description": "User 0 deposits 1 ETH in an empty reserve",
|
||||
"description": "User 0 deposits 1 WETH in an empty reserve",
|
||||
"actions": [
|
||||
{
|
||||
"name": "mint",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
"amount": "1",
|
||||
"user": "0"
|
||||
},
|
||||
"expected": "success"
|
||||
},
|
||||
{
|
||||
"name": "approve",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
"user": "0"
|
||||
},
|
||||
"expected": "success"
|
||||
},
|
||||
{
|
||||
"name": "deposit",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
|
||||
"amount": "1",
|
||||
"user": "0",
|
||||
"sendValue": "1"
|
||||
"user": "0"
|
||||
},
|
||||
"expected": "success"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "User 1 deposits 1 ETH after user 0",
|
||||
"description": "User 1 deposits 1 WETH after user 0",
|
||||
"actions": [
|
||||
{
|
||||
"name": "mint",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
"amount": "1",
|
||||
"user": "1"
|
||||
},
|
||||
"expected": "success"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "approve",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
"user": "1"
|
||||
},
|
||||
"expected": "success"
|
||||
},
|
||||
{
|
||||
"name": "deposit",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
|
||||
"amount": "1",
|
||||
"user": "1",
|
||||
"sendValue": "1"
|
||||
"user": "1"
|
||||
},
|
||||
"expected": "success"
|
||||
}
|
||||
|
@ -161,6 +193,15 @@
|
|||
{
|
||||
"description": "User 1 deposits 0 ETH (revert expected)",
|
||||
"actions": [
|
||||
{
|
||||
"name": "mint",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
"amount": "1",
|
||||
"user": "0"
|
||||
},
|
||||
"expected": "success"
|
||||
},
|
||||
{
|
||||
"name": "deposit",
|
||||
"args": {
|
||||
|
@ -188,40 +229,6 @@
|
|||
"revertMessage": "Amount must be greater than 0"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "User 1 tries to deposit ETH without sending any value",
|
||||
"actions": [
|
||||
{
|
||||
"name": "deposit",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
|
||||
"amount": "1",
|
||||
"user": "1",
|
||||
"sendValue": "0"
|
||||
},
|
||||
"expected": "revert",
|
||||
"revertMessage": "The amount and the value sent to deposit do not match"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "User 1 tries to deposit ETH by sending less value than required",
|
||||
"actions": [
|
||||
{
|
||||
"name": "deposit",
|
||||
"args": {
|
||||
"reserve": "WETH",
|
||||
|
||||
"amount": "1",
|
||||
"user": "1",
|
||||
"sendValue": "0.5"
|
||||
},
|
||||
"expected": "revert",
|
||||
"revertMessage": "The amount and the value sent to deposit do not match"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ BigNumber.config({DECIMAL_PLACES: 0, ROUNDING_MODE: BigNumber.ROUND_DOWN});
|
|||
|
||||
const scenarioFolder = './test/helpers/scenarios/';
|
||||
|
||||
const selectedScenarios: string[] = [];
|
||||
const selectedScenarios: string[] = ['deposit.json'];
|
||||
|
||||
fs.readdirSync(scenarioFolder).forEach((file) => {
|
||||
if (selectedScenarios.length > 0 && !selectedScenarios.includes(file)) return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user