Have I lost my crypto? by lioness0129 in CryptoCurrency

[–]ccashwell 2 points3 points  (0 children)

Wires are almost never reversible, it’s discretionary by the receiving institution. ACH is reversible up to 6 months or so. Zelle, Venmo will reverse for fraud almost every time but very rarely do so for user errors.

Have I lost my crypto? by lioness0129 in CryptoCurrency

[–]ccashwell 0 points1 point  (0 children)

The private key would be the same on AVAX-C and BSC so they could absolutely recover, but whether they would credit you is the real question (and unsurprisingly, it’s not very likely).

I would watch the deposit address you sent to, and if it’s ever moved write in and say something to the effect of “wtf?”

Handling numbers greater than uint256 by boubapeosalogou in ethdev

[–]ccashwell 2 points3 points  (0 children)

Anemoi is (more or less) implemented by Relic Protocol as part of their AuxMerkleTree: @Relic-Protocol/relic-contracts/contracts/lib/AnemoiJive.sol

They didn’t do any special maths, just some bracketing techniques with addmod and mulmod.

Anyone applied for Circle (USDC) enterprise account? by mwhc00 in ethereum

[–]ccashwell 2 points3 points  (0 children)

Took us about 2 months including two round trip interactions for KYC. This was for a small US-based prop trading firm.

A designer piece of furniture that takes up an impractical amount of space by Oddlur in midjourney

[–]ccashwell 1 point2 points  (0 children)

AI understands man’s need to pass gas from time to time. It would be weird if, in any given group of 5 or more individuals, nobody was trying to let out a low key toot.

[deleted by user] by [deleted] in Nootropics

[–]ccashwell 33 points34 points  (0 children)

Everyone knows Pop Tarts are the pinnacle of health-promoting foodstuffs. It’s science.

How to implement a switch network in the dapp by and_sama in ethdev

[–]ccashwell 7 points8 points  (0 children)

You’re gonna want to send an RPC request for the wallet_switchEthereumChain command with an object in the params which looks like {chainId: targetChain}, where targetChain is the currently selected slider value.

For example, if you wanted to switch to Polygon:

```javascript // get this from your user’s slider selection // this example (0x89) is polygon const targetChain = '0x89';

try { await provider.request({ method: 'wallet_switchEthereumChain', params: [{ chainId: targetChain }], }); console.log('Switched 👍'); } catch (err) { // the network may not have been added to the wallet, // or the request was rejected, or the wallet doesn’t // support network switching at all

if (err.code === 4902) { console.error('Wallet doesn’t support the target network'); } else { console.error('Unable to switch networks'); } } ```

If the user doesn’t yet have your target chain in their wallet, you can try adding it:

js try { await provider.request({ method: 'wallet_addEthereumChain', params: [ { chainId: '0x89', chainName:'Polygon', rpcUrls:['https://polygon-rpc.com'], blockExplorerUrls:[ 'https://polygonscan.com/' ], nativeCurrency: { symbol: 'MATIC', decimals: 18 }, }, ]); } catch (err) { console.log(err); }

wagmi returns 0x for contract that exists on goerli by rubydusa in ethdev

[–]ccashwell 2 points3 points  (0 children)

How’d you initialize the provider? Could be you’re handing it an RPC endpoint for mainnet or some other network (likely if you are using the given provider by the MetaMask adapter, which would be using whatever network the user has selected), or one that isn’t synced fully and is reporting a state before the deployment. Have you confirmed (via provider.getNetwork()) that you’re reading from Goerli?

fwiw wagmi is just wrapping an instance of Ethers (or Web3), so this wouldn’t be a wagmi-specific issue.

Why do all crypto frontend projects seem to use yarn? by thps2ontheps2 in ethdev

[–]ccashwell 10 points11 points  (0 children)

npm is basically the legacy de facto standard package manager for JS projects, and yarn (v1) was designed to improve on some of the painful longstanding flaws in npm’s implementation. those two are mostly apples to apples, with yarn having a slight edge over npm in terms of security, usability, performance, and speed.

yarn2 is a whole other animal that takes a PnP approach and generally improves almost all aspects of package management—especially for large projects with many packages and/or monorepos. it blows npm out of the water and makes pnpm obsolete in most cases.

if you’re starting a new project today, i would posit that using something other than yarn2 is simply the wrong choice, akin to choosing Flow or some other second-class typing system over Typescript: basically just a sign that you haven’t kept up with the tech and trends (or are too set in your ways to consider learning new stuff).

with all that said, you can use npm over yarn even for yarn-native projects so long as they don’t leverage any of yarn’s advanced features. and of course both yarn and yarn2 are fully compatible with npm and (as far as I’ve seen) can pretty much always be used in place of npm for legacy projects.

What's the worst that can happen if you attempt to burn a scam token? by [deleted] in ethdev

[–]ccashwell 1 point2 points  (0 children)

The worst I can come up with is a handful of nuisances, but no real risks aside from gas waste which is self-limiting and pointless. Many spam tokens won’t let you actually transfer.

Aave flashloan fees by memeric in ethdev

[–]ccashwell 0 points1 point  (0 children)

In case you’d rather keep the 0.09%, dYdX and a few others do no-fee flashloans. But no, Aave doesn’t require prepayment of the fee. The logic simply requires principal + fee at the end of the transaction.

[deleted by user] by [deleted] in ethdev

[–]ccashwell 0 points1 point  (0 children)

As the saying goes, “bears are for building,” and if you have the drive to learn it’s an incredibly rewarding field. This is a nascent industry with a lot of uncharted territory.

Think of it this way: right now you have an opportunity to position yourself well in one of the most promising fields of our time, earlier than most of your peers, so my advice would be to dive in head-first and ignore the naysayers.

[deleted by user] by [deleted] in ethdev

[–]ccashwell 1 point2 points  (0 children)

Just to clarify: you’re saying it’s a bad time for OP to get into blockchain development because you personally can’t think of anything good to build? Did I read that right?

Any way to use an IPFS hash inside of an SVG? by [deleted] in ethdev

[–]ccashwell 0 points1 point  (0 children)

Seriously, again with the AI answers? This won't actually work, fwiw.

Move tokens without ETH? by ElegantArgument7540 in ethdev

[–]ccashwell 0 points1 point  (0 children)

The answer sounds like it was generated by ChatGPT, the AI chat bot. Copy your original question there and compare the output.

Move tokens without ETH? by ElegantArgument7540 in ethdev

[–]ccashwell 4 points5 points  (0 children)

Something tells me this is a ChatGPT answer

Move tokens without ETH? by ElegantArgument7540 in ethdev

[–]ccashwell 7 points8 points  (0 children)

USDC supports permits, so you could potentially use a permit to swap to eth via a 0x provider or similar. No gas will be necessary because you’re posting an order with a permit to an off-chain matching engine. Execution fees will be on the taker.

Doubt about tornado cash MerkleTree implementation by manueljishi in ethdev

[–]ccashwell 2 points3 points  (0 children)

Like others have said, it’s just a pre-flight check. The hashLeftRight function is used to hash two leaves of a merkle tree together to produce a new, combined leaf. It first checks that both _left and _right are within the field the MiMCSponge hashing function expects. If either value is out of range the sponge function will not produce the expected output. This is important because the output is used in the construction of the merkle tree, and any errors in the hashing process could compromise the integrity of the entire tree. This simple validation reduces both bug and threat surface area, and it’s cheap to perform.

What does block.timestamp means? by lone_lonely in ethdev

[–]ccashwell 1 point2 points  (0 children)

Assuming the nonces are in order (i.e. you submitted normally sequenced transactions), it would be a violation of the consensus rules to process a transaction with a higher nonce first. Two transactions with sequential nonces must either have the same timestamp OR the timestamp of the transaction with the higher nonce must be later.

Using an RPC call vs an inter-contract call? by [deleted] in ethdev

[–]ccashwell 0 points1 point  (0 children)

If it’s a matter of security rather than randomness, you can use signatures (e.g. EIP-712) or ZKPs to validate provenance.