-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'premint' into update_rewards_logic
- Loading branch information
Showing
15 changed files
with
79 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,60 @@ | ||
@startuml | ||
|
||
title Creating a signature for a new erc1155 contract + token | ||
title Creating a signature for a Premint Erc1155 contract + New token | ||
|
||
actor Creator | ||
entity CreatePage | ||
boundary SignatureAPI | ||
entity Wallet | ||
entity CreateUI | ||
boundary PremintAPI | ||
boundary PremintContract | ||
entity SignatureDB | ||
|
||
|
||
Group Signature not created for contract yet | ||
Group New premint token on new contract | ||
|
||
activate CreatePage | ||
Creator -> CreatePage: setup NEW contract name + image | ||
CreatePage -> SignatureAPI: validate that contract \nwith same params for\ncreator doesnt exist | ||
SignatureAPI -> SignatureDB: check if signature with hash \nfor contract is already stored | ||
SignatureAPI --> CreatePage: validation results | ||
Creator -> CreateUI: setup NEW contract name + image | ||
activate CreateUI | ||
CreateUI -> PremintContract: get determnistic collection address\nfor contract creation params | ||
activate PremintContract | ||
PremintContract --> CreateUI: determinstic collection address | ||
deactivate CreateUI | ||
deactivate PremintContract | ||
|
||
end | ||
|
||
Group Signature has been created for contract | ||
Group New premint token on existing premint contract | ||
|
||
Creator -> CreateUI: load page to create new token for\npremint at determinstic\ncollection address | ||
activate CreateUI | ||
CreateUI -> PremintAPI: load collection creation params\nby determinstic address | ||
activate PremintAPI | ||
|
||
Creator -> CreatePage: load page by determinstic collection address | ||
CreatePage -> SignatureAPI: load collection creation params | ||
SignatureAPI -> SignatureDB: fetch collection creation params\nby hash | ||
SignatureAPI --> CreatePage: contract creation params | ||
Group Premint exists | ||
PremintAPI --> CreateUI: collection creation params\n(from premint) | ||
deactivate CreateUI | ||
deactivate PremintAPI | ||
end | ||
|
||
end | ||
|
||
Creator -> CreatePage: setup new token | ||
CreatePage -> PremintContract: get determnistic collection address | ||
PremintContract --> CreatePage: determinstic collection address | ||
CreatePage -> SignatureAPI: get new uid for collection address | ||
SignatureAPI -> SignatureDB: get next token uid\nscoped to collection address | ||
SignatureDB --> SignatureAPI: next token uid | ||
SignatureAPI --> CreatePage: next token uid | ||
Creator -> CreatePage: Submit new token creation params | ||
CreatePage -> Creator: request signature of\n contract + token creation params + token uid | ||
deactivate CreatePage | ||
Creator -> SignatureAPI: Submit signature + contract + token params + token uid | ||
SignatureAPI -> PremintContract: validate signature | ||
PremintContract --> SignatureAPI: validation results (true/false & recovered signer) | ||
CreateUI -> PremintAPI: get next uid for\ncollection address | ||
activate CreateUI | ||
activate PremintAPI | ||
PremintAPI --> CreateUI: next uid for collection | ||
|
||
Group Signature is valid | ||
Creator -> CreateUI: configure new token parameters | ||
Creator -> CreateUI: Submit | ||
CreateUI -> Creator: request Premint EIP-712 signature containing:\n token creation params, token uid, version | ||
Creator -> Wallet: sign message | ||
Wallet -> CreateUI: Signed message by creator of\ntoken creation params, token uid, version | ||
CreateUI -> PremintAPI: validate and store signature | ||
PremintAPI -> PremintContract: validate signature | ||
PremintContract --> PremintAPI: validation results (true/false & recovered signer) | ||
|
||
SignatureAPI -> SignatureDB: store signature + \ncontract creation + \ntoken creation params + \ncollection address + \ntoken uid | ||
Group Signature is valid | ||
PremintAPI -> PremintAPI: store premint and signature | ||
|
||
end | ||
|
||
PremintAPI -> CreateUI: validation & storage status | ||
deactivate CreateUI | ||
|
||
@enduml |
Oops, something went wrong.