-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more meaninful template saving blackhole burns
- Loading branch information
Showing
8 changed files
with
73 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = class Data1674844779131 { | ||
name = 'Data1674844779131' | ||
|
||
async up(db) { | ||
await db.query(`CREATE TABLE "burn" ("id" character varying NOT NULL, "block" integer NOT NULL, "address" text NOT NULL, "value" numeric NOT NULL, "tx_hash" text NOT NULL, CONSTRAINT "PK_dcb4f14ee4534154b31116553f0" PRIMARY KEY ("id"))`) | ||
await db.query(`CREATE INDEX "IDX_fc3726cbc7f5d4edf4340ae298" ON "burn" ("address") `) | ||
} | ||
|
||
async down(db) { | ||
await db.query(`DROP TABLE "burn"`) | ||
await db.query(`DROP INDEX "public"."IDX_fc3726cbc7f5d4edf4340ae298"`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
type MyEntity @entity { | ||
type Burn @entity { | ||
id: ID! | ||
foo: String! | ||
block: Int! | ||
address: String! @index | ||
value: BigInt! | ||
txHash: String! | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_, Index as Index_} from "typeorm" | ||
import * as marshal from "./marshal" | ||
|
||
@Entity_() | ||
export class Burn { | ||
constructor(props?: Partial<Burn>) { | ||
Object.assign(this, props) | ||
} | ||
|
||
@PrimaryColumn_() | ||
id!: string | ||
|
||
@Column_("int4", {nullable: false}) | ||
block!: number | ||
|
||
@Index_() | ||
@Column_("text", {nullable: false}) | ||
address!: string | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
value!: bigint | ||
|
||
@Column_("text", {nullable: false}) | ||
txHash!: string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export * from "./myEntity.model" | ||
export * from "./burn.model" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters