mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
271 lines
16 KiB
TypeScript
271 lines
16 KiB
TypeScript
|
/* Generated by ts-generator ver. 0.0.8 */
|
||
|
/* tslint:disable */
|
||
|
|
||
|
import { Contract, ContractFactory, Signer } from "ethers";
|
||
|
import { Provider } from "ethers/providers";
|
||
|
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||
|
|
||
|
import { TransactionOverrides } from ".";
|
||
|
import { ChainlinkProxyPriceProvider } from "./ChainlinkProxyPriceProvider";
|
||
|
|
||
|
export class ChainlinkProxyPriceProviderFactory extends ContractFactory {
|
||
|
constructor(signer?: Signer) {
|
||
|
super(_abi, _bytecode, signer);
|
||
|
}
|
||
|
|
||
|
deploy(
|
||
|
_assets: string[],
|
||
|
_sources: string[],
|
||
|
_fallbackOracle: string,
|
||
|
overrides?: TransactionOverrides
|
||
|
): Promise<ChainlinkProxyPriceProvider> {
|
||
|
return super.deploy(
|
||
|
_assets,
|
||
|
_sources,
|
||
|
_fallbackOracle,
|
||
|
overrides
|
||
|
) as Promise<ChainlinkProxyPriceProvider>;
|
||
|
}
|
||
|
getDeployTransaction(
|
||
|
_assets: string[],
|
||
|
_sources: string[],
|
||
|
_fallbackOracle: string,
|
||
|
overrides?: TransactionOverrides
|
||
|
): UnsignedTransaction {
|
||
|
return super.getDeployTransaction(
|
||
|
_assets,
|
||
|
_sources,
|
||
|
_fallbackOracle,
|
||
|
overrides
|
||
|
);
|
||
|
}
|
||
|
attach(address: string): ChainlinkProxyPriceProvider {
|
||
|
return super.attach(address) as ChainlinkProxyPriceProvider;
|
||
|
}
|
||
|
connect(signer: Signer): ChainlinkProxyPriceProviderFactory {
|
||
|
return super.connect(signer) as ChainlinkProxyPriceProviderFactory;
|
||
|
}
|
||
|
static connect(
|
||
|
address: string,
|
||
|
signerOrProvider: Signer | Provider
|
||
|
): ChainlinkProxyPriceProvider {
|
||
|
return new Contract(
|
||
|
address,
|
||
|
_abi,
|
||
|
signerOrProvider
|
||
|
) as ChainlinkProxyPriceProvider;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
const _abi = [
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address[]",
|
||
|
name: "_assets",
|
||
|
type: "address[]"
|
||
|
},
|
||
|
{
|
||
|
internalType: "address[]",
|
||
|
name: "_sources",
|
||
|
type: "address[]"
|
||
|
},
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_fallbackOracle",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "constructor"
|
||
|
},
|
||
|
{
|
||
|
anonymous: false,
|
||
|
inputs: [
|
||
|
{
|
||
|
indexed: true,
|
||
|
internalType: "address",
|
||
|
name: "asset",
|
||
|
type: "address"
|
||
|
},
|
||
|
{
|
||
|
indexed: true,
|
||
|
internalType: "address",
|
||
|
name: "source",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "AssetSourceUpdated",
|
||
|
type: "event"
|
||
|
},
|
||
|
{
|
||
|
anonymous: false,
|
||
|
inputs: [
|
||
|
{
|
||
|
indexed: true,
|
||
|
internalType: "address",
|
||
|
name: "fallbackOracle",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "FallbackOracleUpdated",
|
||
|
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: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_asset",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "getAssetPrice",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256",
|
||
|
name: "",
|
||
|
type: "uint256"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address[]",
|
||
|
name: "_assets",
|
||
|
type: "address[]"
|
||
|
}
|
||
|
],
|
||
|
name: "getAssetsPrices",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "uint256[]",
|
||
|
name: "",
|
||
|
type: "uint256[]"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [],
|
||
|
name: "getFallbackOracle",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_asset",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "getSourceOfAsset",
|
||
|
outputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
stateMutability: "view",
|
||
|
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: "_assets",
|
||
|
type: "address[]"
|
||
|
},
|
||
|
{
|
||
|
internalType: "address[]",
|
||
|
name: "_sources",
|
||
|
type: "address[]"
|
||
|
}
|
||
|
],
|
||
|
name: "setAssetSources",
|
||
|
outputs: [],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "_fallbackOracle",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "setFallbackOracle",
|
||
|
outputs: [],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "function"
|
||
|
},
|
||
|
{
|
||
|
inputs: [
|
||
|
{
|
||
|
internalType: "address",
|
||
|
name: "newOwner",
|
||
|
type: "address"
|
||
|
}
|
||
|
],
|
||
|
name: "transferOwnership",
|
||
|
outputs: [],
|
||
|
stateMutability: "nonpayable",
|
||
|
type: "function"
|
||
|
}
|
||
|
];
|
||
|
|
||
|
const _bytecode =
|
||
|
"0x60806040523480156200001157600080fd5b506040516200163538038062001635833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b5050505090500160405260200180516040519392919084640100000000821115620000f057600080fd5b838201915060208201858111156200010757600080fd5b82518660208202830111640100000000821117156200012557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156200015e57808201518184015260208101905062000141565b505050509050016040526020018051906020019092919050505060006200018a6200025460201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35062000239816200025c60201b60201c565b6200024b8383620002e360201b60201c565b505050620004a6565b600033905090565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fce7a780d33665b1ea097af5f155e3821b809ecbaa839d3b33aa83ba28168cefb60405160405180910390a250565b80518251146200035b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f494e434f4e53495354454e545f504152414d535f4c454e47544800000000000081525060200191505060405180910390fd5b60008090505b8251811015620004a1578181815181106200037857fe5b6020026020010151600160008584815181106200039157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508181815181106200041e57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168382815181106200044957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f22c5b7b2d8561d39f7f210b6b326a1aa69f15311163082308ac4877db6339dc160405160405180910390a3808060010191505062000361565b505050565b61117f80620004b66000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806392bf2be01161006657806392bf2be01461017a5780639d23d9f2146101fe578063abfd5310146102cc578063b3596f071461039a578063f2fde38b146103f257610093565b8063170aee73146100985780636210308c146100dc578063715018a6146101265780638da5cb5b14610130575b600080fd5b6100da600480360360208110156100ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610436565b005b6100e461050b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012e610535565b005b6101386106bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bc6004803603602081101561019057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102756004803603602081101561021457600080fd5b810190808035906020019064010000000081111561023157600080fd5b82018360208201111561024357600080fd5b8035906020019184602083028401116401000000008311171561026557600080fd5b909192939192939050505061074f565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156102b857808201518184015260208101905061029d565b505050509050019250505060405180910390f35b610398600480360360408110156102e257600080fd5b81019080803590602001906401000000008111156102ff57600080fd5b82018360208201111561031157600080fd5b8035906020019184602083028401116401000000008311171561033357600080fd5b90919293919293908035906020019064010000
|