Code Monkey home page Code Monkey logo

terraswap's Introduction

TerraSwap

terraswap on crates.io workflow codecov

Uniswap-inspired automated market-maker (AMM) protocol powered by Smart Contracts on the Terra blockchain.

Contracts

Name Description
terraswap_factory
terraswap_pair
terraswap_router
terraswap_token CW20 (ERC20 equivalent) token implementation
  • terraswap_factory

    Mainnet: terra1466nf3zuxpya8q9emxukd7vftaf6h4psr0a07srl5zw74zh84yjqxl5qul

    Testnet: terra1jha5avc92uerwp9qzx3flvwnyxs3zax2rrm6jkcedy2qvzwd2k7qk7yxcl

  • terraswap_pair

    Mainnet (CodeID): 5

    Testnet (CodeID): 84

  • terraswap_token

    Mainnet (CodeID): 4

    Testnet (CodeID): 83

  • terraswap_router

    Mainnet: terra13ehuhysn5mqjeaheeuew2gjs785f6k7jm8vfsqg3jhtpkwppcmzqcu7chk

    Testnet: terra1xp6xe6uwqrspumrkazdg90876ns4h78yw03vfxghhcy03yexcrcsdaqvc8

Running this contract

You will need Rust 1.44.1+ with wasm32-unknown-unknown target installed.

You can run unit tests on this on each contracts directory via :

cargo unit-test
cargo integration-test

Once you are happy with the content, you can compile it to wasm on each contracts directory via:

RUSTFLAGS='-C link-arg=-s' cargo wasm
cp ../../target/wasm32-unknown-unknown/release/cw1_subkeys.wasm .
ls -l cw1_subkeys.wasm
sha256sum cw1_subkeys.wasm

Or for a production-ready (compressed) build, run the following from the repository root:

docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/workspace-optimizer:0.12.6

The optimized contracts are generated in the artifacts/ directory.

terraswap's People

Contributors

csanti avatar ezaanm avatar jhlee-young avatar joowonyun avatar ouiliame avatar pronvis avatar xlk3099 avatar yun-yeo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraswap's Issues

Docker compile error

Describe the bug
Compiling from Dockerfile results in error:

 => [internal] load build definition from Dockerfile                                                                                                            0.0s
 => => transferring dockerfile: 308B                                                                                                                            0.0s 
 => [internal] load .dockerignore                                                                                                                               0.0s 
 => => transferring context: 2B                                                                                                                                 0.0s 
 => [internal] load metadata for docker.io/cosmwasm/workspace-optimizer:0.12.5                                                                                  0.0s 
 => [1/6] FROM docker.io/cosmwasm/workspace-optimizer:0.12.5                                                                                                    0.0s 
 => [internal] load build context                                                                                                                               0.0s 
 => => transferring context: 10.47kB                                                                                                                            0.0s 
 => CACHED [2/6] RUN apk update &&     apk add curl nodejs npm                                                                                                  0.0s 
 => CACHED [3/6] RUN node --version &&     npm --version                                                                                                        0.0s 
 => CACHED [4/6] WORKDIR /code                                                                                                                                  0.0s 
 => [5/6] COPY . /code                                                                                                                                          0.0s 
 => [6/6] RUN chmod +x ./build_release.sh                                                                                                                       0.3s
 => exporting to image                                                                                                                                          0.1s
 => => exporting layers                                                                                                                                         0.0s 
 => => writing image sha256:22ed118ce76df6ad3b3c3df3ac0797ccd49de3e10baeae48e1a9a6b9ab7a78f2                                                                    0.0s 
 => => naming to docker.io/library/terraswap_app                                                                                                                0.0s 

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 2/2
 - Network terraswap_default  Created                                                                                                                           0.8s 
 - Container terraswap-app-1  Started                                                                                                                           1.2s

Terminal will be reused by tasks, press any key to close it.

> Executing task in folder terraswap: docker compose -f "docker-compose.yml" down <

[+] Running 2/2
 - Container terraswap-app-1  Removed                                                                                                                           0.0s 
 - Network terraswap_default  Removed                                                                                                                           0.7s 

Terminal will be reused by tasks, press any key to close it.

> Executing task in folder terraswap: docker compose -f "docker-compose.yml" up -d --build <

[+] Building 128.5s (10/10) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                            0.0s
 => => transferring dockerfile: 322B                                                                                                                            0.0s 
 => [internal] load .dockerignore                                                                                                                               0.0s 
 => => transferring context: 2B                                                                                                                                 0.0s 
 => [internal] load metadata for docker.io/cosmwasm/workspace-optimizer:0.12.5                                                                                  0.0s 
 => [1/6] FROM docker.io/cosmwasm/workspace-optimizer:0.12.5                                                                                                    0.0s 
 => [internal] load build context                                                                                                                               0.0s 
 => => transferring context: 10.49kB                                                                                                                            0.0s 
 => CACHED [2/6] RUN apk update &&     apk add curl nodejs npm                                                                                                  0.0s 
 => CACHED [3/6] RUN node --version &&     npm --version                                                                                                        0.0s 
 => CACHED [4/6] WORKDIR /code                                                                                                                                  0.0s 
 => CACHED [5/6] COPY . /code                                                                                                                                   0.0s 
 => ERROR [6/6] RUN /usr/local/bin/optimize_workspace.sh . &&     npm install &&     npm start                                                                128.4s 
------
 > [6/6] RUN /usr/local/bin/optimize_workspace.sh . &&     npm install &&     npm start:
#0 0.358 1.58.1-x86_64-unknown-linux-musl (default)
#0 0.415 cargo 1.58.0 (f01b232bc 2022-01-19)
#0 0.416 Building artifacts in workspace ...
#0 0.416 Found workspace member entries: ["packages/*", "contracts/*"]
#0 0.416 Package directories: ["contracts/terraswap_factory", "contracts/terraswap_pair", "contracts/terraswap_router", "contracts/terraswap_token", "packages/terraswap"]
#0 0.416 Contracts to be built: ["contracts/terraswap_factory", "contracts/terraswap_pair", "contracts/terraswap_router", "contracts/terraswap_token"]
#0 0.416 Building "contracts/terraswap_factory" ...
#0 0.477 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 0.477 package:   /code/packages/terraswap/Cargo.toml
#0 0.477 workspace: /code/Cargo.toml
#0 0.477 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 0.477 package:   /code/contracts/terraswap_factory/Cargo.toml
#0 0.477 workspace: /code/Cargo.toml
#0 0.477 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 0.477 package:   /code/contracts/terraswap_pair/Cargo.toml
#0 0.477 workspace: /code/Cargo.toml
#0 0.477 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 0.477 package:   /code/contracts/terraswap_router/Cargo.toml
#0 0.477 workspace: /code/Cargo.toml
#0 0.913     Updating crates.io index
#0 40.92  Downloading crates ...
#0 41.26   Downloaded byteorder v1.3.4
#0 41.26   Downloaded cosmwasm-storage v0.16.0
#0 41.27   Downloaded crypto-bigint v0.2.2
#0 41.28   Downloaded der v0.4.0
#0 41.28   Downloaded ecdsa v0.12.3
#0 41.29   Downloaded ff v0.10.0
#0 41.29   Downloaded ed25519-zebra v2.2.0
#0 41.30   Downloaded generic-array v0.14.4
#0 41.30   Downloaded hex v0.4.2
#0 41.33   Downloaded pkcs8 v0.7.5
#0 41.34   Downloaded protobuf v2.23.0
#0 41.35   Downloaded proc-macro2 v1.0.24
#0 41.35   Downloaded itoa v0.4.6
#0 41.35   Downloaded quote v1.0.7
#0 41.36   Downloaded libc v0.2.78
#0 41.38   Downloaded elliptic-curve v0.10.5
#0 41.38   Downloaded serde v1.0.116
#0 41.38   Downloaded serde_derive v1.0.116
#0 41.38   Downloaded serde-json-wasm v0.3.1
#0 41.39   Downloaded schemars_derive v0.8.3
#0 41.39   Downloaded serde_derive_internals v0.25.0
#0 41.39   Downloaded subtle v2.4.0
#0 41.39   Downloaded thiserror v1.0.24
#0 41.39   Downloaded spki v0.4.0
#0 41.39   Downloaded signature v1.3.1
#0 41.39   Downloaded schemars v0.8.3
#0 41.40   Downloaded terra-cosmwasm v2.2.0
#0 41.40   Downloaded ryu v1.0.5
#0 41.41   Downloaded unicode-xid v0.2.1
#0 41.41   Downloaded zeroize v1.4.1
#0 41.41   Downloaded typenum v1.12.0
#0 41.41   Downloaded version_check v0.9.2
#0 41.41   Downloaded thiserror-impl v1.0.24
#0 41.41   Downloaded cosmwasm-crypto v0.16.0
#0 41.41   Downloaded uint v0.9.0
#0 41.42   Downloaded cpuid-bool v0.1.2
#0 41.42   Downloaded cosmwasm-std v0.16.0
#0 41.42   Downloaded opaque-debug v0.3.0
#0 41.42   Downloaded digest v0.9.0
#0 41.42   Downloaded hmac v0.11.0
#0 41.42   Downloaded cfg-if v0.1.10
#0 41.43   Downloaded getrandom v0.1.16
#0 41.43   Downloaded syn v1.0.67
#0 41.44   Downloaded rand_core v0.6.3
#0 41.44   Downloaded serde_json v1.0.58
#0 41.44   Downloaded cw0 v0.8.0
#0 41.44   Downloaded const-oid v0.6.0
#0 41.44   Downloaded dyn-clone v1.0.4
#0 41.44   Downloaded group v0.10.0
#0 41.45   Downloaded cw-storage-plus v0.8.0
#0 41.45   Downloaded cosmwasm-derive v0.16.0
#0 41.45   Downloaded bytes v1.0.1
#0 41.45   Downloaded k256 v0.9.6
#0 41.45   Downloaded crunchy v0.2.2
#0 41.45   Downloaded getrandom v0.2.3
#0 41.46   Downloaded static_assertions v1.1.0
#0 41.46   Downloaded cw20 v0.8.0
#0 41.46   Downloaded sha2 v0.9.1
#0 41.46   Downloaded rand_core v0.5.1
#0 41.46   Downloaded cfg-if v1.0.0
#0 41.46   Downloaded base64 v0.13.0
#0 41.47   Downloaded crypto-mac v0.11.1
#0 41.47   Downloaded block-buffer v0.9.0
#0 41.47   Downloaded curve25519-dalek v3.1.0
#0 41.54    Compiling proc-macro2 v1.0.24
#0 41.54    Compiling unicode-xid v0.2.1
#0 41.54    Compiling syn v1.0.67
#0 41.54    Compiling serde_derive v1.0.116
#0 41.54    Compiling serde v1.0.116
#0 41.54    Compiling ryu v1.0.5
#0 41.55    Compiling byteorder v1.3.4
#0 41.55    Compiling crunchy v0.2.2
#0 41.55    Compiling serde_json v1.0.58
#0 41.55    Compiling itoa v0.4.6
#0 41.55    Compiling schemars v0.8.3
#0 41.55    Compiling static_assertions v1.1.0
#0 41.55    Compiling dyn-clone v1.0.4
#0 41.55    Compiling hex v0.4.2
#0 41.55    Compiling base64 v0.13.0
#0 41.55    Compiling protobuf v2.23.0
#0 41.68    Compiling bytes v1.0.1
#0 42.79    Compiling uint v0.9.0
#0 42.89    Compiling quote v1.0.7
#0 46.78    Compiling serde_derive_internals v0.25.0
#0 49.53    Compiling schemars_derive v0.8.3
#0 49.53    Compiling thiserror-impl v1.0.24
#0 49.53    Compiling cosmwasm-derive v0.16.0
#0 51.37    Compiling thiserror v1.0.24
#0 60.72    Compiling serde-json-wasm v0.3.1
#0 64.06    Compiling cosmwasm-std v0.16.0
#0 67.08    Compiling cw0 v0.8.0
#0 67.43    Compiling cosmwasm-storage v0.16.0
#0 67.67    Compiling terra-cosmwasm v2.2.0
#0 67.82    Compiling cw-storage-plus v0.8.0
#0 68.04    Compiling cw20 v0.8.0
#0 69.89    Compiling terraswap v2.4.1 (/code/packages/terraswap)
#0 77.64    Compiling terraswap-factory v0.0.0 (/code/contracts/terraswap_factory)
#0 82.89     Finished release [optimized] target(s) in 1m 22s
#0 82.91 Building "contracts/terraswap_pair" ...
#0 82.97 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 82.97 package:   /code/packages/terraswap/Cargo.toml
#0 82.97 workspace: /code/Cargo.toml
#0 82.97 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 82.97 package:   /code/contracts/terraswap_factory/Cargo.toml
#0 82.97 workspace: /code/Cargo.toml
#0 82.97 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 82.97 package:   /code/contracts/terraswap_pair/Cargo.toml
#0 82.97 workspace: /code/Cargo.toml
#0 82.97 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 82.97 package:   /code/contracts/terraswap_router/Cargo.toml
#0 82.97 workspace: /code/Cargo.toml
#0 82.99  Downloading crates ...
#0 83.22   Downloaded bigint v4.4.3
#0 83.22   Downloaded integer-sqrt v0.1.5
#0 83.23   Downloaded cw2 v0.8.0
#0 83.23   Downloaded crunchy v0.1.6
#0 83.24   Downloaded autocfg v1.0.1
#0 83.25   Downloaded num-traits v0.2.12
#0 83.25   Downloaded cosmwasm-bignumber v2.2.0
#0 83.26    Compiling autocfg v1.0.1
#0 83.26    Compiling crunchy v0.1.6
#0 83.26    Compiling cw2 v0.8.0
#0 83.66    Compiling bigint v4.4.3
#0 83.66    Compiling num-traits v0.2.12
#0 84.48    Compiling cosmwasm-bignumber v2.2.0
#0 85.23    Compiling integer-sqrt v0.1.5
#0 86.29    Compiling terraswap-pair v0.0.0 (/code/contracts/terraswap_pair)
#0 90.97     Finished release [optimized] target(s) in 8.00s
#0 90.97 Building "contracts/terraswap_router" ...
#0 91.03 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 91.03 package:   /code/packages/terraswap/Cargo.toml
#0 91.03 workspace: /code/Cargo.toml
#0 91.03 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 91.03 package:   /code/contracts/terraswap_factory/Cargo.toml
#0 91.03 workspace: /code/Cargo.toml
#0 91.03 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 91.03 package:   /code/contracts/terraswap_pair/Cargo.toml
#0 91.03 workspace: /code/Cargo.toml
#0 91.03 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 91.03 package:   /code/contracts/terraswap_router/Cargo.toml
#0 91.03 workspace: /code/Cargo.toml
#0 91.06    Compiling terraswap-router v0.0.0 (/code/contracts/terraswap_router)
#0 95.53     Finished release [optimized] target(s) in 4.50s
#0 95.53 Building "contracts/terraswap_token" ...
#0 95.60 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 95.60 package:   /code/packages/terraswap/Cargo.toml
#0 95.60 workspace: /code/Cargo.toml
#0 95.60 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 95.60 package:   /code/contracts/terraswap_factory/Cargo.toml
#0 95.60 workspace: /code/Cargo.toml
#0 95.60 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 95.60 package:   /code/contracts/terraswap_pair/Cargo.toml
#0 95.60 workspace: /code/Cargo.toml
#0 95.60 warning: profiles for the non root package will be ignored, specify profiles at the workspace root:
#0 95.60 package:   /code/contracts/terraswap_router/Cargo.toml
#0 95.60 workspace: /code/Cargo.toml
#0 95.61  Downloading crates ...
#0 95.79   Downloaded cw20-base v0.8.0
#0 95.80   Downloaded cw20-legacy v0.2.0
#0 95.80    Compiling cw20-base v0.8.0
#0 102.6    Compiling cw20-legacy v0.2.0
#0 106.9    Compiling terraswap-token v0.0.0 (/code/contracts/terraswap_token)
#0 109.7     Finished release [optimized] target(s) in 14.12s
#0 109.7 Creating intermediate hashes ...
#0 109.7 7ed616983533a966a23d2f4036e5d5011c4205d771d0cd076aeea607d01fd6f5  target/wasm32-unknown-unknown/release/terraswap_factory.wasm
#0 109.7 dfc29c2404e9a00b42ccd8bb01e60dd0b80122ab27b5ee3cb983e38fe76b9869  target/wasm32-unknown-unknown/release/terraswap_pair.wasm
#0 109.7 d94a187b837d51fabaeb69288c4d0ab7040f2d710b1f3574ed253d57335b2954  target/wasm32-unknown-unknown/release/terraswap_router.wasm
#0 109.7 95f5fd2093041d76420e1f5ee55c5986ac65fb18ac13e2af5f7237ab428a925c  target/wasm32-unknown-unknown/release/terraswap_token.wasm
#0 109.7 Optimizing artifacts in workspace ...
#0 109.7 Optimizing terraswap_factory.wasm ...
#0 113.8 Optimizing terraswap_pair.wasm ...
#0 119.3 Optimizing terraswap_router.wasm ...
#0 123.8 Optimizing terraswap_token.wasm ...
#0 128.1 Moving wasm files ...
#0 128.1 Post-processing artifacts in workspace ...
#0 128.1 dac4445b9f216836702db9b9a1a971d8c713716710daf3020c3b603185993b8e  terraswap_factory.wasm
#0 128.1 5a2a83a525ca49d312ee7571649d12fb83c183d172b17d7ba23319f6f01ce4c3  terraswap_pair.wasm
#0 128.1 cc898b7b61d32480a692bb894d117342bc4189d6e31b8062028d45b21d9898e5  terraswap_router.wasm
#0 128.1 28ca7f213af88eef964f2c01f94085f78705384a3d56b03c78ad4ea098e66bf2  terraswap_token.wasm
#0 128.1 done
#0 128.4 npm ERR! code ENOENT
#0 128.4 npm ERR! syscall open
#0 128.4 npm ERR! path /code/package.json
#0 128.4 npm ERR! errno -2
#0 128.4 npm ERR! enoent ENOENT: no such file or directory, open '/code/package.json'
#0 128.4 npm ERR! enoent This is related to npm not being able to find a file.

To Reproduce
Dockerfile:

FROM cosmwasm/workspace-optimizer:0.12.5

ENV NODE_VERSION=14.19.1
RUN apk update && \
    apk add curl nodejs npm

RUN node --version && \
    npm --version

WORKDIR /code
COPY . /code

RUN /usr/local/bin/optimize_workspace.sh . && \
    npm install && \
    npm start

[FEATURE] migrate pair

Problem definition
A migration method for pair contracts is required.

Feature specification
Migrate a specific pair to the factory by admin

Additional context
It adds contract version management and prevents incorrect migration in the future.

Adding a pair?

Hello, is it possible to add a cw20 token issued another blockchain (created with starport)

ROBOHERO TOKEN

3C9B08718A963A82353C17CC9D141E64A85476AFB860544AA3A0C4E3D2122D92

tx hash 11.127 ust but I have 5 usd in my account why

I swapped my robohero tokens with usdt on the terraswap channel today, no money in my wallet can you help me please

I didn't know that you can swap with upper, when it was usdt among the options, I chose it

While swapping rope hero tokens, there was usdt in the options, I traded here for the first time. How can it suddenly drop to 5 dollars: I converted it to usdt, not to ust.

terra104dnzgzzx7hjt32sml9zspqfmvr7fdae8l6vy8

This person took action immediately after me. Please help me get my money back

If it is so risky to convert to usdt, why do you put it in the options, only put UST

[FEATURE] Support reverse simulation of router

Problem definition
When using the router contract, we cannot get offer_amount with ask_amount.

Feature specification
Reverse the tax and use the reverse_simulation of the pair to get the corresponding value.

Additional context
.

[BUG] Native tokens can have decimals other than 6

Describe the bug
The decimal of native_token is treated as 6 in the current contract.

To Reproduce
A problem occurs when a denom of another decimal is entered from ibc, etc.

(if applicable) suggested solution
A decimal of native_token is registered in the factory through admin, and only allowed native_token can be created as a pair.

[BUG] academy.terra.money tutorial bug

Describe the bug
A clear and concise description of what the bug is.

Im following along on the academy.terra.money tutorial,
and when I run the code from https://github.com/larry0x/spacecamp-2021-workshop

I get the error
Instantiating TerraSwap Token contract... (node:47952) UnhandledPromiseRejectionWarning: Error: Transaction failed! code: 3 codespace: wasm raw_log: failed to execute message; message index: 0: Caught panic: instantiate wasm contract failed{"txhash":"A78A93E4AA9285006E59A395AFFFEFE04B2FD818691A2A076DF03C7E5954BD12","raw_log":"failed to execute message; message index: 0: Caught panic: instantiate wasm contract failed","gas_wanted":8000000,"gas_used":60926,"height":4759,"code":3,"codespace":"wasm"}

and it my LocalTerra logs it outputs
terrad_1 | thread '<unnamed>' panicked at 'assertion failed:(left == right)terrad_1 | left:-1, terrad_1 | right: 0: registering new sigaltstack failed', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-vm-2.0.0/src/trap/traphandlers.rs:984:9

any ideas?

To Reproduce
Describe the steps to reproduce the behavior.

ts-node main.ts

Context & versions
Delineate the correct versions of all the components involved in reproducing the bug.

(if applicable) suggested solution
If you know the solution to the bug, let us know!

[BUG] validation token

Describe the bug

  • There are invalid addresses in the pair.

To Reproduce

  • Any address can be registered in a pair.

Context & versions
.

(if applicable) suggested solution

  • Query token_infos when cw20
  • Query active_denom when native_token
  • Query ibc_denom_trace when ibc_token

[BUG] app.terraswap.io on a non googleplay service android device does not invoke the terrastation app

Describe the bug

I have an android device without google play services, and terraswap.io webapp does not invoke the installed terrastation app on android due to the use of firebase intents
E.g:

11-04 14:20:24.836 1661 2134 I ActivityTaskManager: START u0 {act=com.google.firebase.dynamiclinks.VIEW_DYNAMIC_LINK cat=[android.intent.category.BROWSABLE] dat=https://terrastation.page.link/... flg=0x14000000 pkg=com.google.android.gms cmp=com.google.android.gms/.appinvite.AppInviteAcceptInvitationActivity (has extras)} from uid 10294

To Reproduce
Try to connect wallet on a non googleplay service android device

Context & versions
Happens on latest version of the webapp and terrastation app.

(if applicable) suggested solution
terra.cards webapp in contrast does it without using firebase, and the terrastation app gets invoked without any issues
E.g:

11-04 14:39:05.310 1478 3288 I ActivityTaskManager: START u10 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=terrastation://send/?payload=eyJhZGRyZXNzIjoidGVycmExeW5ld2NrMGx2Y2pudHhtNGV3OGxwaGZoNzI5cjZlY3c3NWhuZTAiLCJhbW91bnQiOiIyMDgwMDAwMDAiLCJ0b2tlbiI6InV1c2QiLCJtZW1vIjoiMTgxNzIifQ== flg=0x14000000 cmp=money.terra.station/.MainActivity (has extras)} from uid 1010254

So if terraswap app switches to normal intents instead of firebase, devices that dont have googleplay services can use terraswap.io webapp on such devices, which now is not possible.

I would be thankful if this gets sorted.

Thanks.

[BUG] title_of_bug

Describe the bug
Currently in the testnet the terraswap router is bugged. Can this also happen on the mainnet?

To Reproduce
it happens when you select in the station a route using the router:

error: "rpc error: code = Unknown desc = Null/Nil argument: checksum: contract query failed"

query_msg: {"simulate_swap_operations":{"offer_amount":"1000000","operations":[{"native_swap":{"offer_denom":"uluna","ask_denom":"uusd"}},{"terra_swap":{"offer_asset_info":{"native_token":{"denom":"uusd"}},"ask_asset_info":{"token":{"contract_addr":"terra18xfqhtfaz2su55zmurmh02ng9lnhw0xnyplvln"}}}}],"minimum_receive":"0"}}

[BUG] Can't provide initial liquidity for trading pair KLT/LUNC

Hello, I want to launch my pair KLT/LUNC on terraswap classic but when I try to execute provide_liquidity message it gives me code error:3.

Without providing LP to the pair I sent KLT and LUNC manually to the pool without receiving LP but even now I can't just add liquidity through your UI, it says pool balance is not enough.

[BUG] belief_price and max_spread not respected?

I think I found a transaction where the terraswap belief_price and spread is not respected. It seems a bug.

The transaction sends 13579720 uluna for bluna with belief_price: "0.98984022497681" and max_spread: "0.0025167438940065". Based on this numbers the minimum received should be (13579720/0.98984022497681*(1-0.0025167438940065)) = 13684575, but it actually received 13652065 which is less.

Did I misinterpret what belief_price and max_spread do or there is a bug?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.