Questions tagged [smartcontracts]

Smart contracts also known as a smart property are computer protocols that facilitate, verify, or enforce the negotiation or performance of a contract, or that make a contractual clause unnecessary.

3050 questions
0
votes
0 answers

Interoperability between two networks (test and live networks interactions)

Let's assume that I want to test a local contract that interact with a live contract or protocol, can a test network communicate the live one? For example, If I have an NFT on Ethereum and would like to test the interoperability between my contract…
Pedro
  • 61
  • 1
  • 1
  • 4
0
votes
1 answer

smart contract undefined in thirdweb

I am using thirdweb-dev/react to communicate with smart contract but the issue is it is giving me the contract undefined in my code with this error. could not resolve metadata for contract at 0xE4ffC734cfa5f3E33f9Da662D0e562155Ad37c6C Code for…
0
votes
0 answers

Deploy contract on polygon, success on mumbai but fail on mainnet

I have deployed the same contract (created with openzepplin wizard) using hardhat on the testnet and the mainnet of Polygon. However, the result is different and something seems to go wrong when I deploy on the mainnet. Here you can see the contract…
Kevin
  • 143
  • 8
0
votes
0 answers

Problem with approving Uniswap to spend WETH on Ethereum blockchain

I am trying to approve the uniswap router to spend a certain amount of WETH. I have written a script that does this for me and it seems to work on the BSC (WBNB and PancakeSwap router). However, now I try to do it on the Ethereum blockchain (WETH…
Westel
  • 1
0
votes
1 answer

Is it possible to run Slither without Hardhat?

I have a Foundry project, and I prefer to not install Hardhat. Would it be possible to run Slither as specified in the Foundry Book? Currently, if I run at the root folder of my Foundry project: slither . I get the error: $ slither . …
gagiuntoli
  • 475
  • 5
  • 13
0
votes
1 answer

Any possibility to return an investment from scam smart contract?

Recently I bought a token from pancakeswap. After a few hours I realized it was a scam - it's new, there are only buy operations, and no sell operations (almost). Of course, I cannot swap it back (it's possible only via Dextools, but there is a Seel…
0
votes
0 answers

requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.190.1', port=7545): Read timed out. (read timeout=10)

I used Ganache to build a test chain locally, and deployed the smart contract code on this chain. w3 = Web3(Web3.HTTPProvider("HTTP://192.168.190.1:7545")) When I upload very small lists(test CEDB len = 12), the smart contract executes…
0
votes
0 answers

How to implement multi-sig feature for dapp running on zksync network?

I'm building a Dapp that runs on Zksync network. and I need to implement multi-sig function but Gnosis Safe doesn't support zksync network. Can anyone advise how I can implement it on zksync network? Thanks I was tried to implement it using Gnosis…
0
votes
1 answer

Getting an error in my solidity code : CompileError: ParserError: Expected identifier but got 'event'

I am trying to develop a smart contract for ticket booking system. I am getting the following error CompileError: ParserError: Expected identifier but got 'event' --> project:/contracts/TicketBooking.sol:28:22: | 28 | Event memory event =…
0
votes
0 answers

Facing error while deploying contract on Sepolia test network

I am new to Blockchain and I was recently working on a smart contract, which deploys perfectly fine in remix IDE. But when I tried deploying it via Truffle over Sepolia test network, it failed. I previously followed a step-by-step tutorial for the…
Fleur07
  • 1
  • 1
0
votes
0 answers

How to extract ABI from hardhat project that contains all inherited contracts in the same file?

I have a hardhat project that uses OpenZeppelin and puts in some custom SmartContracts using OZ. Multiple contracts are inheriting into others, like A inherits from B, C B inherits from C, D, E, F C inherits from G, H, I However, hardhat created an…
delete
  • 18,144
  • 15
  • 48
  • 79
0
votes
1 answer

Error "execution reverted: ERC721: invalid token ID" when trying to create NFT

I am trying to create a smart contract that gives the user an NFT in exchange of some MATIC tokens in the Polygon testnet. I am using Remix IDE and the environment used for teh deployment is the "Injected Provider - Metamask". When I deploy the…
Frenom
  • 21
  • 4
0
votes
1 answer

"jsonrpc":"2.0","error":"execution reverted" in getPrice function

make 1NFT free -> after nft per .0022 sale function so I made this get price function, function getPrice(address _sender,uint256 _quantity) public view returns (uint256){ uint256 _userFreeAmount = maxFree.sub(_numberMinted(_sender)); //can free…
ZO eth
  • 1
  • 1
0
votes
0 answers

Ethereum in Remix contact. Withdrawal doesn't work

I opened a smart contract on Remix and sent some eth on it. Now that I want to use the withdrawal option to send the Eth back to my Metamask the gas estimation error tells me that I don't have enough eth for profitable frontrunning. I still went on,…
Xavier
  • 1
0
votes
1 answer

Unit Test Clarity Language

I have a question on about Unit Test While I putting some code on Tx.contractCall in the .ts file, what types should I choose if I want to put contract name? Tx.contractCall( ""dex"", ""provide-liquidity"", …