mirror of
https://github.com/Instadapp/aave-automation-subgraph.git
synced 2024-07-29 22:28:08 +00:00
467 lines
11 KiB
TypeScript
467 lines
11 KiB
TypeScript
|
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||
|
|
||
|
import {
|
||
|
ethereum,
|
||
|
JSONValue,
|
||
|
TypedMap,
|
||
|
Entity,
|
||
|
Bytes,
|
||
|
Address,
|
||
|
BigInt
|
||
|
} from "@graphprotocol/graph-ts";
|
||
|
|
||
|
export class InstaList__accountLinkResult {
|
||
|
value0: Address;
|
||
|
value1: Address;
|
||
|
value2: BigInt;
|
||
|
|
||
|
constructor(value0: Address, value1: Address, value2: BigInt) {
|
||
|
this.value0 = value0;
|
||
|
this.value1 = value1;
|
||
|
this.value2 = value2;
|
||
|
}
|
||
|
|
||
|
toMap(): TypedMap<string, ethereum.Value> {
|
||
|
let map = new TypedMap<string, ethereum.Value>();
|
||
|
map.set("value0", ethereum.Value.fromAddress(this.value0));
|
||
|
map.set("value1", ethereum.Value.fromAddress(this.value1));
|
||
|
map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2));
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
getFirst(): Address {
|
||
|
return this.value0;
|
||
|
}
|
||
|
|
||
|
getLast(): Address {
|
||
|
return this.value1;
|
||
|
}
|
||
|
|
||
|
getCount(): BigInt {
|
||
|
return this.value2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InstaList__accountListResult {
|
||
|
value0: Address;
|
||
|
value1: Address;
|
||
|
|
||
|
constructor(value0: Address, value1: Address) {
|
||
|
this.value0 = value0;
|
||
|
this.value1 = value1;
|
||
|
}
|
||
|
|
||
|
toMap(): TypedMap<string, ethereum.Value> {
|
||
|
let map = new TypedMap<string, ethereum.Value>();
|
||
|
map.set("value0", ethereum.Value.fromAddress(this.value0));
|
||
|
map.set("value1", ethereum.Value.fromAddress(this.value1));
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
getPrev(): Address {
|
||
|
return this.value0;
|
||
|
}
|
||
|
|
||
|
getNext(): Address {
|
||
|
return this.value1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InstaList__userLinkResult {
|
||
|
value0: BigInt;
|
||
|
value1: BigInt;
|
||
|
value2: BigInt;
|
||
|
|
||
|
constructor(value0: BigInt, value1: BigInt, value2: BigInt) {
|
||
|
this.value0 = value0;
|
||
|
this.value1 = value1;
|
||
|
this.value2 = value2;
|
||
|
}
|
||
|
|
||
|
toMap(): TypedMap<string, ethereum.Value> {
|
||
|
let map = new TypedMap<string, ethereum.Value>();
|
||
|
map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0));
|
||
|
map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1));
|
||
|
map.set("value2", ethereum.Value.fromUnsignedBigInt(this.value2));
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
getFirst(): BigInt {
|
||
|
return this.value0;
|
||
|
}
|
||
|
|
||
|
getLast(): BigInt {
|
||
|
return this.value1;
|
||
|
}
|
||
|
|
||
|
getCount(): BigInt {
|
||
|
return this.value2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InstaList__userListResult {
|
||
|
value0: BigInt;
|
||
|
value1: BigInt;
|
||
|
|
||
|
constructor(value0: BigInt, value1: BigInt) {
|
||
|
this.value0 = value0;
|
||
|
this.value1 = value1;
|
||
|
}
|
||
|
|
||
|
toMap(): TypedMap<string, ethereum.Value> {
|
||
|
let map = new TypedMap<string, ethereum.Value>();
|
||
|
map.set("value0", ethereum.Value.fromUnsignedBigInt(this.value0));
|
||
|
map.set("value1", ethereum.Value.fromUnsignedBigInt(this.value1));
|
||
|
return map;
|
||
|
}
|
||
|
|
||
|
getPrev(): BigInt {
|
||
|
return this.value0;
|
||
|
}
|
||
|
|
||
|
getNext(): BigInt {
|
||
|
return this.value1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InstaList extends ethereum.SmartContract {
|
||
|
static bind(address: Address): InstaList {
|
||
|
return new InstaList("InstaList", address);
|
||
|
}
|
||
|
|
||
|
accountAddr(param0: BigInt): Address {
|
||
|
let result = super.call("accountAddr", "accountAddr(uint64):(address)", [
|
||
|
ethereum.Value.fromUnsignedBigInt(param0)
|
||
|
]);
|
||
|
|
||
|
return result[0].toAddress();
|
||
|
}
|
||
|
|
||
|
try_accountAddr(param0: BigInt): ethereum.CallResult<Address> {
|
||
|
let result = super.tryCall("accountAddr", "accountAddr(uint64):(address)", [
|
||
|
ethereum.Value.fromUnsignedBigInt(param0)
|
||
|
]);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(value[0].toAddress());
|
||
|
}
|
||
|
|
||
|
accountID(param0: Address): BigInt {
|
||
|
let result = super.call("accountID", "accountID(address):(uint64)", [
|
||
|
ethereum.Value.fromAddress(param0)
|
||
|
]);
|
||
|
|
||
|
return result[0].toBigInt();
|
||
|
}
|
||
|
|
||
|
try_accountID(param0: Address): ethereum.CallResult<BigInt> {
|
||
|
let result = super.tryCall("accountID", "accountID(address):(uint64)", [
|
||
|
ethereum.Value.fromAddress(param0)
|
||
|
]);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(value[0].toBigInt());
|
||
|
}
|
||
|
|
||
|
accountLink(param0: BigInt): InstaList__accountLinkResult {
|
||
|
let result = super.call(
|
||
|
"accountLink",
|
||
|
"accountLink(uint64):(address,address,uint64)",
|
||
|
[ethereum.Value.fromUnsignedBigInt(param0)]
|
||
|
);
|
||
|
|
||
|
return new InstaList__accountLinkResult(
|
||
|
result[0].toAddress(),
|
||
|
result[1].toAddress(),
|
||
|
result[2].toBigInt()
|
||
|
);
|
||
|
}
|
||
|
|
||
|
try_accountLink(
|
||
|
param0: BigInt
|
||
|
): ethereum.CallResult<InstaList__accountLinkResult> {
|
||
|
let result = super.tryCall(
|
||
|
"accountLink",
|
||
|
"accountLink(uint64):(address,address,uint64)",
|
||
|
[ethereum.Value.fromUnsignedBigInt(param0)]
|
||
|
);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(
|
||
|
new InstaList__accountLinkResult(
|
||
|
value[0].toAddress(),
|
||
|
value[1].toAddress(),
|
||
|
value[2].toBigInt()
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
accountList(param0: BigInt, param1: Address): InstaList__accountListResult {
|
||
|
let result = super.call(
|
||
|
"accountList",
|
||
|
"accountList(uint64,address):(address,address)",
|
||
|
[
|
||
|
ethereum.Value.fromUnsignedBigInt(param0),
|
||
|
ethereum.Value.fromAddress(param1)
|
||
|
]
|
||
|
);
|
||
|
|
||
|
return new InstaList__accountListResult(
|
||
|
result[0].toAddress(),
|
||
|
result[1].toAddress()
|
||
|
);
|
||
|
}
|
||
|
|
||
|
try_accountList(
|
||
|
param0: BigInt,
|
||
|
param1: Address
|
||
|
): ethereum.CallResult<InstaList__accountListResult> {
|
||
|
let result = super.tryCall(
|
||
|
"accountList",
|
||
|
"accountList(uint64,address):(address,address)",
|
||
|
[
|
||
|
ethereum.Value.fromUnsignedBigInt(param0),
|
||
|
ethereum.Value.fromAddress(param1)
|
||
|
]
|
||
|
);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(
|
||
|
new InstaList__accountListResult(
|
||
|
value[0].toAddress(),
|
||
|
value[1].toAddress()
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
accounts(): BigInt {
|
||
|
let result = super.call("accounts", "accounts():(uint64)", []);
|
||
|
|
||
|
return result[0].toBigInt();
|
||
|
}
|
||
|
|
||
|
try_accounts(): ethereum.CallResult<BigInt> {
|
||
|
let result = super.tryCall("accounts", "accounts():(uint64)", []);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(value[0].toBigInt());
|
||
|
}
|
||
|
|
||
|
instaIndex(): Address {
|
||
|
let result = super.call("instaIndex", "instaIndex():(address)", []);
|
||
|
|
||
|
return result[0].toAddress();
|
||
|
}
|
||
|
|
||
|
try_instaIndex(): ethereum.CallResult<Address> {
|
||
|
let result = super.tryCall("instaIndex", "instaIndex():(address)", []);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(value[0].toAddress());
|
||
|
}
|
||
|
|
||
|
userLink(param0: Address): InstaList__userLinkResult {
|
||
|
let result = super.call(
|
||
|
"userLink",
|
||
|
"userLink(address):(uint64,uint64,uint64)",
|
||
|
[ethereum.Value.fromAddress(param0)]
|
||
|
);
|
||
|
|
||
|
return new InstaList__userLinkResult(
|
||
|
result[0].toBigInt(),
|
||
|
result[1].toBigInt(),
|
||
|
result[2].toBigInt()
|
||
|
);
|
||
|
}
|
||
|
|
||
|
try_userLink(
|
||
|
param0: Address
|
||
|
): ethereum.CallResult<InstaList__userLinkResult> {
|
||
|
let result = super.tryCall(
|
||
|
"userLink",
|
||
|
"userLink(address):(uint64,uint64,uint64)",
|
||
|
[ethereum.Value.fromAddress(param0)]
|
||
|
);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(
|
||
|
new InstaList__userLinkResult(
|
||
|
value[0].toBigInt(),
|
||
|
value[1].toBigInt(),
|
||
|
value[2].toBigInt()
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
|
||
|
userList(param0: Address, param1: BigInt): InstaList__userListResult {
|
||
|
let result = super.call(
|
||
|
"userList",
|
||
|
"userList(address,uint64):(uint64,uint64)",
|
||
|
[
|
||
|
ethereum.Value.fromAddress(param0),
|
||
|
ethereum.Value.fromUnsignedBigInt(param1)
|
||
|
]
|
||
|
);
|
||
|
|
||
|
return new InstaList__userListResult(
|
||
|
result[0].toBigInt(),
|
||
|
result[1].toBigInt()
|
||
|
);
|
||
|
}
|
||
|
|
||
|
try_userList(
|
||
|
param0: Address,
|
||
|
param1: BigInt
|
||
|
): ethereum.CallResult<InstaList__userListResult> {
|
||
|
let result = super.tryCall(
|
||
|
"userList",
|
||
|
"userList(address,uint64):(uint64,uint64)",
|
||
|
[
|
||
|
ethereum.Value.fromAddress(param0),
|
||
|
ethereum.Value.fromUnsignedBigInt(param1)
|
||
|
]
|
||
|
);
|
||
|
if (result.reverted) {
|
||
|
return new ethereum.CallResult();
|
||
|
}
|
||
|
let value = result.value;
|
||
|
return ethereum.CallResult.fromValue(
|
||
|
new InstaList__userListResult(value[0].toBigInt(), value[1].toBigInt())
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class ConstructorCall extends ethereum.Call {
|
||
|
get inputs(): ConstructorCall__Inputs {
|
||
|
return new ConstructorCall__Inputs(this);
|
||
|
}
|
||
|
|
||
|
get outputs(): ConstructorCall__Outputs {
|
||
|
return new ConstructorCall__Outputs(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class ConstructorCall__Inputs {
|
||
|
_call: ConstructorCall;
|
||
|
|
||
|
constructor(call: ConstructorCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
|
||
|
get _instaIndex(): Address {
|
||
|
return this._call.inputValues[0].value.toAddress();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class ConstructorCall__Outputs {
|
||
|
_call: ConstructorCall;
|
||
|
|
||
|
constructor(call: ConstructorCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class AddAuthCall extends ethereum.Call {
|
||
|
get inputs(): AddAuthCall__Inputs {
|
||
|
return new AddAuthCall__Inputs(this);
|
||
|
}
|
||
|
|
||
|
get outputs(): AddAuthCall__Outputs {
|
||
|
return new AddAuthCall__Outputs(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class AddAuthCall__Inputs {
|
||
|
_call: AddAuthCall;
|
||
|
|
||
|
constructor(call: AddAuthCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
|
||
|
get _owner(): Address {
|
||
|
return this._call.inputValues[0].value.toAddress();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class AddAuthCall__Outputs {
|
||
|
_call: AddAuthCall;
|
||
|
|
||
|
constructor(call: AddAuthCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InitCall extends ethereum.Call {
|
||
|
get inputs(): InitCall__Inputs {
|
||
|
return new InitCall__Inputs(this);
|
||
|
}
|
||
|
|
||
|
get outputs(): InitCall__Outputs {
|
||
|
return new InitCall__Outputs(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InitCall__Inputs {
|
||
|
_call: InitCall;
|
||
|
|
||
|
constructor(call: InitCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
|
||
|
get _account(): Address {
|
||
|
return this._call.inputValues[0].value.toAddress();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class InitCall__Outputs {
|
||
|
_call: InitCall;
|
||
|
|
||
|
constructor(call: InitCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class RemoveAuthCall extends ethereum.Call {
|
||
|
get inputs(): RemoveAuthCall__Inputs {
|
||
|
return new RemoveAuthCall__Inputs(this);
|
||
|
}
|
||
|
|
||
|
get outputs(): RemoveAuthCall__Outputs {
|
||
|
return new RemoveAuthCall__Outputs(this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class RemoveAuthCall__Inputs {
|
||
|
_call: RemoveAuthCall;
|
||
|
|
||
|
constructor(call: RemoveAuthCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
|
||
|
get _owner(): Address {
|
||
|
return this._call.inputValues[0].value.toAddress();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export class RemoveAuthCall__Outputs {
|
||
|
_call: RemoveAuthCall;
|
||
|
|
||
|
constructor(call: RemoveAuthCall) {
|
||
|
this._call = call;
|
||
|
}
|
||
|
}
|