aave-protocol-v2/test-suites/test-lp/helpers/scenarios/deposit.json
2021-02-08 11:24:01 -05:00

267 lines
5.7 KiB
JSON

{
"title": "LendingPool: Deposit",
"description": "Test cases for the deposit function.",
"stories": [
{
"description": "User 0 Deposits 1000 LPDAI in an empty reserve",
"actions": [
{
"name": "mint",
"args": {
"reserve": "LPDAI",
"amount": "1000",
"user": "0"
},
"expected": "success"
},
{
"name": "approve",
"args": {
"reserve": "LPDAI",
"user": "0"
},
"expected": "success"
},
{
"name": "deposit",
"args": {
"reserve": "LPDAI",
"amount": "1000",
"user": "0"
},
"expected": "success"
}
]
},
{
"description": "User 1 deposits 1000 LPDAI after user 0",
"actions": [
{
"name": "mint",
"args": {
"reserve": "LPDAI",
"amount": "1000",
"user": "1"
},
"expected": "success"
},
{
"name": "approve",
"args": {
"reserve": "LPDAI",
"user": "1"
},
"expected": "success"
},
{
"name": "deposit",
"args": {
"reserve": "LPDAI",
"amount": "1000",
"user": "1"
},
"expected": "success"
}
]
},
{
"description": "User 0 deposits 1000 LPUSDC in an empty reserve",
"actions": [
{
"name": "mint",
"args": {
"reserve": "LPUSDC",
"amount": "1000",
"user": "0"
},
"expected": "success"
},
{
"name": "approve",
"args": {
"reserve": "LPUSDC",
"user": "0"
},
"expected": "success"
},
{
"name": "deposit",
"args": {
"reserve": "LPUSDC",
"amount": "1000",
"user": "0"
},
"expected": "success"
}
]
},
{
"description": "User 1 deposits 1000 LPUSDC after user 0",
"actions": [
{
"name": "mint",
"args": {
"reserve": "LPUSDC",
"amount": "1000",
"user": "1"
},
"expected": "success"
},
{
"name": "approve",
"args": {
"reserve": "LPUSDC",
"user": "1"
},
"expected": "success"
},
{
"name": "deposit",
"args": {
"reserve": "LPUSDC",
"amount": "1000",
"user": "1"
},
"expected": "success"
}
]
},
{
"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"
},
"expected": "success"
}
]
},
{
"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"
},
"expected": "success"
}
]
},
{
"description": "User 1 deposits 0 WETH (revert expected)",
"actions": [
{
"name": "mint",
"args": {
"reserve": "WETH",
"amount": "1",
"user": "0"
},
"expected": "success"
},
{
"name": "deposit",
"args": {
"reserve": "WETH",
"amount": "0",
"user": "1"
},
"expected": "revert",
"revertMessage": "Amount must be greater than 0"
}
]
},
{
"description": "User 1 deposits 0 LPDAI",
"actions": [
{
"name": "deposit",
"args": {
"reserve": "LPDAI",
"amount": "0",
"user": "1"
},
"expected": "revert",
"revertMessage": "Amount must be greater than 0"
}
]
},
{
"description": "User 1 deposits 100 LPDAI on behalf of user 2, user 2 tries to borrow 0.1 WETH",
"actions": [
{
"name": "mint",
"args": {
"reserve": "LPDAI",
"amount": "100",
"user": "1"
},
"expected": "success"
},
{
"name": "deposit",
"args": {
"reserve": "LPDAI",
"amount": "100",
"user": "1",
"onBehalfOf": "2"
},
"expected": "success"
},
{
"name": "borrow",
"args": {
"reserve": "WETH",
"amount": "0.1",
"borrowRateMode": "variable",
"user": "2"
},
"expected": "success"
}
]
}
]
}