Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

feat: tectonic integration #609

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/apps/tectonic/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,106 changes: 1,106 additions & 0 deletions src/apps/tectonic/contracts/abis/tectonic-core.json

Large diffs are not rendered by default.

365 changes: 365 additions & 0 deletions src/apps/tectonic/contracts/abis/tectonic-lens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,365 @@
[
{
"constant": false,
"inputs": [
{ "internalType": "contract TectonicCoreLensInterface", "name": "tectonicCore", "type": "address" },
{ "internalType": "address", "name": "account", "type": "address" }
],
"name": "getAccountLimits",
"outputs": [
{
"components": [
{ "internalType": "contract TToken[]", "name": "markets", "type": "address[]" },
{ "internalType": "uint256", "name": "liquidity", "type": "uint256" },
{ "internalType": "uint256", "name": "shortfall", "type": "uint256" }
],
"internalType": "struct TectonicLens.AccountLimits",
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "contract GovernorBravoInterface", "name": "governor", "type": "address" },
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
],
"name": "getGovBravoProposals",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
{ "internalType": "address", "name": "proposer", "type": "address" },
{ "internalType": "uint256", "name": "eta", "type": "uint256" },
{ "internalType": "address[]", "name": "targets", "type": "address[]" },
{ "internalType": "uint256[]", "name": "values", "type": "uint256[]" },
{ "internalType": "string[]", "name": "signatures", "type": "string[]" },
{ "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" },
{ "internalType": "uint256", "name": "startBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "endBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "forVotes", "type": "uint256" },
{ "internalType": "uint256", "name": "againstVotes", "type": "uint256" },
{ "internalType": "uint256", "name": "abstainVotes", "type": "uint256" },
{ "internalType": "bool", "name": "canceled", "type": "bool" },
{ "internalType": "bool", "name": "executed", "type": "bool" }
],
"internalType": "struct TectonicLens.GovBravoProposal[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "contract GovernorBravoInterface", "name": "governor", "type": "address" },
{ "internalType": "address", "name": "voter", "type": "address" },
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
],
"name": "getGovBravoReceipts",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
{ "internalType": "bool", "name": "hasVoted", "type": "bool" },
{ "internalType": "uint8", "name": "support", "type": "uint8" },
{ "internalType": "uint128", "name": "votes", "type": "uint128" }
],
"internalType": "struct TectonicLens.GovBravoReceipt[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "contract GovernorAlpha", "name": "governor", "type": "address" },
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
],
"name": "getGovProposals",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
{ "internalType": "address", "name": "proposer", "type": "address" },
{ "internalType": "uint256", "name": "eta", "type": "uint256" },
{ "internalType": "address[]", "name": "targets", "type": "address[]" },
{ "internalType": "uint256[]", "name": "values", "type": "uint256[]" },
{ "internalType": "string[]", "name": "signatures", "type": "string[]" },
{ "internalType": "bytes[]", "name": "calldatas", "type": "bytes[]" },
{ "internalType": "uint256", "name": "startBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "endBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "forVotes", "type": "uint256" },
{ "internalType": "uint256", "name": "againstVotes", "type": "uint256" },
{ "internalType": "bool", "name": "canceled", "type": "bool" },
{ "internalType": "bool", "name": "executed", "type": "bool" }
],
"internalType": "struct TectonicLens.GovProposal[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "contract GovernorAlpha", "name": "governor", "type": "address" },
{ "internalType": "address", "name": "voter", "type": "address" },
{ "internalType": "uint256[]", "name": "proposalIds", "type": "uint256[]" }
],
"name": "getGovReceipts",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "proposalId", "type": "uint256" },
{ "internalType": "bool", "name": "hasVoted", "type": "bool" },
{ "internalType": "bool", "name": "support", "type": "bool" },
{ "internalType": "uint128", "name": "votes", "type": "uint128" }
],
"internalType": "struct TectonicLens.GovReceipt[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "contract Tonic", "name": "tonic", "type": "address" },
{ "internalType": "address", "name": "account", "type": "address" }
],
"name": "getTonicBalanceMetadata",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "balance", "type": "uint256" },
{ "internalType": "uint256", "name": "votes", "type": "uint256" },
{ "internalType": "address", "name": "delegate", "type": "address" }
],
"internalType": "struct TectonicLens.TonicBalanceMetadata",
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{ "internalType": "contract Tonic", "name": "tonic", "type": "address" },
{ "internalType": "contract TectonicCoreLensInterface", "name": "tectonicCore", "type": "address" },
{ "internalType": "address", "name": "account", "type": "address" }
],
"name": "getTonicBalanceMetadataExt",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "balance", "type": "uint256" },
{ "internalType": "uint256", "name": "votes", "type": "uint256" },
{ "internalType": "address", "name": "delegate", "type": "address" },
{ "internalType": "uint256", "name": "allocated", "type": "uint256" }
],
"internalType": "struct TectonicLens.TonicBalanceMetadataExt",
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{ "internalType": "contract Tonic", "name": "tonic", "type": "address" },
{ "internalType": "address", "name": "account", "type": "address" },
{ "internalType": "uint32[]", "name": "blockNumbers", "type": "uint32[]" }
],
"name": "getTonicVotes",
"outputs": [
{
"components": [
{ "internalType": "uint256", "name": "blockNumber", "type": "uint256" },
{ "internalType": "uint256", "name": "votes", "type": "uint256" }
],
"internalType": "struct TectonicLens.TonicVotes[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{ "internalType": "contract TToken", "name": "tToken", "type": "address" },
{ "internalType": "address payable", "name": "account", "type": "address" }
],
"name": "tTokenBalances",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "tToken", "type": "address" },
{ "internalType": "uint256", "name": "balanceOf", "type": "uint256" },
{ "internalType": "uint256", "name": "borrowBalanceCurrent", "type": "uint256" },
{ "internalType": "uint256", "name": "balanceOfUnderlying", "type": "uint256" },
{ "internalType": "uint256", "name": "tokenBalance", "type": "uint256" },
{ "internalType": "uint256", "name": "tokenAllowance", "type": "uint256" }
],
"internalType": "struct TectonicLens.TTokenBalances",
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" },
{ "internalType": "address payable", "name": "account", "type": "address" }
],
"name": "tTokenBalancesAll",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "tToken", "type": "address" },
{ "internalType": "uint256", "name": "balanceOf", "type": "uint256" },
{ "internalType": "uint256", "name": "borrowBalanceCurrent", "type": "uint256" },
{ "internalType": "uint256", "name": "balanceOfUnderlying", "type": "uint256" },
{ "internalType": "uint256", "name": "tokenBalance", "type": "uint256" },
{ "internalType": "uint256", "name": "tokenAllowance", "type": "uint256" }
],
"internalType": "struct TectonicLens.TTokenBalances[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }],
"name": "tTokenMetadata",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "tToken", "type": "address" },
{ "internalType": "uint256", "name": "exchangeRateCurrent", "type": "uint256" },
{ "internalType": "uint256", "name": "supplyRatePerBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "borrowRatePerBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" },
{ "internalType": "uint256", "name": "totalBorrows", "type": "uint256" },
{ "internalType": "uint256", "name": "totalReserves", "type": "uint256" },
{ "internalType": "uint256", "name": "totalSupply", "type": "uint256" },
{ "internalType": "uint256", "name": "totalCash", "type": "uint256" },
{ "internalType": "bool", "name": "isListed", "type": "bool" },
{ "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" },
{ "internalType": "address", "name": "underlyingAssetAddress", "type": "address" },
{ "internalType": "uint256", "name": "tTokenDecimals", "type": "uint256" },
{ "internalType": "uint256", "name": "underlyingDecimals", "type": "uint256" }
],
"internalType": "struct TectonicLens.TTokenMetadata",
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }],
"name": "tTokenMetadataAll",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "tToken", "type": "address" },
{ "internalType": "uint256", "name": "exchangeRateCurrent", "type": "uint256" },
{ "internalType": "uint256", "name": "supplyRatePerBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "borrowRatePerBlock", "type": "uint256" },
{ "internalType": "uint256", "name": "reserveFactorMantissa", "type": "uint256" },
{ "internalType": "uint256", "name": "totalBorrows", "type": "uint256" },
{ "internalType": "uint256", "name": "totalReserves", "type": "uint256" },
{ "internalType": "uint256", "name": "totalSupply", "type": "uint256" },
{ "internalType": "uint256", "name": "totalCash", "type": "uint256" },
{ "internalType": "bool", "name": "isListed", "type": "bool" },
{ "internalType": "uint256", "name": "collateralFactorMantissa", "type": "uint256" },
{ "internalType": "address", "name": "underlyingAssetAddress", "type": "address" },
{ "internalType": "uint256", "name": "tTokenDecimals", "type": "uint256" },
{ "internalType": "uint256", "name": "underlyingDecimals", "type": "uint256" }
],
"internalType": "struct TectonicLens.TTokenMetadata[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [{ "internalType": "contract TToken", "name": "tToken", "type": "address" }],
"name": "tTokenUnderlyingPrice",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "tToken", "type": "address" },
{ "internalType": "uint256", "name": "underlyingPrice", "type": "uint256" }
],
"internalType": "struct TectonicLens.TTokenUnderlyingPrice",
"name": "",
"type": "tuple"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [{ "internalType": "contract TToken[]", "name": "tTokens", "type": "address[]" }],
"name": "tTokenUnderlyingPriceAll",
"outputs": [
{
"components": [
{ "internalType": "address", "name": "tToken", "type": "address" },
{ "internalType": "uint256", "name": "underlyingPrice", "type": "uint256" }
],
"internalType": "struct TectonicLens.TTokenUnderlyingPrice[]",
"name": "",
"type": "tuple[]"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading