migration_research_constants.gno
2.05 Kb · 49 lines
1package block
2
3import "strconv"
4
5const (
6 MigrationResearchExpectedBlockType = "migration_research"
7 MigrationResearchExpectedLayer = "solid"
8 MigrationResearchExpectedDrawType = "cube"
9 MigrationResearchExpectedTextureLayer = "default"
10 MigrationResearchExpectedTextureURL = "migration_texture"
11 MigrationResearchExpectedPreviewURL = "migration_preview"
12 MigrationResearchExpectedOption = "migration_option"
13 MigrationResearchExpectedContent = "migration_content"
14 MigrationResearchExpectedUpdatedOption = "exercise_option"
15 MigrationResearchExpectedPersonalWorld = "1"
16 MigrationResearchExpectedSystemWorld = "4000000001"
17 MigrationResearchExpectedPersonalPosIdx = "100"
18 MigrationResearchExpectedSystemPosIdx = "101"
19 MigrationResearchExpectedMintAmount = int64(3)
20)
21
22func migrationResearchPersonalPosition(owner address) string {
23 return "personal|" + MigrationResearchExpectedPersonalWorld + "|" + owner.String() + "|0|0|" + MigrationResearchExpectedPersonalPosIdx
24}
25
26func migrationResearchSystemPosition(owner address) string {
27 return "system|" + MigrationResearchExpectedSystemWorld + "|" + owner.String() + "|0|1|" + MigrationResearchExpectedSystemPosIdx
28}
29
30func migrationResearchBlockPropKeys() string {
31 return "name,blockType,layer,drawType,textureLayer,textureURL,previewURL,maxSupply,mintPrice,usePrice,installerBps,shape,state,emission"
32}
33
34func migrationResearchBlockPropValues(name string, maxSupply string, mintPrice string, usePrice string, installerBPS string, shape uint32, state uint32, emission uint8) string {
35 return name + "," +
36 MigrationResearchExpectedBlockType + "," +
37 MigrationResearchExpectedLayer + "," +
38 MigrationResearchExpectedDrawType + "," +
39 MigrationResearchExpectedTextureLayer + "," +
40 MigrationResearchExpectedTextureURL + "," +
41 MigrationResearchExpectedPreviewURL + "," +
42 maxSupply + "," +
43 mintPrice + "," +
44 usePrice + "," +
45 installerBPS + "," +
46 strconv.FormatUint(uint64(shape), 10) + "," +
47 strconv.FormatUint(uint64(state), 10) + "," +
48 strconv.FormatUint(uint64(emission), 10)
49}