New answers tagged

1 vote

How can I automate the crypto payments using smart contract?

You can automate crypto payments with something like Gelato Ops.
user avatar
1 vote

How can I automate the crypto payments using smart contract?

I'm assuming from the question you want to know if there is a way to fund a contract so it performs as expected, because when it runs out of funds the program stops? Disclaimer: I am part of Chainlink ...
user avatar
0 votes

Smart contract events are being emitted multiple times with exactly the same data using Ethers JS

is that your component rendering multiple times? I am facing the same issue but it happens only two times since my component is rendering two times. I am trying to find a better way to do this.
user avatar
  • 21
0 votes
Accepted

Interacting with one smart contract to another ? , Multiple smart contract interaction ? , One contract calls to another contract ? Solidity

Ok, So to solve this problem, Solidity not only provides for inheritance to invoke contracts in one another, It also provides a cool feature that helps devs/coders to invoke a contracts function from ...
user avatar
1 vote

How to spend a specific amount of ether and send it to the smart contract (from msg sender)?

The sender must attach the required amount of ETH to the transaction. mywallet.sendTransaction({to: contractAddress, value: "1000000000"}) Contract will then be receiving this amount as ...
user avatar
  • 1,236
1 vote

Why am I failing to interact with a smart contract I found on Etherscan.io?

That's because nothing is deployed in your Ganache's address 0x2929E21109901461659C0F26aD7f0e7633Ea6539. You need to execute this on mainnet, to receive an answer from that contract.
user avatar
  • 1,236
0 votes

Smart contract using WETH

WETH is "Wrapped ETH". WETH by itself does not provide the kinds of functions you are talking about. However, generally speaking, once the ETH is wrapped in an ERC20 wrapper (such as WETH), ...
user avatar
0 votes

Locker smartcontract in solidity withdraw function error

It should be something like this: function claim() public { // Get the Lock for the requester Lock storage lock = tokenLock[msg.sender]; // Check timestamp require(lock.endtime >= ...
user avatar
  • 29.3k
0 votes

Can we have communications in a web-based dapp?

Arbo94, The concept of oracles is for querying data from the off-chain world and executing smart contract functions from this data. It's not to trigger external services like sending email, for ...
user avatar
1 vote
Accepted

How to retrieve multiple values returned from solidity with ether.js?

const result = await contractInstance.yourFunction(); const {0: variable_1, 1: variable_2} = result; Reference: https://blockheroes.dev/js-read-multiple-returned-values-solidity/ Hope it helps.
user avatar
  • 26
1 vote

Member "push" not found or not visible after argument-dependent lookup

The array you declare here : lmnop [] public qwerty ; is of type lmnop[] and has a name / identifier of qwerty. Simply change your addqwerty function to use the actual name of the array instead of ...
user avatar
  • 4,934
0 votes

NFT Sent to Smart Contract

I don't think that you can. But that would have reverted if you would have used the safeTransferFrom function as this contract doesn't appear to implement the IERC721Receiver. Did you used ...
user avatar
  • 149
1 vote

Where to mint tokens from

The contract doesn't have a public mint function so you won't be able to mint more tokens than those minted during deployment. The minted tokens were in the deployer address. You can transfer them to ...
user avatar
  • 29.3k
0 votes

Cannot add JSDOC comments in .sol file in VS Code. Any help?

Doc for Solidity is a bit different - /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the ...
user avatar
  • 1,236
0 votes
Accepted

Is it a problem If I keep my nft meta data ipfs link public?

IPFS just describes the token's essential properties, nothing secret there. As long as the private key of your deploying wallet is hidden safely, you should be OK. Verifying your smart contract will ...
user avatar
  • 1,236
1 vote
Accepted

How can i set the values of mapping which is inside of a struct?

If you're using a mapping that store customerId struct, you can see this smart contract example: // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; contract Test { struct customerId{ ...
user avatar
  • 1,195
0 votes

How can I deploy my smart contract with someone else's wallet?

Have the developer teach you how to deploy. If they developer deploys using their wallet then now or later, that developer will be able to claim they are the "owner" of the contract and ...
user avatar
0 votes

Send erc20 token with pay another address

As you know all coin transfer functions regard as transaction and all transactions need gas fee
user avatar
0 votes

how to use function approve() and function transferfrom() in a dapp?

Firstly, you need to implement approve button in the UI, when user clicks it, approval should be called like this: IERC20(_tokenAddress).approve(ADDRESS_OF_YOUR_DAPP, amount) Where _tokenAddress is ...
user avatar
  • 26
0 votes

Is there a way to make an automatic redistribution smart contract?

For your ERC20, you can make use of the IERC20 interface. Import the IERC20 interface if you have the file. You can check openzepellin's library for the file. Enclose your erc20 contract address in ...
user avatar
0 votes

Is there a way to make an automatic redistribution smart contract?

Yes you can do this with something like Gelato Ops.
user avatar
0 votes

Is there a way to make an automatic redistribution smart contract?

You can achieve this natively (for utility tokens such as ETH) with the fallback function receive - see docs here, although you may encounter issues due to the default gas limit for transfers. For ...
user avatar
  • 662
0 votes

how to use function approve() and function transferfrom() in a dapp?

When you call approve(), you are allowing a specified address to take a certain amount of tokens from your address. So in your case, I guess you would have to call it twice. (Once to allow contract ...
user avatar
  • 530
0 votes

Who pays funds for Marketing, Giveaways for Decentralized Company like Binance?

First, Binance is not a decentralized exchange but rather a centralized exchange just like Coinbase, FTX, etc. So Binance of course has a budget to pay for all their marketing efforts from maybe the ...
user avatar
  • 38
0 votes
Accepted

"The called function should be payable if you send value and the value you send should be less than your current balance." error for non-transfer func

You must to change these for conditions in SetAllowance() function: for (uint i=0; i <= AllFamilyAcc.length; i++){ ... } for (uint i=0; i <= AllAppSpendersAcc.length; i++) { ... } in this ...
user avatar
  • 1,195

Top 50 recent answers are included