-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Application: pendzl-smart-contract-library #2193
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read and hereby sign the Contributor License Agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Nradko thanks for the application. After an initial review, I have the following comments:
- The sum of milestones 1 + 2 = $30k but the total costs say $90k? Can you adjust this to reflect the correct cost?
- We only fund the technical development, so we wouldn't be able to fund the consultations in milestone 2. Perhaps you could focus on a reduced scope of just M1 to start.
- Have you had some preliminary discussions with the ink! team to see if they like this solution?
Hey @keeganquigley,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nradko thanks, this looks interesting - in general I think it'd be good to have an alternative to the abandoned OpenBrush project. However, could you be a bit more specific on how your solution would deliver a better dev experience? For example, you're saying:
We will write our own smart contract implementations that are more customizable and allow developers for much more!
How exactly will they be more customizable? What exactly will it allow devs to do "much more"? Ideally, you'd have 2-3 code examples of specific scenarios, to demonstrate the differences.
Also, I was wondering if your library is backwards-compatible with OpenBrush. That would make it much easier for existing, Openbrush-dependent projects to migrate to your solution.
Finally, the FTE rates/month for M1 and M2 are different - what's the cause for this?
Hey @takahser,
When we implement PSP22, PSP22Internal and PSP22Storage we will use the following constraints: struct PSP22DefaultData {...}
impl <T: PSP22Internal> PSP22 for T{...}
impl PSP22Storage for PSP22DefaultData {...}
impl<T: StorageFieldGetter<PSP22Data>> PSP22Internal for T where PSP22Data: PSP22Storage {} Pendzl will provide all the 3 above implementations and a default struct PSP22Data that implements StorageFieldGetter. In this way developer can use the default implementations in this way: #[pendzl::implementation(PSP22)]
#[ink::contract]
pub mod default_psp22 {
#[ink(storage)]
#[derive(StorageFieldGetter)]
pub struct Contract {
#[storage_field]
psp22: PSP22Data,
}
impl Contract {
#[ink(constructor)]
pub fn new(total_supply: Balance) -> Self {...}
}
} Moreover, a developer can choose to override methods from PSP22, and PSP22Internal (as shown in the Application), and/or he can provide his own struct that will be used in contract storage that implements PSP22Storage trait to change the storage of the contract but to keep the PSP22Internal and PSP22 implementations. In the simple example of a PSP22 contract a developer may decide that for the application he is building it is enough to use u32 to store user balance instead of Balance( which often is u128). In such a case it will be enough for a Developer to create his struct PSP22U32 and implement a PSP22Storage for it: #[pendzl::implementation(PSP22)]
#[ink::contract]
pub mod my_psp22_with_u32_storage_and_blocked_transfer_from {
#[ink::storage_item]
PSP22U32{
balances: Mapping<AccountId,u32>,
allowances: Mapping<AccountId, u32>,
total_supply: u64
}
impl PSP22Storage for PSP22U32{....}
#[ink(storage)]
#[derive(StorageFieldGetter)]
pub struct Contract {
#[storage_field]
psp22: PSP22U32, // instead of Default PSP22Data
}
#[overrider(PSP22)]
fn transfer_from(
from: AccountId,
to: AccountId,
amount: Balance,
data: Vec<u8>,
) -> Returns<(), PSP22Error>{
Return Err(PSP22Error::Custom("Our Contract doesn't support PSP22 Transfer From")
}
impl Contract {
#[ink(constructor)]
pub fn new(total_supply: Balance) -> Self {...}
}
} Moreover, developers can choose to implement PSP22Internal from scratch but still use the provided PSP22 implementation.
2,5 FTE = 8+8+ 0.5 *6 = 19 [k$] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the application. This looks interesting. I have one question: have you considered the decentralized futures program: https://futures.web3.foundation/ I think you could apply for a slightly larger amount there to kickstart this initiative.
Thanks for the suggestion. We have just applied for a grant from decentralized futures program and started a topic on the forum: https://forum.polkadot.network/t/pendzl-a-smart-contract-library/5975. Having that in mind, shall we abandon this application? |
Sounds good @Nradko thanks for the update. Sure we can go ahead and close this, and we will reach out to the email address on the DF application for further steps. Thanks! |
Project Abstract
The Pendzl Library represents the evolution of the OpenBrush v4.3.0 smart contract library, taking it to the ink 5.0.0 standard while introducing crucial features like event emission. Our primary focus is to enhance usability and eliminate unnecessary parts of the code (ex. macros) that have historically complicated the OpenBrush library. The mentioned evolution of OpenBrush is necessary due to it becoming too complex & introducing updates that piled up and have had a detrimental effect on the development experience.
Pendzl's core principle is simplicity. We aim to minimize the introduction of new code while maximizing utility. Our overarching vision is to establish Pendzl as an open-source project, inviting contributions from the entire ink smart contract developer community.
Grant level
Application Checklist
project_name.md
).@_______:matrix.org
(change the homeserver if you use a different one)