ethlite-contracts 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +8 -0
- data/Rakefile +1 -1
- data/lib/ethlite/contracts/mad_camels.rb +199 -0
- data/lib/ethlite/contracts/marcs.rb +199 -0
- data/lib/ethlite/contracts/moonbirds.rb +211 -0
- data/lib/ethlite/contracts/mooncats.rb +151 -0
- data/lib/ethlite/contracts/phunks_v2.rb +145 -0
- data/lib/ethlite/contracts/punk_blocks.rb +71 -110
- data/lib/ethlite/contracts/punks_data.rb +31 -0
- data/lib/ethlite/contracts/punks_meta.rb +80 -0
- data/lib/ethlite/contracts/punks_v1.rb +38 -59
- data/lib/ethlite/contracts/synth_punks.rb +182 -0
- data/lib/ethlite-contracts.rb +10 -2
- metadata +10 -2
@@ -0,0 +1,151 @@
|
|
1
|
+
# Mooncats contract / (blockchain) services / function calls
|
2
|
+
#
|
3
|
+
# auto-generated via abigen (see https://rubygems.org/gems/abigen) on 2023-01-15 16:36:44 UTC
|
4
|
+
# - 23 query functions(s)
|
5
|
+
# - 0 helper functions(s)
|
6
|
+
|
7
|
+
|
8
|
+
class Mooncats < Ethlite::Contract
|
9
|
+
|
10
|
+
address "0x60cd862c9c687a9de49aecdc3a99b74a4fc54ab6"
|
11
|
+
|
12
|
+
# function **name**() ⇒ (string _) _readonly_
|
13
|
+
def name()
|
14
|
+
do_call("name")
|
15
|
+
end
|
16
|
+
sig "name", outputs: ["string"]
|
17
|
+
|
18
|
+
# function **remainingGenesisCats**() ⇒ (uint16 _) _readonly_
|
19
|
+
def remainingGenesisCats()
|
20
|
+
do_call("remainingGenesisCats")
|
21
|
+
end
|
22
|
+
sig "remainingGenesisCats", outputs: ["uint16"]
|
23
|
+
|
24
|
+
# function **totalSupply**() ⇒ (uint256 _) _readonly_
|
25
|
+
def totalSupply()
|
26
|
+
do_call("totalSupply")
|
27
|
+
end
|
28
|
+
sig "totalSupply", outputs: ["uint256"]
|
29
|
+
|
30
|
+
# function **remainingCats**() ⇒ (uint16 _) _readonly_
|
31
|
+
def remainingCats()
|
32
|
+
do_call("remainingCats")
|
33
|
+
end
|
34
|
+
sig "remainingCats", outputs: ["uint16"]
|
35
|
+
|
36
|
+
# function **mode**() ⇒ (uint8 _) _readonly_
|
37
|
+
def mode()
|
38
|
+
do_call("mode")
|
39
|
+
end
|
40
|
+
sig "mode", outputs: ["uint8"]
|
41
|
+
|
42
|
+
# function **getCatDetails**(bytes5 catId) ⇒ (bytes5 id, address owner, bytes32 name, address onlyOfferTo, uint256 offerPrice, address requester, uint256 requestPrice) _readonly_
|
43
|
+
def getCatDetails(catId)
|
44
|
+
do_call("getCatDetails", catId)
|
45
|
+
end
|
46
|
+
sig "getCatDetails", inputs: ["bytes5"], outputs: ["bytes5","address","bytes32","address","uint256","address","uint256"]
|
47
|
+
|
48
|
+
# function **decimals**() ⇒ (uint8 _) _readonly_
|
49
|
+
def decimals()
|
50
|
+
do_call("decimals")
|
51
|
+
end
|
52
|
+
sig "decimals", outputs: ["uint8"]
|
53
|
+
|
54
|
+
# function **getCatOwners**() ⇒ (address[] _) _readonly_
|
55
|
+
def getCatOwners()
|
56
|
+
do_call("getCatOwners")
|
57
|
+
end
|
58
|
+
sig "getCatOwners", outputs: ["address[]"]
|
59
|
+
|
60
|
+
# function **catOwners**(bytes5 _) ⇒ (address _) _readonly_
|
61
|
+
def catOwners(arg0)
|
62
|
+
do_call("catOwners", arg0)
|
63
|
+
end
|
64
|
+
sig "catOwners", inputs: ["bytes5"], outputs: ["address"]
|
65
|
+
|
66
|
+
# function **rescueOrder**(uint256 _) ⇒ (bytes5 _) _readonly_
|
67
|
+
def rescueOrder(arg0)
|
68
|
+
do_call("rescueOrder", arg0)
|
69
|
+
end
|
70
|
+
sig "rescueOrder", inputs: ["uint256"], outputs: ["bytes5"]
|
71
|
+
|
72
|
+
# function **getCatIds**() ⇒ (bytes5[] _) _readonly_
|
73
|
+
def getCatIds()
|
74
|
+
do_call("getCatIds")
|
75
|
+
end
|
76
|
+
sig "getCatIds", outputs: ["bytes5[]"]
|
77
|
+
|
78
|
+
# function **balanceOf**(address _) ⇒ (uint256 _) _readonly_
|
79
|
+
def balanceOf(arg0)
|
80
|
+
do_call("balanceOf", arg0)
|
81
|
+
end
|
82
|
+
sig "balanceOf", inputs: ["address"], outputs: ["uint256"]
|
83
|
+
|
84
|
+
# function **getCatNames**() ⇒ (bytes32[] _) _readonly_
|
85
|
+
def getCatNames()
|
86
|
+
do_call("getCatNames")
|
87
|
+
end
|
88
|
+
sig "getCatNames", outputs: ["bytes32[]"]
|
89
|
+
|
90
|
+
# function **adoptionOffers**(bytes5 _) ⇒ (bool exists, bytes5 catId, address seller, uint256 price, address onlyOfferTo) _readonly_
|
91
|
+
def adoptionOffers(arg0)
|
92
|
+
do_call("adoptionOffers", arg0)
|
93
|
+
end
|
94
|
+
sig "adoptionOffers", inputs: ["bytes5"], outputs: ["bool","bytes5","address","uint256","address"]
|
95
|
+
|
96
|
+
# function **catNames**(bytes5 _) ⇒ (bytes32 _) _readonly_
|
97
|
+
def catNames(arg0)
|
98
|
+
do_call("catNames", arg0)
|
99
|
+
end
|
100
|
+
sig "catNames", inputs: ["bytes5"], outputs: ["bytes32"]
|
101
|
+
|
102
|
+
# function **symbol**() ⇒ (string _) _readonly_
|
103
|
+
def symbol()
|
104
|
+
do_call("symbol")
|
105
|
+
end
|
106
|
+
sig "symbol", outputs: ["string"]
|
107
|
+
|
108
|
+
# function **getCatRequestPrices**() ⇒ (uint256[] _) _readonly_
|
109
|
+
def getCatRequestPrices()
|
110
|
+
do_call("getCatRequestPrices")
|
111
|
+
end
|
112
|
+
sig "getCatRequestPrices", outputs: ["uint256[]"]
|
113
|
+
|
114
|
+
# function **searchSeed**() ⇒ (bytes32 _) _readonly_
|
115
|
+
def searchSeed()
|
116
|
+
do_call("searchSeed")
|
117
|
+
end
|
118
|
+
sig "searchSeed", outputs: ["bytes32"]
|
119
|
+
|
120
|
+
# function **imageGenerationCodeMD5**() ⇒ (bytes16 _) _readonly_
|
121
|
+
def imageGenerationCodeMD5()
|
122
|
+
do_call("imageGenerationCodeMD5")
|
123
|
+
end
|
124
|
+
sig "imageGenerationCodeMD5", outputs: ["bytes16"]
|
125
|
+
|
126
|
+
# function **adoptionRequests**(bytes5 _) ⇒ (bool exists, bytes5 catId, address requester, uint256 price) _readonly_
|
127
|
+
def adoptionRequests(arg0)
|
128
|
+
do_call("adoptionRequests", arg0)
|
129
|
+
end
|
130
|
+
sig "adoptionRequests", inputs: ["bytes5"], outputs: ["bool","bytes5","address","uint256"]
|
131
|
+
|
132
|
+
# function **getCatOfferPrices**() ⇒ (uint256[] _) _readonly_
|
133
|
+
def getCatOfferPrices()
|
134
|
+
do_call("getCatOfferPrices")
|
135
|
+
end
|
136
|
+
sig "getCatOfferPrices", outputs: ["uint256[]"]
|
137
|
+
|
138
|
+
# function **rescueIndex**() ⇒ (uint16 _) _readonly_
|
139
|
+
def rescueIndex()
|
140
|
+
do_call("rescueIndex")
|
141
|
+
end
|
142
|
+
sig "rescueIndex", outputs: ["uint16"]
|
143
|
+
|
144
|
+
# function **pendingWithdrawals**(address _) ⇒ (uint256 _) _readonly_
|
145
|
+
def pendingWithdrawals(arg0)
|
146
|
+
do_call("pendingWithdrawals", arg0)
|
147
|
+
end
|
148
|
+
sig "pendingWithdrawals", inputs: ["address"], outputs: ["uint256"]
|
149
|
+
|
150
|
+
end ## class Mooncats
|
151
|
+
|
@@ -0,0 +1,145 @@
|
|
1
|
+
# PhunksV2 contract / (blockchain) services / function calls
|
2
|
+
#
|
3
|
+
# auto-generated via abigen (see https://rubygems.org/gems/abigen) on 2023-01-15 16:36:46 UTC
|
4
|
+
# - 22 query functions(s)
|
5
|
+
# - 0 helper functions(s)
|
6
|
+
|
7
|
+
|
8
|
+
class PhunksV2 < Ethlite::Contract
|
9
|
+
|
10
|
+
address "0xf07468ead8cf26c752c676e43c814fee9c8cf402"
|
11
|
+
|
12
|
+
# function **MAX_MINTABLE_AT_ONCE**() ⇒ (uint256 _) _readonly_
|
13
|
+
def MAX_MINTABLE_AT_ONCE()
|
14
|
+
do_call("MAX_MINTABLE_AT_ONCE")
|
15
|
+
end
|
16
|
+
sig "MAX_MINTABLE_AT_ONCE", outputs: ["uint256"]
|
17
|
+
|
18
|
+
# function **balanceOf**(address owner) ⇒ (uint256 _) _readonly_
|
19
|
+
def balanceOf(owner)
|
20
|
+
do_call("balanceOf", owner)
|
21
|
+
end
|
22
|
+
sig "balanceOf", inputs: ["address"], outputs: ["uint256"]
|
23
|
+
|
24
|
+
# function **contractURI**() ⇒ (string _) _readonly_
|
25
|
+
def contractURI()
|
26
|
+
do_call("contractURI")
|
27
|
+
end
|
28
|
+
sig "contractURI", outputs: ["string"]
|
29
|
+
|
30
|
+
# function **freeRollPhunks**(address _) ⇒ (uint256 _) _readonly_
|
31
|
+
def freeRollPhunks(arg0)
|
32
|
+
do_call("freeRollPhunks", arg0)
|
33
|
+
end
|
34
|
+
sig "freeRollPhunks", inputs: ["address"], outputs: ["uint256"]
|
35
|
+
|
36
|
+
# function **getApproved**(uint256 tokenId) ⇒ (address _) _readonly_
|
37
|
+
def getApproved(tokenId)
|
38
|
+
do_call("getApproved", tokenId)
|
39
|
+
end
|
40
|
+
sig "getApproved", inputs: ["uint256"], outputs: ["address"]
|
41
|
+
|
42
|
+
# function **getCostForMintingPhunks**(uint256 _numToMint) ⇒ (uint256 _) _readonly_
|
43
|
+
def getCostForMintingPhunks(_numToMint)
|
44
|
+
do_call("getCostForMintingPhunks", _numToMint)
|
45
|
+
end
|
46
|
+
sig "getCostForMintingPhunks", inputs: ["uint256"], outputs: ["uint256"]
|
47
|
+
|
48
|
+
# function **getNumFreeRollPhunks**(address owner) ⇒ (uint256 _) _readonly_
|
49
|
+
def getNumFreeRollPhunks(owner)
|
50
|
+
do_call("getNumFreeRollPhunks", owner)
|
51
|
+
end
|
52
|
+
sig "getNumFreeRollPhunks", inputs: ["address"], outputs: ["uint256"]
|
53
|
+
|
54
|
+
# function **getPhunksBelongingToOwner**(address _owner) ⇒ (uint256[] _) _readonly_
|
55
|
+
def getPhunksBelongingToOwner(_owner)
|
56
|
+
do_call("getPhunksBelongingToOwner", _owner)
|
57
|
+
end
|
58
|
+
sig "getPhunksBelongingToOwner", inputs: ["address"], outputs: ["uint256[]"]
|
59
|
+
|
60
|
+
# function **imageHash**() ⇒ (string _) _readonly_
|
61
|
+
def imageHash()
|
62
|
+
do_call("imageHash")
|
63
|
+
end
|
64
|
+
sig "imageHash", outputs: ["string"]
|
65
|
+
|
66
|
+
# function **isApprovedForAll**(address owner, address operator) ⇒ (bool _) _readonly_
|
67
|
+
def isApprovedForAll(owner, operator)
|
68
|
+
do_call("isApprovedForAll", owner, operator)
|
69
|
+
end
|
70
|
+
sig "isApprovedForAll", inputs: ["address","address"], outputs: ["bool"]
|
71
|
+
|
72
|
+
# function **isSaleOn**() ⇒ (bool _) _readonly_
|
73
|
+
def isSaleOn()
|
74
|
+
do_call("isSaleOn")
|
75
|
+
end
|
76
|
+
sig "isSaleOn", outputs: ["bool"]
|
77
|
+
|
78
|
+
# function **name**() ⇒ (string _) _readonly_
|
79
|
+
def name()
|
80
|
+
do_call("name")
|
81
|
+
end
|
82
|
+
sig "name", outputs: ["string"]
|
83
|
+
|
84
|
+
# function **numTotalPhunks**() ⇒ (uint256 _) _readonly_
|
85
|
+
def numTotalPhunks()
|
86
|
+
do_call("numTotalPhunks")
|
87
|
+
end
|
88
|
+
sig "numTotalPhunks", outputs: ["uint256"]
|
89
|
+
|
90
|
+
# function **owner**() ⇒ (address _) _readonly_
|
91
|
+
def owner()
|
92
|
+
do_call("owner")
|
93
|
+
end
|
94
|
+
sig "owner", outputs: ["address"]
|
95
|
+
|
96
|
+
# function **ownerOf**(uint256 tokenId) ⇒ (address _) _readonly_
|
97
|
+
def ownerOf(tokenId)
|
98
|
+
do_call("ownerOf", tokenId)
|
99
|
+
end
|
100
|
+
sig "ownerOf", inputs: ["uint256"], outputs: ["address"]
|
101
|
+
|
102
|
+
# function **saleHasBeenStarted**() ⇒ (bool _) _readonly_
|
103
|
+
def saleHasBeenStarted()
|
104
|
+
do_call("saleHasBeenStarted")
|
105
|
+
end
|
106
|
+
sig "saleHasBeenStarted", outputs: ["bool"]
|
107
|
+
|
108
|
+
# function **supportsInterface**(bytes4 interfaceId) ⇒ (bool _) _readonly_
|
109
|
+
def supportsInterface(interfaceId)
|
110
|
+
do_call("supportsInterface", interfaceId)
|
111
|
+
end
|
112
|
+
sig "supportsInterface", inputs: ["bytes4"], outputs: ["bool"]
|
113
|
+
|
114
|
+
# function **symbol**() ⇒ (string _) _readonly_
|
115
|
+
def symbol()
|
116
|
+
do_call("symbol")
|
117
|
+
end
|
118
|
+
sig "symbol", outputs: ["string"]
|
119
|
+
|
120
|
+
# function **tokenByIndex**(uint256 index) ⇒ (uint256 _) _readonly_
|
121
|
+
def tokenByIndex(index)
|
122
|
+
do_call("tokenByIndex", index)
|
123
|
+
end
|
124
|
+
sig "tokenByIndex", inputs: ["uint256"], outputs: ["uint256"]
|
125
|
+
|
126
|
+
# function **tokenOfOwnerByIndex**(address owner, uint256 index) ⇒ (uint256 _) _readonly_
|
127
|
+
def tokenOfOwnerByIndex(owner, index)
|
128
|
+
do_call("tokenOfOwnerByIndex", owner, index)
|
129
|
+
end
|
130
|
+
sig "tokenOfOwnerByIndex", inputs: ["address","uint256"], outputs: ["uint256"]
|
131
|
+
|
132
|
+
# function **tokenURI**(uint256 _tokenId) ⇒ (string _) _readonly_
|
133
|
+
def tokenURI(_tokenId)
|
134
|
+
do_call("tokenURI", _tokenId)
|
135
|
+
end
|
136
|
+
sig "tokenURI", inputs: ["uint256"], outputs: ["string"]
|
137
|
+
|
138
|
+
# function **totalSupply**() ⇒ (uint256 _) _readonly_
|
139
|
+
def totalSupply()
|
140
|
+
do_call("totalSupply")
|
141
|
+
end
|
142
|
+
sig "totalSupply", outputs: ["uint256"]
|
143
|
+
|
144
|
+
end ## class PhunksV2
|
145
|
+
|
@@ -1,97 +1,88 @@
|
|
1
|
-
#########################
|
2
1
|
# PunkBlocks contract / (blockchain) services / function calls
|
3
|
-
#
|
2
|
+
#
|
3
|
+
# auto-generated via abigen (see https://rubygems.org/gems/abigen) on 2023-01-15 16:36:58 UTC
|
4
4
|
# - 8 query functions(s)
|
5
|
-
|
6
|
-
#
|
5
|
+
# - 0 helper functions(s)
|
6
|
+
#
|
7
|
+
#
|
7
8
|
# - Author: tycoon.eth, thanks to @geraldb & @samwilsn on Github for inspiration!
|
8
9
|
# - Version: v0.0.2
|
9
10
|
# - Pragma: solidity ^0.8.17
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# ```
|
33
|
-
#
|
11
|
+
#
|
12
|
+
#
|
13
|
+
# ███████████ █████
|
14
|
+
# ░░███░░░░░███ ░░███
|
15
|
+
# ░███ ░███ █████ ████ ████████ ░███ █████
|
16
|
+
# ░██████████ ░░███ ░███ ░░███░░███ ░███░░███
|
17
|
+
# ░███░░░░░░ ░███ ░███ ░███ ░███ ░██████░
|
18
|
+
# ░███ ░███ ░███ ░███ ░███ ░███░░███
|
19
|
+
# █████ ░░████████ ████ █████ ████ █████
|
20
|
+
# ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ░░░░ ░░░░░
|
21
|
+
#
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# ███████████ ████ █████
|
25
|
+
# ░░███░░░░░███░░███ ░░███
|
26
|
+
# ░███ ░███ ░███ ██████ ██████ ░███ █████ █████
|
27
|
+
# ░██████████ ░███ ███░░███ ███░░███ ░███░░███ ███░░
|
28
|
+
# ░███░░░░░███ ░███ ░███ ░███░███ ░░░ ░██████░ ░░█████
|
29
|
+
# ░███ ░███ ░███ ░███ ░███░███ ███ ░███░░███ ░░░░███
|
30
|
+
# ███████████ █████░░██████ ░░██████ ████ █████ ██████
|
31
|
+
# ░░░░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░░ ░░░░░ ░░░░░░
|
32
|
+
#
|
34
33
|
# A Registry of 24x24 png images
|
35
|
-
#
|
34
|
+
#
|
36
35
|
# This contract:
|
37
|
-
#
|
36
|
+
#
|
38
37
|
# 1. Stores all the classic traits of the CryptoPunks in
|
39
38
|
# individual png files, 100% on-chain. These are then used as
|
40
39
|
# blocks to construct CryptoPunk images. Outputted as SVGs.
|
41
|
-
#
|
40
|
+
#
|
42
41
|
# 2. Any of the 10,000 "classic" CryptoPunks can be generated
|
43
42
|
# by supplying desired arguments to a function, such as
|
44
43
|
# the id of a punk, or a list of the traits.
|
45
|
-
#
|
44
|
+
#
|
46
45
|
# 3. An unlimited number of new punk images can be generated from
|
47
46
|
# the existing classic set of traits, or even from new traits!
|
48
|
-
#
|
47
|
+
#
|
49
48
|
# 4. New traits (blocks) can be added to the contract by
|
50
49
|
# registering them with the `registerBlock` function.
|
51
|
-
#
|
50
|
+
#
|
52
51
|
# Further documentation:
|
53
52
|
# https://github.com/0xTycoon/punk-blocks
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
53
|
+
#
|
54
|
+
#
|
55
|
+
#
|
57
56
|
# **Data Structures**
|
58
|
-
#
|
57
|
+
#
|
59
58
|
# Layer is in the order of rendering
|
60
|
-
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
67
|
-
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
# }
|
85
|
-
# ```
|
86
|
-
#
|
87
|
-
#
|
59
|
+
#
|
60
|
+
# enum Layer {
|
61
|
+
# Base, // 0 Base is the face. Determines if m or f version will be used to render the remaining layers
|
62
|
+
# Cheeks, // 1 (Rosy Cheeks)
|
63
|
+
# Blemish, // 2 (Mole, Spots)
|
64
|
+
# Hair, // 3 (Purple Hair, Shaved Head, Pigtails, ...)
|
65
|
+
# Beard, // 4 (Big Beard, Front Beard, Goat, ...)
|
66
|
+
# Eyes, // 5 (Clown Eyes Green, Green Eye Shadow, ...)
|
67
|
+
# Eyewear, // 6 (VR, 3D Glass, Eye Mask, Regular Shades, Welding Glasses, ...)
|
68
|
+
# Nose, // 7 (Clown Nose)
|
69
|
+
# Mouth, // 8 (Hot Lipstick, Smile, Buck Teeth, ...)
|
70
|
+
# MouthProp, // 9 (Medical Mask, Cigarette, ...)
|
71
|
+
# Earring, // 10 (Earring)
|
72
|
+
# Headgear, // 11 (Beanie, Fedora, Hoodie, Police Cap, Tiara, Headband, ...)
|
73
|
+
# Neck // 12 (Choker, Silver Chain, Gold Chain)
|
74
|
+
# }
|
75
|
+
#
|
76
|
+
# struct Block {
|
77
|
+
# Layer layer; // 13 possible layers
|
78
|
+
# bytes dataMale; // male version of this attribute
|
79
|
+
# bytes dataFemale;// female version of this attribute
|
80
|
+
# }
|
81
|
+
#
|
82
|
+
#
|
88
83
|
# **Events**
|
89
|
-
#
|
90
|
-
#
|
91
|
-
# event NewBlock(address, uint256, string)
|
92
|
-
# ```
|
93
|
-
#
|
94
|
-
#
|
84
|
+
#
|
85
|
+
# event NewBlock(address, uint256, string)
|
95
86
|
|
96
87
|
|
97
88
|
class PunkBlocks < Ethlite::Contract
|
@@ -100,73 +91,54 @@ class PunkBlocks < Ethlite::Contract
|
|
100
91
|
|
101
92
|
# storage - mapping(bytes32 => Block) public blocks
|
102
93
|
#
|
103
|
-
#
|
104
94
|
# stores punk attributes as a png
|
105
|
-
#
|
106
|
-
#
|
107
|
-
sig "blocks", inputs: ["bytes32"], outputs: ["uint8","bytes","bytes"]
|
108
95
|
def blocks(arg0)
|
109
96
|
do_call("blocks", arg0)
|
110
97
|
end
|
98
|
+
sig "blocks", inputs: ["bytes32"], outputs: ["uint8","bytes","bytes"]
|
111
99
|
|
112
100
|
# function getBlocks
|
113
101
|
#
|
114
|
-
#
|
115
|
-
# ```
|
116
102
|
# getBlocks returns a sequential list of blocks in a single call
|
117
103
|
# @param _fromID is which id to begin from
|
118
104
|
# @param _count how many items to retrieve.
|
119
105
|
# @return Block[] list of blocks, uint256 next id
|
120
|
-
# ```
|
121
|
-
#
|
122
|
-
sig "getBlocks", inputs: ["uint256","uint256"], outputs: ["(uint8,bytes,bytes)[]","uint256"]
|
123
106
|
def getBlocks(_fromID, _count)
|
124
107
|
do_call("getBlocks", _fromID, _count)
|
125
108
|
end
|
109
|
+
sig "getBlocks", inputs: ["uint256","uint256"], outputs: ["(uint8,bytes,bytes)[]","uint256"]
|
126
110
|
|
127
111
|
# storage - mapping(uint256 => bytes32) public index
|
128
112
|
#
|
129
|
-
#
|
130
113
|
# index of each block by its sequence
|
131
|
-
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
sig "index", inputs: ["uint256"], outputs: ["bytes32"]
|
135
114
|
def index(arg0)
|
136
115
|
do_call("index", arg0)
|
137
116
|
end
|
117
|
+
sig "index", inputs: ["uint256"], outputs: ["bytes32"]
|
138
118
|
|
139
119
|
# storage - uint256 public nextId
|
140
120
|
#
|
141
|
-
#
|
142
121
|
# next id to use when adding a block
|
143
|
-
#
|
144
|
-
sig "nextId", outputs: ["uint256"]
|
145
122
|
def nextId()
|
146
123
|
do_call("nextId")
|
147
124
|
end
|
125
|
+
sig "nextId", outputs: ["uint256"]
|
148
126
|
|
149
127
|
# function svgFromIDs
|
150
128
|
#
|
151
|
-
#
|
152
|
-
# ```
|
153
129
|
# svgFromIDs returns the svg data as a string
|
154
130
|
# e.g. [9,55,99]
|
155
131
|
# One of the elements must be must be a layer 0 block.
|
156
132
|
# This element decides what version of image to use for the higher layers
|
157
133
|
# (dataMale or dataFemale)
|
158
134
|
# @param _ids uint256 ids of an attribute, by it's index of creation
|
159
|
-
# ```
|
160
|
-
#
|
161
|
-
sig "svgFromIDs", inputs: ["uint256[]"], outputs: ["string"]
|
162
135
|
def svgFromIDs(_ids)
|
163
136
|
do_call("svgFromIDs", _ids)
|
164
137
|
end
|
138
|
+
sig "svgFromIDs", inputs: ["uint256[]"], outputs: ["string"]
|
165
139
|
|
166
140
|
# function svgFromKeys
|
167
141
|
#
|
168
|
-
#
|
169
|
-
# ```
|
170
142
|
# svgFromKeys returns the svg data as a string
|
171
143
|
# @param _attributeKeys a list of attribute names that have been hashed,
|
172
144
|
# eg keccak256("Male 1"), keccak256("Goat")
|
@@ -175,17 +147,13 @@ end
|
|
175
147
|
# (dataMale or dataFemale)
|
176
148
|
# e.g. ["0x9039da071f773e85254cbd0f99efa70230c4c11d63fce84323db9eca8e8ef283",
|
177
149
|
# "0xd5de5c20969a9e22f93842ca4d65bac0c0387225cee45a944a14f03f9221fd4a"]
|
178
|
-
# ```
|
179
|
-
#
|
180
|
-
sig "svgFromKeys", inputs: ["bytes32[]"], outputs: ["string"]
|
181
150
|
def svgFromKeys(_attributeKeys)
|
182
151
|
do_call("svgFromKeys", _attributeKeys)
|
183
152
|
end
|
153
|
+
sig "svgFromKeys", inputs: ["bytes32[]"], outputs: ["string"]
|
184
154
|
|
185
155
|
# function svgFromNames
|
186
156
|
#
|
187
|
-
#
|
188
|
-
# ```
|
189
157
|
# svgFromNames returns the svg data as a string
|
190
158
|
# @param _attributeNames a list of attribute names, eg "Male 1", "Goat"
|
191
159
|
# must have at least 1 layer 0 attribute (eg. Male, Female, Alien, Ape, Zombie)
|
@@ -193,26 +161,19 @@ end
|
|
193
161
|
# Where "Male 1" is a layer 0 attribute, that decides what version of
|
194
162
|
# image to use for the higher
|
195
163
|
# layers (dataMale or dataFemale)
|
196
|
-
# ```
|
197
|
-
#
|
198
|
-
#
|
199
|
-
sig "svgFromNames", inputs: ["string[]"], outputs: ["string"]
|
200
164
|
def svgFromNames(_attributeNames)
|
201
165
|
do_call("svgFromNames", _attributeNames)
|
202
166
|
end
|
167
|
+
sig "svgFromNames", inputs: ["string[]"], outputs: ["string"]
|
203
168
|
|
204
169
|
# function svgFromPunkID
|
205
170
|
#
|
206
|
-
#
|
207
|
-
# ```
|
208
171
|
# svgFromPunkID returns the svg data as a string given a punk id
|
209
172
|
# @param _tokenID uint256 IDs a punk id, 0-9999
|
210
|
-
# ```
|
211
|
-
#
|
212
|
-
sig "svgFromPunkID", inputs: ["uint256"], outputs: ["string"]
|
213
173
|
def svgFromPunkID(_tokenID)
|
214
174
|
do_call("svgFromPunkID", _tokenID)
|
215
175
|
end
|
176
|
+
sig "svgFromPunkID", inputs: ["uint256"], outputs: ["string"]
|
216
177
|
|
217
178
|
end ## class PunkBlocks
|
218
179
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# PunksData contract / (blockchain) services / function calls
|
2
|
+
#
|
3
|
+
# auto-generated via abigen (see https://rubygems.org/gems/abigen) on 2023-01-15 16:36:46 UTC
|
4
|
+
# - 3 query functions(s)
|
5
|
+
# - 0 helper functions(s)
|
6
|
+
|
7
|
+
|
8
|
+
class PunksData < Ethlite::Contract
|
9
|
+
|
10
|
+
address "0x16f5a35647d6f03d5d3da7b35409d65ba03af3b2"
|
11
|
+
|
12
|
+
# function **punkAttributes**(uint16 index) ⇒ (string text) _readonly_
|
13
|
+
def punkAttributes(index)
|
14
|
+
do_call("punkAttributes", index)
|
15
|
+
end
|
16
|
+
sig "punkAttributes", inputs: ["uint16"], outputs: ["string"]
|
17
|
+
|
18
|
+
# function **punkImage**(uint16 index) ⇒ (bytes _) _readonly_
|
19
|
+
def punkImage(index)
|
20
|
+
do_call("punkImage", index)
|
21
|
+
end
|
22
|
+
sig "punkImage", inputs: ["uint16"], outputs: ["bytes"]
|
23
|
+
|
24
|
+
# function **punkImageSvg**(uint16 index) ⇒ (string svg) _readonly_
|
25
|
+
def punkImageSvg(index)
|
26
|
+
do_call("punkImageSvg", index)
|
27
|
+
end
|
28
|
+
sig "punkImageSvg", inputs: ["uint16"], outputs: ["string"]
|
29
|
+
|
30
|
+
end ## class PunksData
|
31
|
+
|