Comments (30)
I'll attempt adding walletconnect. I'm a bit new to Rust/dapps, so may post some questions!
from foundry.
from foundry.
I'm still unsure on the abstraction, we already have a working abstraction for signers in ethers-rs, it's just a matter of implementing them there and/or "flipping the switch" here 😄
from foundry.
i'm going to pause on this for now, struggling to do this without understanding solidity contracts a bit more. if someone wants to tackle this feel free, i'll grab a different issue once I'm up to speed.
from foundry.
It'd also be sick if we added https://github.com/gakonst/ethers-fireblocks
from foundry.
@gakonst walletconnect seems a little more involved. Would I have to implement a signer here?
https://github.com/gakonst/ethers-rs/tree/master/ethers-signers/src/
from foundry.
from foundry.
An RPC signer with some access control in ethers-rs would be like a software HSM. Have thought about it before and like it as an idea. Should be simple.
from foundry.
Would it do any harm to change the AwsSigner to own its KmsClient property?
No, it's fine. It's actually been on my to-clean list for a while. Initially wrote it this way to save resources when using several AWS keys in the same bin, but later dug in and figured out that KmsClient
holds a rusoto_core::Client
which wraps an Arc
containing the actual request dispatch system. It won't add significant overhead to change to an owned KmsClient
, as it's always cheap to clone
from foundry.
@prestwich perhaps it's something I could look into if its alright?
from foundry.
- trezor
- walletconnect
from foundry.
I'll give walletconnect a go since nobody else is currently working on it.
from foundry.
You can also implement in a separate crate like ethers-fireblocks
does it, you just need to implement the ethers::signers::Signer
trait.
from foundry.
https://github.com/nlordell/walletconnect-rs FYI
from foundry.
Is this still open? Interested in having a go at this if no one else is
from foundry.
from foundry.
go for it!
Sweet, thanks! Is there a branch you were working on that I should take a look at / work off or should I start from scratch?
from foundry.
Could we not enable arbitrary signing via a simple local REST/JSON-RPC service? e.g. something like:
/sign-eth
-> raw_unsigned_tx
<- raw_signed_tx
This would for allow users to forward the raw_unsigned_tx
to their favorite key management tool and then return the signed tx for validation & submission. My personal use case is forwarding the raw_unsigned_tx
to fireblocks for signing, so we would need to allow for slow response times from the signer-service (we could go for a callback/polling approach instead of a single long-lasting REST call).
from foundry.
I don't think these are handled by wallets like Ledger/Trezor? I might be wrong here
from foundry.
I think you're right, wallets will probably steer away from eth_sign
due to the risk that a user signing a message will actually sign a valid ethereum tx. In this case the interface would look like:
/eth_signTransaction
-> (legacy | eip-1559 | eip-2930)
<- encoded_transaction
/eth_accounts
<- address[]
This should allow users to fairly simply host a local proxy to forward the requests for signing to their various signing mechanisms. It would also return the accounts the signing mechanism has access to, this can be used by forge's wallet management logic.
from foundry.
Fair enough, the only arguments would be the ease of implementation (and/or not needing to expose config to foundry). That said, one could always implement a "localhost signer" in ethers-rs and flip the switch
from foundry.
Hi I wanted to try and tackle the aws kms implementation but I ran into an issue I wasn't sure the best path forward would be.
From my understanding the AwsSigner uses a reference to a borrowed KmsClient.
https://github.com/gakonst/ethers-rs/blob/master/ethers-signers/src/aws/mod.rs#L48
When I try to pass the signer to an async function such as cast_send it throws an E0597 error.
https://github.com/foundry-rs/foundry/blob/master/cli/src/cmd/cast/send.rs#L211
What would you suggest to proceed on this ?
For example I could create a separate cast_send function for the aws signer but wasn't sure if there is a better way.
from foundry.
Can you please share your branch?
from foundry.
Can you please share your branch?
oh yes,
https://github.com/jatokz/foundry/tree/aws_kms
from foundry.
sorry I misunderstood what the issue was. The error I get happens when trying to create the Cast struct because the impl requires
impl<M: Middleware> Cast<M> where M::Error: 'static,
Since AwsSigner borrows kmsClient it raises the error:
argument requires that kms
is borrowed for 'static
Would it do any harm to change the AwsSigner to own its KmsClient property?
from foundry.
Defer to @prestwich , im Ok with that
from foundry.
ya, should be really easy
from foundry.
@gakonst This issue should be marked as done as be closed, no?
from foundry.
Close-able? @mds1
from foundry.
seems closable, if anyone disagrees lmk and I'll reopen
from foundry.
Related Issues (20)
- Cast abi-decode crashes HOT 1
- Forge is failing to deploy valid contract HOT 5
- Setting for `include_storage` in invariant tests seems to leak into fuzz tests settings HOT 2
- Called contract seemingly randomly exits HOT 5
- forge verify-contract error when using --chain parameter
- feat(cheatcodes): `vm.mockCalls()` for mocking multiple calls
- Failed to deserialize response
- Challenges in Directly Accessing Nested Mappings within Structs in Solidity for Testing
- Support resetting from forked to non forked on anvil_reset HOT 2
- add the ability to select a given chain in the scripts HOT 2
- Coverage report misses return-declared variables if returned as-is
- anvil: configure memory limit HOT 3
- Foundry panics after executing 3 transactions using `transact` on a forked state HOT 1
- Deserialization Error: EOF while parsing a value at line 1 column 0 HOT 4
- Etherscan Multichain Contract Verification
- Max Priority gas price does not work HOT 2
- Feature request: `input.index(key)` HOT 3
- Feature request: `--disable-metadata` as CLI option to `forge build`
- anvil: EVM error MemoryLimitOOG HOT 10
- Retrieving default `arbitrum_one` rpc url fails HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundry.