Skip to content

Commit a1f7505

Browse files
committed
disable submit button for account editor when name or username length less than 3
1 parent b5e9027 commit a1f7505

File tree

11 files changed

+2576
-113
lines changed

11 files changed

+2576
-113
lines changed

build/Contract/Contract.wasm

10.8 KB
Binary file not shown.

build/Contract/abis/Contract.json

Lines changed: 1076 additions & 0 deletions
Large diffs are not rendered by default.

build/schema.graphql

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
type Platform @entity {
2+
id: ID!
3+
address: Bytes!
4+
totalSale: BigInt
5+
totalSaleInWei: BigInt
6+
platformFirstSalePercentage: BigInt
7+
platformSecondSalePercentage: BigInt
8+
artistSecondSalePercentage: BigInt
9+
lastModifiedTimestamp: BigInt
10+
}
11+
12+
# TYPE @Master
13+
# Master image with id of `tokenId`
14+
# Contains layers (ControlTokens) of type `Layer` (see below)
15+
type Master @entity {
16+
id: ID! # unique `tokenId`
17+
uri: String!
18+
layerCount: Int!
19+
layers: [Layer!]! @derivedFrom(field: "master")
20+
creators: [Bytes!]!
21+
owner: Bytes!
22+
pastOwners: [Bytes!]! # inclusive of current owner
23+
highBid: BidLog @derivedFrom(field: "master")
24+
pastBids: [BidLog!] @derivedFrom(field: "master")
25+
lastUpdated: BigInt # unix timestamp
26+
pastUpdates: [BigInt!] # unix timestamp
27+
lastTransfer: TransferLog @derivedFrom(field: "master")
28+
pastTransfers: [TransferLog!] @derivedFrom(field: "master")
29+
buyNowPriceInWei: BigInt
30+
}
31+
32+
# TYPE @Layer
33+
# Represents the `ControlToken`
34+
# Lives on a unique `Master`
35+
# Contains lever(s) of type `Lever`
36+
type Layer @entity {
37+
id: ID! # unique `tokenId`
38+
uri: String
39+
numLevers: Int
40+
levers: [Lever]! @derivedFrom(field: "layer")
41+
owner: Bytes!
42+
creators: [Bytes!]!
43+
pastOwners: [Bytes!]! # inclusive of current owner
44+
highBid: BidLog @derivedFrom(field: "layer")
45+
pastBids: [BidLog!] @derivedFrom(field: "layer")
46+
lastUpdate: BigInt # unix timestamp
47+
pastUpdates: [BigInt!]
48+
lastTransfer: TransferLog @derivedFrom(field: "layer")
49+
pastTransfers: [TransferLog!] @derivedFrom(field: "layer")
50+
buyNowPriceInWei: BigInt
51+
master: Master
52+
}
53+
54+
# TYPE @Lever
55+
# Represents the state of a `ControlToken`
56+
# Lives on a unique `Layer`
57+
# Contains a list of values which map to `Layer` states
58+
type Lever @entity {
59+
id: ID! # unique `tokenId` + lever index ? TODO
60+
minValue: Int!
61+
maxValue: Int!
62+
currentValue: Int!
63+
layer: Layer
64+
}
65+
66+
type Account @entity {
67+
id: ID!
68+
address: Bytes!
69+
isCreator: Boolean
70+
lastModifiedTimestamp: BigInt!
71+
bids: [BidLog!]! # @derivedFrom(field: "bidder")
72+
createdMasters: [Master]!
73+
createdLayers: [Layer]!
74+
ownedMasters: [Master]!
75+
ownedLayer: [Layer]!
76+
}
77+
78+
type SaleLog @entity {
79+
id: ID!
80+
timestamp: BigInt!
81+
tokenId: BigInt!
82+
isMaster: Boolean!
83+
isLayer: Boolean!
84+
amountInWei: BigInt!
85+
buyer: Account!
86+
seller: Account!
87+
}
88+
89+
type BidLog @entity {
90+
id: ID!
91+
timestamp: BigInt!
92+
master: Master
93+
layer: Layer
94+
amountInWei: BigInt!
95+
bidder: Bytes!
96+
isWithdrawn: Boolean! # whether or not the bid has been withdrawn
97+
withdrawnTimestamp: BigInt
98+
}
99+
100+
type TransferLog @entity {
101+
id: ID!
102+
timestamp: BigInt!
103+
tokenId: String!
104+
from: Bytes!
105+
to: Bytes!
106+
master: Master
107+
layer: Layer
108+
}

build/subgraph.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
specVersion: 0.0.2
2+
schema:
3+
file: schema.graphql
4+
dataSources:
5+
- kind: ethereum/contract
6+
name: Contract
7+
network: mainnet
8+
source:
9+
abi: Contract
10+
address: "0x6c424C25e9F1ffF9642cB5B7750b0Db7312c29ad"
11+
startBlock: 9555952
12+
mapping:
13+
kind: ethereum/events
14+
apiVersion: 0.0.4
15+
language: wasm/assemblyscript
16+
entities:
17+
- Approval
18+
- ApprovalForAll
19+
- BidProposed
20+
- BidWithdrawn
21+
- BuyPriceSet
22+
- ControlLeverUpdated
23+
- PlatformAddressUpdated
24+
- RoyaltyAmountUpdated
25+
- TokenSale
26+
- Transfer
27+
abis:
28+
- name: Contract
29+
file: Contract/abis/Contract.json
30+
callHandlers:
31+
- function: mintArtwork(uint256,string,address[])
32+
handler: handleMintArtwork
33+
- function: setupControlToken(uint256,string,int256[],int256[],int256[],address[])
34+
handler: handleSetupControlToken
35+
eventHandlers:
36+
- event: BidProposed(uint256,uint256,address)
37+
handler: handleBidProposed
38+
- event: TokenSale(uint256,uint256,address)
39+
handler: handleTokenSale
40+
- event: Transfer(indexed address,indexed address,indexed uint256)
41+
handler: handleTransfer
42+
file: Contract/Contract.wasm

0 commit comments

Comments
 (0)