/r/ethdev

Photograph via snooOG

Ethereum-related dev talk:

Contracts, DApps, Wallets, Clients, Infrastructure, Tooling, UIs, Patterns, and others.

Ethereum Development and DApps

No specific rules are enforced apart from the normal global reddit rules.

Search our history

Testnet Ethers

Updated faucets for 2022:

https://goerlifaucet.com (new since March)

Goerli Github Request Issue

https://www.rinkebyfaucet.com

Updated faucet for 2021:

https://faucets.chain.link/

Older faucets (some might be broken):

For Rinkeby, Ropsten, Kovan, Goerli Testnet Ethers: Get them here and here

For more Görli Testnet Ethers: Get them here

For more Ropsten Testnet Ethers: Get them here

Other subreddits

http://ethereum.stackexchange.com/ - The Ethereum Programming Stack Exchange

r/EthDevJobs - To find Jobs, and posting you're Hiring

r/ethereum - Offical sub, for discussion of Tech and Application Development using Ethereum.

r/ethfinance - A community for investors, traders, users, developers, and others to discuss Ethereum and its cryptocurrency ETH.

r/ethtrader - Trading sub, for price discussion of Ether and other cryptocurrencies

r/ethstaker - About staking your ETH: help and guidance

r/EtherMining - Ether Mining discussion.

r/ethereumnoobies - Ethereum for newbies

Others: r/ethtraderpro, r/cryptocurrency

/r/ethdev

109,034 Subscribers

2

Web3 Builder News 4/29-5/5: Base Onchain Summer Offers >600 ETH

0 Comments
2024/05/06
08:40 UTC

1

What are your go-to frontend tools?

Viem, wagmi, ethers, walletconnect, alchemy, moralis, quicknode, etc.

What are the tools you use on pretty much every crypto frontend?

2 Comments
2024/05/06
01:05 UTC

5

Please dont copy paste any "MEV BOT CODE" from youtube and dont let youtubers to lure you into this scam.

0 Comments
2024/05/05
21:19 UTC

1

How can I decrypt using web3 / ethers

Hi, I am looking for a way to decrypt a message using web3 / ethers or whatever library can assist with that.

I encrypt a message with a public key and I want to use the corresponding private key to decrypt it, but I couldn’t find any function that is exposed by the wallet to use any decryption mechanism, obviously the private key itself isn’t exposed, anyone tried something like that and can send me in the right direction?

0 Comments
2024/05/05
17:20 UTC

3

I'm Building a Tool for Accessing Smart Contract Data with No-Code

Hey everyone! 🚀

I noticed how hard it is to access smart contract data essential for building crypto apps. That is why I'm building the first ever tool that lets you access smart contract data with no coding required!

spidey.dev

Please let me know if this tool would be useful for you and what features you'd like me to add, thanks!

2 Comments
2024/05/05
01:31 UTC

1

Do I Really Need to Provide Real Private Keys When Initializing SDK to Fetch a Message From L1 to L2 on Linea?

3 Comments
2024/05/04
18:05 UTC

2

Contract vs Regular Transactions Question

I am confused on how this works. If a block can only hold n transactions, how is it possible for contracts to make sometimes hundreds of transactions in one call?

I don't understand how multiple things that change the blockchain state in different ways can happen in 1 tx. Can someone help me understand?

9 Comments
2024/05/04
17:00 UTC

0

Does Ethereum use EC or DSA? (For generating keys)

I'm trying to use the generateKeyPairSync() method from node.js to generate keys. It gives me options to generate keys of type ec or dsa . To generate ones like ethereum, who uses ECDSA, which one is the correct one?

Thank you

0 Comments
2024/05/04
02:20 UTC

1

Do Light nodes still need RPC url from a provider?

I was hoping I can set up a light node without using a third party provider like Alchemy / Infura - just to avoid any rate limits & privacy. The Ethereum light client page lists Lodestar, Helios, Geth and Nimbus as potential options. But Geth's light node seems to have been depricated and Helios still seems to require an RPC URL provider.

Not sure about Lodestart and Nimbus. Any other suggestions / suggestion on which one is the best?

1 Comment
2024/05/03
18:15 UTC

1

Could someone explain what domain Separator and Domain are in EIP712?

2 Comments
2024/05/03
16:03 UTC

1

Some good Hackathon ideas for single player campaign.

I am participating in a hackathon(my first ever) as a Solo participant and I just can't come up with a good hackathon idea. Currently, I was thinking of a Dapp that gives you a Dynamic NFT Badge based on how much you walk daily. You have to lets say walk 5000 steps for N number of days to get a badge. The main purpose is commitment.

The Cons with this idea:

  1. There are apps that does almost the same without the user having to create/add their wallet address to get NFT.
  2. IMO the whole Dynamic NFT things is very generic and not very eye catching.

Ofcourse my priority is to learn here, prize and rewards are secondary.

5 Comments
2024/05/03
15:15 UTC

0

Where to list my freelance offer for Community Building

Hello, 

I'm a Senior Community Manager at a SaaS company, and I've successfully built a rapidly growing community on Discord. Started from scratch, I now have strong knowledge on how to do that, including strategies, promotion part, technical stuff, etc.

I want to start freelancing and help others to build or grow their communities. Where could I list my offering, i.e. site/app/server, etc?

Thank you for any tips.

1 Comment
2024/05/02
15:37 UTC

1

I am trying to use the Openzepplin Relayer and I keep getting an error please help me out.

Error: Network error

at /home/blah2389/automate3/node_modules/amazon-cognito-identity-js/lib/Client.js:113:15

at processTicksAndRejections (node:internal/process/task_queues:95:5)

code with error:

async func main() {

const { Defender } = require('@openzeppelin/defender-sdk');
const {hre,ethers} = require("hardhat");
async function main(){
const credentials = { relayerApiKey: process.env.api1, relayerApiSecret: process.env.api2 };
const client = new Defender(credentials);

const provider = client.relaySigner.getProvider();
console.log( provider);
}

main();

these are the docs I am following https://docs.openzeppelin.com/defender/v2/manage/relayers

and I am trying to replicate the code present in the relayer section for the docs :

//code I am trying to replicate.

const { Defender } = require('@openzeppelin/defender-sdk');

const { ethers } = require('ethers');

const credentials = { relayerApiKey: YOUR_RELAYER_API_KEY, relayerApiSecret: YOUR_RELAYER_API_SECRET };

const client = new Defender(credentials);

const provider = client.relaySigner.getProvider();

const signer = client.relaySigner.getSigner(provider, { speed: 'fast', validUntil });

const erc20 = new ethers.Contract(ERC20_ADDRESS, ERC20_ABI, signer);

const tx = await erc20.transfer(beneficiary, 1e18.toString());

const mined = await tx.wait();

5 Comments
2024/05/02
15:30 UTC

2

[Repost] What are your feelings and understanding of Web3, Cryptocurrency, Blockchain and safety? 6-10 Minute Survey (All ages and knowledge levels)

Access link: https://nettskjema.no/a/418645#/page/1

In this research, we intend to outline how internet users of all technological levels, from just a user to a expert, feel about Web 3.0 and their own perception of security while using the internet. If you use the internet then you are a valid participant. If you fear you don't have the required insight the survey also has an intro text that could assist you in filling the gap.

The survey is completely anonymous and will require no personal information other than on a group demographic level. The results will also be stored safely and only be used for academic purposes.

If you have any queries/questions, please contact me via my email leog@ntnu.no or by leaving a comment down below.

3 Comments
2024/05/02
08:47 UTC

2

Base ETH Regulatory Oversight

What sort of oversight/power does Coinbase have over Base tokens? By this I ask:

  1. Can Coinbase freeze/prevent bridging from Base -> ETH? Have they ever done this before?
  2. Does Base have any sort of “rules”? As in, cannot be used for x sort of transactions or transactions in x field?

Disclaimer: not trying to rug/scam/commit any sort of illegal activity, just curious as I’m not too familiar with this aspect of L2s and Base. Thanks!

5 Comments
2024/05/02
06:28 UTC

3

Looking for a Job

Hey guys, I've been in the web3 space for more than a year now and things has been going fine till the market started crashing

My portfolios are going down really hard. I now realize I need a job to earn a stable income till the market starts rising again

I've worked as a moderator, Collab manager, Copywriter / Content Writer, And a Reply guy

If you need any of this services Please reply and let's makeaguc happen :)

This the only option I've got atm

What do you guys think

3 Comments
2024/05/01
12:29 UTC

0

Few doubts regarding test networks

  1. Sepolia is a permissionned testnet , what does this mean ?
  2. Where do these testnet faucets get their ether from ?
  3. Now why is the holesky network faucets having a high demand , is it because it is the alternative to the goerli network? To test staking and stuffs ?
  4. Since the release of the ephemery.dev test network which resets to genesis where getting test ethers isn't a big deal , aren't basically all other test networks and faucets kinda useless?

My question is what is main difference between ephemery and holesky when it comes to testing staking and stuffs? Isn't it the the better alternative to all these test networks where getting test ether is just really really hard now ?

3 Comments
2024/05/01
13:16 UTC

1

How does the Kalp DLT address the challenges of RWA tokenization?

The Kalp DLT aims to address the challenges of RWA tokenization by offering layer 1 cross-chain blockchain environment. It incorporates KYC/AML compliance, secure key management, and stringent due diligence processes to ensure regulatory adherence of underlying assets. Additionally, Kalp's interoperability features and scalable node design aim to overcome the limitations of current blockchain ecosystems, facilitating secure and efficient RWA tokenization and liquidity across different chains. Community link for your reference r/KALPCHAIN

0 Comments
2024/05/01
07:10 UTC

4

Let's Build Buy Me a Coffee but in Web3

0 Comments
2024/05/01
03:06 UTC

0

Which cryptocurrency would allow me to deploy an ERC 721 contract without reputation?

I deployed a smart contract on TronScan. It flagged my smart contract as suspicious immediately. It looked like they only allow famous and rich people to create tokens. I really don't like that reputation system. Which ERC 721 blockchains allow you to create ERC 721 NFT tokens freely without reputation problem?

3 Comments
2024/04/30
05:01 UTC

0

Feedback Request: New Ideas in Film Distribution - Your Insights Needed

1 Comment
2024/04/29
23:12 UTC

0

What are some aspects of working with on-chain data do you hate?

I'm currently building a crypto project, and I find that many things we take for granted in Web2 are like pulling teeth in Web3. For example, I hate how there are so many different chains now, and I'm never sure which one to build for or where to find the standard data source. I guess projects like The Graph solve this but even navigating their platform is crazy. I haven't touched on-chain analytics yet but from what I read that seems to be an issue. Anyone else feeling this about building in this space?

4 Comments
2024/04/29
22:27 UTC

0

Looking for freelance smart contract auditors

Our company Hashlock is looking for smart contract auditors.

You will get paid depending on the size of the project.

If you are interested DM me on Discord

Username: ketanba

1 Comment
2024/04/29
21:10 UTC

1

Uniswap router error debugging

I'm trying to write a frontend to interact with Uniswap V3. When tryng to submit a swap transaction I get the following error:

{
    "code": -32603,
    "message": "Internal JSON-RPC error.",
    "data": {
        "code": 3,
        "message": "execution reverted",
        "data": "0xff633a38",
        "cause": null
    }
}

Specifically, I try to swap 0.001 WETH to USDC on base by calling the execute(bytes,bytes[],uint256) function on the Universal Router with the following data: commands: 0x00 inputs: [0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000000000000002b85e000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002b42000000000000000000000000000000000000060001f4833589fcd6edb6e08f4c7c32d4f71b54bda02913000000000000000000000000000000000000000000]

Any ideas how to debug this? The error message from ethers is not so helpful.

4 Comments
2024/04/29
18:20 UTC

3

Most reliable way to get the USD price of a token on-chain for a specific block?

I am looking to track down the USD value of a token at the time an asset was transfered. Right now, what I am doing is looking at the block the ERC20.Transfer(to, from, amount) event was emitted, and then trying to find that token's USD price at that block.

I do not want to use off-chain data like CoinMarketCap API for this, and even if I did, most just use token names and only work with popular tokens, rather being able to work off of the block and token's address directly. In other words, I need to make an on-chain call to determine the price.

 

What I've tried

I have the token address and the block for the transfer. Using that, I use UniswapV3 to get the pool and calculate the price:

interface IUniswapV3Factory {
    function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address pair);
}

interface IUniswapV3Pair {
    function token0() external view returns (address);

    function token1() external view returns (address);

    function slot0() external view returns (
        uint160 sqrtPriceX96,
        ...
    );
}

 

Using the UniswapV3 interfaces, the algorithm looks like follows:

  1. Call IUniswapV3Factory.getPool(targetToken, USDC, 3000) which gives the pool
  2. Call IUniswapV3Pair.token0() to see if target token is token0 or token1, which determines if we need to switch order.
  3. Call IUniswapV3Pair.slot0() to get sqrtPriceX96
  4. Do the math to determine the actual price from sqrtPriceX96.

And this works well, but there are some problems:

  • In step 1, not every token is going to have a TOKEN/USDC pool. Some might be pooled with a different stable (e.g. DAI, USDT), some might only be pooled with WETH.
  • In step 1, some pools might not have a 3000 fee tier.
  • (Not a big deal): transferres further back from when Uniswap V3 was deployed will not work. Of course I can also use Uniswap V2, but this runs into similar problems.

 

Conclusion

In my experience, I can work around these problems, but it leads to a highly complex systems. For the first problem, I can iterate through all pairs, and even handle WETH pools by just checking WETH/USDC price afterward. For the second problem, I can just iterate through all fee tiers.

However, I'd really like to avoid all this complexity. The leads me to ask the question: Is there a better way to get the USD price of a token at a specific block? Is it possible some DEX aggregator has a contract deployed that makes step 1 a lot simpler?

11 Comments
2024/04/29
16:17 UTC

1

Can’t connect to wallet in Remix Desktop on Mac

SOLVED: If anyone is having the same issue, select 'WalletConnect' as the Environment and connect wallet through the WalletConnect plugin

***I’m using the desktop app, not the web app

I'm using Remix Desktop on mac. I'm trying to connect my MetaMask wallet by changing the environment to 'Injected provider'.

But I get the error 'No injected provider found. Make sure your provider (e.g. MetaMask, ...) is active and running (when recently activated you may have to reload the page)'.

I have MetaMask desktop, I tried refreshing, and I successfully connected my metamask using the WalletConnect plugin.

Anyone have any ideas?

3 Comments
2024/04/29
16:00 UTC

1

Could you please suggest a few resources for Openzepplin Defender other than the docs?

1 Comment
2024/04/29
13:56 UTC

2

DeFi Dev News 4/22-4/28: Starknet Propulsion Program Offers up to 1M, Taiko Launches Final Testnet Hekla, Pike Finance Suffered $299K Exploit

0 Comments
2024/04/29
13:54 UTC

1

I have been looking through account abstraction and I am a bit confused What is the basic difference between a relayer and a paymaster?

6 Comments
2024/04/29
13:40 UTC

Back To Top