calling a payable function with parameters
See original GitHub issuei’m struggling to find an example to use a payable function with parameters.
let’s say i’ve an function in my Smart Contract:
function doSomething(address[] _adresses, address[] _groups, uint[] _percentages)
public
payable
returns(address) {
How do i call this SC and send ethers to it & pass parameters and get the return value?
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to call a payable function with multiple parameters using ...
This is how you can call payable contract method along with some ether and sender. c.deposit(420, { value: 10000000000000000000, ...
Read more >Call a Payable Solidity Function Using Ethers - vsupalov.com
A simple way to call a payable Solidity function, either from your tests or your dApp code. ... The ALL, OTHER, PARAMETERS part...
Read more >Solidity calling payable function with arguments with hardhat ...
ethers.utils.parseEther returns object with BigNumber in it.. you have to convert it into string before using it in the test.. Eg:
Read more >Calling payable contract method with arguments #563 - GitHub
I'm trying to execute trades on uniswap but I can't find how to call a payable method with arguments. I'm finding the documentation...
Read more >Contracts — Solidity 0.8.17 documentation
A contract can have multiple functions of the same name but with different parameter types. This process is called “overloading” and also applies...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @ungaro
First of all you should understand that if the function is mutating (like one above) you are not guaranteed that a return value will in fact be the same when you check for it and when transaction executes.
I recommend you to go through the tests of web3swift to check the examples.
Sincerely, Alex
It seems that the issue is resolved, so its closed