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

Loop contract deploy function for each different wallet using nodejs

How to repeat contract deploy function for next wallet(privatekey2,privatekey3)? I am using the following code but running only 1 wallet (PRIVATEKEY1) and the function stop, I want each wallet to create one contract. const Web3 =…
Mansyur
  • 1
  • 2
0
votes
0 answers

Source "operator-filter-registry/src/DefaultOperatorFilterer.sol" not found: File import callback not supported

can you please help me how to solve this error? I tried using the ./ for the path but it didn't worked. enter image description here
0
votes
1 answer

Buy custom token from eth (in test net)

I want to swap ETH with my coin. This is my Exchange contract: pragma solidity >=0.8.2 <0.9.0; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract Exchange { ERC20 public…
Adri HM
  • 2,314
  • 2
  • 17
  • 30
0
votes
1 answer

Get signer of a contract inside a function

I need to somehow transfer APT coins to another account from smart contract itself. Here is an issue, because transfer function needs &signer of an sender and that's why I can not send it from contract. Is there any chance that I can send APT…
AndRockSYS
  • 11
  • 2
0
votes
1 answer

Nonfungiblepositionmanager Contract Interaction message: 'Error: Transaction reverted without a reason string', How to Solve it?

In the hardhat local fork, I created the pool by interacting with factoryv3 in javascript. I approve the tokens to nonfungiblepositionmanager. I check allowance and it’s all good. I have enough funds But when I try to add liquidity it don’t work…
jayyyo
  • 109
  • 4
0
votes
0 answers

Chainsafe Gaming web3.unity Calling a function Without metamask interaction

I am making a WebGL game in unity in which two player can play match with each other. At the end of the game winner be decided by game. My game will call declareWinner function of my contract that you can see below. The issue is that it will always…
0
votes
1 answer

Why am I unable to send ether to other contract with 'send' or 'transfer' function?

Why send() and transfer() doesn't work? I just learned solidity and I'm curious about the methods of sending ether. I wrote two smart contract in solidity and deployed them with Remix IDE(Environment is Remix VM(Merge)). I tried to send 1 ether from…
pwnstar
  • 13
  • 3
0
votes
0 answers

Can I get transacntion hash of any triggered function of smart contract in solidity?

Essentially, my goal is to obtain the transaction hash, which is a unique identifier used to check the status of a transaction on a blockchain explorer, such as etherscan.io. I want to obtain this hash for any trigger function in a smart contract. I…
0
votes
1 answer

application deploys but does not load, console log showcases an error

I am trying to deploy my application but an error keeps stopping the initialization, I have tried some solutions but none has worked link to the repo for codes - https://github.com/Demiladekusa/Evoting-dapp this is the error I keep getting I am…
0
votes
1 answer

Fold or map function & pass in list as parameter Clarity Smart contracts

I have a question regarding the fold or map function and how they can be used. This, as well as passing in a list. how can the fold or map function be used to run another function more then once? How can i pass in a list as a parameter to a…
0
votes
1 answer

Question regarding this notice in Clarity extension

Question regarding this notice in Clarity extension v0.7.1 (define-public (lock (new-beneficiary principal) (unlock-at uint) (amount uint)) Returns: 'source of untrusted input here' (var-set beneficiary (some new-beneficiary)) Returns: 'use of…
0
votes
1 answer

Print current value of missing variables during manual testing - Clarity Smart Contract

Is it possible to print the current value of variables during manual testing to see how they are behaving? I mean during manual testing in the clarinet console or do I have to add something like (ok variable_name) at the end of the function?
0
votes
0 answers

Getting compilation error when upgrading to V3 uniswap contracts. = No return param name given: liquidity

here is the error I am getting: Internal exception in StandardCompiler::compile: /Users/distiller/project/libsolidity/interface/Natspec.cpp(201): Throw in function static Json::Value solidity::frontend::Natspec::extractReturnParameterDocs(const…
0
votes
1 answer

Unable to swap Tokens for Tokens Web3Py

I am trying to swap WETH for USDC using SushiSwap Router with Polygon. This is my current code: import web3 from web3.middleware import geth_poa_middleware import time def swap(node, account_address, pvt_key, contract_address, contract_abi,…
giacomomaraglino
  • 177
  • 2
  • 14
0
votes
1 answer

Clarity Smart contract function loop if error

can someone help me understand why my 'get-employee-2nd...' function seems to loop if the check index u1 and returns (ok none) for other indexes. (define-public (get-employee-2nd-club- name-from-tuple) (let ( …