UNPKG

@augmentedfinance/protocol-v1

Version:

Augmented Protocol smart contracts

208 lines 10.3 kB
"use strict"; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StaticPriceOracleFactory = void 0; const contracts_1 = require("@ethersproject/contracts"); class StaticPriceOracleFactory extends contracts_1.ContractFactory { constructor(signer) { super(_abi, _bytecode, signer); } deploy(remoteAcl, assets_, prices_, overrides) { return super.deploy(remoteAcl, assets_, prices_, overrides || {}); } getDeployTransaction(remoteAcl, assets_, prices_, overrides) { return super.getDeployTransaction(remoteAcl, assets_, prices_, 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.StaticPriceOracleFactory = StaticPriceOracleFactory; const _abi = [ { inputs: [ { internalType: "contract IMarketAccessController", name: "remoteAcl", type: "address", }, { internalType: "address[]", name: "assets_", type: "address[]", }, { internalType: "uint256[]", name: "prices_", type: "uint256[]", }, ], 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: "ETH", outputs: [ { internalType: "address", name: "", type: "address", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "asset", type: "address", }, ], name: "getAssetPrice", outputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "address", name: "asset", type: "address", }, { internalType: "uint256", name: "price", type: "uint256", }, ], name: "setAssetPrice", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [ { internalType: "address[]", name: "assets_", type: "address[]", }, { internalType: "uint256[]", name: "prices_", type: "uint256[]", }, ], name: "setAssetPrices", outputs: [], stateMutability: "nonpayable", type: "function", }, ]; const _bytecode = "0x60806040523480156200001157600080fd5b5060405162000970380380620009708339810160408190526200003491620001b5565b600080546001600160a01b0319166001600160a01b0385161790558051825114620000975760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b604482015260640160405180910390fd5b60005b82518110156200013457818181518110620000c557634e487b7160e01b600052603260045260246000fd5b602002602001015160016000858481518110620000f257634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806200012b90620002f7565b9150506200009a565b505050506200034e565b600082601f8301126200014f578081fd5b81516020620001686200016283620002d1565b6200029e565b80838252828201915082860187848660051b890101111562000188578586fd5b855b85811015620001a8578151845292840192908401906001016200018a565b5090979650505050505050565b600080600060608486031215620001ca578283fd5b8351620001d78162000335565b602085810151919450906001600160401b0380821115620001f6578485fd5b818701915087601f8301126200020a578485fd5b81516200021b6200016282620002d1565b8082825285820191508585018b878560051b88010111156200023b578889fd5b8895505b838610156200026a578051620002558162000335565b8352600195909501949186019186016200023f565b5060408a0151909750945050508083111562000284578384fd5b505062000294868287016200013e565b9150509250925092565b604051601f8201601f191681016001600160401b0381118282101715620002c957620002c96200031f565b604052919050565b60006001600160401b03821115620002ed57620002ed6200031f565b5060051b60200190565b60006000198214156200031857634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200034b57600080fd5b50565b610612806200035e6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806351323f72146100515780638322fff214610066578063b3596f071461009e578063ecb1c85a146100bf575b600080fd5b61006461005f3660046104b8565b6100d2565b005b61008173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b16100ac366004610497565b610120565b604051908152602001610095565b6100646100cd3660046104e1565b610181565b60408051808201909152600a815269149154d5149250d5115160b21b602082015260005461020091610111916001600160a01b0316903390849061028a565b61011b83836102bb565b505050565b6001600160a01b0381166000908152600160205260408120548061017b5760405162461bcd60e51b815260206004820152600d60248201526c1d5b9adb9bdddb88185cdcd95d609a1b60448201526064015b60405180910390fd5b92915050565b60408051808201909152600a815269149154d5149250d5115160b21b6020820152600054610200916101c0916001600160a01b0316903390849061028a565b8382146102015760405162461bcd60e51b815260206004820152600f60248201526e0d8cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610172565b60005b848110156102825761027086868381811061022f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906102449190610497565b85858481811061026457634e487b7160e01b600052603260045260246000fd5b905060200201356102bb565b8061027a816105b5565b915050610204565b505050505050565b61029584848461038a565b81906102b45760405162461bcd60e51b81526004016101729190610562565b5050505050565b6001600160a01b0382166102ce57600080fd5b6001600160a01b038216600081815260016020526040902082905573eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561034157604080518281524260208201527fb4f35977939fa8b5ffe552d517a8ff5223046b1fdd3ee0068ae38d1e2b8d001691015b60405180910390a15050565b604080516001600160a01b03841681526020810183905242918101919091527fce6e0b57367bae95ca7198e1172f653ea64a645c16ab586b4cefa9237bfc2d9290606001610335565b6000806103988585856103a5565b9092161515949350505050565b60405163cc8b29c160e01b81526001600160a01b038381166004830152602482018390526000919085169063cc8b29c19060440160206040518083038186803b1580156103f157600080fd5b505afa158015610405573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610429919061054a565b949350505050565b80356001600160a01b038116811461044857600080fd5b919050565b60008083601f84011261045e578182fd5b50813567ffffffffffffffff811115610475578182fd5b6020830191508360208260051b850101111561049057600080fd5b9250929050565b6000602082840312156104a8578081fd5b6104b182610431565b9392505050565b600080604083850312156104ca578081fd5b6104d383610431565b946020939093013593505050565b600080600080604085870312156104f6578182fd5b843567ffffffffffffffff8082111561050d578384fd5b6105198883890161044d565b90965094506020870135915080821115610531578384fd5b5061053e8782880161044d565b95989497509550505050565b60006020828403121561055b578081fd5b5051919050565b6000602080835283518082850152825b8181101561058e57858101830151858201604001528201610572565b8181111561059f5783604083870101525b50601f01601f1916929092016040019392505050565b60006000198214156105d557634e487b7160e01b81526011600452602481fd5b506001019056fea2646970667358221220c3644a9733699f64add3683af30284b27a1ecccb719a5e29cc27a9fc58cda4b364736f6c63430008040033"; //# sourceMappingURL=StaticPriceOracleFactory.js.map