UNPKG

@augmentedfinance/protocol-v1

Version:

Augmented Protocol smart contracts

189 lines 10.3 kB
"use strict"; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PriceFeedCompoundEthFactory = void 0; const contracts_1 = require("@ethersproject/contracts"); class PriceFeedCompoundEthFactory extends contracts_1.ContractFactory { constructor(signer) { super(_abi, _bytecode, signer); } deploy(token, overrides) { return super.deploy(token, overrides || {}); } getDeployTransaction(token, overrides) { return super.getDeployTransaction(token, overrides || {}); } attach(address) { return super.attach(address); } connect(signer) { return super.connect(signer); } static connect(address, signerOrProvider) { return new contracts_1.Contract(address, _abi, signerOrProvider); } } exports.PriceFeedCompoundEthFactory = PriceFeedCompoundEthFactory; const _abi = [ { inputs: [ { internalType: "contract ICToken", name: "token", type: "address", }, ], stateMutability: "nonpayable", type: "constructor", }, { anonymous: false, inputs: [ { indexed: false, internalType: "address", name: "asset", type: "address", }, { indexed: false, internalType: "uint256", name: "price", type: "uint256", }, { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256", }, ], name: "AssetPriceUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", name: "asset", type: "address", }, { indexed: false, internalType: "uint256", name: "index", type: "uint256", }, { indexed: true, internalType: "address", name: "underlyingSource", type: "address", }, { indexed: false, internalType: "uint256", name: "underlyingPrice", type: "uint256", }, { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256", }, { indexed: false, internalType: "enum SourceType", name: "sourceType", type: "uint8", }, ], name: "DerivedAssetSourceUpdated", type: "event", }, { anonymous: false, inputs: [ { indexed: false, internalType: "uint256", name: "price", type: "uint256", }, { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256", }, ], name: "EthPriceUpdated", type: "event", }, { inputs: [], name: "latestAnswer", outputs: [ { internalType: "int256", name: "", type: "int256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "latestRound", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "pure", type: "function", }, { inputs: [], name: "latestTimestamp", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "rateIndex", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "updatePrice", outputs: [], stateMutability: "nonpayable", type: "function", }, ]; const _bytecode = "0x60806040523480156200001157600080fd5b5060405162000ac638038062000ac6833981016040819052620000349162000376565b600080546001600160a01b0319166001600160a01b0383161790558060126200005f81600a62000473565b6200006c90600a62000505565b600180546001600160e01b0319166001600160e01b039283161790556200009792506200009e169050565b5062000616565b6001544263ffffffff908116600160e01b909204161415620000bc57565b6001805463ffffffff4216600160e01b026001600160e01b0391821617909155600090620000eb90620001c216565b90506000620000f9620001ce565b6000805460405192935042926001600160a01b03909116907f4d6f204d987e56ba34a56def65b841eee975b05eec411c9caddfc759a01ced56906200014690869088908790879062000415565b60405180910390a36000547fce6e0b57367bae95ca7198e1172f653ea64a645c16ab586b4cefa9237bfc2d92906001600160a01b0316620001948585620001ec602090811b620001cb17901c565b604080516001600160a01b0390931683526020830191909152810183905260600160405180910390a1505050565b670de0b6b3a764000090565b6000620001e76b033b2e3c9fd0803ce8000000620002cd565b905090565b6000821580620001fa575081155b156200020957506000620002c7565b816200022360026b033b2e3c9fd0803ce80000006200049b565b6200023190600019620005e6565b6200023d91906200049b565b83111560405180604001604052806002815260200161068760f31b81525090620002855760405162461bcd60e51b81526004016200027c9190620003bf565b60405180910390fd5b506b033b2e3c9fd0803ce8000000620002a06002826200049b565b620002ac8486620005c4565b620002b8919062000458565b620002c491906200049b565b90505b92915050565b600154600080546040805163182df0f560e01b8152905192936001600160e01b0316926001600160a01b039092169163182df0f591600480820192602092909190829003018186803b1580156200032357600080fd5b505afa15801562000338573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200035e9190620003a6565b6200036a9084620005c4565b620002c791906200049b565b60006020828403121562000388578081fd5b81516001600160a01b03811681146200039f578182fd5b9392505050565b600060208284031215620003b8578081fd5b5051919050565b6000602080835283518082850152825b81811015620003ed57858101830151858201604001528201620003cf565b81811115620003ff5783604083870101525b50601f01601f1916929092016040019392505050565b848152602081018490526040810183905260808101600383106200044957634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b600082198211156200046e576200046e62000600565b500190565b600060ff821660ff84168060ff0382111562000493576200049362000600565b019392505050565b600082620004b757634e487b7160e01b81526012600452602481fd5b500490565b600181815b80851115620004fd578160001904821115620004e157620004e162000600565b80851615620004ef57918102915b93841c9390800290620004c1565b509250929050565b6000620002c460ff8416836000826200052157506001620002c7565b816200053057506000620002c7565b8160018114620005495760028114620005545762000574565b6001915050620002c7565b60ff84111562000568576200056862000600565b50506001821b620002c7565b5060208310610133831016604e8410600b841016171562000599575081810a620002c7565b620005a58383620004bc565b8060001904821115620005bc57620005bc62000600565b029392505050565b6000816000190483118215151615620005e157620005e162000600565b500290565b600082821015620005fb57620005fb62000600565b500390565b634e487b7160e01b600052601160045260246000fd5b6104a080620006266000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806350d25bcd1461005c578063668a0f0214610076578063673a7e281461007e5780638205bf6a14610088578063c24cda6d1461008e575b600080fd5b610064610096565b60405190815260200160405180910390f35b600019610064565b6100866100ae565b005b42610064565b6100646101b4565b60006100a9670de0b6b3a7640000610298565b905090565b6001544263ffffffff908116600160e01b9092041614156100cb57565b600180546001600160e01b0316600160e01b4263ffffffff1602179055670de0b6b3a764000060006100fb6101b4565b6000805460405192935042926001600160a01b03909116907f4d6f204d987e56ba34a56def65b841eee975b05eec411c9caddfc759a01ced56906101469086908890879087906103a4565b60405180910390a36000547fce6e0b57367bae95ca7198e1172f653ea64a645c16ab586b4cefa9237bfc2d92906001600160a01b031661018685856101cb565b604080516001600160a01b0390931683526020830191909152810183905260600160405180910390a1505050565b60006100a96b033b2e3c9fd0803ce8000000610298565b60008215806101d8575081155b156101e557506000610292565b816101fd60026b033b2e3c9fd0803ce80000006103fe565b6102099060001961043d565b61021391906103fe565b83111560405180604001604052806002815260200161068760f31b815250906102585760405162461bcd60e51b815260040161024f9190610351565b60405180910390fd5b506b033b2e3c9fd0803ce80000006102716002826103fe565b61027b848661041e565b61028591906103e6565b61028f91906103fe565b90505b92915050565b600154600080546040805163182df0f560e01b8152905192936001600160e01b0316926001600160a01b039092169163182df0f591600480820192602092909190829003018186803b1580156102ed57600080fd5b505afa158015610301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103259190610339565b61032f908461041e565b61029291906103fe565b60006020828403121561034a578081fd5b5051919050565b6000602080835283518082850152825b8181101561037d57858101830151858201604001528201610361565b8181111561038e5783604083870101525b50601f01601f1916929092016040019392505050565b848152602081018490526040810183905260808101600383106103d757634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b600082198211156103f9576103f9610454565b500190565b60008261041957634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561043857610438610454565b500290565b60008282101561044f5761044f610454565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220ffb88cd39aa6d6e326ad45188c88df7c21b59fdc35a3b044d2be70c4ad97ba9664736f6c63430008040033"; //# sourceMappingURL=PriceFeedCompoundEthFactory.js.map