mirror of
https://github.com/wharfkit/cli.git
synced 2026-07-21 18:03:41 +00:00
fix: fixing no-use-before-define errors
This commit is contained in:
@@ -24,5 +24,14 @@
|
||||
"@typescript-eslint/no-non-null-assertion": "off",
|
||||
"@typescript-eslint/no-empty-function": "warn",
|
||||
"no-inner-declarations": "off"
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["test/data/contracts/**/*.ts"],
|
||||
"rules": {
|
||||
"no-use-before-define": "error",
|
||||
"@typescript-eslint/no-use-before-define": "error"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -182,17 +182,17 @@ export async function generateContract(contractName: string, abi: ABI, eslintrc?
|
||||
importContractClassStatement,
|
||||
abiBlobField,
|
||||
abiField,
|
||||
classDeclaration,
|
||||
actionNamesInterface,
|
||||
actionsNamespace,
|
||||
generateNamespace('Types', structDeclarations),
|
||||
tableMap,
|
||||
tableTypes,
|
||||
rowTypeAlias,
|
||||
actionsTypeAlias,
|
||||
tablesTypeAlias,
|
||||
actionsNamespace,
|
||||
actionNamesInterface,
|
||||
actionsTypeAlias,
|
||||
...(actionResultValuesInterface ? [actionResultValuesInterface] : []),
|
||||
...(actionResultsNamesType ? [actionResultsNamesType] : []),
|
||||
classDeclaration,
|
||||
],
|
||||
ts.factory.createToken(ts.SyntaxKind.EndOfFileToken),
|
||||
ts.NodeFlags.None
|
||||
|
||||
File diff suppressed because one or more lines are too long
+496
-496
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+430
-430
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -13,71 +13,6 @@ export const abiBlob = Blob.from(
|
||||
'DmVvc2lvOjphYmkvMS4yAAoHYWRkdXNlcgACB2FjY291bnQEbmFtZQZ3ZWlnaHQGdWludDE2BWNsYWltAAIHYWNjb3VudARuYW1lBmFtb3VudAZhc3NldD8GY29uZmlnAAMMdG9rZW5fc3ltYm9sBnN5bWJvb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5kaWdpdGFsL2ltYWdlcy9taXNjX2ljb24ucG5nIzZmNWVhOTc4YjA0ZDAzZTAxOGIzNzlhMmJhYzRjMTBiNWE4ZmUwY2Q1ZTZlMTVjODg4MjhkYzk4NmJlOTZjZmYKLS0tCgp7e2FjY291bnR9fSBpcyB1cGRhdGVkIHRvIGhhdmUgd2VpZ2h0IHt7d2VpZ2h0fX0uAgAAAAAwtyZFA2k2NAAABmNvbmZpZwAAAAAAfBXWA2k2NAAACHVzZXJfcm93AAAAAAA='
|
||||
)
|
||||
export const abi = ABI.from(abiBlob)
|
||||
export class Contract extends BaseContract {
|
||||
constructor(args: PartialBy<ContractArgs, 'abi' | 'account'>) {
|
||||
super({
|
||||
client: args.client,
|
||||
abi: abi,
|
||||
account: args.account || Name.from('rewards.gm'),
|
||||
})
|
||||
}
|
||||
action<T extends ActionNames>(
|
||||
name: T,
|
||||
data: ActionNameParams[T],
|
||||
options?: ActionOptions
|
||||
): Action {
|
||||
return super.action(name, data, options)
|
||||
}
|
||||
table<T extends TableNames>(name: T, scope?: NameType): Table<RowType<T>> {
|
||||
return super.table(name, scope, TableMap[name])
|
||||
}
|
||||
}
|
||||
export interface ActionNameParams {
|
||||
adduser: ActionParams.adduser
|
||||
claim: ActionParams.claim
|
||||
configure: ActionParams.configure
|
||||
deluser: ActionParams.deluser
|
||||
receipt: ActionParams.receipt
|
||||
updateuser: ActionParams.updateuser
|
||||
}
|
||||
export namespace ActionParams {
|
||||
export namespace Type {
|
||||
export interface oracle_pair {
|
||||
name: NameType
|
||||
precision: UInt16Type
|
||||
}
|
||||
export interface price_info {
|
||||
pair: string
|
||||
price: Float64Type
|
||||
timestamp: TimePointType
|
||||
}
|
||||
}
|
||||
export interface adduser {
|
||||
account: NameType
|
||||
weight: UInt16Type
|
||||
}
|
||||
export interface claim {
|
||||
account: NameType
|
||||
amount?: AssetType
|
||||
}
|
||||
export interface configure {
|
||||
token_symbol: Asset.SymbolType
|
||||
oracle_account: NameType
|
||||
oracle_pairs: Type.oracle_pair[]
|
||||
}
|
||||
export interface deluser {
|
||||
account: NameType
|
||||
}
|
||||
export interface receipt {
|
||||
account: NameType
|
||||
amount: AssetType
|
||||
ticker: Type.price_info[]
|
||||
}
|
||||
export interface updateuser {
|
||||
account: NameType
|
||||
weight: UInt16Type
|
||||
}
|
||||
}
|
||||
export namespace Types {
|
||||
@Struct.type('adduser')
|
||||
export class adduser extends Struct {
|
||||
@@ -167,5 +102,70 @@ export interface TableTypes {
|
||||
users: Types.user_row
|
||||
}
|
||||
export type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any
|
||||
export type ActionNames = keyof ActionNameParams
|
||||
export type TableNames = keyof TableTypes
|
||||
export namespace ActionParams {
|
||||
export namespace Type {
|
||||
export interface oracle_pair {
|
||||
name: NameType
|
||||
precision: UInt16Type
|
||||
}
|
||||
export interface price_info {
|
||||
pair: string
|
||||
price: Float64Type
|
||||
timestamp: TimePointType
|
||||
}
|
||||
}
|
||||
export interface adduser {
|
||||
account: NameType
|
||||
weight: UInt16Type
|
||||
}
|
||||
export interface claim {
|
||||
account: NameType
|
||||
amount?: AssetType
|
||||
}
|
||||
export interface configure {
|
||||
token_symbol: Asset.SymbolType
|
||||
oracle_account: NameType
|
||||
oracle_pairs: Type.oracle_pair[]
|
||||
}
|
||||
export interface deluser {
|
||||
account: NameType
|
||||
}
|
||||
export interface receipt {
|
||||
account: NameType
|
||||
amount: AssetType
|
||||
ticker: Type.price_info[]
|
||||
}
|
||||
export interface updateuser {
|
||||
account: NameType
|
||||
weight: UInt16Type
|
||||
}
|
||||
}
|
||||
export interface ActionNameParams {
|
||||
adduser: ActionParams.adduser
|
||||
claim: ActionParams.claim
|
||||
configure: ActionParams.configure
|
||||
deluser: ActionParams.deluser
|
||||
receipt: ActionParams.receipt
|
||||
updateuser: ActionParams.updateuser
|
||||
}
|
||||
export type ActionNames = keyof ActionNameParams
|
||||
export class Contract extends BaseContract {
|
||||
constructor(args: PartialBy<ContractArgs, 'abi' | 'account'>) {
|
||||
super({
|
||||
client: args.client,
|
||||
abi: abi,
|
||||
account: args.account || Name.from('rewards.gm'),
|
||||
})
|
||||
}
|
||||
action<T extends ActionNames>(
|
||||
name: T,
|
||||
data: ActionNameParams[T],
|
||||
options?: ActionOptions
|
||||
): Action {
|
||||
return super.action(name, data, options)
|
||||
}
|
||||
table<T extends TableNames>(name: T, scope?: NameType): Table<RowType<T>> {
|
||||
return super.table(name, scope, TableMap[name])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,95 +17,6 @@ export const abiBlob = Blob.from(
|
||||
'DmVvc2lvOjphYmkvMS4yABsMYXBpX3Jlc3BvbnNlAAEDZm9vBnVpbnQ2NAdjYWxsYXBpAAALYWNjb3VudF9yb3cAAgdhY2NvdW50BG5hbWUFc2VlZHMGdWludDMyCWFkZG9yYWNsZQABBm9yYWNsZQRuYW1lB2FkdmFuY2UAAAZjb21taXQAAwZvcmFjbGUEbmFtZQVlcG9jaAZ1aW50NjQGY29tbWl0C2NoZWNrc3VtMjU2CmNvbW1pdF9yb3cABAJpZAZ1aW50NjQFZXBvY2gGdWludDY0Bm9yYWNsZQRuYW1lBmNvbW1pdAtjaGVja3N1bTI1Ngdjb21wdXRlAAIFZXBvY2gGdWludDY0BHNlZWQGdWludDY0B2Rlc3Ryb3kAAgVvd25lcgRuYW1lCnRvX2Rlc3Ryb3kIdWludDY0W10UZGVzdHJveV9yZXR1cm5fdmFsdWUAAghyYW1fc29sZAZ1aW50NjQIcmVkZWVtZWQFYXNzZXQKZGVzdHJveWFsbAAABmVuYWJsZQABB2VuYWJsZWQEYm9vbAZlbnJvbGwAAgdhY2NvdW50BG5hbWUFZXBvY2gGdWludDY0CWVwb2NoX3JvdwAFBWVwb2NoBnVpbnQ2NAVzdGFydAp0aW1lX3BvaW50A2VuZAp0aW1lX3BvaW50BnJldmVhbAp0aW1lX3BvaW50CGNvbXBsZXRlCnRpbWVfcG9pbnQVZ2VuZXJhdGVfcmV0dXJuX3ZhbHVlAAYFc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aTY0AAAKY29tbWl0X3JvdwAAAADghmhVA2k2NAAACWVwb2NoX3JvdwAAAACriMylA2k2NAAACm9yYWNsZV9yb3cAAAAAR6O2ugNpNjQAAApyZXZlYWxfcm93AAAAAACclMIDaTY0AAAIc2VlZF9yb3cAAAAAAJVNxgNpNjQAAAlzdGF0ZV9yb3cAAAAAAJxNxgNpNjQAAAhzdGF0X3JvdwAAAAAFAAAAwFUTo0EMYXBpX3Jlc3BvbnNlAAAAQKFpdjIJZXBvY2hfcm93AAAAQGVdJUULY2hlY2tzdW0yNTYAAADA05uxShRkZXN0cm95X3JldHVybl92YWx1ZTBvviqbq6ZiFWdlbmVyYXRlX3JldHVybl92YWx1ZQ=='
|
||||
)
|
||||
export const abi = ABI.from(abiBlob)
|
||||
export class Contract extends BaseContract {
|
||||
constructor(args: PartialBy<ContractArgs, 'abi' | 'account'>) {
|
||||
super({
|
||||
client: args.client,
|
||||
abi: abi,
|
||||
account: args.account || Name.from('testing.gm'),
|
||||
})
|
||||
}
|
||||
action<T extends ActionNames>(
|
||||
name: T,
|
||||
data: ActionNameParams[T],
|
||||
options?: ActionOptions
|
||||
): Action {
|
||||
return super.action(name, data, options)
|
||||
}
|
||||
readonly<T extends ActionReturnNames>(
|
||||
name: T,
|
||||
data?: ActionNameParams[T]
|
||||
): ActionReturnValues[T] {
|
||||
return super.readonly(name, data) as unknown as ActionReturnValues[T]
|
||||
}
|
||||
table<T extends TableNames>(name: T, scope?: NameType): Table<RowType<T>> {
|
||||
return super.table(name, scope, TableMap[name])
|
||||
}
|
||||
}
|
||||
export interface ActionNameParams {
|
||||
callapi: ActionParams.callapi
|
||||
addoracle: ActionParams.addoracle
|
||||
advance: ActionParams.advance
|
||||
commit: ActionParams.commit
|
||||
compute: ActionParams.compute
|
||||
destroy: ActionParams.destroy
|
||||
destroyall: ActionParams.destroyall
|
||||
enable: ActionParams.enable
|
||||
enroll: ActionParams.enroll
|
||||
generatertrn: ActionParams.generatertrn
|
||||
init: ActionParams.init
|
||||
removeoracle: ActionParams.removeoracle
|
||||
reveal: ActionParams.reveal
|
||||
transfer: ActionParams.transfer
|
||||
wipe: ActionParams.wipe
|
||||
wipesome: ActionParams.wipesome
|
||||
}
|
||||
export namespace ActionParams {
|
||||
export namespace Type {}
|
||||
export interface callapi {}
|
||||
export interface addoracle {
|
||||
oracle: NameType
|
||||
}
|
||||
export interface advance {}
|
||||
export interface commit {
|
||||
oracle: NameType
|
||||
epoch: UInt64Type
|
||||
commit: Checksum256Type
|
||||
}
|
||||
export interface compute {
|
||||
epoch: UInt64Type
|
||||
seed: UInt64Type
|
||||
}
|
||||
export interface destroy {
|
||||
owner: NameType
|
||||
to_destroy: UInt64Type[]
|
||||
}
|
||||
export interface destroyall {}
|
||||
export interface enable {
|
||||
enabled: boolean
|
||||
}
|
||||
export interface enroll {
|
||||
account: NameType
|
||||
epoch: UInt64Type
|
||||
}
|
||||
export interface generatertrn {}
|
||||
export interface init {}
|
||||
export interface removeoracle {
|
||||
oracle: NameType
|
||||
}
|
||||
export interface reveal {
|
||||
oracle: NameType
|
||||
epoch: UInt64Type
|
||||
reveal: string
|
||||
}
|
||||
export interface transfer {
|
||||
from: NameType
|
||||
to: NameType
|
||||
to_transfer: UInt64Type[]
|
||||
}
|
||||
export interface wipe {}
|
||||
export interface wipesome {}
|
||||
}
|
||||
export namespace Types {
|
||||
@Struct.type('api_response')
|
||||
export class api_response extends Struct {
|
||||
@@ -309,8 +220,72 @@ export interface TableTypes {
|
||||
stats: Types.stat_row
|
||||
}
|
||||
export type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any
|
||||
export type ActionNames = keyof ActionNameParams
|
||||
export type TableNames = keyof TableTypes
|
||||
export namespace ActionParams {
|
||||
export namespace Type {}
|
||||
export interface callapi {}
|
||||
export interface addoracle {
|
||||
oracle: NameType
|
||||
}
|
||||
export interface advance {}
|
||||
export interface commit {
|
||||
oracle: NameType
|
||||
epoch: UInt64Type
|
||||
commit: Checksum256Type
|
||||
}
|
||||
export interface compute {
|
||||
epoch: UInt64Type
|
||||
seed: UInt64Type
|
||||
}
|
||||
export interface destroy {
|
||||
owner: NameType
|
||||
to_destroy: UInt64Type[]
|
||||
}
|
||||
export interface destroyall {}
|
||||
export interface enable {
|
||||
enabled: boolean
|
||||
}
|
||||
export interface enroll {
|
||||
account: NameType
|
||||
epoch: UInt64Type
|
||||
}
|
||||
export interface generatertrn {}
|
||||
export interface init {}
|
||||
export interface removeoracle {
|
||||
oracle: NameType
|
||||
}
|
||||
export interface reveal {
|
||||
oracle: NameType
|
||||
epoch: UInt64Type
|
||||
reveal: string
|
||||
}
|
||||
export interface transfer {
|
||||
from: NameType
|
||||
to: NameType
|
||||
to_transfer: UInt64Type[]
|
||||
}
|
||||
export interface wipe {}
|
||||
export interface wipesome {}
|
||||
}
|
||||
export interface ActionNameParams {
|
||||
callapi: ActionParams.callapi
|
||||
addoracle: ActionParams.addoracle
|
||||
advance: ActionParams.advance
|
||||
commit: ActionParams.commit
|
||||
compute: ActionParams.compute
|
||||
destroy: ActionParams.destroy
|
||||
destroyall: ActionParams.destroyall
|
||||
enable: ActionParams.enable
|
||||
enroll: ActionParams.enroll
|
||||
generatertrn: ActionParams.generatertrn
|
||||
init: ActionParams.init
|
||||
removeoracle: ActionParams.removeoracle
|
||||
reveal: ActionParams.reveal
|
||||
transfer: ActionParams.transfer
|
||||
wipe: ActionParams.wipe
|
||||
wipesome: ActionParams.wipesome
|
||||
}
|
||||
export type ActionNames = keyof ActionNameParams
|
||||
export interface ActionReturnValues {
|
||||
callapi: Types.api_response
|
||||
advance: Types.epoch_row
|
||||
@@ -319,3 +294,28 @@ export interface ActionReturnValues {
|
||||
generatertrn: Types.generate_return_value
|
||||
}
|
||||
export type ActionReturnNames = keyof ActionReturnValues
|
||||
export class Contract extends BaseContract {
|
||||
constructor(args: PartialBy<ContractArgs, 'abi' | 'account'>) {
|
||||
super({
|
||||
client: args.client,
|
||||
abi: abi,
|
||||
account: args.account || Name.from('testing.gm'),
|
||||
})
|
||||
}
|
||||
action<T extends ActionNames>(
|
||||
name: T,
|
||||
data: ActionNameParams[T],
|
||||
options?: ActionOptions
|
||||
): Action {
|
||||
return super.action(name, data, options)
|
||||
}
|
||||
readonly<T extends ActionReturnNames>(
|
||||
name: T,
|
||||
data?: ActionNameParams[T]
|
||||
): ActionReturnValues[T] {
|
||||
return super.readonly(name, data) as unknown as ActionReturnValues[T]
|
||||
}
|
||||
table<T extends TableNames>(name: T, scope?: NameType): Table<RowType<T>> {
|
||||
return super.table(name, scope, TableMap[name])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user