All Questions
50,391
questions
1
vote
0
answers
14
views
I have a for loop. it doesnt work on hardhat but works on mumbai testnet
I have basic chainlink vrf contract.Trying to get 12 random numbers.I want to save those random numbers in another array.
I define an array called output. in fulfillRandomWords function, simple assign ...
0
votes
0
answers
5
views
For function overriding, why can visibility be made less restrictive, but mutability only more restrictive?
From the solidity docs:
Function Overriding
Base functions can be overridden by inheriting contracts to change
their behavior if they are marked as virtual. The overriding function
must then use the ...
0
votes
1
answer
2
views
Can the Aragon SDK pass any encoded action abitrarily?
In the examples section of the SDK documentation, there are encoders for a bunch of common DAO operations.
However I can't see an encoding for an arbitrary contract call in the examples.
Does the SDK ...
0
votes
0
answers
19
views
SafeProxy was not deployed correctly
we have the complete setup running locally and have now tried to deploy a new safe on our chain via the web UI. After creating a new Safe the process fails with: SafeProxy was not deployed correctly.
...
0
votes
0
answers
17
views
Binance smart chain node API provider without billing per websocket response
I'm unsure if this is the correct place to ask but I thought I'd try anyway.
Problem
I want to build a Node.js application using the Web3 library. The application should collect prices on liquidity ...
0
votes
0
answers
10
views
Sell Tax keeps changing on coin scanners and trading websites , is it because of low LP for test tokens?
I am testing a token I am going to launch, but I wanted to make sure things were okay and it was getting good scores first. One thing that baffled me was that the sell tax keeps changing on every ...
0
votes
1
answer
2
views
How can I test locally that my Aragon OSx plugin is working?
I'm creating a plugin and want to test it locally.
While reviewing examples at https://github.com/aragon/osx/blob/develop/packages/contracts/test/plugins, I found two different ways to deploy a local ...
0
votes
0
answers
6
views
Continue to execute Foundry Script after error
I'm running a foundry script and wondered if it was possible to continue to execute the script after an error ? The program does not run as soon as it encounters an error.
Currently I am debugging ...
0
votes
1
answer
16
views
creating multiple eth keys from one private key [duplicate]
I want to create multiple Eth public Keys from one private Key like exchange hot wallet
2
votes
1
answer
30
views
Can I change Openzeppelin access control without having the right permissions?
If you check this link: openzeppelin github access control
you will notice they use 2 function for granting a role:
function grantRole(bytes32 role, address account) public virtual override onlyRole(...
0
votes
1
answer
15
views
Problem with using gnosis safe in fuji testnet
I have problems using gnosis safe in fuji testnet.
On this page https://docs.gnosis-safe.io/learn/safe-core-api/available-services
there is no corresponding url for connecting, only for Avalanche ...
0
votes
0
answers
7
views
How Can I get both Incoming and Outgoing transactions from "getAssetTransfers" inside one request?
I'm working with alchemy's SDK.
And as per the Alchemy SDK documentation, it says we can get all the transactions
like this:
const config = {
apiKey: "<-- ALCHEMY APP API KEY -->",
...
1
vote
0
answers
14
views
Can a contract address send tokens it doesn't have?
I am trying to decipher the transfer logs of the transaction 0x57d755615684d53415cf2d47004f46d78478fd81df886d86e0f6f2066f222b2f.
Seemingly, the addresses 0x8971b0eacedda995a6dfddd82696c83d2278e233 ...
2
votes
1
answer
32
views
Gas limit for calling a smart contract function varies greatly upon address list parameter
Consider the following smart contract:
pragma solidity ^0.8.19;
contract Test {
mapping (address => bool) registered;
function test(address[] calldata addresses) external {
...
1
vote
1
answer
20
views
Metamask not recognizing Hardhat network on EC2 instance: "Could not fetch chain ID Is your URL correct"
Using the following installation on AWS EC2 Server Ubuntu 20.04
npm install --save-dev hardhat@2.8.4
using the following command:
npm hardhat node
getting the (following) response ( warning sign: ...
2
votes
1
answer
34
views
What is the meaning of transfer logs originating from the address "0x00...00"?
Some Ethereum transfer event logs have the address 0x000..00 in their from field. such as the log in the image, from tx with hash 0x60085d9f157a8426b3d2795de6cebbd4b50d541445be08e23f2b458d4bd0e60e
...
0
votes
2
answers
26
views
Is it good for me to switch to Moralis from web3js?
I've used web3.js for a long time now for connecting my front-end ( ReactJs ) with blockchain.
I wanted to switch to ethers but heard about Moralis . Now I am really confused about what to choose ? ( ...
0
votes
0
answers
4
views
Blockchain Layer on top of a database for Query Processing
Is it possible to have a blockchain layer on top of a database? I have heard about bigchainDB doing exactly the same but I wanted to know if there lies any advantage in doing so?
0
votes
1
answer
27
views
Why is dangerous to share metamask logs?
Sorry for the noob question, but if the Metamask logs don't contain a secret phrase, why is it dangerous to share it online?
Also, can hackers get hold of my Metamask wallet logs without hacking my ...
0
votes
1
answer
33
views
Error with getting balance of an ERC20 token for a wallet address solidity
I tried calling this function :
function createBorrowerCentricService (address _borrowToken) public returns (uint256) {
BorrowService storage borrowService = borrowingServices[...
1
vote
1
answer
23
views
Solidity dynamic array order & index
Just a question around dynamic solidity arrays. Is the order always guaranteed? I.e.
string[] public myArray2 = ['value0', 'value1', 'value2', 'value3'];
Will myArray2[1] always contain 'value1' for ...
1
vote
1
answer
42
views
Deployed my smart contract using 'npx hardhat run scripts/deploy.js' but it doesnt show me the contract address on the terminal
I've been trying to deploy my solidity files, and this is what I get.
So basically, my files compile, and there is no error, but I do not get the deployed address, so they probably didn't deploy ...
0
votes
1
answer
11
views
Trying to convert INR value to equivalent Eth (wei)
I'm trying to write a smart contract that takes INR as user input and converts it to equivalent eth ( wei ). I looked into chainlink datafeeds, but no luck there. Need advice on how to implement this. ...
2
votes
1
answer
36
views
I Think I might have been scammed - Hoping For Help PLEASE
So i think i fell into a smart contract scam. It started buy using https://remixethereumcompiler.io/ and creating a contract and funding it. I did that but can withdrawl the money. I looked at the ...
0
votes
1
answer
26
views
Infura network support for sepollia in Brownie
I have been trying to get testnet LINK for Goerli from chain.link. But it looks like it is no longer providing that for Goerli but Sepolia only. I am using the latest version of Brownie and it only ...
1
vote
1
answer
25
views
web3: How to be notified when address performs transaction with contract?
Using python web3, is it possible to listen for when a given target address uses a specific contract?
For context: I want to be able to know every time a wallet purchases/sells tokens via Pancakeswap'...
0
votes
0
answers
10
views
bscscan "BEP-20 Token Transfer Events" API unreliable?
Running on python 3.10, web3 v5.31.10
I am using the BEP-20 Token Transfer Events API endpoint from bscscan for a project.
However, during testing, I am noticing the API has been giving incorrect ...
0
votes
0
answers
19
views
How to call the exchange method on a Curve Pool?
I can't for the life of me figure out where I'm going wrong. I'm trying to write a simple swap inside my contract for the curve pool at this mainnet address: https://etherscan.io/address/...
0
votes
0
answers
4
views
Why does the abigen bin change based on the path to the contract?
I had a contract at my/original/path and moved it to your/new/path. The contract did not change. The second time I ran abigen, the bin variable in the go file changed.
When I moved the contract back ...
0
votes
0
answers
12
views
Difficulty processing requests for ethsignedtypedata SAFE signatures in python to be able sign from independent python wallet
What is the proper format for authenticating these types of signature requests?
I'm using python and I can't seem to be able to produce the right signature with my wallet code. I tried ...
0
votes
1
answer
9
views
Impossible to deals with big number in web3.js transacation :
I can't deals with big number (BN.js) with web3.js I have overflow error or i have execution reverted with BN.js library when I try add liquidity to pancakeswap pool.
By using BN.js
Without using BN....
0
votes
0
answers
14
views
Why does being an LP in uniswap take a fee?
I deposit 10k USDC into uniswap as an lp for the current tick spacing as a range order, i.e. I'm trying to provide one sided liquidity as a limit order.
No trades occur, thus no fees accrue. I ...
1
vote
1
answer
25
views
python web3 error: Unknown Account
I am trying to update the state of a variable in the smart contract using python web3 library, when I call the function using the transact method, this error appears
ValueError: {'code': -32000, '...
0
votes
0
answers
10
views
Why doesn't Openzeppelin's IERC20 has a `decimal()` function?
In my projects, getting the decimals() is an important task, so I have to sometimes manually add the function in IERC20's interface. But why isn't this function officially in the contract? What am I ...
0
votes
1
answer
23
views
Funding the deployer during the deployment of Safe's singleton contract?
My objective is to deploy the Safe app on a custom EVM-compatible network, using the safe-infrastructure repository.
I discovered that in order to proceed, I need to request a new deployment at https:/...
0
votes
0
answers
11
views
Calcul Gas will be used by a Txn
Hello every body hope all are good today ?
We trying to know precisely the number of gas used by a Txn, before the Txn be mine
We not talking about calcule estimateGas.
For example of this Txn : https:...
0
votes
1
answer
33
views
Transfer eth from one goerli account to another
So, I sent from one goerli testnet account to another: https://goerli.etherscan.io/tx/0xa1a6a53ef3b7e54b5dd58e1f6983b0ab06bf6a2301ba2155e869ce1a77347b9e
But the eth did not show up on the intended ...
1
vote
0
answers
17
views
Scaffold-eth's graph_node docker container dies after a few seconds, complaining about invalid collation setting
I have installed and run scaffold-eth on linux but The Graph node's docker container dies after a few seconds with this output:
graph-node_1 | Mar 09 17:30:46.164 CRIT Database does not use C locale. ...
1
vote
1
answer
12
views
How to implement QR code scanning?
In some DApps, when they want to connect a wallet, you can click on 'Connect to Wallet' and it opens a QR code for App to scan and authorize it. How do we implement this functionality? is there a ...
0
votes
1
answer
20
views
How can I keep updating an array value inside a struct using user inputs?
I am a beginner user of solidity so I have to learn a lot. I am creating a car sales Dapp for a school assignment in remix and I can't figure out how I can keep updating an array value inside a struct ...
0
votes
1
answer
10
views
Are there any critical points to consider regarding the externally owned account (EOA) that deployed the Safe contract?
I am planning to deploy the Safe contract on a custom network using the Deterministic Deployment Proxy using my personal wallet.
Assuming that I have high hopes for the Safe app to perform well on the ...
0
votes
0
answers
4
views
how define multiple @fulltext search in a GRT subgraph?
I have a graphql.schema file in my subgraph(GRT)
I try to write a search for 3 entity
but the graph accepts one @fulltext type like this:
type _Schema_
@fulltext(
name: "ABXsearch"
...
1
vote
0
answers
13
views
How to change rpc url programatically in MetaMask?
I have custom sidechain network and want to change rpc url, without changing a chainId. Is this possible to do programatically? Like "Provider.setRpcUrl(...)".
I know there is ...
2
votes
2
answers
85
views
How to view the amount of storage a contract uses?
Is it possible to view the amount of storage a smart contract uses from an existing tool? Or if not is it possible to determine it by making json rpc calls?
There are a few similar questions such as ...
1
vote
1
answer
17
views
Is there any way to use try/catch for the "view" functions?
I have been trying to run this code:
function seeError(address _token) public view returns (uint256) {
try IERC20(_token).decimals() {
return IERC20(_token).decimals();
} ...
0
votes
2
answers
60
views
Using Wagmi Core and Wagmi React together
I am using React Wagmi Hooks in my dapp to manage wallet connection. However, when it comes to reading or writing some contract functions it is not really practical to use the hooks. The reason I don'...
0
votes
2
answers
22
views
How to implement negation in Solidity?
I know that the EVM uses the two's complement system to represent signed values, and that EVM words have 256 bits.
How can I negate a number in Solidity, i.e. obtain its negation under the two's ...
0
votes
1
answer
21
views
What happens to transactions that has the same nonce as another failed transaction?
TLDR;
This question comprises of two parts.
When the status field of eth_call eth_getTransactionReceipt is 0 (failed), what could this indicate? (assuming there are multiple scenarios)
When there are ...
0
votes
1
answer
8
views
Why does negation flip all high bits of a number expect for the least significant bit?
In his blog post on 512 bit division, Remco Bloemen makes the following assertion:
... negation flips all high bits of a number up to but not including the least significant one
Why is that?
1
vote
0
answers
27
views
Would ERC-4337 allow more fraud?
If Account Abstraction is going to be widely available, wouldn't scammers, just make you sign a smart contract (e.g. pretending to be a DEX or to buy an NFT) while the smart contract is actually an ...