OpenZeppelin / rust-contracts-stylus

A library for secure smart contract development written in Rust
MIT License
32 stars 5 forks source link

ERC-20 Permit #43

Open bidzyyys opened 2 months ago

bidzyyys commented 2 months ago
### Tasks
- [ ] https://github.com/OpenZeppelin/rust-contracts-stylus/issues/182
- [ ] https://github.com/OpenZeppelin/rust-contracts-stylus/issues/183
- [ ] https://github.com/OpenZeppelin/rust-contracts-stylus/issues/184
- [ ] https://github.com/OpenZeppelin/rust-contracts-stylus/issues/17
developeruche commented 2 weeks ago

This entails implementing logic similar to https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.5/contracts/token/ERC20/extensions/ERC20Permit.sol right?

but implementing this logic;

address signer = ECDSA.recover(hash, v, r, s);

is not yet clear;

Wasn't able to see how to access precomplies in stylus, would it be cool to use a lib for this that works fine in a no_std env?

alexfertel commented 2 weeks ago

This entails implementing logic similar to OpenZeppelin/openzeppelin-contracts@v4.9.5/contracts/token/ERC20/extensions/ERC20Permit.sol right?

Yes, that's right! We already have an issue that tracks implementing ECDSA (#17). However, the works there needs a bit of design first.

Wasn't able to see how to access precomplies in stylus

You can just make calls to the precompile address! We'll have an example of this in the implementation of ECDSA.


Just a quick heads-up about tackling tasks. Before you dive into something, it'd be great if you could give us a shout. That way, we can assign the issue to you and avoid any accidental double-ups. It's all about keeping things smooth and making sure we're not stepping on each other's toes. So, if you've got your eye on a particular task, let us know, and we'll get you set up. Thanks for helping us keep things organized!

developeruche commented 2 weeks ago

This entails implementing logic similar to OpenZeppelin/openzeppelin-contracts@v4.9.5/contracts/token/ERC20/extensions/ERC20Permit.sol right?

Yes, that's right! We already have an issue that tracks implementing ECDSA (#17). However, the works there needs a bit of design first.

Wasn't able to see how to access precomplies in stylus

You can just make calls to the precompile address! We'll have an example of this in the implementation of ECDSA.

Just a quick heads-up about tackling tasks. Before you dive into something, it'd be great if you could give us a shout. That way, we can assign the issue to you and avoid any accidental double-ups. It's all about keeping things smooth and making sure we're not stepping on each other's toes. So, if you've got your eye on a particular task, let us know, and we'll get you set up. Thanks for helping us keep things organized!

Thanks a lot for the heads-up, I would like to work on this... I have been looking through the issues but those issues have some activity going on already, this was the only issue I saw static. Would love to work on something more!

alexfertel commented 2 weeks ago

Thanks a lot for the heads-up, I would like to work on this... I have been looking through the issues but those issues have some activity going on already, this was the only issue I saw static. Would love to work on something more!

Hey! Unfortunately, this one is already planned for us to work on it, and its scope is a bit wide and is interleaved with ECDSA. However, we will be opening many more issues with different complexities often, so keep an eye on the issue tracker! We are at the very early stages so there'll be plenty of work for everyone to contribute.

developeruche commented 2 weeks ago

Thanks a lot for the heads-up, I would like to work on this... I have been looking through the issues but those issues have some activity going on already, this was the only issue I saw static. Would love to work on something more!

Hey! Unfortunately, this one is already planned for us to work on it, and its scope is a bit wide and is interleaved with ECDSA. However, we will be opening many more issues with different complexities often, so keep an eye on the issue tracker! We are at the very early stages so there'll be plenty of work for everyone to contribute.

Sounds great! thanks.