Skip to content

Feature/afloat pallet #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
May 10, 2023
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8bc120e
Adds RBAC to afloat pallet
Dreyhh Apr 26, 2023
2c670ce
Adds mapped-assets into gated-marketplace
Dreyhh Apr 27, 2023
6469375
Adds mapped-assets into gated-marketplace
Dreyhh Apr 27, 2023
a545014
Creates get_roles_by_user() on RBAC pallet to improve removal of role…
Dreyhh Apr 28, 2023
16b527c
Adds functions to buy/sell tax credits, creates unit tests for afloat…
Dreyhh May 3, 2023
e90c1f7
Fixes set_afoat_balance
Dreyhh May 3, 2023
4736291
✨ feat(types.rs): add Offer and Transaction structs and OfferStatus enum
tlacloc May 5, 2023
f12d4f3
🔧 chore(afloat): add storage for afloat offers and transactions
tlacloc May 5, 2023
eb435c9
🚀 feat(types.rs): add OfferType enum and offer_type field to Offer st…
tlacloc May 5, 2023
47ac56b
🔖 chore(types.rs): change offer_id type from u32 to StorageId
tlacloc May 5, 2023
c61d336
🔨 refactor(afloat): rename create_sell_order to create_offer and crea…
tlacloc May 8, 2023
5684fe0
🔀 chore(types.rs): change types of price_per_credit, fee, and tax_cre…
tlacloc May 8, 2023
8613bbb
Return offer_id when creating buy/sell offers
Dreyhh May 8, 2023
15f3063
🔨 refactor(functions.rs): remove unnecessary whitespace
tlacloc May 8, 2023
e6f423a
Merge branch 'feature/afloat-pallet' of github.com:hashed-io/hashed-s…
tlacloc May 8, 2023
b069a3c
🔥 refactor(afloat): remove unused code
tlacloc May 8, 2023
3168505
🔨 refactor(afloat): refactor Offer struct and User struct
tlacloc May 8, 2023
e044b33
📝 docs(FruniquesImplementation): add FruniquesImplementation diagram
tlacloc May 9, 2023
6eff77e
🎨 style(afloat): add fruniquesImplementation.drawio diagram
tlacloc May 10, 2023
b6e68d1
Merge branch 'develop' into feature/afloat-pallet
tlacloc May 10, 2023
7e10ff8
🐛 fix(afloat): change admin to creator in UserInfo insert
tlacloc May 10, 2023
e82e34e
🔒 chore(functions.rs): update creator and admin user cids and groups
tlacloc May 10, 2023
bf7eae8
🚀 feat(functions.rs, lib.rs, types.rs): add admin edit user functiona…
tlacloc May 10, 2023
e4e8ec0
🐛 fix(lib.rs): remove redundant authorization check
tlacloc May 10, 2023
c5af71d
🐛 fix(lib.rs): fix user authorization logic in UpdateUserArgs
tlacloc May 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pallets/afloat/fruniquesImplementation.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile><diagram id="2qktoTp6xuHNVyL5OBEX" name="Page-1"><mxGraphModel dx="1171" dy="760" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="3" value="User creates&lt;br&gt;a tax cretid with&lt;br&gt;n editions" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="160" y="140" width="120" height="60" as="geometry"/></mxCell><mxCell id="4" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="5" target="13"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="5" value="user places an&lt;br&gt;sell order for&lt;br&gt;this TC" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="160" y="230" width="120" height="80" as="geometry"/></mxCell><mxCell id="6" style="edgeStyle=none;html=1;exitX=0.5;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="7" target="11"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="7" value="Buyer" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1"><mxGeometry x="80" y="350" width="30" height="60" as="geometry"/></mxCell><mxCell id="8" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="9" target="3"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="9" value="Seller" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1"><mxGeometry x="100" y="140" width="30" height="60" as="geometry"/></mxCell><mxCell id="10" style="edgeStyle=none;html=1;" edge="1" parent="1" source="11" target="13"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="11" value="places a buy offer&lt;br&gt;for a m amount of&lt;br&gt;TC" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="160" y="340" width="120" height="80" as="geometry"/></mxCell><mxCell id="12" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="13" target="15"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="13" value="offer matched" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="310" y="280" width="120" height="60" as="geometry"/></mxCell><mxCell id="14" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.418;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="15" target="17"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="15" value="TC &lt;br&gt;n = 100%&lt;br&gt;n - m&amp;nbsp; = c%" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="480" y="270" width="120" height="80" as="geometry"/></mxCell><mxCell id="16" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.889;entryY=0.155;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="17" target="5"><mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="610" y="240"/></Array></mxGeometry></mxCell><mxCell id="17" value="if offer passes&lt;br&gt;a new TC spawns with the c% of the father" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="490" y="410" width="120" height="60" as="geometry"/></mxCell><mxCell id="18" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="19" target="20"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="19" value="User creates&lt;br&gt;a tax cretid with&lt;br&gt;n editions" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="150" y="510" width="120" height="60" as="geometry"/></mxCell><mxCell id="20" value="user places an&lt;br&gt;sell order for&lt;br&gt;this TC" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="150" y="600" width="120" height="80" as="geometry"/></mxCell><mxCell id="21" style="edgeStyle=none;html=1;exitX=0.5;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.549;entryY=1.009;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="22" target="20"><mxGeometry relative="1" as="geometry"><mxPoint x="150" y="750" as="targetPoint"/></mxGeometry></mxCell><mxCell id="22" value="Buyer" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1"><mxGeometry x="70" y="720" width="30" height="60" as="geometry"/></mxCell><mxCell id="23" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="24" target="19"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="24" value="Seller" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="1"><mxGeometry x="90" y="510" width="30" height="60" as="geometry"/></mxCell><mxCell id="25" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="20" target="27"><mxGeometry relative="1" as="geometry"><mxPoint x="420" y="680" as="sourcePoint"/></mxGeometry></mxCell><mxCell id="26" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.418;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="27" target="28"><mxGeometry relative="1" as="geometry"/></mxCell><mxCell id="27" value="TC &lt;br&gt;n = 100%" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="330" y="600" width="120" height="80" as="geometry"/></mxCell><mxCell id="28" value="if offer passes&lt;br&gt;a new TC is trasfered to the buyer" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1"><mxGeometry x="340" y="740" width="120" height="60" as="geometry"/></mxCell><mxCell id="29" value="Takes the sell order" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"><mxGeometry x="160" y="710" width="60" height="30" as="geometry"/></mxCell><mxCell id="30" value="Updates TC to n = n - m" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"><mxGeometry x="360" y="210" width="150" height="30" as="geometry"/></mxCell></root></mxGraphModel></diagram></mxfile>
Loading