Skip to content

Commit

Permalink
Merge branch 'master' into flashmint-nav-issuance
Browse files Browse the repository at this point in the history
  • Loading branch information
edkim authored Sep 19, 2024
2 parents 61e54d9 + 509df42 commit e21b456
Show file tree
Hide file tree
Showing 25 changed files with 3,993 additions and 10 deletions.
440 changes: 440 additions & 0 deletions contracts/adapters/TargetWeightWrapExtension.sol

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions contracts/exchangeIssuance/FlashMintWrapped.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ import { IWrapModuleV2} from "../interfaces/IWrapModuleV2.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { DEXAdapter } from "./DEXAdapter.sol";

import "hardhat/console.sol";

/**
* @title FlashMintWrapped
*
Expand Down
1 change: 1 addition & 0 deletions contracts/interfaces/IController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ interface IController {
function isModule(address _module) external view returns(bool);
function isSet(address _setToken) external view returns(bool);
function isSystemContract(address _contractAddress) external view returns (bool);
function isResource(address _resource) external view returns(bool);
function resourceId(uint256 _id) external view returns(address);
function owner() external view returns(address);
function addFactory(address _factory) external;
Expand Down
4 changes: 3 additions & 1 deletion contracts/interfaces/ISetToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ interface ISetToken is IERC20 {

/* ============ Functions ============ */

function controller() external view returns (address);

function addComponent(address _component) external;
function removeComponent(address _component) external;
function editDefaultPositionUnit(address _component, int256 _realUnit) external;
Expand Down Expand Up @@ -115,4 +117,4 @@ interface ISetToken is IERC20 {
function isInitializedModule(address _module) external view returns(bool);
function isPendingModule(address _module) external view returns(bool);
function isLocked() external view returns (bool);
}
}
1 change: 1 addition & 0 deletions contracts/interfaces/ISetValuer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ import { ISetToken } from "../interfaces/ISetToken.sol";

interface ISetValuer {
function calculateSetTokenValuation(ISetToken _setToken, address _quoteAsset) external view returns (uint256);
function calculateComponentValuation(ISetToken _setToken, address _component, address _quoteAsset) external view returns (uint256);
}
161 changes: 161 additions & 0 deletions external/abi/set/AaveV2WrapV2Adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "AaveV2WrapV2Adapter",
"sourceName": "contracts/protocol/integration/wrap-v2/AaveV2WrapV2Adapter.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract ILendingPool",
"name": "_lendingPool",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "getSpenderAddress",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"gas": "0xa7d8c0"
},
{
"inputs": [
{
"internalType": "address",
"name": "_underlyingToken",
"type": "address"
},
{
"internalType": "address",
"name": "_wrappedToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "_wrappedTokenUnits",
"type": "uint256"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "getUnwrapCallData",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function",
"gas": "0xa7d8c0"
},
{
"inputs": [
{
"internalType": "address",
"name": "_underlyingToken",
"type": "address"
},
{
"internalType": "address",
"name": "_wrappedToken",
"type": "address"
},
{
"internalType": "uint256",
"name": "_underlyingUnits",
"type": "uint256"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "getWrapCallData",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "view",
"type": "function",
"gas": "0xa7d8c0"
},
{
"inputs": [],
"name": "lendingPool",
"outputs": [
{
"internalType": "contract ILendingPool",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function",
"gas": "0xa7d8c0"
}
],
"bytecode": "0x608060405234801561001057600080fd5b506040516105e33803806105e383398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610082565b600060208284031215610065578081fd5b81516001600160a01b038116811461007b578182fd5b9392505050565b610552806100916000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806390f0f93814610051578063a59a99731461007c578063d91462ca14610091578063de68a3da146100a4575b600080fd5b61006461005f3660046102ea565b6100b7565b6040516100739392919061040c565b60405180910390f35b61008461014f565b60405161007391906103a9565b61006461009f3660046102ea565b61015e565b6100846100b23660046102b2565b6101f0565b600080606087876100c88282610201565b6100ed5760405162461bcd60e51b81526004016100e490610476565b60405180910390fd5b60608a8989604051602401610104939291906103bd565b60408051601f198184030181529190526020810180516001600160e01b0316631a4ca37b60e21b179052600080546001600160a01b0316975095509350505050955095509592505050565b6000546001600160a01b031681565b6000806060878761016f8282610201565b61018b5760405162461bcd60e51b81526004016100e490610476565b60608a898960006040516024016101a594939291906103e0565b60408051601f198184030181529190526020810180516001600160e01b031663e8eda9df60e01b179052600080546001600160a01b0316975095509350505050955095509592505050565b50506000546001600160a01b031690565b6000826001600160a01b0316826001600160a01b031663b16a19de6040518163ffffffff1660e01b815260040160206040518083038186803b15801561024657600080fd5b505afa15801561025a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027e919061028f565b6001600160a01b0316149392505050565b6000602082840312156102a0578081fd5b81516102ab81610504565b9392505050565b600080604083850312156102c4578081fd5b82356102cf81610504565b915060208301356102df81610504565b809150509250929050565b600080600080600060a08688031215610301578081fd5b853561030c81610504565b9450602086013561031c81610504565b935060408601359250606086013561033381610504565b9150608086013567ffffffffffffffff81111561034e578182fd5b80870188601f82011261035f578283fd5b8035915061037461036f836104d4565b6104ad565b828152896020848401011115610388578384fd5b6103998360208301602085016104f8565b8093505050509295509295909350565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681526020810192909252909116604082015260600190565b6001600160a01b03948516815260208101939093529216604082015260ff909116606082015260800190565b600060018060a01b038516825260208481840152606060408401528351806060850152825b8181101561044d57858101830151858201608001528201610431565b8181111561045e5783608083870101525b50601f01601f19169290920160800195945050505050565b6020808252601a908201527f4d75737420626520612076616c696420746f6b656e2070616972000000000000604082015260600190565b60405181810167ffffffffffffffff811182821017156104cc57600080fd5b604052919050565b600067ffffffffffffffff8211156104ea578081fd5b50601f01601f191660200190565b82818337506000910152565b6001600160a01b038116811461051957600080fd5b5056fea26469706673582212200ff3a4107a04cf8c9239c38dce04978f06ca975a86cac2782a262fb3f3828db064736f6c634300060a0033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806390f0f93814610051578063a59a99731461007c578063d91462ca14610091578063de68a3da146100a4575b600080fd5b61006461005f3660046102ea565b6100b7565b6040516100739392919061040c565b60405180910390f35b61008461014f565b60405161007391906103a9565b61006461009f3660046102ea565b61015e565b6100846100b23660046102b2565b6101f0565b600080606087876100c88282610201565b6100ed5760405162461bcd60e51b81526004016100e490610476565b60405180910390fd5b60608a8989604051602401610104939291906103bd565b60408051601f198184030181529190526020810180516001600160e01b0316631a4ca37b60e21b179052600080546001600160a01b0316975095509350505050955095509592505050565b6000546001600160a01b031681565b6000806060878761016f8282610201565b61018b5760405162461bcd60e51b81526004016100e490610476565b60608a898960006040516024016101a594939291906103e0565b60408051601f198184030181529190526020810180516001600160e01b031663e8eda9df60e01b179052600080546001600160a01b0316975095509350505050955095509592505050565b50506000546001600160a01b031690565b6000826001600160a01b0316826001600160a01b031663b16a19de6040518163ffffffff1660e01b815260040160206040518083038186803b15801561024657600080fd5b505afa15801561025a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061027e919061028f565b6001600160a01b0316149392505050565b6000602082840312156102a0578081fd5b81516102ab81610504565b9392505050565b600080604083850312156102c4578081fd5b82356102cf81610504565b915060208301356102df81610504565b809150509250929050565b600080600080600060a08688031215610301578081fd5b853561030c81610504565b9450602086013561031c81610504565b935060408601359250606086013561033381610504565b9150608086013567ffffffffffffffff81111561034e578182fd5b80870188601f82011261035f578283fd5b8035915061037461036f836104d4565b6104ad565b828152896020848401011115610388578384fd5b6103998360208301602085016104f8565b8093505050509295509295909350565b6001600160a01b0391909116815260200190565b6001600160a01b0393841681526020810192909252909116604082015260600190565b6001600160a01b03948516815260208101939093529216604082015260ff909116606082015260800190565b600060018060a01b038516825260208481840152606060408401528351806060850152825b8181101561044d57858101830151858201608001528201610431565b8181111561045e5783608083870101525b50601f01601f19169290920160800195945050505050565b6020808252601a908201527f4d75737420626520612076616c696420746f6b656e2070616972000000000000604082015260600190565b60405181810167ffffffffffffffff811182821017156104cc57600080fd5b604052919050565b600067ffffffffffffffff8211156104ea578081fd5b50601f01601f191660200190565b82818337506000910152565b6001600160a01b038116811461051957600080fd5b5056fea26469706673582212200ff3a4107a04cf8c9239c38dce04978f06ca975a86cac2782a262fb3f3828db064736f6c634300060a0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Loading

0 comments on commit e21b456

Please sign in to comment.