Skip to content

Commit

Permalink
[FE] - UI for Create Product Form (#40)
Browse files Browse the repository at this point in the history
Got most of the work done for the create product form, it's still very
messy and i need to clean up all the code and separate them into smaller
components to avoid a file with 1k+ lines of code but in the interest of
time just pushing what i have so far to get feedback asap.

this PR builds on top of your unmerged PR #35  @0x0ece

---------

Co-authored-by: Emanuele Cesena <[email protected]>
  • Loading branch information
srondss and 0x0ece authored Apr 3, 2024
1 parent 2a1cc0f commit 3ec6645
Show file tree
Hide file tree
Showing 17 changed files with 1,595 additions and 219 deletions.
28 changes: 28 additions & 0 deletions anchor/target/idl/custody.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.1.0",
"name": "custody",
"constants": [
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
}
],
"instructions": [
{
"name": "initialize",
"accounts": [],
"args": []
}
],
"errors": [
{
"code": 6000,
"name": "CustomError",
"msg": "Custom error message"
}
],
"metadata": {
"address": "Gcu1vbed9bwpfwU9PCnJw8QanQfVHfETWxAK3EZczbgo"
}
}
95 changes: 95 additions & 0 deletions anchor/target/idl/policy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"version": "0.1.0",
"name": "policy",
"constants": [
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
}
],
"instructions": [
{
"name": "transferHook",
"accounts": [
{
"name": "sourceToken",
"isMut": false,
"isSigner": false
},
{
"name": "mint",
"isMut": false,
"isSigner": false
},
{
"name": "destinationToken",
"isMut": false,
"isSigner": false
},
{
"name": "owner",
"isMut": false,
"isSigner": false
},
{
"name": "extraAccountMetaList",
"isMut": false,
"isSigner": false
}
],
"args": [
{
"name": "amount",
"type": "u64"
}
]
},
{
"name": "initializeExtraAccountMetaList",
"accounts": [
{
"name": "payer",
"isMut": true,
"isSigner": true
},
{
"name": "extraAccountMetaList",
"isMut": true,
"isSigner": false
},
{
"name": "mint",
"isMut": false,
"isSigner": false
},
{
"name": "tokenProgram",
"isMut": false,
"isSigner": false
},
{
"name": "associatedTokenProgram",
"isMut": false,
"isSigner": false
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
}
],
"args": []
}
],
"errors": [
{
"code": 6000,
"name": "AmountTooBig",
"msg": "Amount too big"
}
],
"metadata": {
"address": "Gpo1jXtEFepqyPQWTG7oDJrg8rye8JL3zcsczHzXKqLt"
}
}
64 changes: 64 additions & 0 deletions anchor/target/idl/pricing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"version": "0.1.0",
"name": "pricing",
"constants": [
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
}
],
"instructions": [
{
"name": "initialize",
"accounts": [],
"args": []
},
{
"name": "payUsd",
"accounts": [
{
"name": "from",
"isMut": false,
"isSigner": true
},
{
"name": "to",
"isMut": true,
"isSigner": false
},
{
"name": "solUsdPriceAccount",
"isMut": false,
"isSigner": false
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false
}
],
"args": [
{
"name": "amount",
"type": "u64"
}
]
}
],
"errors": [
{
"code": 6000,
"name": "PriceUnavailable",
"msg": "Price is currently not available"
},
{
"code": 6001,
"name": "InvalidPriceFeedId",
"msg": "Invalid price feed id"
}
],
"metadata": {
"address": "Gpr1WZZXAty2L9eiMwZPC7ra69vMFojhdqDuiRHkQQQp"
}
}
28 changes: 28 additions & 0 deletions anchor/target/idl/strategy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "0.1.0",
"name": "strategy",
"constants": [
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
}
],
"instructions": [
{
"name": "initialize",
"accounts": [],
"args": []
}
],
"errors": [
{
"code": 6000,
"name": "CustomError",
"msg": "Custom error message"
}
],
"metadata": {
"address": "Gst1YGe5vKURSWfCqM7GhZys1oML9E9t91WRyV2rt4yS"
}
}
51 changes: 51 additions & 0 deletions anchor/target/types/custody.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
export type Custody = {
"version": "0.1.0",
"name": "custody",
"constants": [
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
}
],
"instructions": [
{
"name": "initialize",
"accounts": [],
"args": []
}
],
"errors": [
{
"code": 6000,
"name": "CustomError",
"msg": "Custom error message"
}
]
};

export const IDL: Custody = {
"version": "0.1.0",
"name": "custody",
"constants": [
{
"name": "SEED",
"type": "string",
"value": "\"anchor\""
}
],
"instructions": [
{
"name": "initialize",
"accounts": [],
"args": []
}
],
"errors": [
{
"code": 6000,
"name": "CustomError",
"msg": "Custom error message"
}
]
};
Loading

0 comments on commit 3ec6645

Please sign in to comment.