All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
21 views

Best way for a smart contract to be approved to transfer tokens from a different ERC20 smart contract to an address

I have two smart contracts; tokenContract otherContract tokenContract is an ERC20 contract with a fixed supply of tokens. otherContract is a separate contract that users of our application interact ...
0
votes
0answers
13 views

NFT on Opensea #Alchemy

I followed all steps in 3 parts of this tutorial https://ethereum.org/en/developers/tutorials/how-to-view-nft-in-metamask/ I also registered NFT in Metamask wallet. Wallet adress ...
0
votes
0answers
24 views

Function: null(address) in contract deployment

I try to understand the process of contract deployment and how to determine if a rug pull is possible. I am looking at the contract of the memecoin DOBO. During contract deployment a function "...
0
votes
0answers
5 views

Are there benifits using Moralis node provider services?

I'm very new to solidiy and blockchain so forgive me if this is a stupid question! I've been playing around on the BSC test net, following a few online guides and the Binance dev docs. I've noticed ...
0
votes
1answer
18 views

How to upload images to IPFS with the certain baseURL?

I have uploaded one image and set the baseURL for that. https://gateway.pinata.cloud/ipfs/QmQGTQMWRxK33PF4fvnxanyz8aWPPaweYUZeNTVW4gqpQb Now, I am going to upload more images with the same baseURL, ...
0
votes
1answer
14 views

Transferring a value into a fallback function of a contract

I'm trying to figure out what happens when you send a value to a contract. If the destination address (to) is a contract, then the EVM will execute the contract and will attempt to call the function ...
0
votes
0answers
10 views

I'm using brownie for testing contracts but its stuck like that in the image

I made a project folder using brownie. I can deploy the contract from the scripts folder but when I test it it's stuck I can't find anything that solves the problem.
2
votes
0answers
5 views

What is the role of a circuit in zero knowledge rollups

I am a student currently pursuing my bachelors degree in technology, for my final year project. I am trying to create a zk-rollup poc for nfts, I have came across different implementation of rollup ...
1
vote
0answers
12 views

What is the right way to manually interact with contracts in Ganache?

I've deployed and properly configured MetaCoin with Truffle and Ganache. But I don't see a way to actually interact with the deployed contract via Ganache's UI? https://trufflesuite.com/docs/ganache/...
0
votes
0answers
5 views

Nothing returned from `truffle develop` command on powershell

I'm new to web3. I'm trying to deploy a smart contract to the Ganache core ETH development node using Truffle. However, when I ran the truffle develop command, the console is stuck and does not do ...
0
votes
0answers
5 views

Broadcasting transactions from a not-up-to-date node

I am trying to run a full node in ethereum. But it seems to need 10hours more to be fully sync with the chain. What happens if I broadcast a transaction (maybe running a smart contract function that ...
1
vote
0answers
10 views

Decrypting data on chain and verifying the decryption is correct

I already know decrypting data on chain will reveal the key and the plaintext to everyone and for my use case that is exactly what I want. I want to be able to build a contract that has a pre-...
0
votes
1answer
16 views

Using payable functions in the remix ide

I created a simple solidity contract in the remix ide. I cannot figure out how to test the payable functions I created. here is an example of a payable function: function pay() payable { } here is a ...
0
votes
0answers
9 views

Deploying smart contract using vanilla JS with existing bytecode

I'm not sure if it's possible to deploy a new smart contract using plain Javascript if I include the bytecode and ABI. I copied and paste my ABI and bytecode below at MEW and I could deploy them. But ...
0
votes
1answer
12 views

I sent ETH(M) tokens from trust wallet to ETH wallet in crypto.com not Defi wallet

I sent ETHM from trust wallet to ETH wallet in crypto.com, the transaction showing in etherscan as success and I'm able to see my token in etherscan but not in crypto.com platform , any help what to ...
0
votes
1answer
195 views

We send the balance of the smart contrat using payable function to another smart contrat on gnosis safe

We send the balance of the smart contrat using payable function to another smart contrat which has a non payable address, is there any solution to make the transfer ? https://snowtrace.io/address/...
0
votes
1answer
23 views

Sent ETH one day ago from coinbase account to celsius account and it never arrived there [closed]

I sent a higher amount of ETH from my coinbase account to my account at celsius network, double checked the ETH receive address then pressed "Send". In this moment I saw the first capital ...
0
votes
0answers
8 views

Deploying Migrations using network Matic-- insufficient funds for gas * price + value

Trying to connect to the Matic network on Metamask. I funded the account with matic and followed the directions using Polygon's documentation. How do you solve the insufficient funds error?
0
votes
0answers
18 views

How is Etherscan Token Tracker Feature Built

How is the Etherscan ERC-20 Token Address page built (different from address Page)? My understanding is that ERC-20 only logs (emits) the events 'Transfer' and 'Aprove', so we are limited to these ...
0
votes
1answer
10 views

Economic motivation for aggregators in Chainlink

Please help me to understand what is the economic motivation for price aggregators? As I understand the aggregator pays to price providers via transferAndCall. This payment is motivation for the ...
0
votes
1answer
10 views

Mint function with 2 or 3 parameters Reverted

I am building a mint DAPP on the fantom blockchain. However, when I call the mint function, it returns an error: (execution reverted: Invalid payment amount) My React app communicates well with the ...
0
votes
0answers
7 views

i have problem with run Geth and find Geth

The keystore and geth folder could not be found after I ran geth and it ran. no folder was created . my question is why i have not these folders
0
votes
2answers
30 views

How to transfer my ERC20 token correctly?

I have my ExampleToken contract from Openzeppelin: // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/...
0
votes
0answers
10 views

How to prevent MEV Bots "attacks" to a fork of uniswap V2

I deployed a smart contracts structure to create a DEX in the mainnet. Is a fork of UniswapV2, only changing the variable names. I added some liquidity to it and it worked well. After some days, we ...
1
vote
1answer
42 views

Detect receiving token address in "receive() payable"

for the given receive function , is there a way I can detect the receiving tokens address (Detect what coin my contract is receiving ) is it possible to extract this information from msg ? receive() ...
0
votes
1answer
34 views

what happened in this transaction?

ID 0xbb14faf85f1b0bff9b31af11d11b045dd19c244046028ba2d62ece10f974425c basically I had entered an eth-USDC swap through matcha. I even had the USDC in my wallet for like 5 seconds but then I ended up ...
0
votes
1answer
13 views

Should I care about these benchmark values?

Let's say I have a contract which, for the sake of this post, inherits OpenZeppelin's Ownable. I made a minor update (in terms of code / complexity: an override & revert to disable a method). Then ...
0
votes
1answer
14 views

How can i get access to the account name and not the account address in metamask?

Instead of the account address like shown here, how can i get the account name instead?
0
votes
1answer
23 views

Recreating a re-entrancy attack but transaction failed/reverted, why?

I tried creating 2 contracts (Victim.sol and Attack.sol) in Remix, to recreate a re-entrancy attack, in particular the recursive function calling. Victim.sol is the contract to be siphoned, I ...
0
votes
1answer
17 views

Bitcoin address to private key, [closed]

I know its impossible to calculate a Bitcoin private key from address, but how far beck can you go with math, where math stops?
0
votes
0answers
13 views

Transaction / call that fails to be parsed with the correct ABI

This OpenSea sale fails to parsed with the standard ABI: https://etherscan.io/tx/0x4499dc75facb4cd27894196aac00bcb0ffbe3d64de87105878451d5637662f90 Here is sample script to show this: const ethers = ...
0
votes
1answer
30 views

Ethers.js - Error: invalid BigNumber string

I am trying to approve a larger amount of erc-20 tokens (it has 18 decimals). await token.connect(signer).approve(contractAddress, BigNumber.from((1000*(tenToPowerOf18Digits)).toString())) : If I try ...
-2
votes
0answers
13 views

stuck on installing ethereum client on macos

(base) kushal@Kushals-MacBook-Air go-ethereum % brew install ethereum Warning: No available formula with the name "go" (dependency of ethereum/ethereum/ethereum). ==> Searching for ...
0
votes
1answer
19 views

Need help with checking responses from balanceOf functions

So I have two contracts Contract A & Contract B Contract A is an ERC721 that allows for the balanceOf function to be called after passing it an address. It will return response of how many NFTs ...
1
vote
0answers
24 views

How to change/set values of a mapping through a function in solidity?

I have the following structure, with the mentioned mapping struct A { uint a; bool[100] b; } mapping(uint => A) public arr; I am using this function to set/...
1
vote
2answers
29 views
+50

What are the pros and cons of emitting events vs return statements?

According to this answer the return data of a smart contract function call can be accessed, however the same return data can be collated into an event to emit, so when should either method of ...
1
vote
1answer
43 views

How do nodes reject a fraudulent block

I read about block structure, hashing, verifying transactions, but I am struggling to understand how a bad block is rejected by miners. Let's say I am a bad actor and win the PoW competition and I ...
1
vote
1answer
21 views

How to add back default Rinkeby Testnet network in brownie networks list back?

I accidentally deleted the default rinkeby network that comes with brownie and wanted to know how to add it back? I tried with the below cmd by creating an infura project but I'm getting the ...
1
vote
1answer
18 views

Unable to withdraw/transfer funds from contract (using Remix)

I wanted to create a contract where wallets can deposit and withdraw funds, to test the re-entrancy attack. However, on deploying this contract in Remix VM (London), I'm unable to withdraw using the ...
0
votes
1answer
10 views

New MacOS M1 user - truffle test will compile but will give me warnings and errors

I'm following a simple tutorial on smart contracts and I keep running into errors with properly installing truffle. After doing countless hours of research, I'm starting to believe maybe the latest ...
0
votes
1answer
29 views

how to write a contract to set a reward for players and they claim the reward?

I want to create a contract to give the players rewards and they claim their rewards. It seems everything is ok! // SPDX-License-Identifier: MIT pragma solidity ^0.8; import "@openzeppelin/...
0
votes
1answer
16 views

Does stack persist through external calls?

Looking through the docs I found that a malicious caller can take the stack depth to ~1000 and then make a call which would fail due to stack depth. Based on that let's assume that stack indeed ...
0
votes
0answers
9 views

Transactions in queue not visible in Gnosis

I can't reject this transaction because "TRANSACTION WITH NONCE 2 NEEDS TO BE EXECUTED FIRST". However neither this transaction or any other appears in the Queue? Not sure what to do here, ...
1
vote
1answer
13 views

Why is it necessary to access smart contracts via their address?

I am new to solidity and just started exploring smart contracts. I have a smart contract for creating a Person struct with name and age and a function to access the structs using the name variable: ...
0
votes
0answers
14 views

web3.py swapExactTokensForTokens failing transaction: Fail with error 'PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT'

I am trying to call swapExactTokensForTokens of a router contract, I need to swap USDT to tokenB. Here is the code of the transaction: router = '0x0000000' abi = '[{"inputs":[{"...
0
votes
0answers
7 views

Learning hardhat. What is the difference between deploying to localhost and hardhat network?

On one hand, when I run "npx hardhat node --network localhost" it tells me that we can only run hardhat node, so i run "npx hardhat node" and it works. Ok so I am using hardhat ...
0
votes
1answer
14 views

Clone factory contract variable initialization

DaoRegistry dao = DaoRegistry(_createClone(identityAddress)); _createClone() returns a payable address, but the DaoRegistry constructor is empty. I haven't been able to find an explanation for what ...
0
votes
1answer
25 views

What are the risks of token approvals?

How exactly do token approvals work? As they cost gas fees, I assume they must be stored on the blockchain. Let's say, I approve uniswap to spend all my eth. Does that mean that a central entity has ...
0
votes
0answers
5 views

Brownie runs just one test instead of two

I have two functions in my test file; test_simple_storage.py, but when I run brownie test only the first one runs. I tried to elect just the second function to be tested and it simply returned 1 ...
1
vote
0answers
8 views

What are the consequences of a nested mapping?

I'm wondering what the consequences of using a nested mapping are. If I have a mapping that is 4 levels deep, for example: mapping(address => mapping(address => mapping(uint256 => uint256))) ...

15 30 50 per page