Skip to content
36 changes: 15 additions & 21 deletions generated/OverlayV1Factory/ERC20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Entity,
Bytes,
Address,
BigInt,
BigInt
} from "@graphprotocol/graph-ts";

export class Approval extends ethereum.Event {
Expand Down Expand Up @@ -85,7 +85,7 @@ export class ERC20 extends ethereum.SmartContract {
approve(_spender: Address, _value: BigInt): boolean {
let result = super.call("approve", "approve(address,uint256):(bool)", [
ethereum.Value.fromAddress(_spender),
ethereum.Value.fromUnsignedBigInt(_value),
ethereum.Value.fromUnsignedBigInt(_value)
]);

return result[0].toBoolean();
Expand All @@ -94,7 +94,7 @@ export class ERC20 extends ethereum.SmartContract {
try_approve(_spender: Address, _value: BigInt): ethereum.CallResult<boolean> {
let result = super.tryCall("approve", "approve(address,uint256):(bool)", [
ethereum.Value.fromAddress(_spender),
ethereum.Value.fromUnsignedBigInt(_value),
ethereum.Value.fromUnsignedBigInt(_value)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand Down Expand Up @@ -125,8 +125,8 @@ export class ERC20 extends ethereum.SmartContract {
[
ethereum.Value.fromAddress(_from),
ethereum.Value.fromAddress(_to),
ethereum.Value.fromUnsignedBigInt(_value),
],
ethereum.Value.fromUnsignedBigInt(_value)
]
);

return result[0].toBoolean();
Expand All @@ -135,16 +135,16 @@ export class ERC20 extends ethereum.SmartContract {
try_transferFrom(
_from: Address,
_to: Address,
_value: BigInt,
_value: BigInt
): ethereum.CallResult<boolean> {
let result = super.tryCall(
"transferFrom",
"transferFrom(address,address,uint256):(bool)",
[
ethereum.Value.fromAddress(_from),
ethereum.Value.fromAddress(_to),
ethereum.Value.fromUnsignedBigInt(_value),
],
ethereum.Value.fromUnsignedBigInt(_value)
]
);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -170,15 +170,15 @@ export class ERC20 extends ethereum.SmartContract {

balanceOf(_owner: Address): BigInt {
let result = super.call("balanceOf", "balanceOf(address):(uint256)", [
ethereum.Value.fromAddress(_owner),
ethereum.Value.fromAddress(_owner)
]);

return result[0].toBigInt();
}

try_balanceOf(_owner: Address): ethereum.CallResult<BigInt> {
let result = super.tryCall("balanceOf", "balanceOf(address):(uint256)", [
ethereum.Value.fromAddress(_owner),
ethereum.Value.fromAddress(_owner)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -205,7 +205,7 @@ export class ERC20 extends ethereum.SmartContract {
transfer(_to: Address, _value: BigInt): boolean {
let result = super.call("transfer", "transfer(address,uint256):(bool)", [
ethereum.Value.fromAddress(_to),
ethereum.Value.fromUnsignedBigInt(_value),
ethereum.Value.fromUnsignedBigInt(_value)
]);

return result[0].toBoolean();
Expand All @@ -214,7 +214,7 @@ export class ERC20 extends ethereum.SmartContract {
try_transfer(_to: Address, _value: BigInt): ethereum.CallResult<boolean> {
let result = super.tryCall("transfer", "transfer(address,uint256):(bool)", [
ethereum.Value.fromAddress(_to),
ethereum.Value.fromUnsignedBigInt(_value),
ethereum.Value.fromUnsignedBigInt(_value)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -227,26 +227,20 @@ export class ERC20 extends ethereum.SmartContract {
let result = super.call(
"allowance",
"allowance(address,address):(uint256)",
[
ethereum.Value.fromAddress(_owner),
ethereum.Value.fromAddress(_spender),
],
[ethereum.Value.fromAddress(_owner), ethereum.Value.fromAddress(_spender)]
);

return result[0].toBigInt();
}

try_allowance(
_owner: Address,
_spender: Address,
_spender: Address
): ethereum.CallResult<BigInt> {
let result = super.tryCall(
"allowance",
"allowance(address,address):(uint256)",
[
ethereum.Value.fromAddress(_owner),
ethereum.Value.fromAddress(_spender),
],
[ethereum.Value.fromAddress(_owner), ethereum.Value.fromAddress(_spender)]
);
if (result.reverted) {
return new ethereum.CallResult();
Expand Down
2 changes: 1 addition & 1 deletion generated/OverlayV1Factory/ERC20NameBytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Entity,
Bytes,
Address,
BigInt,
BigInt
} from "@graphprotocol/graph-ts";

export class ERC20NameBytes extends ethereum.SmartContract {
Expand Down
2 changes: 1 addition & 1 deletion generated/OverlayV1Factory/ERC20SymbolBytes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Entity,
Bytes,
Address,
BigInt,
BigInt
} from "@graphprotocol/graph-ts";

export class ERC20SymbolBytes extends ethereum.SmartContract {
Expand Down
34 changes: 17 additions & 17 deletions generated/OverlayV1Factory/OverlayV1Factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Entity,
Bytes,
Address,
BigInt,
BigInt
} from "@graphprotocol/graph-ts";

export class EmergencyShutdown extends ethereum.Event {
Expand Down Expand Up @@ -161,15 +161,15 @@ export class OverlayV1Factory extends ethereum.SmartContract {

PARAMS_MAX(param0: BigInt): BigInt {
let result = super.call("PARAMS_MAX", "PARAMS_MAX(uint256):(uint256)", [
ethereum.Value.fromUnsignedBigInt(param0),
ethereum.Value.fromUnsignedBigInt(param0)
]);

return result[0].toBigInt();
}

try_PARAMS_MAX(param0: BigInt): ethereum.CallResult<BigInt> {
let result = super.tryCall("PARAMS_MAX", "PARAMS_MAX(uint256):(uint256)", [
ethereum.Value.fromUnsignedBigInt(param0),
ethereum.Value.fromUnsignedBigInt(param0)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -180,15 +180,15 @@ export class OverlayV1Factory extends ethereum.SmartContract {

PARAMS_MIN(param0: BigInt): BigInt {
let result = super.call("PARAMS_MIN", "PARAMS_MIN(uint256):(uint256)", [
ethereum.Value.fromUnsignedBigInt(param0),
ethereum.Value.fromUnsignedBigInt(param0)
]);

return result[0].toBigInt();
}

try_PARAMS_MIN(param0: BigInt): ethereum.CallResult<BigInt> {
let result = super.tryCall("PARAMS_MIN", "PARAMS_MIN(uint256):(uint256)", [
ethereum.Value.fromUnsignedBigInt(param0),
ethereum.Value.fromUnsignedBigInt(param0)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -200,16 +200,16 @@ export class OverlayV1Factory extends ethereum.SmartContract {
deployMarket(
feedFactory: Address,
feed: Address,
params: Array<BigInt>,
params: Array<BigInt>
): Address {
let result = super.call(
"deployMarket",
"deployMarket(address,address,uint256[15]):(address)",
[
ethereum.Value.fromAddress(feedFactory),
ethereum.Value.fromAddress(feed),
ethereum.Value.fromUnsignedBigIntArray(params),
],
ethereum.Value.fromUnsignedBigIntArray(params)
]
);

return result[0].toAddress();
Expand All @@ -218,16 +218,16 @@ export class OverlayV1Factory extends ethereum.SmartContract {
try_deployMarket(
feedFactory: Address,
feed: Address,
params: Array<BigInt>,
params: Array<BigInt>
): ethereum.CallResult<Address> {
let result = super.tryCall(
"deployMarket",
"deployMarket(address,address,uint256[15]):(address)",
[
ethereum.Value.fromAddress(feedFactory),
ethereum.Value.fromAddress(feed),
ethereum.Value.fromUnsignedBigIntArray(params),
],
ethereum.Value.fromUnsignedBigIntArray(params)
]
);
if (result.reverted) {
return new ethereum.CallResult();
Expand Down Expand Up @@ -268,15 +268,15 @@ export class OverlayV1Factory extends ethereum.SmartContract {

getMarket(param0: Address): Address {
let result = super.call("getMarket", "getMarket(address):(address)", [
ethereum.Value.fromAddress(param0),
ethereum.Value.fromAddress(param0)
]);

return result[0].toAddress();
}

try_getMarket(param0: Address): ethereum.CallResult<Address> {
let result = super.tryCall("getMarket", "getMarket(address):(address)", [
ethereum.Value.fromAddress(param0),
ethereum.Value.fromAddress(param0)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -287,7 +287,7 @@ export class OverlayV1Factory extends ethereum.SmartContract {

isFeedFactory(param0: Address): boolean {
let result = super.call("isFeedFactory", "isFeedFactory(address):(bool)", [
ethereum.Value.fromAddress(param0),
ethereum.Value.fromAddress(param0)
]);

return result[0].toBoolean();
Expand All @@ -297,7 +297,7 @@ export class OverlayV1Factory extends ethereum.SmartContract {
let result = super.tryCall(
"isFeedFactory",
"isFeedFactory(address):(bool)",
[ethereum.Value.fromAddress(param0)],
[ethereum.Value.fromAddress(param0)]
);
if (result.reverted) {
return new ethereum.CallResult();
Expand All @@ -308,15 +308,15 @@ export class OverlayV1Factory extends ethereum.SmartContract {

isMarket(param0: Address): boolean {
let result = super.call("isMarket", "isMarket(address):(bool)", [
ethereum.Value.fromAddress(param0),
ethereum.Value.fromAddress(param0)
]);

return result[0].toBoolean();
}

try_isMarket(param0: Address): ethereum.CallResult<boolean> {
let result = super.tryCall("isMarket", "isMarket(address):(bool)", [
ethereum.Value.fromAddress(param0),
ethereum.Value.fromAddress(param0)
]);
if (result.reverted) {
return new ethereum.CallResult();
Expand Down
Loading