-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send ETH to contract address. #259
Comments
Please have a look documentation section about this case: let value: String = "1.0" // In Ether
let walletAddress = EthereumAddress(wallet.address)! // Your wallet address
let toAddress = EthereumAddress(toAddressString)!
let contract = web3.contract(Web3.Utils.coldWalletABI, at: toAddress, abiVersion: 2)!
let amount = Web3.Utils.parseToBigUInt(value, units: .eth)
var options = TransactionOptions.defaultOptions
options.value = amount
options.from = walletAddress
options.gasPrice = .automatic
options.gasLimit = .automatic
let tx = contract.write(
"fallback",
parameters: [AnyObject](),
extraData: Data(),
transactionOptions: options)! |
Hi Please check below code
|
thanks @ravi-ranjan-oodles for the detailed comments. It would be great if you can improve the documentation in this way. I would be happy to make a bounty for this task - just let me know if you are interested in (or make a PR)! 👍 |
Sure @skywinder, I am Interested in updating the Documentation. Please let me know at https://github.com/veerChauhan id |
Hi, I have updated the documentation and made a pull request with the name
veer chauhan.
Hope for a bounty :D for this coming year :D
Thanks
*Ravi Ranjan**Sr. Associate Consultant - Development*
*_______________________________________________________*
<https://www.oodlestechnologies.com/>
+91 9711734151live:.cid.ba8be0ea7047f0b5www.oodlestechnologies.com |
www.oodlesmarketing.com | www.oodlesstudio.comUnit No. 159, Tower B1, Spaze
I-Tech Park, Sector 49, Sohna Road, Gurgaon, India, 122018[image: Facebook
icon] <https://www.linkedin.com/in/rranjanchchn/> [image: Youtbue icon]
<https://www.facebook.com/OodlesTech> [image: LinkedIn icon]
<https://twitter.com/ciggret_hai>
…On Thu, Dec 31, 2020 at 12:48 PM Petr Korolev ***@***.***> wrote:
thanks @ravi-ranjan-oodles <https://github.com/ravi-ranjan-oodles> for
the detailed comments.
It would be great if you can improve the documentation in this way. I
would be happy to make a bounty for this task - just let me know if you are
interested in (or make a PR)! 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#259 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APADMZHYVF5VRMPXIZGOTYTSXQQVJANCNFSM4MG4W2QA>
.
|
Hi,
I need to send ETH to contract address..But am getting issue as failed to fetch gas estimate.
My code:
The text was updated successfully, but these errors were encountered: