-
Notifications
You must be signed in to change notification settings - Fork 93
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
Token Transfer #145
Labels
Comments
q9f
added
bug
Something isn't working
documentation
Improvements or additions to documentation
labels
Sep 26, 2022
Yes, this is something we need to work on for sure! |
@gouravnaik have you been able to get past this issue? |
I am generating data and then send the transaction. Steps I am using currently @skeevis
|
Should be addressed in #191 - I'll make sure to write some tests. |
q9f
added
spec-tests
and removed
documentation
Improvements or additions to documentation
labels
Dec 29, 2022
Confirming this should be fixed in #191 geth = Client.create "/tmp/geth.ipc"
# => #<Eth::Client::Ipc:0x0000557f2508dc80 @gas_limit=21000, @id=0, @max_fee_per_gas=0.4269e11, @max_priority_fee_per_gas=0.101e10, @path="/tmp/geth.ipc">
erc = Contract.from_file(file: "spec/fixtures/contracts/erc20.sol")
# => #<Eth::Contract::ERC20:0x0000557f2517b160>
geth.deploy_and_wait(erc, "FooBar", "FOO")
# => "0x582738E45b3Ed823709F7A251352f55E4a6f146E"
erc.address
# => "0x582738E45b3Ed823709F7A251352f55E4a6f146E"
geth.call(erc, "name")
# => "FooBar"
geth.call(erc, "symbol")
# => "FOO"
geth.call(erc, "decimals")
# => 18
geth.transact_and_wait(erc, "mint", geth.default_account.to_s, 1 * Unit::ETHER)
# => "0x5246c13331ed7868e623e2a442879891e4b6e6170f2d7091fa7f56962cd647ec"
geth.call(erc, "balanceOf", geth.default_account.to_s)
# => 1000000000000000000
adr = Key.new.address.to_s
# => "0x49eB8f597De9B22D9141392d287BAfDc80994D51"
geth.transact_and_wait(erc, "transfer", adr, 1)
# => "0xf13020c546dffaac15b3e804b61db183a47947c860aad9418cc894822d4f1fa1"
geth.call(erc, "balanceOf", geth.default_account.to_s)
# => 999999999999999999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying to transfer some of my tokens to another address and here are the steps I followed.
But getting an error
I feel the issue is in
lib/eth/abi.rb
in line 52The text was updated successfully, but these errors were encountered: