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.
Questions tagged [smartcontracts]
3050 questions
0
votes
0 answers
How to verify the contract(Smart) on Etherscan.io with the terminal code?
Been several days trying to verify my erc-20 smart contract on etherscan via the terminal with the hardhat command and keeps rejecting my petition
Before trying to do it with the terminal, I went to etherscan.io to the verify and publish page…
0
votes
0 answers
Error: Returned error: VM Exception while processing transaction: invalid opcode
this is the server.js file that calls the voting contract
i don't know where is the problem and how to solve, i tryed too much solutions but no one helps
let web3;
if (typeof web3 !== 'undefined') {
web3 = new…

Gehad Elhawary
- 1
- 1
0
votes
0 answers
How to know userFeePercentage (consume_user_resource_percent) when calling smart-contract?
I need to calculate energy fee for TRC20 transfer.
I can estimate needed energy(energy_usage_total) for transfer and it's price in TRX.
ESTIMATED ENERGY: 16482
CONSTANT CONTRACT: 14650
How do I calculate the amount of energy (energy_usage) that will…
0
votes
2 answers
I'm getting the error Error: Expected identifier but got '(' on line 44 of my solidity smart contract in vs code
I have a constructor function in my solidity contract file and on line 44 it's giving me an error in vs code Error: Expected identifier but got '('
Here's my contract so far
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// INTERNAL IMPORT…

Avinash Gupta
- 1
- 1
0
votes
0 answers
Getting a "BuyGasFailure" error when fetching k: account balance using @kadena/chainweb-node-client
I'm encountering a "BuyGasFailure" error while trying to fetch the balance given a k: account a and contract address using the @kadena/chainweb-node-client v0.2.5 library. I'm using the get-balance function with the appropriate contract address and…

DominusMendacium
- 1
- 1
0
votes
1 answer
Smart contract who automatically forwards USDT to an specific address
I have deployed a smart contract that simply forwards the USDT it receives to a specific hard coded address, but it is not working. The USDT just stays at the smart contract wallet and does not forward.
I sent 1 USDT to the smart contract and I was…

Manuel GPF
- 1
- 1
0
votes
1 answer
How to interact with other smart contracts using web3js?
In the doc of web3.js I can only find use case where interaction with your own smart contracts are described. But how do I interact with other smart contracts on the blockchain?
This is easily possible through blockchain explores like etherscan:…

schmark
- 53
- 1
- 4
0
votes
1 answer
What happens if there is not enough crypto money to fulfill a smart contract?
Let's say a smart contract says: "In 365 days, X should send 0.005 Crypto to Y".
If the D-day X doesn't own enough Crypto to fulfill the contract, what will happen?

acmoune
- 2,981
- 3
- 24
- 41
0
votes
1 answer
Smart Contract's ABI has uint256, but I get error `Type 'number' is not assignable to type 'BigNumber'
This is the first time I work with web3 api, so I am totally lost. I use wagmi hook with react, trying to call a function from smart contract:
const id = 1;
const index = 1;
const { data, error, isError, isLoading } = useContractRead({
…

MrOwl
- 69
- 1
- 9
0
votes
1 answer
Deployed contract event listening not working
What could be causing me to not receive events from my deployed contract on the Binance Smart Chain (BNB) testnet and the Aurora testnet, even after trying different nodes? How can I troubleshoot this issue and ensure that I am properly connected to…

Marou M
- 1
- 1
0
votes
1 answer
|I'm Having problem deploying my smart contract
i'm using infura and i'm creating a smart contract that can get the total balance of token on a wallet and can transfer token balance
This is my Transactions.sol
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import…
0
votes
0 answers
Error: cannot estimate gas; transaction may fail or may require manual gas limit - while deploying contract
This is my contract which is called by an API to deploy the contract. The wallet has a lot of test ETH (goerli). Basically, the User is trying to register to my app and this contract has to be deployed when he registers and clicks on the submit…

Aditya Krishnan Mohan
- 162
- 2
- 13
0
votes
0 answers
How do I call a smart contract with additional fees in web3py?
I am trying to call a smart contract (bridge) via web3py. The bridge function has an additional fee that can be estimated by calling another contractfunction.
When building the transaction vie web3py it seems as there is never enough gas to satisfy…

Suberi
- 1
0
votes
0 answers
Get Request in a Smart Contract from an API
I am trying to fetch data from an API. I have followed all the necessary steps required according to chain link docs.
function requestFirstId() public returns (bytes32 requestId) {
Chainlink.Request memory req = buildChainlinkRequest(
…
0
votes
1 answer
Is there a way Bytecode matches with etherscan verification process validating Smart Contract
Trying to validate a Smart Contract but keep getting ByteCode error as Etherscan can't match the correct one.
In Solidity everything works perfect but unable to validate in Etherscan.
Contract address:…

Dank1212
- 1
- 3