15 votes
Accepted

What is DSProxy and how does it work?

What DSProxy is a smart wallet built by DappHub that enables developers to execute multiple contract calls in one transaction. This is something that vanilla EOAs can't do; they are limited to ...
user avatar
6 votes
Accepted

I want learn smart contract trading

That’s called arbitrage, you swap e.g. ETH for DAI on one exchange and then swap it back from DAI to ETH on another exchange. This works because the so called DEX’s (Decentralized exchanges like ...
user avatar
  • 400
4 votes

how to deploy a smart contract on same address in ethereum and binance

If your deployment environment employs the CREATE opcode under the hood, The deployed contract address is going to be a function of the deployer's EOA and the nonce. contractAddress = hash(...
user avatar
4 votes
Accepted

Detect receiving token address in "receive() payable"

The receive function is triggered by a transfer of the native token only, such as ETH on Ethereum or BNB on Binance Smart Chain. Therefore, msg.value is always an amount of the native token and never ...
user avatar
  • 3,237
3 votes

Solidity : Error encoding arguments: Error: invalid BigNumber string

I'm also learning from fcc haha. Not sure if you still need it but just in case if others also encounter similar problem. I don't think you're supposed to change "People[0] public people;" ...
user avatar
3 votes

Deploying a contract that inherits GnosisSafe from another smart contract

If the goal is to deploy a Safe with custom modules and guards, you don't necessarily need a separate contract to do that. When deploying a Safe, there's a distinct initializer parameter to setup ...
user avatar
  • 616
2 votes

Can someone help me figure out how to get my UNI from an old MCD vault?

Here is what I think that you should do (using web3.js v1.2): const Web3 = require("web3"); // enter your node address and private key below, for example: const NODE_ADDRESS = "https://...
user avatar
2 votes
Accepted

what is the cheapest way for sending ethereum from 10 account addresses to 10 account addresses?

10 transactions from an EOA will cost 210,000 gas. The most efficient way to do this would be to deploy a contract that accepts funds in the constructor and subsequently distributes the funds to 10 ...
user avatar
2 votes

How to write a smart contract for access level (read/write)?

This might be done in the same manner as any other programming language: you basically define who will assign/revoke these permissions and create a structure to handle such permissions per user (read, ...
user avatar
2 votes
Accepted

What happens when the owner kills a multisig wallet?

By default there is no such concept as contract owner. Such concept exists only if it has been coded into the contract. So it depends on what kind of functionality the contract has. If by killing you ...
user avatar
2 votes
Accepted

Don't know how to get money out of smart wallet

I'm not 100% sure what's happened here, but... The smart contract was indeed self-destructed - via the kill() function - in the transaction you've pointed to (this one). During the self-destruct the ...
user avatar
2 votes
Accepted

If someone performed an arbitrage, is it possible to see the smart contract he executed if I know his wallet address?

It depends. In the transaction that you linked to in your question, the person call a function swap() directly on the pair contract. The code of the pair contract is public (verified). So, in that ...
user avatar
  • 3,237
2 votes
Accepted

Transfer ERC20 tokens of a smart contract

There is two different address in Ethereum. The one controlled by a private key (usable for a user). Smart contract that are address controlled by a code (no private key). If you didn't put a function ...
user avatar
  • 347
2 votes

What is the pupose of TokenID increment in OpenZepplin implementation?

What makes a token unique within an ERC-721 NFT contract is that token’s tokenId. The ERC-721 NFT standard doesn’t tell you how to assign tokenIds to tokens, but only requires that different tokens ...
user avatar
  • 958
2 votes
Accepted

Who pays gas fee for ERC-20 token transactions in exchanger?

I've notived at least 2 different ways of doing it. Binance will send and keep a small Eth balance in the deposit address. They will use that Eth to send the tokens from the deposit wallet to the ...
user avatar
  • 3,237
2 votes

What are some reliable multisig wallet solutions for Ethereum?

A really good option is Gnosis. Find more info here: https://gnosis-safe.io/#getting-started to create a wallet on Gnosis Safe, go here: https://gnosis-safe.io/app/#/welcome
user avatar
2 votes

Scam where unsolicited airdrop NFTs, if sold, empties victim's wallet

Looks like you have been following Twitter today. The user in question actually had their private keys compromised by a fake OpenSea email spam. However attack vectors can be launched on smart ...
user avatar
2 votes

Cannot read properties of undefined (reading 'address')

FOUND THE ANSWER: You need to know how to setup the Ganache Local with your Metamask. Add a Custom RPC Network using these settings: Network Name : Ganache Local New RPC URL: HTTP://127.0.0.1:...
user avatar
2 votes

how do i solve KeyError: 'wallets'?

Your brownie-config.yaml is in the wrong folder. Move it down to the root folder. In this example, move it from tests to brownie_simple_storage
user avatar
2 votes

How does WBTC on Ethereum work?

The organization that controls the issuance of WBTC is mainly BitGo, the issuance of WBTC happens when an amount of bitcoin is sent to a "wallet" that the company has access to, and after ...
user avatar
  • 331
2 votes

How does WBTC on Ethereum work?

Wrapped bitcoin is an ethereum ERC20 token that is pegged to Bitcoin. Pegging means that, for every WBTC token you available, there is a corresponding one Bitcoin that set aside to represent it. In ...
user avatar
  • 76
2 votes

How can I automate the crypto payments using smart contract?

I'm assuming from the question you want to know if there is a way to fund a contract so it performs as expected, because when it runs out of funds the program stops? Disclaimer: I am part of Chainlink ...
user avatar
2 votes
Accepted

Error : Using ".value(...)" is deprecated. Use "{value: ...}" instead

I had faced this on invoking call and had found from Solidity docs that gas and value parameters need to be passed in curly brackets now: address(nameReg).call{gas: 1000000, value: 1 ether}(abi....
user avatar
2 votes
Accepted

How many NFTs are hosted on IPFS?

What you're doing is probably your best bet! There is no on-chain "registry" of smart contracts that let you track their existence. Here are a few paths you might be able to take. 1. Find a ...
user avatar
2 votes

Funds stucked in smart contract

The funds are not stuck, they are now controlled only by the creator (0x97ce82ccb3d8d6a02c87799f1d8d8af4dad77a0e). You need to contact them, asking to call again the transferOwnership function. In any ...
user avatar
1 vote

Is it possible to send tokens to any smart contract address?

To add to Lauri Peltonen, the smart contract that own new token must have a function that allow him to handle this token, if not they are lost.
user avatar
1 vote
Accepted

Is it possible to send tokens to any smart contract address?

In general, you can send tokens to any address and it will go through. The only exceptions are if the token implements safeTransfer functionality, which first makes sure that the receiving address is ...
user avatar
1 vote
Accepted

How to retrieve multiple values returned from solidity with ether.js?

const result = await contractInstance.yourFunction(); const {0: variable_1, 1: variable_2} = result; Reference: https://blockheroes.dev/js-read-multiple-returned-values-solidity/ Hope it helps.
user avatar
  • 26
1 vote

Time locked wallet contract withdraw revert

Not definitively, but onlyOwner and require are the usual suspects. You should add reasons to require(expression, "this is why it reverted"); statements to help with debugging. I can't quite ...
user avatar
  • 51.1k
1 vote

Should I limit the amount of tokens a person can buy/sell per transaction/per 24 hours

Just limiting the sales per address won't solve the problem as whales will just become more sophisticated and split their funds up to many addresses over time. You can however use a protocol like ...
user avatar
  • 417

Only top scored, non community-wiki answers of a minimum length are eligible