Skip to main content

Questions tagged [contract-development]

Questions regarding the development of smart contracts

Filter by
Sorted by
Tagged with
0 votes
1 answer
10 views

Ganache alternative in docker

After the Sunset of Truffle and Ganache . Are they already some alternative to the Ganache docker image https://hub.docker.com/r/trufflesuite/ganache with enabled persistent data for local development ...
Majd TL's user avatar
  • 3,217
0 votes
1 answer
9 views

Is there a standard or method for creating multiple, separate, batch NFT mints within one contract or deployment?

Is there a standard or method for creating multiple, separate, batch mints NFT within one contract or deployment? While each Batch maintain its own unique metadata? For example, say i need, 6 ...
kushycrypto's user avatar
0 votes
0 answers
5 views

Getting error Error in plugin @nomiclabs/hardhat-etherscan: You set an Etherscan API token for the network

Hello Dear I need Some help Am trying all The day TO deploy nft in Base testnet in visual studio code I deployed it but when I try to verify I got This error Error in plugin @nomiclabs/hardhat-...
Shi's user avatar
  • 1
0 votes
1 answer
29 views

selfdestruct in solidity is reinitializing the contract

Hello I am trying to solve ethernaut challenge MotorBike ,code below // SPDX-License-Identifier: MIT pragma solidity <0.7.0; import "openzeppelin-contracts-06/utils/Address.sol"; import ...
Tanaka wa Kun's user avatar
1 vote
1 answer
11 views

how do you unstake VGX token?

i had staked my VGX token through their website back in 2021. but now their website is no longer available and i have been told that i have to unstake using etherscan. i tried to use the unstake ...
Feroz's user avatar
  • 11
1 vote
0 answers
11 views

Does `call` opcode panic if less size data is returned?

I was reading the zksync documentation and found the following in the differences section here For calls, you specify a memory slice to write the return data to, e.g. out and outsize arguments for ...
Neo's user avatar
  • 103
1 vote
0 answers
28 views

eth_sendTransaction is not supported. Use eth_sendRawTransaction to send a signed transaction

I'll go straight to the point. I have a React App, I want to integrate this web with a very simple smart contract, which receives a hash and then saves with an event the timestamp of when it was ...
JETIX's user avatar
  • 11
0 votes
0 answers
17 views

Fotomatriza ist Encoding

Фотоматрицу кодируют на заводе, и драйверы к фотоматрице устанавливают на заводе. Они (фотоматрицы) изготовлены из квантовых полупроводников очень маленького размера и работают с информацией через ...
PLUTON-128-HIQSY's user avatar
0 votes
0 answers
20 views

I am experimenting with a contract and creating my own router and running into a verification Issue on EtherScan

hope you all are well. I wanted to see if anyone would be able to help me diagnose what I could possibly be doing wrong. Ive read through numerous posts and it seems many solutions have not yet helped ...
Altcoin View's user avatar
0 votes
1 answer
34 views

ERC20 Token Balance to Zero After Swap

I tried to do some token swaps on Uniswap. I also checked other topics in the forum but couldn't understand what really happened because I couldn't find any transactions that shows something happened ...
morez890's user avatar
0 votes
0 answers
19 views

Trouble publishing contract source code in Brownie: ConnectionError 403

I'm encountering an issue while attempting to deploy a contract using Brownie and publish its source code to Etherscan. The deployment itself is successful, but I'm unable to publish the contract ...
Aria's user avatar
  • 11
0 votes
1 answer
32 views

transfer token from one address to another through a contract using solidity

I am trying to transfer a token from any address to my contract or another address using solidity but it is not working. the TransferTokenAddress function is the one I'm running. // SPDX-License-...
Jose's user avatar
  • 3
1 vote
1 answer
17 views

LP contract doesn't approve

I created this contract to simulate a liquidity pool and I'm testing it with the Remix IDE. I can say it works fine, except for the function to swap tokens for ether, which is bothering me. The user ...
Integral's user avatar
  • 115
0 votes
1 answer
32 views

How to cast uint to address in Solidity

How to cast an Ethereum address from uint to address following the next format? uint universal = 0x7addAd09; uint uni = 0xcbd98D97; uint cake = 0xEC3dA7a0; uint inch = 0x088EAdFE; uint others = ...
folkiesss's user avatar
0 votes
0 answers
10 views

How malicious are approvals on default ERC standards?

Assuming i have deployed contract A, that is a marketplace for tokens. Contract A uses all default OpenZeppelin interfaces. Multiple approve for example unlimited USDT to contract A. After some weeks, ...
De ruige's user avatar
  • 123
0 votes
0 answers
30 views

Gas estimation failed - remix.ethereum.org

Why i cant deploy my contract ? it show me every time this. I am sure i do everything right. Before i try force sending but TX failed and i burn some eth... here is tx https://etherscan.io/tx/...
Lukáš Kubala's user avatar
0 votes
0 answers
14 views

Handle workspace/monorepo with different deployments

I am using yarn workspaces in which I have 2 projects. My-project contracts subgraph Some devs work on contracts, others on subgraph. The flow of the release is the following: PRs are created ...
Neo's user avatar
  • 103
0 votes
1 answer
18 views

Pinata pinList API Fetching Unpinned Images and Files

I am encountering an issue with Pinata's API (https://api.pinata.cloud/data/pinList) where despite unpining several images and files from my Pinata Cloud account, the API continues to fetch the ...
Umar Raza's user avatar
0 votes
0 answers
28 views

I made a contract with 1 eth from a tutorial and I want to know if I lost it or can I recover it [duplicate]

could someone help me identify if I was scammed or not, please follow the following video link https://www.youtube.com/watch?v=VwpCxLGTl20 I did exactly the indicated steps and I did not have any ...
Diego Tavella's user avatar
1 vote
1 answer
19 views

Running a Cryptocurrency Bot 24/7 Without a Computer

I've developed a cryptocurrency trading bot, but I don't want to leave my personal computer running all the time just to keep it operational. Is there a method or service that allows me to run the bot ...
adam mr's user avatar
  • 101
0 votes
2 answers
24 views

Getting started with a project

I'm new to smart contract and eth development but I have a project I'm planning to start and wanted to get a guide on the tools and framework I should be using. I'm gonna be writing smart contracts in ...
Dhruv Pareek's user avatar
0 votes
1 answer
25 views

Create SplitSwap smart contract

I'm trying to create a split swap smart contract. This contract works fine on the BSC chain, but on ETH I got the error "TransferHelper: TRANSFER_FROM_FAILED", why? SplitSwap.sol // SPDX-...
Brain King's user avatar
0 votes
0 answers
7 views

How to handle liquidity pool transfers and fees?

Suppose I have a token on the Ethereum network. From what I understand, with each buy and sell a part of the transaction is maintained by the contract that adds it to the LP (liquidity pool). However, ...
Integral's user avatar
  • 115
1 vote
1 answer
19 views

Can't withdraw funds from a Contract

I've deployed a contract for education purposes and used it. The contract address: 0x3Fe77339866AB535Fe4f8D1F2Ee1a1a49658AeBf You can see the contract code on zkscan but i will put the relevant part ...
Ugur Bukcuoglu's user avatar
0 votes
0 answers
12 views

Forking a network to simulate events

I'm trying to simulate an event by forking a network. For example: wss.on('block', async (blockNumber) => { // Your code here }); How can I accomplish this? Any guidance would be ...
adam mr's user avatar
  • 101
0 votes
1 answer
19 views

Looking for BSC RPC Provider with Log Monitoring

I'm in search of a reliable RPC provider for accessing the Binance Smart Chain (BSC) network, preferably with log monitoring capabilities similar to Alchemy. Any recommendations or insights would be ...
adam mr's user avatar
  • 101
0 votes
0 answers
21 views

How do I impliment Ethereum fowarding functions without paying large gas fees for my business

I am making a business and will receive Ethereum (and other cryptos), each time a user creates a order a ethereum address will be Generated for them to send too, then that is instantly forwarded to my ...
Hav's user avatar
  • 1
0 votes
0 answers
9 views

Implementing Unique LP Token Features: Rewarding Liquidity Providers with Free LP Tokens

I'm working on a coin and aiming to introduce a unique feature where liquidity providers can mint additional LP tokens as a reward for providing liquidity to the pool, excluding gas fees. However, ...
Domi's user avatar
  • 1
1 vote
1 answer
53 views

getting address field from assembly

Assume the following solidity code: function caller(uint k, uint v) public { (bool success, ) = address(this).call(abi.encodeWithSignature("callee()", abi.encode(k, v, msg.sender))); ...
Giorgi Lagidze's user avatar
0 votes
0 answers
19 views

Subgraph Link for Uniswap V2 on BSC?

I'm looking for the SubGraph Api endpoint to interact with UniswapV2 on the Binance Smart Chain (BSC). Can anyone provide the specific link or information on how to access it? I appreciate any ...
adam mr's user avatar
  • 101
0 votes
0 answers
11 views

i want to transfer amount from ride booking to ride owner so getting error

// RideSharingContract.sol pragma solidity ^0.8.0; contract RideSharingContract { address public owner; event RideCreated(address indexed creator, uint256 indexed rideId, string source, ...
Pradeep prajapati's user avatar
0 votes
0 answers
14 views

On-chain or Off-chain: Optimal Calculation for Arbitraging Two v2 Pairs?

I'm currently exploring arbitrage opportunities involving two v2 pairs and I'm wondering whether it's more advisable to compute the optimal amount to trade on-chain or off-chain. What are the key ...
adam mr's user avatar
  • 101
0 votes
0 answers
18 views

Dynamically include data from contract in ERC721 JSON data

Let's say an ERC721 NFT contract includes a mapping: mapping(uint256 => uint16) public nftAttributeA; // uint256 is tokenId, uint16 is an attribute of the tokenId where the nftAttribute is updated ...
Ryan's user avatar
  • 92
0 votes
0 answers
18 views

UnimplementedFeatureError: Copying of type struct logistics.Vehicle memory[] memory to storage not yet supported

I'm encountering an issue while working on a smart contract. I have three structs that are interdependent: Participant, Vehicle, and Sensor. Participant contains an array of Vehicle structs, and each ...
Kedar Dhamankar's user avatar
0 votes
1 answer
34 views

Etherscan claimed MANA, DEXE & REQ tokens creation tx's return different contractAddresses, they got an issue or I miss something?

For example, Mana token page at Etherscan is https://etherscan.io/token/0x0f5d2fb29fb7d3cfee444a200298f468908cc942 Mana contract page at Etherscan is https://etherscan.io/address/...
Nimrod Yonatan Ben-Nes's user avatar
1 vote
0 answers
17 views

Issues setting up a test case for when withdrawal fails in my Contract

Question Description: I created a contract that users can fund and only the owner of the Contract can withdraw the funds from the Contract. The Contract is below: // SPDX-License-Identifier: MIT ...
Eyang Daniel's user avatar
0 votes
1 answer
23 views

Is it possible for a view function to revert (in a loop?)

If I have a view function and it runs a loop to get a large set of data, is it possible to revert and be out of gas, or no matter how big the loop is will it still call it? This function will not be ...
Henry Gagnier's user avatar
3 votes
1 answer
88 views

What's type hash's usecase in EIP-712?

Assume I'm implementing EIP-712 signatures in solidity. contract Nice { bytes32 private constant BID_TYPE_HASH = keccak256("Bid(uint256 num1,uint256 num2)"); struct Bid { uint256 ...
Neo's user avatar
  • 103
0 votes
0 answers
8 views

How to trigger revert with hardhat

I want to use hardhat to test my contract.Here is my Contract. When I deliberately make a mistake which will trigger require(,"The service is not passed") and run npx hardhat test,I expect ...
hiahia xu's user avatar
1 vote
1 answer
47 views

gasLimit argument in ethers.js confuses me

Assume the following: // Tx1 const realCall = await contract.callMain(secondAddress, num); const waited = await realCall.wait(); console.log(waited.gasUsed.toString(), ' gas used') it prints: "...
Neo's user avatar
  • 103
0 votes
0 answers
9 views

How to use contract address in web3js dynamicly with hardhat?

I have an contract but when I deploy with hardhat in artifact json code there s no contract address property but with truffle there was. I wanna use hardhat and use contract address not staticly ...
seojunchian's user avatar
0 votes
0 answers
12 views

brownie deploy using script error

PS C:\Users\Rakshit_Kumar_Singh\Desktop\brownie-learn> brownie run .\scripts\deploy_testnet.py Brownie v1.20.0 - Python development framework for Ethereum File "C:\Users\Rakshit_Kumar_Singh\...
Abc def's user avatar
1 vote
1 answer
32 views

I need help coming up with a code solution of a change I want to make to my stable coin project

so can someone please help me come up with a solution to implement the change I want to make to my stable coin project please? The system is designed to be as minimal as possible, and have the tokens ...
Dylan Katsch's user avatar
0 votes
0 answers
36 views

How I can sent ETH using alias 0xEe address?

How do I send ether through a smart contract using the 0xE alias for it in transactions from the UI? I've been sitting and racking my head for the fifth day. Here's an example of my function, tell me ...
Pavlo Konchych's user avatar
0 votes
0 answers
15 views

Account Balances Not Updating When Interacting with Smart Contract on Private OpenEthereum Network

Context: I have set up a private Ethereum network using OpenEthereum, configured with four nodes: a validator node, two non-validator nodes, and an RPC node. This setup is part of a project for a ...
Martin's user avatar
  • 1
1 vote
2 answers
67 views

msg.sender vs owner

Is it bad practice (or risk prone) to use owner instead of msg.sender when checking actions initiated by a caller? ...even if I check that owner is authorized by msg.sender to do the mentioned actions?...
dNyrM's user avatar
  • 936
0 votes
1 answer
19 views

How state variable change affects blocks in blockchain?

When a state variable is updated, is a new block mined with the new value and then spread over the network? or the value is overwritten. I know that once the block is mined it can never be changed but ...
Niladri's user avatar
  • 11
0 votes
1 answer
26 views

how can I store more than ten thousands address in solidity array

i am trying to make lottery contract, and expected applicants will be about 2~30,000. i want to set those applicants by this code. function setApplicants(address[] memory _applicants) public onlyRole(...
rrrrssss's user avatar
0 votes
1 answer
34 views

Possible to increment token id automatically for mint function?

Currently I send always a new tokenId to the mint function. There is also a check if the tokenId already has been minted. Would it be possible to automatically increment the tokenId? So I dont have to ...
aronsommer's user avatar
0 votes
0 answers
31 views

im building an auto crypto profit generator. i need some help making it work right. (incomplete code attached)

to start with, im already deep into the process of creating this thing, ive already spend $1000 on this contract (dont feel bad for me, thats one paycheck and i needed to learn the deploying and ...
SoullessScythe's user avatar

1
2 3 4 5
95