mercurial-finance / mercurial-dynamic-amm-sdk

An SDK for building applications on top of Mercurial Dynamic AMM
22 stars 15 forks source link

feat: Add PoolCreated event #109

Open quangkeu95 opened 6 months ago

quangkeu95 commented 6 months ago

Attempt to add PoolCreated event into the SDK IDL types

Tasks:

00xSam commented 5 months ago
Screenshot 2024-01-17 at 11 40 40 AM

running pnpm run generate throw me error. Did you forgot to commit something?

00xSam commented 5 months ago

pnpm run anchor-test failed as well for me.


error: failed to run custom build command for `blake3 v1.5.0`

Caused by:
  process didn't exit successfully: `/Users/mcsam/Development/mercurial-dynamic-amm-sdk/target/release/build/blake3-18f03ff94989d032/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=CARGO_FEATURE_PURE
  cargo:rerun-if-env-changed=CARGO_FEATURE_NO_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_NO_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_PURE
  cargo:rustc-cfg=blake3_neon
  TARGET = Some("aarch64-apple-darwin")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
  CC_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
  CC_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some("/Users/mcsam/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang")
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
  CFLAGS_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
  CFLAGS_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  running: "/Users/mcsam/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-Wall" "-Wextra" "-std=c11" "-o" "/Users/mcsam/Development/mercurial-dynamic-amm-sdk/target/release/build/blake3-5478e16ff4b3f7e8/out/c/blake3_neon.o" "-c" "c/blake3_neon.c"
  cargo:warning=In file included from c/blake3_neon.c:1:

  cargo:warning=c/blake3_impl.h:4:10: fatal error: 'assert.h' file not found

  cargo:warning=#include <assert.h>

  cargo:warning=         ^~~~~~~~~~

  cargo:warning=1 error generated.

  exit status: 1

  --- stderr

  error occurred: Command "/Users/mcsam/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-Wall" "-Wextra" "-std=c11" "-o" "/Users/mcsam/Development/mercurial-dynamic-amm-sdk/target/release/build/blake3-5478e16ff4b3f7e8/out/c/blake3_neon.o" "-c" "c/blake3_neon.c" with args "clang" did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...
 ELIFECYCLE  Command failed with exit code 1.
 ```
quangkeu95 commented 5 months ago
Screenshot 2024-01-17 at 11 40 40 AM

running pnpm run generate throw me error. Did you forgot to commit something?

I think we don't need to use the generated types so i'm gonna remove this command with the achor-client-gen dependency.

quangkeu95 commented 5 months ago

pnpm run anchor-test failed as well for me.

error: failed to run custom build command for `blake3 v1.5.0`

Caused by:
  process didn't exit successfully: `/Users/mcsam/Development/mercurial-dynamic-amm-sdk/target/release/build/blake3-18f03ff94989d032/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=CARGO_FEATURE_PURE
  cargo:rerun-if-env-changed=CARGO_FEATURE_NO_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_NO_NEON
  cargo:rerun-if-env-changed=CARGO_FEATURE_PURE
  cargo:rustc-cfg=blake3_neon
  TARGET = Some("aarch64-apple-darwin")
  OPT_LEVEL = Some("0")
  HOST = Some("aarch64-apple-darwin")
  cargo:rerun-if-env-changed=CC_aarch64-apple-darwin
  CC_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CC_aarch64_apple_darwin
  CC_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CC
  HOST_CC = None
  cargo:rerun-if-env-changed=CC
  CC = Some("/Users/mcsam/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang")
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-apple-darwin
  CFLAGS_aarch64-apple-darwin = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_apple_darwin
  CFLAGS_aarch64_apple_darwin = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  running: "/Users/mcsam/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-Wall" "-Wextra" "-std=c11" "-o" "/Users/mcsam/Development/mercurial-dynamic-amm-sdk/target/release/build/blake3-5478e16ff4b3f7e8/out/c/blake3_neon.o" "-c" "c/blake3_neon.c"
  cargo:warning=In file included from c/blake3_neon.c:1:

  cargo:warning=c/blake3_impl.h:4:10: fatal error: 'assert.h' file not found

  cargo:warning=#include <assert.h>

  cargo:warning=         ^~~~~~~~~~

  cargo:warning=1 error generated.

  exit status: 1

  --- stderr

  error occurred: Command "/Users/mcsam/.local/share/solana/install/releases/1.16.1/solana-release/bin/sdk/sbf/dependencies/platform-tools/llvm/bin/clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=arm64-apple-darwin" "-Wall" "-Wextra" "-std=c11" "-o" "/Users/mcsam/Development/mercurial-dynamic-amm-sdk/target/release/build/blake3-5478e16ff4b3f7e8/out/c/blake3_neon.o" "-c" "c/blake3_neon.c" with args "clang" did not execute successfully (status code exit status: 1).

warning: build failed, waiting for other jobs to finish...
 ELIFECYCLE  Command failed with exit code 1.
 ```

would you mind running cargo clean and rerun the command, make sure you run in inside the ts-client dir. I'm not sure about this error.