Skip to content

Commit

Permalink
Merge pull request #37 from Blueberryfi/curve-oracle
Browse files Browse the repository at this point in the history
Curve oracle fix #123
  • Loading branch information
Gornutz authored Jun 13, 2023
2 parents 99fd7c3 + 2710d4e commit edde717
Show file tree
Hide file tree
Showing 19 changed files with 1,162 additions and 180 deletions.
184 changes: 184 additions & 0 deletions abi/CurveStableOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
[
{
"inputs": [
{
"internalType": "contract IBaseOracle",
"name": "base_",
"type": "address"
},
{
"internalType": "contract ICurveAddressProvider",
"name": "addressProvider_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "lp",
"type": "address"
}
],
"name": "ORACLE_NOT_SUPPORT_LP",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "crvLp",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"indexed": false,
"internalType": "address[]",
"name": "underlyingTokens",
"type": "address[]"
}
],
"name": "CurveLpRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "addressProvider",
"outputs": [
{
"internalType": "contract ICurveAddressProvider",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "base",
"outputs": [
{
"internalType": "contract IBaseOracle",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "crvLp",
"type": "address"
}
],
"name": "getPoolInfo",
"outputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "address[]",
"name": "coins",
"type": "address[]"
},
{
"internalType": "uint256",
"name": "virtualPrice",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "crvLp",
"type": "address"
}
],
"name": "getPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
2 changes: 1 addition & 1 deletion abi/CurveOracle.json → abi/CurveTricryptoOracle.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"type": "uint256"
}
],
"stateMutability": "view",
"stateMutability": "nonpayable",
"type": "function"
},
{
Expand Down
180 changes: 180 additions & 0 deletions abi/CurveVolatileOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
[
{
"inputs": [
{
"internalType": "contract IBaseOracle",
"name": "base_",
"type": "address"
},
{
"internalType": "contract ICurveAddressProvider",
"name": "addressProvider_",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "lp",
"type": "address"
}
],
"name": "ORACLE_NOT_SUPPORT_LP",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "crvLp",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"indexed": false,
"internalType": "address[]",
"name": "underlyingTokens",
"type": "address[]"
}
],
"name": "CurveLpRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [],
"name": "addressProvider",
"outputs": [
{
"internalType": "contract ICurveAddressProvider",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "base",
"outputs": [
{
"internalType": "contract IBaseOracle",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "crvLp",
"type": "address"
}
],
"name": "getPoolInfo",
"outputs": [
{
"internalType": "address",
"name": "pool",
"type": "address"
},
{
"internalType": "address[]",
"name": "coins",
"type": "address[]"
},
{
"internalType": "uint256",
"name": "virtualPrice",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "crvLp",
"type": "address"
}
],
"name": "getPrice",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
2 changes: 1 addition & 1 deletion abi/ICurveOracle.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"type": "uint256"
}
],
"stateMutability": "view",
"stateMutability": "nonpayable",
"type": "function"
},
{
Expand Down
Loading

0 comments on commit edde717

Please sign in to comment.