Questions tagged [send]
The send tag has no usage guidance.
22
questions
2
votes
1
answer
25
views
How can I send an NFT automatically when someone clicks on the claim NFT button?
I am working on a quiz site but I want the winners and participants to receive NFT at the end of the quiz. But I do not want to manually sign the transactions. I understand I can use ethers.js and use ...
0
votes
1
answer
29
views
Coinbase / Web3 - how are they connected? Where is my balance on Web3
I am brand new. I created a Coinbase Account and started investing. I heard someone say something about web3. I don't know what this is, but I think i have money in there. As I'm still waiting to be ...
0
votes
1
answer
22
views
Does a blank space matter? - (bool sent,)
In terms of sending ETH from a contract, if only the boolean is needed and the data gets omitted, I always see two different versions.
Some people write it with a blank space (bool sent, ) and some ...
1
vote
2
answers
40
views
Can a simple ether refund without storage checks be hackable(reentrancy attack, ...)?
As the title says, I am wondering if the following ether refund(using .call) can be hackable.
I am not entirely sure no reentrancy attack can be performed in it, but I think so since I am not updating ...
1
vote
1
answer
50
views
Recommended way to remove ETH balance from a contract?
There are multiple methods to withdraw the ETH balance of a contract to the owners' wallet:
function withdrawal() external {
payable(owner).transfer(address(this).balance);
}
function withdrawal()...
0
votes
1
answer
67
views
Is "msg.sender.token1().gas(msg.gas)" too low-level call?
Context :
I decompiled this contract(https://bscscan.com/address/0x5cb11ce550a2e6c24ebfc8df86c5757b596e69c1#code) which is the attacker's smartcontract that hacked MEV-bot. You can check the ...
1
vote
1
answer
82
views
How can I verify that a function (IERC777.send) is executed successfully if it doesn't return anything but only emits an event
In a solidity smart contract function, I want to verify that an IERC777.send function has executed successfully before proceeding. Unfortunately, IERC777 has no bool return that I could use in this ...
0
votes
2
answers
314
views
What is causing this invalid opcode error when I call the transfer function?
I am working through the process of developing a simple ERC-20 token to learn more about smart contract development. I am running into an issue on my coin sale contract, however. When I wish to end ...
1
vote
1
answer
377
views
Possible to send ether to another smart contract without function call?
I've created a contract, let's call it Contract A that mints an NFT when it receives .001 Ether.
This is the receive() function in Contract A:
receive() external payable {
require(
...
3
votes
2
answers
1k
views
Front End: Transfer (send) your NFTs (ERC-721) using Ethers.js or Wagmi.sh
I'm a front-end dev getting my feet wet in the crypto nft space.
I built a simple site for displaying all the NFTs in your wallet. Users can connect to the page using Rainbowkit (built on top of WAGMI,...
3
votes
1
answer
1k
views
How to send ether to a contract (even if the contract doesn't implement receive or fallback functions)? [duplicate]
If the contract doesn't implement the receive or fallback function as payable, it can't receive funds?
0
votes
1
answer
69
views
How to send from a contract to a personal wallet
// SPDX-License_Identifier: MIT
pragma solidity >=0.6.6 <0.9.0;
//2.56
//import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "hardhat/console.sol&...
0
votes
1
answer
97
views
Send Ether from SC to EAO
I came across many blogs saying the defacto standard to send ether from one contract to another and why one is better than the other. However, what is the best practice for sending ether from contract ...
1
vote
2
answers
3k
views
How to send a value to smart contract function using meta mask and web3.js?
I tried to follow a tutorial https://livecodestream.dev/post/interacting-with-smart-contracts-from-web-apps/
I was able to retrieve the number via call function, but was not able to update the number ...
0
votes
2
answers
724
views
Transferring an NFT via MetaMask
Im onto developing my own NFT project.
Im developing with the Truffle Suite and Ganache.
I can mint the NFT to my address, but whats wondering me: I cant send the NFT because the "send" ...
0
votes
1
answer
36
views
Sending balance to contract fails
I'm playing ethernaut, the king of the hill level. I made a practice target contract and an attacking contract. I want to send value to the attacking contract (this works) then I want to send the ...
0
votes
1
answer
520
views
What is the "bytes memory" in (bool success, bytes memory) = some_address.call{value: some_amount}("")
I understand that the success tells if the receive/fallback methods returned successfully but what does the memory give?
0
votes
0
answers
830
views
How to send BNB (or other networks) with web3 on a dapp?
So, I tried the many examples found around but I never manage to get it working.
I have this snippet:
async function pay(cost) {
code = 0
message = "Please approve the tx"
...
0
votes
0
answers
147
views
Calling a non-payable function that mutates state? (web3)
With web3, you can call read-only functions using 'call()' (eg, balanceOf), and functions that mutate state with 'send({from: adr, value: 10})'
I'm able to call payable and non-payable functions fine, ...
0
votes
1
answer
1k
views
Error calling web3.eth.Contract send() function gives error: Method not found
I just deployed a contract and wants to access it using web3 to read and write data.
I have web3 working, passed the contract Address and ABI and I can access the contract and Read Data using:
...
0
votes
1
answer
350
views
EVM:out of gas while executing send
I want to consider a scenario, lets suppose that a contract performs a transfer using send. At this point, out of gas occurs and send returns -1. Now the contract has no gas, and send does not revert,...
0
votes
1
answer
506
views
Error: Member "send" not found or not visible after argument-dependent lookup
I am trying to compile the following smart contract:
pragma solidity ^0.5.1;
contract Governmental{
uint constant TWELVE_HOURS = 12;
function lendGovernmentMoney ( address buddy ) public ...