learnforpractice / pyeoskit

Python Toolkit for Eos
MIT License
16 stars 9 forks source link

Help! #5

Closed Verstor closed 2 years ago

Verstor commented 2 years ago

I'm quite a beginner and I need help with my code. I want to write a script that will send 3 actions in order to buy some drop on neftyblocks.com . I have a raw transaction in the anchor. I tried to write using your examples, but I couldn't do anything:( Here is my raw transaction in anchor: Here is my code (I erased the private key): I will be very glad if someone helps me

learnforpractice commented 2 years ago

Hi, there. The following code should work.

actions = [ [ "eosio.token", "transfer", { "from": "11111verstor", "to": "neftyblocksd", "quantity": "0.97000000 WAX", "memo": "deposit" }, { "11111verstor": "active" } ], [ "neftyblocksd", "claimdrop", { "claimer": "11111verstor", "drop_id": 92463, "amount": 1, "intended_delphi_median": 0, "referrer": "NeftyBlocks", "country": "RU", "currency": "8,WAX" }, { "11111verstor": "active" } ] ] eosapi.push_actions(actions)

On Jan 18, 2022, at 3:07 PM, Verstor @.***> wrote:

I'm quite a beginner and I need help with my code. I want to write a script that will send 3 actions in order to buy some drop on neftyblocks.com . I have a raw transaction in the anchor. I tried to write using your examples, but I couldn't do anything:( Here is my raw transaction in anchor: raw transaction in anchor.txt https://github.com/learnforpractice/pyeoskit/files/7886881/raw.transaction.in.anchor.txt Here is my code (I erased the private key): code.txt https://github.com/learnforpractice/pyeoskit/files/7886898/code.txt I will be very glad if someone helps me

— Reply to this email directly, view it on GitHub https://github.com/learnforpractice/pyeoskit/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPS3XUT4T6LC7Y2RNVLUWUGSPANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.

Verstor commented 2 years ago

Thanks for your answer, but it gives an error: An exception occurred: Exception *errors.errorString abi struct not found for neftyblocksd::claimdrop

learnforpractice commented 2 years ago

https://eos.greymass.com https://eos.greymass.com/ is a EOS network API node url, change it to a WAX network node API url please.

You can find available urls from the following links.

https://wax.eosio.online/endpoints https://wax.eosio.online/endpoints

On Jan 18, 2022, at 5:52 PM, Verstor @.***> wrote:

Hi, there. The following code should work. actions = [ [ "eosio.token", "transfer", { "from": "11111verstor", "to": "neftyblocksd", "quantity": "0.97000000 WAX", "memo": "deposit" }, { "11111verstor": "active" } ], [ "neftyblocksd", "claimdrop", { "claimer": "11111verstor", "drop_id": 92463, "amount": 1, "intended_delphi_median": 0, "referrer": "NeftyBlocks", "country": "RU", "currency": "8,WAX" }, { "11111verstor": "active" } ] ] eosapi.push_actions(actions) … <x-msg://2/#> On Jan 18, 2022, at 3:07 PM, Verstor @.***> wrote: I'm quite a beginner and I need help with my code. I want to write a script that will send 3 actions in order to buy some drop on neftyblocks.com . I have a raw transaction in the anchor. I tried to write using your examples, but I couldn't do anything:( Here is my raw transaction in anchor: raw transaction in anchor.txt https://github.com/learnforpractice/pyeoskit/files/7886881/raw.transaction.in.anchor.txt https://github.com/learnforpractice/pyeoskit/files/7886881/raw.transaction.in.anchor.txt Here is my code (I erased the private key): code.txt https://github.com/learnforpractice/pyeoskit/files/7886898/code.txt https://github.com/learnforpractice/pyeoskit/files/7886898/code.txt I will be very glad if someone helps me — Reply to this email directly, view it on GitHub <#5 https://github.com/learnforpractice/pyeoskit/issues/5>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPS3XUT4T6LC7Y2RNVLUWUGSPANCNFSM5MGL3GJQ https://github.com/notifications/unsubscribe-auth/AHPJSPS3XUT4T6LC7Y2RNVLUWUGSPANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.

Not working :( An exception occurred: Exception *errors.errorString abi struct not found for neftyblocksd::claimdrop

— Reply to this email directly, view it on GitHub https://github.com/learnforpractice/pyeoskit/issues/5#issuecomment-1015243295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPT3AXUH7AZA2D7B4ODUWUZ5RANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

Verstor commented 2 years ago

Thank you so much, its working)

learnforpractice commented 2 years ago

Your account private key has been compromised in code.txt. Please change your account owner key as soon as possible.

On Jan 18, 2022, at 7:42 PM, Verstor @.***> wrote:

Thank you so much, its working)

— Reply to this email directly, view it on GitHub https://github.com/learnforpractice/pyeoskit/issues/5#issuecomment-1015330956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPX23FBJ6FLUJQ6V4I3UWVG2DANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

learnforpractice commented 2 years ago

Sorry, not owner key, but active key. Don’t expose your private key to anyone you don’t trust.

On Jan 18, 2022, at 7:59 PM, Ron Shek @.***> wrote:

Your account private key has been compromised in code.txt. Please change your account owner key as soon as possible.

On Jan 18, 2022, at 7:42 PM, Verstor @. @.>> wrote:

Thank you so much, its working)

— Reply to this email directly, view it on GitHub https://github.com/learnforpractice/pyeoskit/issues/5#issuecomment-1015330956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPX23FBJ6FLUJQ6V4I3UWVG2DANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

Verstor commented 2 years ago

Ok,thanks. (I'm going to change my keys now) I have one more question. what is the syntax for asset_ids? I write: "asset_ids": ["1099605209578"] and this not working Error: *errors.errorString strconv.ParseUint: parsing "\"1099605209578\"": invalid syntax

learnforpractice commented 2 years ago

It’s off-topic, but I think this is what you want:

"asset_ids": [1099605209578]

You can find the ABI definition with:

eosapi.get_abi('neftyblocksd’)

On Jan 18, 2022, at 8:17 PM, Verstor @.***> wrote:

Ok,thanks. I have one more question. what is the syntax for asset_ids? I write: "asset_ids": ["1099605209578"] and this not working

— Reply to this email directly, view it on GitHub https://github.com/learnforpractice/pyeoskit/issues/5#issuecomment-1015355403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPSHVKEHZOMD6U22XH3UWVK3ZANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

Verstor commented 2 years ago

Oh, my fault) sorry for the stupid mistake

learnforpractice commented 2 years ago

You still didn’t change your WAX account active key. You can refer to the code in the following link to change your active key.

https://github.com/learnforpractice/pyeoskit/blob/master/examples/auths/updateauth.py https://github.com/learnforpractice/pyeoskit/blob/master/examples/auths/updateauth.py

Use the following line of code to create a new private key:

eosapi.create_key()

Don’t blame me if you lost any assets.

On Jan 18, 2022, at 8:33 PM, Verstor @.***> wrote:

Oh my bad) sorry stupid mistake

— Reply to this email directly, view it on GitHub https://github.com/learnforpractice/pyeoskit/issues/5#issuecomment-1015367249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPJSPXXCLGQTSH6M5I5W2LUWVMYHANCNFSM5MGL3GJQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

Verstor commented 2 years ago

I changed the private key. Thanks