Skip to content

Commit

Permalink
feat:staking and erc4626 adaptors (#248)
Browse files Browse the repository at this point in the history
* ERC4626 Adaptor support

* Staking adaptor support

* Update permissions

* Bump to v4.1.0

* Minor tweaks
  • Loading branch information
cbrit authored Feb 6, 2024
1 parent dd8046a commit 631a685
Show file tree
Hide file tree
Showing 30 changed files with 6,368 additions and 1,573 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "steward"
authors = []
version = "4.0.0"
version = "4.1.0"
edition = "2021"

[dependencies]
Expand Down
274 changes: 274 additions & 0 deletions abi/ERC4626AdaptorV1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
[
{
"inputs": [],
"name": "BaseAdaptor__ConstructorHealthFactorTooLow",
"type": "error"
},
{
"inputs": [],
"name": "BaseAdaptor__ExternalReceiverBlocked",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "BaseAdaptor__PricingNotSupported",
"type": "error"
},
{
"inputs": [],
"name": "BaseAdaptor__Slippage",
"type": "error"
},
{
"inputs": [],
"name": "BaseAdaptor__UserDepositsNotAllowed",
"type": "error"
},
{
"inputs": [],
"name": "BaseAdaptor__UserWithdrawsNotAllowed",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "erc4626Vault",
"type": "address"
}
],
"name": "ERC4626Adaptor__ERC4626PositionNotUsed",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "adaptorData",
"type": "bytes"
}
],
"name": "assetOf",
"outputs": [
{
"internalType": "contract ERC20",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "adaptorData",
"type": "bytes"
}
],
"name": "assetsUsed",
"outputs": [
{
"internalType": "contract ERC20[]",
"name": "assets",
"type": "address[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "adaptorData",
"type": "bytes"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "adaptorData",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ERC4626",
"name": "erc4626Vault",
"type": "address"
},
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"name": "depositToVault",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "identifier",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "isDebt",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ERC20",
"name": "asset",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "revokeApproval",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "slippage",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
},
{
"internalType": "address",
"name": "receiver",
"type": "address"
},
{
"internalType": "bytes",
"name": "adaptorData",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "configurationData",
"type": "bytes"
}
],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "contract ERC4626",
"name": "erc4626Vault",
"type": "address"
},
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"name": "withdrawFromVault",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "adaptorData",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "configurationData",
"type": "bytes"
}
],
"name": "withdrawableFrom",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
Loading

0 comments on commit 631a685

Please sign in to comment.