All Questions

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

how import in remix smart contract without source code?

I am trying to call a fallback function on a smart contract that has not verified contract source code, How can I do this? Thanks in advance
user avatar
  • 1
0 votes
0 answers
3 views

How do I get all information regarding a ERC721 token

How do I fetch details about an NFT using JavaScript? Basically I want to get the owner detail minter detail and the NFT image of a particular smart contract and ID? Is there any API or something?
user avatar
0 votes
0 answers
3 views

Geth import a local backup slower than syncing

System: Linux, SSD, 64G RAM Is there a way to speed up the process of importing a local Backup? So I run a node for a while (completly synced until yesterday) and wanted to play around a bit more. I ...
user avatar
1 vote
0 answers
5 views

Is there any difference between the "new Contract()" syntax and the assembly "create" opcode?

Is there any difference between the two following ways of creating a smart contract via a smart contract? function create_v1() external { Contract c = new Contract(); } function create_v2() ...
user avatar
0 votes
0 answers
7 views

Why function is not taking parameter

I have written following simple solidity code pragma solidity ^0.4.0; contract C1 { function f() { g(8) ; // simply passing an integer to another function } function g( uint x) returns (uint ) {...
user avatar
0 votes
0 answers
6 views

Why is my solidity compiler not generating bytecodes?

For some reason the my solidity compiler did not include many fields in the contract.json file. Most importantly I miss the data field. The first field I get is abi. Here is my contract: pragma ...
user avatar
0 votes
0 answers
5 views

how to list nfts in NFT marketplace with my custom token

I want to build an marketplace to sell nfts and only accept my own custom token as a payment method the way Decentraland has mana as their token below: https://i.stack.imgur.com/Y6y9D.png I could ...
user avatar
0 votes
0 answers
9 views

The Get Functions of ERC1820 (added in genesis file) not working correctly on Quorum

Because I cannot deploy the magic ERC1820 directly to my private Quorum Network, I must add it to the genesis file like this: "0x1820a4b7618bde71dce8cdc73aab6c95905fad24": { "...
user avatar
  • 2,536
0 votes
0 answers
9 views

Error in deploying a safe - methods is empty

I am writing a simple script to deploy a safe, using the safe-core-sdk. I faced multiple issues that I have bee resolving but currently there is a point where I am stuck. issue 1 CommonJS vs ES6 ...
user avatar
0 votes
1 answer
11 views

How to deploy a contract by manually signing it?

what all options are there to deploy a contract by manually signing instead of using library built in methods.
user avatar
0 votes
0 answers
6 views

Options for a light client in PoS?

What kind of client options are available in Ethereum Proof of Stake? I don't mean different clients, but options such as Geth fast sync and Geth light sync. I'm especially interested in light ...
user avatar
0 votes
1 answer
12 views

Is there any simple function done in Solidity to check if an address is a contract address or a wallet address?

I'm looking for a function that will tell me if an address is a contract address or an externally owned address / wallet address. I tried with this function, however this only tells me if the address ...
user avatar
  • 101
0 votes
1 answer
7 views

Using array of arrays as a function argument returns "Invalid implicit conversion from uint256 to uint256[] memory requested."

Please consider this contract: pragma solidity 0.8.7; contract Test { struct UserStruct { uint256 betAmount; uint256[] potentialWinnings; string teamChosen;} mapping(...
user avatar
1 vote
0 answers
9 views

How stable is the block time after Ethereum PoS?

I understand that PoW basically depends on luck. If the target block time is 10 minutes, if lucky, 3 minutes, if unlucky, will not be able to find the hash even after 30 minutes. How stable is the ...
user avatar
1 vote
1 answer
10 views

Do ETH have its own contract address in Ethereum Chain?

Sorry that i have a stupid question would like to ask. As I know, each token which ride on EVM has its own contract address. However, i am not sure native token.Such like native token (ETH), will it ...
user avatar
0 votes
0 answers
9 views

How to add delay while testing smart contract

Currently I am testing smart contract with truffle framework. In my smart contract I have a function which can be executed for limited time period(say 100 seconds from contract deploy). How can I ...
user avatar
  • 1
0 votes
0 answers
9 views

Upgradable Contracts From Scratch Without Openzeppelin

I'm on a tight deadline so I don't have time to go through all of openzeppelin's upgradable contract logic. However, I need upgradable contracts. I understand the general concept of what the library ...
user avatar
1 vote
1 answer
14 views

Do nothing when condition is met

Can I do something like this in solidity? Will the user be able to do anything malicious? if(some condition met){ //Do nothing or return; }
user avatar
  • 111
1 vote
1 answer
9 views

How would we know that a parameter can be passed into the interface's constructor?

When I create a priceFeed object of type AggregatorV3Interface, I use code that looks like this (from all the documentation): AggregatorV3Interface priceFeed = AggregatorV3Interface(...
user avatar
  • 11
0 votes
1 answer
18 views

How to write a linear formula for percentage in Solidity?

So id like to write this function in solidity but im having issues because of the integers not being accepted. s being the startin time. Lets say 1 second in unix time. x being the ending time. Lets ...
user avatar
0 votes
0 answers
7 views

How to transfer nft from one account to another via web3?

I use the erc1155 type and I can't get nft on my other account, after confirming the transaction, nothing happens. const contract = new web3.eth.Contract(abi, '0xTARGET_TOKEN'); const ...
user avatar
  • 1
0 votes
0 answers
5 views

Trying to understand solidity assembly's revert function

I have been absolutely racking my brain trying to understand this line of code from OpenZeppelin's ERC721.sol file. It is inside the function _checkOnERC721Received. I've already dove into a bunch of ...
user avatar
1 vote
1 answer
34 views

Restrict who can call a constructor

I create an instance of a child contract using a Factory contract. I want to limit the constructor of the child to only be called by the Factory. Is this possible? contract Factory { function ...
user avatar
  • 111
2 votes
0 answers
14 views

Why the bytecodes for the same smart contract in testnet explorer and Remix/solcjs are different?

I am using Remix to compile and deploy my smart contract to the Rinkeby test network. I don't understand why the bytecode of my contract on Rinkeby explorer is different from the metadata.data....
user avatar
0 votes
0 answers
10 views

Getting assertion error for unit test

Im getting the assertion error the test it("return false if enough time hasnt passed", async function(){ await expect(raffle.enterRaffle({value: raffleEntranceFee})) ...
user avatar
0 votes
0 answers
21 views

Ethers setup provider for mumbai testnet

I try to connect to mumbai testnet in javascript. I don't want to use alchemy, infura or something like this, but want to connect drectly. I already have deployed a smart contract to mumbai-testnet. I ...
user avatar
  • 1
0 votes
0 answers
8 views

solc compiler --allow-paths fails

I'm trying to compile a contract using standard JSON through a script via the solc compiler CLI. I have a folder structure for storing the .sol files, the input JSON, and the compiled JSON output. No ...
user avatar
0 votes
1 answer
21 views

Mapping/variable in struct. Which one is cheaper in terms of gas?

Considering the following different approaches: 1st approach struct Apartment { string apartmentAddress; string description; string image; } struct Reservation { Apartment apartment; uint32 ...
user avatar
0 votes
0 answers
25 views

Gnosis safe transactions fails with code 803

I launched the infrastructure of gnosis locally with safe-infrastructure repository and set up there Aurora mainnet chain in config service: { "next": null, "previous": ...
user avatar
0 votes
1 answer
18 views

JS Passing front end input data to function params

In a nutshell: I am trying to get data from the front end (string input) to flow to my backend function parameters. See code below export default function foo() { const boilerplate const { ...
user avatar
0 votes
2 answers
17 views

msg.sender.call{value: 0.1 ether, gas: 1}(""): Why it doesn't fail? Shouldn't?

I'm making a simple test to force a transaction to be reverted, but it just doesn't happen. I have this function where I intend to limit the gas to just 1. contract MyContract { constructor() ...
user avatar
  • 63
0 votes
0 answers
30 views

Web3.js function estimateGas() generate "Returned error: gas required exceeds allowance (50000000)"

I am trying to do a simple swap on Uniswap Router V2 on Optimism: https://optimistic.etherscan.io/address/0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45 const encoded = await uniswapRouterContract.methods....
user avatar
  • 1
0 votes
0 answers
11 views

How to put value in structure by taking value from another structure?

I am creating a NFT market place i created a structure for Token details i wanted to put deatils about their rayalties in it so i was thinking about fetching the data from ERC2981 structure cause it ...
user avatar
0 votes
0 answers
8 views

0x swap quote API not giving quote with SHIBA INU token

Tried 0x swap quote API GET /swap/v1/quote to sell the SHIBA INU tokens but it is not working. Although working for other tokens like USDT, DAI, etc. Query params I used: With symbol https://api.0x....
user avatar
0 votes
0 answers
4 views

Is there a Harmony API function to fetch both both the HMY and ETH transaction hashes

It appears that Harmony Transactions have multiple hashes, with the web-based block explorer showing both a Harmony and an ETH transaction hash (randomly picked example). This is causing me some ...
user avatar
0 votes
0 answers
9 views

What is the difference between Binance Beacon Chain & Binance Smart Chain

What is the difference between Binance Beacon Chain & Binance Smart Chain
user avatar
0 votes
1 answer
26 views

Problem with interacting with external contract

I've created universal contract that get balance of any NFT(I parse NFT contract address). // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface myInterface { function balanceOf(...
user avatar
0 votes
0 answers
5 views

How to execute Meta Transaction in python

I have performed transfer function but I am unable to find from where to get SigR SigS SigV that are required in the transaction I have two transaction one is successful and other is failed 1 - https:/...
user avatar
  • 1
0 votes
1 answer
9 views

Different bytecode when compiling from both solc-js and Remix IDE

Currently, I'm trying to get the bytecode from this contract code for example: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract GetSet { uint256 private total; mapping(address =&...
user avatar
0 votes
0 answers
9 views

**Math/Stableswap Formula** Explaining the subsitution of "Chi" to get Stableswap invariant formular

Hello, I'm having a trouble of understanding this operation: In Curve.fi Stable Swap's paper, page 5, they substitue into this formular With some simplification step, we get the Stableswap invariant:...
user avatar
1 vote
0 answers
10 views

How is the the net probability mentioned in EIP-55 calculated?

In EIP-55, it says: the net probability that a randomly generated address if mistyped will accidentally pass a check is 0.0247% I am curious about how this probability is calculated and tried to ...
user avatar
  • 11
0 votes
0 answers
16 views

Is approving a smart contract for ERC20 transfers bad practice?

Some context: I am developing a smart contract and working out a way to charge my users for usage of our service. I am trying to go for a subscription model so they do not have to purchase "...
user avatar
0 votes
1 answer
13 views

Why isn't ether value not showing in etherscan transaction?

I called a fund function and sent 0.55 ether to this contract. Now called withdraw function and all the ethers in the contract came back to my metamask account. But in the screenshot below you can see ...
user avatar
  • 48
0 votes
0 answers
7 views

Is there any way to store data privately in dec database?

Can I store data privately in a decentralised database and retrieve the data in JSON format like in mongodb
user avatar
0 votes
0 answers
8 views

Function selector collision in ERC165

Like we know that the receiver contract can provide the confirmation of the implemented interfaces by comparing the interface indentifier and function selector of implemented interfaces. What could go ...
user avatar
0 votes
1 answer
7 views

How can we test 0x platform matcha.xyz in testnet network?

matcha platform only support mainnet networks. How can we test with Testnet network?
user avatar
-1 votes
0 answers
14 views

Solidty NFT smart contract ERC721A

i have an NFT smart contract using ERC-721A library and want to get ids of all token against each address without consuming gas. CODE is given here i use array and mapping. Array for storing Ids and ...
user avatar
0 votes
2 answers
40 views

Access Private Address Mapping SOLIDITY

i have this contract trying to access the private mapping https://rinkeby.etherscan.io/address/0xe67a53e13e5bc8d197c97ff01a201eb73eb9eb78 bytes32(keccak256(abi.encodePacked("...
user avatar
0 votes
1 answer
8 views

Wrong implementation of ERC165 by receiver

My understanding about ERC165 is that if a contract had implemented ERC165 then the sender contract can check for the supported interface before initiating the tx with the receiver contract address. ...
user avatar
0 votes
0 answers
6 views

ERC1155 mintBatch ids issue

I met an issue when I try to use mintBatch function in my ERC1155 contract, when I use remix to try mintBatch, it should fill in 4 items: address, ids, amounts and data. The problem comes from "ids". ...
user avatar

15 30 50 per page
1
2 3 4 5
937