Skip to content
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 swap not functioning #1

Closed
przmyst opened this issue Sep 5, 2023 · 1 comment
Closed

Token swap not functioning #1

przmyst opened this issue Sep 5, 2023 · 1 comment

Comments

@przmyst
Copy link
Owner

przmyst commented Sep 5, 2023

While using Astroport UI the following swap works, however fails with code. Why?

https://finder.terra.money/classic/tx/4682D33F89911F4CB6145B8233B93FCB0DF7D79292511217B8B9B094DC018298

From UI:

{
  "send": {
    "msg": "eyJzd2FwIjp7Im1heF9zcHJlYWQiOiIwLjUwMCIsImJlbGllZl9wcmljZSI6IjAuMDA4ODE4NDAwMzk2NjY1NzU5IiwiZGVhZGxpbmUiOjE2OTM5MjY1ODZ9fQ==",
    "amount": "1000000",
    "contract": "terra1z5ufkcg8urgcmjqc7h6sjwk9rcxpp8qlu6tuxka8duvug86pmzwqq4craj"
  }
}

From code:

{
  "swap": {
    "max_spread": "0.1",
    "offer_asset": {
      "info": {
        "token": {
          "contract_addr": "terra1f0us6p9axmzacwq2fn7sm5ke8k302tx7hg7s49"
        }
      },
      "amount": "1000"
    },
    "belief_price": "13.895568934822152940"
  }
}
@przmyst
Copy link
Owner Author

przmyst commented Sep 5, 2023

@przmyst przmyst closed this as completed Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant