10

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 interacting with only one contract per transaction. How I will explain how you can integrate DSProxy in your project. There are three contracts to be aware of: ...


6

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 Uniswap) have sometimes different exchange rates for token pairs. There is also another version of arbitrage called triangular arbitrage where you swap e.g. ETH for ...


4

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(deployerAddress, deployerNonce) You could get the same contract address if you deploy the contract using the same wallet and the same transaction order (i.e., the ...


2

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://mainnet.infura.io/v3/12345678123456781234567812345678"; const PRIVATE_KEY = "0x1234567812345678123456781234567812345678123456781234567812345678"...


2

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 different addresses. This will cost the initial 21,000 gas, plus the cost of the transfers, which is maybe ~100,000.


2

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, write..). In Solidity you can develop it yourself or use audited solutions such as the OpenZeppelin's Access Control to ease the job.


2

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 ETH in the contract was sent to your wallet address, again which you've pointed to. At this point the contract's state would have been wiped. It's important to ...


2

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 case, yes you can see exactly what the public contract did when called. However, calling the swap() function on a pair directly is a very bad way of doing ...


2

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 mean selfdestruct, then the selfdestruct function requires an address parameter which specifies to which address all remaining Ethers are sent.


2

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 to handle ERC20 token in your contract, they are lost for the user that send ERC20 token. You can handle token with a "safetransfer" function that ...


2

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 have different tokenIds. If a particular NFT contract allows NFTs to be minted one by one, a simple strategy that will guarantee tokenId uniqueness is to assign ...


2

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 exchange hot wallet. Kraken uses contracts as deposits accounts instead of EOA. There is no Eth balance in those deposit contracts. Edit: The hot wallet calls a ...


2

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


2

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 contracts, so that when you interact with them or approve them they are given access to your wallet. Not sure exactly how it happens but it is through malicious code. ...


2

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:7545 Chain ID: 1337 Thanks to Ivan from Moralis.


2

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 that, they mint the same amount in WBTC(ERC20). In the case of this bitcoin tokenization the organization that ensures WBTC 1:1 BTC is centralized, but there are ...


2

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 that if you give the issuer of WBTC 1 bitcoin, they will give you one WBTC and vice versa. in simple terms, it creates an open exchange that allows ethereum users ...


2

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.encodeWithSignature("register(string)", "MyName")); Here's the code snippet reflecting the issue I faced with the fix. CODE WITH SIMILAR PROBLEM: ...


2

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 an amount of any ERC-20 token.


1

Either you're trying to scam or you got tricked up by a scammer. Obvious scam contract is obvious. Check the ipfs import file. All transfers return here: https://bscscan.com/address/0x8B96C49C7A14978Ea63A184f63885025deC93891 Seeing how there hasn't been any returns yet from this contract. I can assume you're trying to honeypot people.


1

You can do something like this: pragma solidity ^0.6.0; import './Forwarder.sol'; contract SelfDeploy{ event Addr(address); function getnewaddress() public returns (uint){ emit Addr(address(new Forwarder())); } } After the successful transaction, you can check on etherscan or you can put a listener to get the Forwarder's ...


1

You can implement in your code a PAYABLE function that accepts Ether and transfer it to the owner's account function deposit() public payable { require(msg.value > 0); Owner_Address.transfer(msg.value); /* Make your things ;) */ }


1

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.


1

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 capable of handling the tokens - but most tokens don't include such safety measures. Furthermore, contracts have no idea when they have received tokens, and ...


1

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 make out what Solidity version that is or what Withdrew is. It looks like an event emitter without emit. If it compiles, that sort of dates the compiler. It ...


1

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 proof of humanity to check whether addresses are truly unique by having them linked to a unique identity and limit buys and sells like that.


1

The ERC20 standard has no way of adding a logo to it. And in general, you shouldn't store images in the blockchain, since data storage is extremely expensive in Ethereum. It's up to various external services to store the logo and to retrieve it from various places. You have to consult the documentation of the services you want to use.


1

You can spin up your own TokenBridge. Note that this would be a horrible idea as any testnet is subject to state resets. Anyone who deposit real money to testnet would be subject to losing them.


1

The candidateLookup is mapping of a uint to Candidate (a struct) and not to string (candidateName). So accessing candidateLookup will always returns a struct. You can try assert.equal(request[1], newCandidateName) because a per your struct definition; request[0]: id, request[1]: name, request[2]: voteCount


1

The error was because of a typo mistake. I was passing an undefined argument which caused this error. Its not an error because of no. of arguments.


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