@shipload/sdk 1.0.0-next.63 → 1.0.0-next.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/shipload.d.ts +809 -624
- package/lib/shipload.js +482 -64
- package/lib/shipload.js.map +1 -1
- package/lib/shipload.m.js +564 -150
- package/lib/shipload.m.js.map +1 -1
- package/lib/testing.js +208 -63
- package/lib/testing.js.map +1 -1
- package/lib/testing.m.js +208 -63
- package/lib/testing.m.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/token.ts +170 -0
- package/src/contracts.ts +1 -0
- package/src/data/catalog.test.ts +19 -0
- package/src/data/catalog.ts +6 -0
- package/src/data/citizenry-adjectives.json +42 -0
- package/src/data/citizenry-nouns.json +50 -0
- package/src/index-module.ts +8 -1
- package/src/influence/citizenry.ts +16 -9
- package/src/influence/influence.test.ts +29 -3
- package/src/managers/actions.ts +92 -5
- package/src/managers/balances.test.ts +161 -0
- package/src/managers/balances.ts +93 -0
- package/src/managers/context.ts +9 -0
- package/src/managers/index.ts +3 -1
- package/src/managers/nft.test.ts +8 -1
- package/src/managers/nft.ts +56 -16
- package/src/shipload.ts +5 -0
- package/src/utils/hash.ts +4 -0
- package/src/utils/system.ts +1 -5
package/package.json
CHANGED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type {Action, AssetType, NameType} from '@wharfkit/antelope'
|
|
2
|
+
import {ABI, Asset, Blob, Name, Struct} from '@wharfkit/antelope'
|
|
3
|
+
import type {ActionOptions, ContractArgs, PartialBy, Table} from '@wharfkit/contract'
|
|
4
|
+
import {Contract as BaseContract} from '@wharfkit/contract'
|
|
5
|
+
export const abiBlob = Blob.from(
|
|
6
|
+
'DmVvc2lvOjphYmkvMS4yAAoHYWNjb3VudAABB2JhbGFuY2UFYXNzZXQFY2xvc2UAAgVvd25lcgRuYW1lBnN5bWJvbAZzeW1ib2wGY3JlYXRlAAIGaXNzdWVyBG5hbWUObWF4aW11bV9zdXB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8
|
+
export const abi = ABI.from(abiBlob)
|
|
9
|
+
export namespace Types {
|
|
10
|
+
@Struct.type('account')
|
|
11
|
+
export class account extends Struct {
|
|
12
|
+
@Struct.field(Asset)
|
|
13
|
+
declare balance: Asset
|
|
14
|
+
}
|
|
15
|
+
@Struct.type('close')
|
|
16
|
+
export class close extends Struct {
|
|
17
|
+
@Struct.field(Name)
|
|
18
|
+
declare owner: Name
|
|
19
|
+
@Struct.field(Asset.Symbol)
|
|
20
|
+
declare symbol: Asset.Symbol
|
|
21
|
+
}
|
|
22
|
+
@Struct.type('create')
|
|
23
|
+
export class create extends Struct {
|
|
24
|
+
@Struct.field(Name)
|
|
25
|
+
declare issuer: Name
|
|
26
|
+
@Struct.field(Asset)
|
|
27
|
+
declare maximum_supply: Asset
|
|
28
|
+
}
|
|
29
|
+
@Struct.type('currency_stats')
|
|
30
|
+
export class currency_stats extends Struct {
|
|
31
|
+
@Struct.field(Asset)
|
|
32
|
+
declare supply: Asset
|
|
33
|
+
@Struct.field(Asset)
|
|
34
|
+
declare max_supply: Asset
|
|
35
|
+
@Struct.field(Name)
|
|
36
|
+
declare issuer: Name
|
|
37
|
+
}
|
|
38
|
+
@Struct.type('issue')
|
|
39
|
+
export class issue extends Struct {
|
|
40
|
+
@Struct.field(Name)
|
|
41
|
+
declare to: Name
|
|
42
|
+
@Struct.field(Asset)
|
|
43
|
+
declare quantity: Asset
|
|
44
|
+
@Struct.field('string')
|
|
45
|
+
declare memo: string
|
|
46
|
+
}
|
|
47
|
+
@Struct.type('issuefixed')
|
|
48
|
+
export class issuefixed extends Struct {
|
|
49
|
+
@Struct.field(Name)
|
|
50
|
+
declare to: Name
|
|
51
|
+
@Struct.field(Asset)
|
|
52
|
+
declare supply: Asset
|
|
53
|
+
@Struct.field('string')
|
|
54
|
+
declare memo: string
|
|
55
|
+
}
|
|
56
|
+
@Struct.type('open')
|
|
57
|
+
export class open extends Struct {
|
|
58
|
+
@Struct.field(Name)
|
|
59
|
+
declare owner: Name
|
|
60
|
+
@Struct.field(Asset.Symbol)
|
|
61
|
+
declare symbol: Asset.Symbol
|
|
62
|
+
@Struct.field(Name)
|
|
63
|
+
declare ram_payer: Name
|
|
64
|
+
}
|
|
65
|
+
@Struct.type('retire')
|
|
66
|
+
export class retire extends Struct {
|
|
67
|
+
@Struct.field(Asset)
|
|
68
|
+
declare quantity: Asset
|
|
69
|
+
@Struct.field('string')
|
|
70
|
+
declare memo: string
|
|
71
|
+
}
|
|
72
|
+
@Struct.type('setmaxsupply')
|
|
73
|
+
export class setmaxsupply extends Struct {
|
|
74
|
+
@Struct.field(Name)
|
|
75
|
+
declare issuer: Name
|
|
76
|
+
@Struct.field(Asset)
|
|
77
|
+
declare maximum_supply: Asset
|
|
78
|
+
}
|
|
79
|
+
@Struct.type('transfer')
|
|
80
|
+
export class transfer extends Struct {
|
|
81
|
+
@Struct.field(Name)
|
|
82
|
+
declare from: Name
|
|
83
|
+
@Struct.field(Name)
|
|
84
|
+
declare to: Name
|
|
85
|
+
@Struct.field(Asset)
|
|
86
|
+
declare quantity: Asset
|
|
87
|
+
@Struct.field('string')
|
|
88
|
+
declare memo: string
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export const TableMap = {
|
|
92
|
+
accounts: Types.account,
|
|
93
|
+
stat: Types.currency_stats,
|
|
94
|
+
}
|
|
95
|
+
export interface TableTypes {
|
|
96
|
+
accounts: Types.account
|
|
97
|
+
stat: Types.currency_stats
|
|
98
|
+
}
|
|
99
|
+
export type RowType<T> = T extends keyof TableTypes ? TableTypes[T] : any
|
|
100
|
+
export type TableNames = keyof TableTypes
|
|
101
|
+
export namespace ActionParams {
|
|
102
|
+
export namespace Type {}
|
|
103
|
+
export interface close {
|
|
104
|
+
owner: NameType
|
|
105
|
+
symbol: Asset.SymbolType
|
|
106
|
+
}
|
|
107
|
+
export interface create {
|
|
108
|
+
issuer: NameType
|
|
109
|
+
maximum_supply: AssetType
|
|
110
|
+
}
|
|
111
|
+
export interface issue {
|
|
112
|
+
to: NameType
|
|
113
|
+
quantity: AssetType
|
|
114
|
+
memo: string
|
|
115
|
+
}
|
|
116
|
+
export interface issuefixed {
|
|
117
|
+
to: NameType
|
|
118
|
+
supply: AssetType
|
|
119
|
+
memo: string
|
|
120
|
+
}
|
|
121
|
+
export interface open {
|
|
122
|
+
owner: NameType
|
|
123
|
+
symbol: Asset.SymbolType
|
|
124
|
+
ram_payer: NameType
|
|
125
|
+
}
|
|
126
|
+
export interface retire {
|
|
127
|
+
quantity: AssetType
|
|
128
|
+
memo: string
|
|
129
|
+
}
|
|
130
|
+
export interface setmaxsupply {
|
|
131
|
+
issuer: NameType
|
|
132
|
+
maximum_supply: AssetType
|
|
133
|
+
}
|
|
134
|
+
export interface transfer {
|
|
135
|
+
from: NameType
|
|
136
|
+
to: NameType
|
|
137
|
+
quantity: AssetType
|
|
138
|
+
memo: string
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
export interface ActionNameParams {
|
|
142
|
+
close: ActionParams.close
|
|
143
|
+
create: ActionParams.create
|
|
144
|
+
issue: ActionParams.issue
|
|
145
|
+
issuefixed: ActionParams.issuefixed
|
|
146
|
+
open: ActionParams.open
|
|
147
|
+
retire: ActionParams.retire
|
|
148
|
+
setmaxsupply: ActionParams.setmaxsupply
|
|
149
|
+
transfer: ActionParams.transfer
|
|
150
|
+
}
|
|
151
|
+
export type ActionNames = keyof ActionNameParams
|
|
152
|
+
export class Contract extends BaseContract {
|
|
153
|
+
constructor(args: PartialBy<ContractArgs, 'abi' | 'account'>) {
|
|
154
|
+
super({
|
|
155
|
+
client: args.client,
|
|
156
|
+
abi: abi,
|
|
157
|
+
account: args.account || Name.from('eosio.token'),
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
action<T extends ActionNames>(
|
|
161
|
+
name: T,
|
|
162
|
+
data: ActionNameParams[T],
|
|
163
|
+
options?: ActionOptions
|
|
164
|
+
): Action {
|
|
165
|
+
return super.action(name, data, options)
|
|
166
|
+
}
|
|
167
|
+
table<T extends TableNames>(name: T, scope?: NameType): Table<RowType<T>> {
|
|
168
|
+
return super.table(name, scope, TableMap[name])
|
|
169
|
+
}
|
|
170
|
+
}
|
package/src/contracts.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {describe, expect, test} from 'bun:test'
|
|
2
|
+
import {getItems, itemTypeIndex, typeLabel} from './catalog'
|
|
3
|
+
|
|
4
|
+
describe('itemTypeIndex', () => {
|
|
5
|
+
test('agrees with typeLabel for every item in the catalog', () => {
|
|
6
|
+
for (const item of getItems()) {
|
|
7
|
+
expect(typeLabel(itemTypeIndex(item.id))).toBe(typeLabel(item.type))
|
|
8
|
+
}
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
test('covers every type in the chain enum order', () => {
|
|
12
|
+
const indexes = new Set(getItems().map((item) => itemTypeIndex(item.id)))
|
|
13
|
+
expect([...indexes].sort()).toEqual([0, 1, 2, 3])
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
test('throws for an unknown item', () => {
|
|
17
|
+
expect(() => itemTypeIndex(65535)).toThrow()
|
|
18
|
+
})
|
|
19
|
+
})
|
package/src/data/catalog.ts
CHANGED
|
@@ -106,6 +106,12 @@ const TYPE_LABEL_BY_STRING: Record<ItemType, string> = {
|
|
|
106
106
|
|
|
107
107
|
const TYPE_BY_INDEX: ItemType[] = ['resource', 'component', 'module', 'entity']
|
|
108
108
|
|
|
109
|
+
export function itemTypeIndex(itemId: UInt16Type): number {
|
|
110
|
+
const index = TYPE_BY_INDEX.indexOf(getItem(itemId).type)
|
|
111
|
+
if (index < 0) throw new Error(`Unknown item type for item ${UInt16.from(itemId).toNumber()}`)
|
|
112
|
+
return index
|
|
113
|
+
}
|
|
114
|
+
|
|
109
115
|
export function typeLabel(type: ItemType | number): string {
|
|
110
116
|
if (typeof type === 'number') {
|
|
111
117
|
const t = TYPE_BY_INDEX[type]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[
|
|
2
|
+
"Free",
|
|
3
|
+
"Civic",
|
|
4
|
+
"United",
|
|
5
|
+
"Sovereign",
|
|
6
|
+
"Common",
|
|
7
|
+
"Greater",
|
|
8
|
+
"Outer",
|
|
9
|
+
"Inner",
|
|
10
|
+
"New",
|
|
11
|
+
"Old",
|
|
12
|
+
"Grand",
|
|
13
|
+
"High",
|
|
14
|
+
"Deep",
|
|
15
|
+
"Bright",
|
|
16
|
+
"Open",
|
|
17
|
+
"Steadfast",
|
|
18
|
+
"Enduring",
|
|
19
|
+
"Rising",
|
|
20
|
+
"Standing",
|
|
21
|
+
"Unified",
|
|
22
|
+
"Allied",
|
|
23
|
+
"Independent",
|
|
24
|
+
"Provisional",
|
|
25
|
+
"Perpetual",
|
|
26
|
+
"Elder",
|
|
27
|
+
"Prime",
|
|
28
|
+
"Central",
|
|
29
|
+
"Frontier",
|
|
30
|
+
"Distant",
|
|
31
|
+
"Kindred",
|
|
32
|
+
"Mutual",
|
|
33
|
+
"Shared",
|
|
34
|
+
"Reformed",
|
|
35
|
+
"Restored",
|
|
36
|
+
"Second",
|
|
37
|
+
"Orbital",
|
|
38
|
+
"Solar",
|
|
39
|
+
"Verdant",
|
|
40
|
+
"Far",
|
|
41
|
+
"Wayward"
|
|
42
|
+
]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[
|
|
2
|
+
"Collective",
|
|
3
|
+
"Compact",
|
|
4
|
+
"Concord",
|
|
5
|
+
"Union",
|
|
6
|
+
"Assembly",
|
|
7
|
+
"League",
|
|
8
|
+
"Accord",
|
|
9
|
+
"Commune",
|
|
10
|
+
"Congress",
|
|
11
|
+
"Coalition",
|
|
12
|
+
"Charter",
|
|
13
|
+
"Syndicate",
|
|
14
|
+
"Directorate",
|
|
15
|
+
"Movement",
|
|
16
|
+
"Pact",
|
|
17
|
+
"Circle",
|
|
18
|
+
"Council",
|
|
19
|
+
"Conclave",
|
|
20
|
+
"Convention",
|
|
21
|
+
"Federation",
|
|
22
|
+
"Confederacy",
|
|
23
|
+
"Alliance",
|
|
24
|
+
"Association",
|
|
25
|
+
"Fellowship",
|
|
26
|
+
"Order",
|
|
27
|
+
"Chapter",
|
|
28
|
+
"Guild",
|
|
29
|
+
"Consortium",
|
|
30
|
+
"Cooperative",
|
|
31
|
+
"Bloc",
|
|
32
|
+
"Front",
|
|
33
|
+
"Caucus",
|
|
34
|
+
"Chamber",
|
|
35
|
+
"Quorum",
|
|
36
|
+
"Covenant",
|
|
37
|
+
"Communion",
|
|
38
|
+
"Trust",
|
|
39
|
+
"Society",
|
|
40
|
+
"Company",
|
|
41
|
+
"Corps",
|
|
42
|
+
"Delegation",
|
|
43
|
+
"Ministry",
|
|
44
|
+
"Authority",
|
|
45
|
+
"Commission",
|
|
46
|
+
"Bureau",
|
|
47
|
+
"Polity",
|
|
48
|
+
"Dominion",
|
|
49
|
+
"Protectorate"
|
|
50
|
+
]
|
package/src/index-module.ts
CHANGED
|
@@ -50,6 +50,7 @@ export {
|
|
|
50
50
|
ClusterManager,
|
|
51
51
|
computeFreeCells,
|
|
52
52
|
NftManager,
|
|
53
|
+
BalancesManager,
|
|
53
54
|
ConstructionManager,
|
|
54
55
|
JobsManager,
|
|
55
56
|
InfluenceManager,
|
|
@@ -68,6 +69,11 @@ export type {
|
|
|
68
69
|
PlayerRosterEntry,
|
|
69
70
|
LocationStratum,
|
|
70
71
|
NftConfigForItem,
|
|
72
|
+
WrapConfig,
|
|
73
|
+
WrapGate,
|
|
74
|
+
DepositConfig,
|
|
75
|
+
PlatformBalance,
|
|
76
|
+
TokenBalance,
|
|
71
77
|
BuildableTarget,
|
|
72
78
|
BuildState,
|
|
73
79
|
SourceEntityRef,
|
|
@@ -87,7 +93,7 @@ export type {
|
|
|
87
93
|
LaunchStatsInput,
|
|
88
94
|
} from './managers/actions'
|
|
89
95
|
export type {WrapDeposit} from './managers/nft'
|
|
90
|
-
export {resolveLockedAmount} from './managers/nft'
|
|
96
|
+
export {resolveLockedAmount, wrapCostKey} from './managers/nft'
|
|
91
97
|
|
|
92
98
|
export {
|
|
93
99
|
getItem,
|
|
@@ -98,6 +104,7 @@ export {
|
|
|
98
104
|
getModules,
|
|
99
105
|
getEntityItems,
|
|
100
106
|
resolveItemCategory,
|
|
107
|
+
itemTypeIndex,
|
|
101
108
|
typeLabel,
|
|
102
109
|
categoryLabel,
|
|
103
110
|
categoryFromIndex,
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {Checksum256, type Checksum256Type} from '@wharfkit/antelope'
|
|
2
2
|
import {Coordinates, type CoordinatesType, LocationType} from '../types'
|
|
3
|
-
import {hash512} from '../utils/hash'
|
|
3
|
+
import {hash512, uint16} from '../utils/hash'
|
|
4
4
|
import {deriveLocationStatic, getSystemName} from '../utils/system'
|
|
5
|
+
import citizenryAdjectives from '../data/citizenry-adjectives.json'
|
|
6
|
+
import citizenryNouns from '../data/citizenry-nouns.json'
|
|
5
7
|
|
|
6
|
-
const
|
|
7
|
-
(w) => `${w}
|
|
8
|
-
(w) => `${w}
|
|
9
|
-
(w) =>
|
|
10
|
-
(w) => `${w} Union`,
|
|
8
|
+
const CITIZENRY_FORMS: ((world: string, noun: string, adjective: string) => string)[] = [
|
|
9
|
+
(w, n) => `${w} ${n}`,
|
|
10
|
+
(w, n, a) => `${a} ${w} ${n}`,
|
|
11
|
+
(w, n, a) => `${a} ${n} of ${w}`,
|
|
11
12
|
]
|
|
12
13
|
|
|
14
|
+
const FORMS_WITH_ADJECTIVE = 2
|
|
15
|
+
|
|
13
16
|
export function citizenryName(
|
|
14
17
|
gameSeed: Checksum256Type,
|
|
15
18
|
coordinates: CoordinatesType
|
|
@@ -22,10 +25,14 @@ export function citizenryName(
|
|
|
22
25
|
const roll = hash512(
|
|
23
26
|
Checksum256.from(gameSeed),
|
|
24
27
|
`citizenry-${coords.x.toString()}-${coords.y.toString()}`
|
|
25
|
-
)
|
|
26
|
-
|
|
28
|
+
)
|
|
29
|
+
const form = CITIZENRY_FORMS[roll.array[0] % CITIZENRY_FORMS.length]
|
|
30
|
+
const noun = citizenryNouns[uint16(roll, 1) % citizenryNouns.length]
|
|
31
|
+
const adjective = citizenryAdjectives[uint16(roll, 3) % citizenryAdjectives.length]
|
|
32
|
+
return form(world, noun, adjective)
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
export function citizenryPatternCount(): number {
|
|
30
|
-
|
|
36
|
+
const plainForms = CITIZENRY_FORMS.length - FORMS_WITH_ADJECTIVE
|
|
37
|
+
return citizenryNouns.length * (plainForms + FORMS_WITH_ADJECTIVE * citizenryAdjectives.length)
|
|
31
38
|
}
|
|
@@ -22,7 +22,9 @@ import {findDecomp, DECOMP_REGISTRY} from './decomp'
|
|
|
22
22
|
import {contributeDuration} from './duration'
|
|
23
23
|
import {getStatCount, statsSumSq} from './quality'
|
|
24
24
|
import {pricingFromWeights, valueCargoItem, valueContribution} from './valuation'
|
|
25
|
-
import {citizenryName} from './citizenry'
|
|
25
|
+
import {citizenryName, citizenryPatternCount} from './citizenry'
|
|
26
|
+
import citizenryAdjectives from '../data/citizenry-adjectives.json'
|
|
27
|
+
import citizenryNouns from '../data/citizenry-nouns.json'
|
|
26
28
|
|
|
27
29
|
const PAR = 213
|
|
28
30
|
const WORLD = {x: 56, y: 0}
|
|
@@ -273,10 +275,34 @@ describe('citizenry names', () => {
|
|
|
273
275
|
expect(a).toBe(b as string)
|
|
274
276
|
})
|
|
275
277
|
|
|
276
|
-
test('composes the world name', () => {
|
|
278
|
+
test('composes the world name with a known noun', () => {
|
|
277
279
|
const name = citizenryName(gameSeed, WORLD) ?? ''
|
|
278
280
|
expect(name.length).toBeGreaterThan(0)
|
|
279
|
-
expect(
|
|
281
|
+
expect(citizenryNouns.some((noun) => name.includes(noun))).toBe(true)
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
test('spreads across nouns and forms', () => {
|
|
285
|
+
const names: string[] = []
|
|
286
|
+
for (let x = 0; x < 160 && names.length < 200; x++) {
|
|
287
|
+
for (let y = 0; y < 160 && names.length < 200; y++) {
|
|
288
|
+
const name = citizenryName(gameSeed, {x, y})
|
|
289
|
+
if (name) names.push(name)
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
expect(names.length).toBeGreaterThan(100)
|
|
293
|
+
|
|
294
|
+
const nouns = new Set(names.map((n) => citizenryNouns.find((noun) => n.includes(noun))))
|
|
295
|
+
expect(nouns.size).toBeGreaterThan(20)
|
|
296
|
+
|
|
297
|
+
const ofForm = names.filter((n) => n.includes(' of ')).length
|
|
298
|
+
expect(ofForm).toBeGreaterThan(0)
|
|
299
|
+
expect(ofForm).toBeLessThan(names.length * 0.6)
|
|
300
|
+
})
|
|
301
|
+
|
|
302
|
+
test('counts every noun and adjective combination', () => {
|
|
303
|
+
expect(citizenryPatternCount()).toBe(
|
|
304
|
+
citizenryNouns.length * (1 + 2 * citizenryAdjectives.length)
|
|
305
|
+
)
|
|
280
306
|
})
|
|
281
307
|
|
|
282
308
|
test('is undefined away from a world', () => {
|
package/src/managers/actions.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Action,
|
|
3
|
+
Asset,
|
|
4
|
+
type AssetType,
|
|
3
5
|
Bytes,
|
|
4
6
|
Checksum256,
|
|
5
7
|
type Checksum256Type,
|
|
8
|
+
ExtendedAsset,
|
|
6
9
|
Int64,
|
|
7
10
|
type Int64Type,
|
|
8
11
|
Name,
|
|
@@ -18,7 +21,7 @@ import {
|
|
|
18
21
|
} from '@wharfkit/antelope'
|
|
19
22
|
import {BaseManager} from './base'
|
|
20
23
|
import {Coordinates, PRECISION, type ClusterSlotType, type CoordinatesType} from '../types'
|
|
21
|
-
import {ServerContract} from '../contracts'
|
|
24
|
+
import {ServerContract, TokenContract} from '../contracts'
|
|
22
25
|
import {ATOMICASSETS_ABI, SHIPLOAD_COLLECTION} from '../nft/atomicassets'
|
|
23
26
|
import {getItem} from '../data/catalog'
|
|
24
27
|
|
|
@@ -164,6 +167,8 @@ export type EntityRefInput = {
|
|
|
164
167
|
export type WaypointInput = {x: Int64Type; y: Int64Type}
|
|
165
168
|
|
|
166
169
|
export class ActionsManager extends BaseManager {
|
|
170
|
+
private tokenContracts = new Map<string, TokenContract.Contract>()
|
|
171
|
+
|
|
167
172
|
travel(shipId: UInt64Type, destination: CoordinatesType, recharge = true): Action {
|
|
168
173
|
const x = Int64.from(destination.x)
|
|
169
174
|
const y = Int64.from(destination.y)
|
|
@@ -696,6 +701,88 @@ export class ActionsManager extends BaseManager {
|
|
|
696
701
|
})
|
|
697
702
|
}
|
|
698
703
|
|
|
704
|
+
open(owner: NameType, tokenContract: NameType, tokenSymbol: Asset.SymbolType): Action {
|
|
705
|
+
return this.platform.action('open', {
|
|
706
|
+
owner: Name.from(owner),
|
|
707
|
+
token_contract: Name.from(tokenContract),
|
|
708
|
+
token_symbol: Asset.Symbol.from(tokenSymbol),
|
|
709
|
+
})
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
close(owner: NameType, tokenContract: NameType, tokenSymbol: Asset.SymbolType): Action {
|
|
713
|
+
return this.platform.action('close', {
|
|
714
|
+
owner: Name.from(owner),
|
|
715
|
+
token_contract: Name.from(tokenContract),
|
|
716
|
+
token_symbol: Asset.Symbol.from(tokenSymbol),
|
|
717
|
+
})
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
withdraw(
|
|
721
|
+
owner: NameType,
|
|
722
|
+
quantity: AssetType,
|
|
723
|
+
tokenContract: NameType,
|
|
724
|
+
memo = 'withdraw'
|
|
725
|
+
): Action {
|
|
726
|
+
return this.platform.action('withdraw', {
|
|
727
|
+
owner: Name.from(owner),
|
|
728
|
+
quantity: ExtendedAsset.from({
|
|
729
|
+
quantity: Asset.from(quantity),
|
|
730
|
+
contract: Name.from(tokenContract),
|
|
731
|
+
}),
|
|
732
|
+
memo,
|
|
733
|
+
})
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
tokenContract(account: NameType): TokenContract.Contract {
|
|
737
|
+
const name = Name.from(account)
|
|
738
|
+
const key = String(name)
|
|
739
|
+
let contract = this.tokenContracts.get(key)
|
|
740
|
+
if (!contract) {
|
|
741
|
+
contract = new TokenContract.Contract({client: this.client, account: name})
|
|
742
|
+
this.tokenContracts.set(key, contract)
|
|
743
|
+
}
|
|
744
|
+
return contract
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
tokenTransfer(
|
|
748
|
+
from: NameType,
|
|
749
|
+
to: NameType,
|
|
750
|
+
quantity: AssetType,
|
|
751
|
+
tokenContract: NameType,
|
|
752
|
+
memo = ''
|
|
753
|
+
): Action {
|
|
754
|
+
return this.tokenContract(tokenContract).action('transfer', {
|
|
755
|
+
from: Name.from(from),
|
|
756
|
+
to: Name.from(to),
|
|
757
|
+
quantity: Asset.from(quantity),
|
|
758
|
+
memo,
|
|
759
|
+
})
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
// `open` is an idempotent no-op; omitting it is what produces the "call open first" abort.
|
|
763
|
+
deposit(
|
|
764
|
+
owner: NameType,
|
|
765
|
+
quantity: AssetType,
|
|
766
|
+
tokenContract: NameType,
|
|
767
|
+
opts: {memo?: string; open?: boolean} = {}
|
|
768
|
+
): Action[] {
|
|
769
|
+
const amount = Asset.from(quantity)
|
|
770
|
+
const actions: Action[] = []
|
|
771
|
+
if (opts.open !== false) {
|
|
772
|
+
actions.push(this.open(owner, tokenContract, amount.symbol))
|
|
773
|
+
}
|
|
774
|
+
actions.push(
|
|
775
|
+
this.tokenTransfer(
|
|
776
|
+
owner,
|
|
777
|
+
this.platform.account,
|
|
778
|
+
amount,
|
|
779
|
+
tokenContract,
|
|
780
|
+
opts.memo ?? 'deposit'
|
|
781
|
+
)
|
|
782
|
+
)
|
|
783
|
+
return actions
|
|
784
|
+
}
|
|
785
|
+
|
|
699
786
|
async wrap(
|
|
700
787
|
owner: NameType,
|
|
701
788
|
entityId: UInt64Type,
|
|
@@ -714,8 +801,8 @@ export class ActionsManager extends BaseManager {
|
|
|
714
801
|
quantity: UInt64.from(quantity),
|
|
715
802
|
}),
|
|
716
803
|
]
|
|
717
|
-
|
|
718
|
-
|
|
804
|
+
// setlastpayer is what fires logrampayer and clears the wrap gate; skipping it strands it.
|
|
805
|
+
const claimRam = opts.claimRam ?? true
|
|
719
806
|
if (claimRam) {
|
|
720
807
|
actions.push(this.setLastPayer(owner, SHIPLOAD_COLLECTION))
|
|
721
808
|
}
|
|
@@ -749,8 +836,8 @@ export class ActionsManager extends BaseManager {
|
|
|
749
836
|
nexus_id: UInt64.from(nexusId),
|
|
750
837
|
}),
|
|
751
838
|
]
|
|
752
|
-
|
|
753
|
-
|
|
839
|
+
// setlastpayer is what fires logrampayer and clears the wrap gate; skipping it strands it.
|
|
840
|
+
const claimRam = opts.claimRam ?? true
|
|
754
841
|
if (claimRam) {
|
|
755
842
|
actions.push(this.setLastPayer(owner, SHIPLOAD_COLLECTION))
|
|
756
843
|
}
|