@astonic-io/astonic-bindings-ts
Version:
Astonic type generation and npm package deployment repo
159 lines (158 loc) • 7.42 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.WithThreshold__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var ethers_1 = require("ethers");
var _abi = [
{
type: "function",
name: "defaultRateChangeThreshold",
inputs: [],
outputs: [
{
name: "value",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "exceedsThreshold",
inputs: [
{
name: "referenceValue",
type: "uint256",
internalType: "uint256",
},
{
name: "currentValue",
type: "uint256",
internalType: "uint256",
},
{
name: "rateFeedID",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "view",
},
{
type: "function",
name: "rateChangeThreshold",
inputs: [
{
name: "",
type: "address",
internalType: "address",
},
],
outputs: [
{
name: "value",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "event",
name: "DefaultRateChangeThresholdUpdated",
inputs: [
{
name: "defaultRateChangeThreshold",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "RateChangeThresholdUpdated",
inputs: [
{
name: "rateFeedID",
type: "address",
indexed: false,
internalType: "address",
},
{
name: "rateChangeThreshold",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
];
var _bytecode = "0x608060405234801561001057600080fd5b506104b5806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80631893304f14610046578063753d8c2f1461007e578063a44235cb146100c4575b600080fd5b61006c6004803603602081101561005c57600080fd5b50356001600160a01b03166100cc565b60408051918252519081900360200190f35b6100b06004803603606081101561009457600080fd5b50803590602081013590604001356001600160a01b03166100de565b604080519115158252519081900360200190f35b61006c6101e2565b60016020526000908152604090205481565b60408051602081019091526000805482529081906100fb906101e8565b6001600160a01b038416600090815260016020908152604080832081519283019091525481529192509061012e906101e8565b9050801561013a578091505b600061014c6101476101ec565b6101e8565b90506000610160828563ffffffff61021016565b9050600061018e69d3c21bcecceda10000006101828b8563ffffffff61027316565b9063ffffffff6102cc16565b905060006101a2848763ffffffff61030e16565b905060006101c469d3c21bcecceda10000006101828d8563ffffffff61027316565b9050808a10806101d35750828a115b9b9a5050505050505050505050565b60005481565b5190565b6101f461044c565b50604080516020810190915269d3c21bcecceda1000000815290565b60008282018381101561026a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000826102825750600061026d565b8282028284828161028f57fe5b041461026a5760405162461bcd60e51b81526004018080602001828103825260218152602001806104606021913960400191505060405180910390fd5b600061026a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610350565b600061026a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506103f2565b600081836103dc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156103a1578181015183820152602001610389565b50505050905090810190601f1680156103ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816103e857fe5b0495945050505050565b600081848411156104445760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156103a1578181015183820152602001610389565b505050900390565b604051806020016040528060008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820a33d66ec642ca53e62141c63d01f8de25613cb772a6a674aa910a66593b33f2864736f6c63430005110032";
var isSuperArgs = function (xs) { return xs.length > 1; };
var WithThreshold__factory = /** @class */ (function (_super) {
__extends(WithThreshold__factory, _super);
function WithThreshold__factory() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var _this = this;
if (isSuperArgs(args)) {
_this = _super.apply(this, args) || this;
}
else {
_this = _super.call(this, _abi, _bytecode, args[0]) || this;
}
return _this;
}
WithThreshold__factory.prototype.deploy = function (overrides) {
return _super.prototype.deploy.call(this, overrides || {});
};
WithThreshold__factory.prototype.getDeployTransaction = function (overrides) {
return _super.prototype.getDeployTransaction.call(this, overrides || {});
};
WithThreshold__factory.prototype.attach = function (address) {
return _super.prototype.attach.call(this, address);
};
WithThreshold__factory.prototype.connect = function (signer) {
return _super.prototype.connect.call(this, signer);
};
WithThreshold__factory.createInterface = function () {
return new ethers_1.utils.Interface(_abi);
};
WithThreshold__factory.connect = function (address, signerOrProvider) {
return new ethers_1.Contract(address, _abi, signerOrProvider);
};
WithThreshold__factory.bytecode = _bytecode;
WithThreshold__factory.abi = _abi;
return WithThreshold__factory;
}(ethers_1.ContractFactory));
exports.WithThreshold__factory = WithThreshold__factory;