From d9a60a28fdd721fcf89f9843ba37c4e5b5c460a8 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:16:46 +0100 Subject: [PATCH 01/55] add a workflow for deploying contracts to testnet --- .github/workflows/testnet.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/testnet.yml diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml new file mode 100644 index 00000000..96c07f9a --- /dev/null +++ b/.github/workflows/testnet.yml @@ -0,0 +1,25 @@ +name: Deployment to testnet + +on: + workflow_dispatch + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install Soroban + run: | + rustup target add wasm32-unknown-unknown + cargo install --locked stellar-cli --version v22.0.0 --features opt + + - name: Generate Soroban keys + run: | + stellar keys generate --global alice --network testnet --fund + stellar keys generate --global bob --network testnet --fund + stellar keys generate --global admin --network testnet --fund \ No newline at end of file From 085457cfb4d406e8ff1a56e20eb0b5edf5b77ac3 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:20:53 +0100 Subject: [PATCH 02/55] enable on PR for debugging --- .github/workflows/testnet.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 96c07f9a..7f12db4e 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -1,8 +1,10 @@ name: Deployment to testnet on: - workflow_dispatch - + workflow_dispatch: + # TODO: comment out after debugging in the draft PR + pull_request: + jobs: build-and-deploy: runs-on: ubuntu-latest From 029cc4664f9d638fb583a7be3f4b78224b7f76ed Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:27:03 +0100 Subject: [PATCH 03/55] fix version --- .github/workflows/testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 7f12db4e..622c4363 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -18,7 +18,7 @@ jobs: - name: Install Soroban run: | rustup target add wasm32-unknown-unknown - cargo install --locked stellar-cli --version v22.0.0 --features opt + cargo install --locked stellar-cli --version 22.0.0 --features opt - name: Generate Soroban keys run: | From 8850be0920a0f8ca14257c51c0a0f670208b7928 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:39:54 +0100 Subject: [PATCH 04/55] derive the workflow from the examples --- .github/workflows/testnet.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 622c4363..caae6f60 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -10,18 +10,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: actions/setup-node@v3 + # see: https://github.com/stellar/soroban-examples/blob/main/.github/workflows/rust.yml + - uses: stellar/actions/rust-cache@main + - run: rustup update + - run: cargo version + - run: rustup target add wasm32-unknown-unknown + - uses: stellar/stellar-cli@v22 with: - node-version: '16' - - - name: Install Soroban - run: | - rustup target add wasm32-unknown-unknown - cargo install --locked stellar-cli --version 22.0.0 --features opt + version: 22.0.0 - name: Generate Soroban keys run: | stellar keys generate --global alice --network testnet --fund stellar keys generate --global bob --network testnet --fund - stellar keys generate --global admin --network testnet --fund \ No newline at end of file + + #- uses: actions/setup-node@v3 + # with: + # node-version: '16' + # stellar keys generate --global admin --network testnet --fund \ No newline at end of file From a90e70e86c4b8f2a5a4546b27df0f3318a993eb0 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:41:48 +0100 Subject: [PATCH 05/55] switch stellar-cli to main? --- .github/workflows/testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index caae6f60..02174750 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -15,7 +15,7 @@ jobs: - run: rustup update - run: cargo version - run: rustup target add wasm32-unknown-unknown - - uses: stellar/stellar-cli@v22 + - uses: stellar/stellar-cli@main with: version: 22.0.0 From 678150ba9ffd7f1fd5ea079bdb8056a43a1f3e00 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:49:30 +0100 Subject: [PATCH 06/55] build contracts and deploy alert --- .github/workflows/testnet.yml | 13 +++++++++++++ ContractExamples/Cargo.toml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 02174750..2aa34f3e 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -10,6 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Update submodules + run: | + git submodule update --init --recursive # see: https://github.com/stellar/soroban-examples/blob/main/.github/workflows/rust.yml - uses: stellar/actions/rust-cache@main - run: rustup update @@ -24,6 +27,16 @@ jobs: stellar keys generate --global alice --network testnet --fund stellar keys generate --global bob --network testnet --fund + - name: Build contract examples + run: | + cd ContractExamples + cargo build --release --all + + - name: Deploy alert + run: | + cd ContractExamples + ./scripts/alert-deploy.sh + #- uses: actions/setup-node@v3 # with: # node-version: '16' diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index 1dba1cab..d143645c 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.dependencies] -soroban-sdk = "21.6.0" +soroban-sdk = "22.0.0-rc.3" [profile.release] opt-level = "z" From 0aa0ab756bdce010ea0d001e045765ea9fc3b0ad Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 19:54:28 +0100 Subject: [PATCH 07/55] rename soroban to stellar --- ContractExamples/scripts/alert-deploy.sh | 8 ++-- ContractExamples/scripts/prepare-timelock.sh | 22 ++++----- ContractExamples/scripts/setter-populate.sh | 46 +++++++++---------- ContractExamples/scripts/xycloans-populate.sh | 34 +++++++------- 4 files changed, 55 insertions(+), 55 deletions(-) diff --git a/ContractExamples/scripts/alert-deploy.sh b/ContractExamples/scripts/alert-deploy.sh index d5655c6d..20a77293 100755 --- a/ContractExamples/scripts/alert-deploy.sh +++ b/ContractExamples/scripts/alert-deploy.sh @@ -15,14 +15,14 @@ dir=$(cd `dirname $0`; pwd -P) cd ${dir}/.. NET=testnet -(soroban network ls | grep -q $NET) || (echo "add testnet via soroban network"; exit 1) +(stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) ACCOUNT=alice -soroban keys address $ACCOUNT || (echo "add the account $ACCOUNT via soroban keys generate"; exit 1) +stellar keys address $ACCOUNT || (echo "add the account $ACCOUNT via stellar keys generate"; exit 1) set -x -soroban contract build -soroban contract deploy --wasm target/wasm32-unknown-unknown/release/alert.wasm \ +stellar contract build +stellar contract deploy --wasm target/wasm32-unknown-unknown/release/alert.wasm \ --source $ACCOUNT --network $NET \ No newline at end of file diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 675672ab..92014628 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -12,22 +12,22 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) ALICE=alice -soroban keys address $ALICE || (echo "add the account $ALICE via soroban keys generate"; exit 1) +stellar keys address $ALICE || (echo "add the account $ALICE via stellar keys generate"; exit 1) BOB=bob -soroban keys address $BOB || (echo "add the account $BOB via soroban keys generate"; exit 1) +stellar keys address $BOB || (echo "add the account $BOB via stellar keys generate"; exit 1) set -x TOKEN=$( - soroban contract deploy \ + stellar contract deploy \ --source-account alice \ --network testnet \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm + --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/stellar_token_contract.wasm ) echo "Token contract ID: $TOKEN" -soroban contract invoke \ +stellar contract invoke \ --id $TOKEN \ --source alice \ --network testnet \ @@ -38,7 +38,7 @@ soroban contract invoke \ --name '"TOK"' \ --symbol '"TOK"' -soroban contract invoke \ +stellar contract invoke \ --id $TOKEN \ --source alice \ --network testnet \ @@ -47,14 +47,14 @@ soroban contract invoke \ --to alice \ --amount 100 -TIMELOCK=$(soroban contract deploy \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_timelock_contract.wasm \ +TIMELOCK=$(stellar contract deploy \ + --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/stellar_timelock_contract.wasm \ --source alice \ --network testnet) echo "Timelock contract ID: $TIMELOCK" -soroban contract invoke \ +stellar contract invoke \ --id $TIMELOCK \ --source alice \ --network testnet \ @@ -63,10 +63,10 @@ soroban contract invoke \ --from alice \ --token $TOKEN \ --amount 1 \ - --claimants "[\"$(soroban keys address bob)\"]"\ + --claimants "[\"$(stellar keys address bob)\"]"\ --time_bound '{"kind": "After", "timestamp": 0}' -soroban contract invoke \ +stellar contract invoke \ --id $TIMELOCK \ --source bob \ --network testnet \ diff --git a/ContractExamples/scripts/setter-populate.sh b/ContractExamples/scripts/setter-populate.sh index 2359b802..7eab7776 100755 --- a/ContractExamples/scripts/setter-populate.sh +++ b/ContractExamples/scripts/setter-populate.sh @@ -15,53 +15,53 @@ dir=$(cd `dirname $0`; pwd -P) cd ${dir}/.. NET=testnet -(soroban network ls | grep -q $NET) || (echo "add testnet via soroban network"; exit 1) +(stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) ACCOUNT=alice -soroban keys address $ACCOUNT || (echo "add the account $ACCOUNT via soroban keys generate"; exit 1) +stellar keys address $ACCOUNT || (echo "add the account $ACCOUNT via stellar keys generate"; exit 1) ACCOUNT2=bob -soroban keys address $ACCOUNT2 || (echo "add the account $ACCOUNT2 via soroban keys generate"; exit 1) +stellar keys address $ACCOUNT2 || (echo "add the account $ACCOUNT2 via stellar keys generate"; exit 1) set -x -soroban contract build -soroban contract deploy --wasm target/wasm32-unknown-unknown/release/setter.wasm \ +stellar contract build +stellar contract deploy --wasm target/wasm32-unknown-unknown/release/setter.wasm \ --source $ACCOUNT --network $NET | tee >.setter.id -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_bool --v true -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_u32 --v 42 -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_i32 --v '-42' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_u64 --v 42 -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_i64 --v '-42' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_u128 --v 42 -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_i128 --v '-42' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_sym --v hello -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_bytes --v beef -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_bytes32 --v beef0123456789beef0123456789beef0123456789ab -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_vec --v '[ 1, -2, 3 ]' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_map --v '{ "2": 3, "4": 5 }' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_address --v GDIY6AQQ75WMD4W46EYB7O6UYMHOCGQHLAQGQTKHDX4J2DYQCHVCR4W4 -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_struct --v '{ "a": 1, "b": "-100" }' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- set_enum --v '{ "B": "-200" }' -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- remove_bool # we can provoke a failed transaction by submitting 2 transactions in parallel from different accounts -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET -- set_bool_if_notset & -soroban contract invoke --id $(cat .setter.id) --source $ACCOUNT2 --network $NET -- set_bool_if_notset +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET -- set_bool_if_notset & +stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT2 --network $NET -- set_bool_if_notset diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 40f890ff..65e4ed0c 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -15,57 +15,57 @@ dir=$(cd `dirname $0`; pwd -P) cd ${dir}/../xycloans NET=testnet -(soroban network ls | grep -q $NET) || (echo "add testnet via soroban network"; exit 1) +(stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) ADMIN=admin -soroban keys address $ADMIN || (echo "add the account $ADMIN via soroban keys generate"; exit 1) +stellar keys address $ADMIN || (echo "add the account $ADMIN via stellar keys generate"; exit 1) ALICE=alice -soroban keys address $ALICE || (echo "add the account $ALICE via soroban keys generate"; exit 1) +stellar keys address $ALICE || (echo "add the account $ALICE via stellar keys generate"; exit 1) BOB=bob -soroban keys address $BOB || (echo "add the account $BOB via soroban keys generate"; exit 1) +stellar keys address $BOB || (echo "add the account $BOB via stellar keys generate"; exit 1) XLM_ADDRESS=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC BORROW_AMOUNT=1000 set -x -soroban contract build +stellar contract build -soroban contract deploy --wasm target/wasm32-unknown-unknown/release/xycloans_factory.wasm \ +stellar contract deploy --wasm target/wasm32-unknown-unknown/release/xycloans_factory.wasm \ --source $ADMIN --network $NET | tee >.xycloans_factory.id -soroban contract deploy --wasm target/wasm32-unknown-unknown/release/simple.wasm \ +stellar contract deploy --wasm target/wasm32-unknown-unknown/release/simple.wasm \ --source $ADMIN --network $NET | tee >.xycloans_simple.id -soroban contract install --wasm target/wasm32-unknown-unknown/release/xycloans_pool.wasm \ +stellar contract install --wasm target/wasm32-unknown-unknown/release/xycloans_pool.wasm \ --source $ADMIN --network $NET | tee >.xycloans_pool.wasmhash # initialize the factory contract and deploy a pool -soroban contract invoke --id $(cat .xycloans_factory.id) --source $ADMIN --network $NET \ +stellar contract invoke --id $(cat .xycloans_factory.id) --source $ADMIN --network $NET \ -- initialize --pool_hash $(cat .xycloans_pool.wasmhash) --admin $ADMIN -soroban contract invoke --id $(cat .xycloans_factory.id) --source $ADMIN --network $NET \ +stellar contract invoke --id $(cat .xycloans_factory.id) --source $ADMIN --network $NET \ -- deploy_pool --token_address $XLM_ADDRESS --salt efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef | tr -d '"' | tee >.xycloans_pool.id # initialize the simple receiver contract and transfer it some tokens so it can pay fees -soroban contract invoke --id $(cat .xycloans_simple.id) --source $ADMIN --network $NET \ +stellar contract invoke --id $(cat .xycloans_simple.id) --source $ADMIN --network $NET \ -- init --token_id $XLM_ADDRESS --fl_address $(cat .xycloans_pool.id) --amount $BORROW_AMOUNT -soroban contract invoke --id $XLM_ADDRESS --source $ADMIN --network $NET \ +stellar contract invoke --id $XLM_ADDRESS --source $ADMIN --network $NET \ -- transfer --from $ADMIN --to $(cat .xycloans_simple.id) --amount 10000 # deposit some tokens into the pool -soroban contract invoke --id $(cat .xycloans_pool.id) --source $ALICE --network $NET \ +stellar contract invoke --id $(cat .xycloans_pool.id) --source $ALICE --network $NET \ -- deposit --from $ALICE --amount 1000 -soroban contract invoke --id $(cat .xycloans_pool.id) --source $BOB --network $NET \ +stellar contract invoke --id $(cat .xycloans_pool.id) --source $BOB --network $NET \ -- deposit --from $BOB --amount 1 # borrow some tokens from the pool -soroban contract invoke --id $(cat .xycloans_pool.id) --source $ADMIN --network $NET \ +stellar contract invoke --id $(cat .xycloans_pool.id) --source $ADMIN --network $NET \ -- borrow --receiver_id $(cat .xycloans_simple.id) --amount $BORROW_AMOUNT # update the fee rewards and withdraw the matured rewards -soroban contract invoke --id $(cat .xycloans_pool.id) --source $BOB --network $NET \ +stellar contract invoke --id $(cat .xycloans_pool.id) --source $BOB --network $NET \ -- update_fee_rewards --addr $BOB -soroban contract invoke --id $(cat .xycloans_pool.id) --source $BOB --network $NET \ +stellar contract invoke --id $(cat .xycloans_pool.id) --source $BOB --network $NET \ -- withdraw_matured --addr $BOB cd ${dir} From 3c0c0cbd2325015c11fa8586a7c9db7aeb1be0e8 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 20:21:38 +0100 Subject: [PATCH 08/55] add timelock and setter --- .github/workflows/testnet.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 2aa34f3e..0d135f5a 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -37,6 +37,16 @@ jobs: cd ContractExamples ./scripts/alert-deploy.sh + - name: Deploy timelock + run: | + cd ContractExamples + ./scripts/prepare-timelock.sh + + - name: Deploy setter + run: | + cd ContractExamples + ./scripts/setter-populate.sh + #- uses: actions/setup-node@v3 # with: # node-version: '16' From 36731c58e3411d1f1468a59b65bbde327f13ba0d Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 20:29:04 +0100 Subject: [PATCH 09/55] fix contract names --- ContractExamples/scripts/prepare-timelock.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 92014628..2e72f54a 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -22,7 +22,7 @@ TOKEN=$( stellar contract deploy \ --source-account alice \ --network testnet \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/stellar_token_contract.wasm + --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm ) echo "Token contract ID: $TOKEN" @@ -48,7 +48,7 @@ stellar contract invoke \ --amount 100 TIMELOCK=$(stellar contract deploy \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/stellar_timelock_contract.wasm \ + --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_timelock_contract.wasm \ --source alice \ --network testnet) From 239b66688f2dbd8adae0c322e6767ba462f8bc69 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 21:00:40 +0100 Subject: [PATCH 10/55] fixes for 22.0.0 --- ContractExamples/.cargo/config.toml | 5 +++++ ContractExamples/Cargo.toml | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 ContractExamples/.cargo/config.toml diff --git a/ContractExamples/.cargo/config.toml b/ContractExamples/.cargo/config.toml new file mode 100644 index 00000000..a900bb5f --- /dev/null +++ b/ContractExamples/.cargo/config.toml @@ -0,0 +1,5 @@ +[build] +rustflags = ["--cfg", "target_family=\"wasm\""] + +[target.wasm32-unknown-unknown] +rustflags = ["-C", "target-feature=+bulk-memory"] \ No newline at end of file diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index d143645c..8fa4f8d2 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -6,6 +6,10 @@ members = [ "soroban-examples/timelock/" ] +[workspace.package] +version = "22.0.0-rc.3" +edition = "2021" + [workspace.dependencies] soroban-sdk = "22.0.0-rc.3" @@ -23,3 +27,9 @@ lto = true [profile.release-with-logs] inherits = "release" debug-assertions = true + +[profile.release.package.soroban-env-host] +debug = false + +[profile.release.package.stellar-xdr] +debug = false \ No newline at end of file From 9001e06bfb257bf827ac3de3925abbbea3dfcdde Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 21:05:20 +0100 Subject: [PATCH 11/55] add wasm before building contracts --- .github/workflows/testnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 0d135f5a..3e3f5f32 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -17,11 +17,12 @@ jobs: - uses: stellar/actions/rust-cache@main - run: rustup update - run: cargo version - - run: rustup target add wasm32-unknown-unknown - uses: stellar/stellar-cli@main with: version: 22.0.0 + - run: stellar --version + - name: Generate Soroban keys run: | stellar keys generate --global alice --network testnet --fund @@ -30,6 +31,7 @@ jobs: - name: Build contract examples run: | cd ContractExamples + rustup target add wasm32-unknown-unknown cargo build --release --all - name: Deploy alert From 60fa532fef7f67332fc7b6939a43af1c2b2531be Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 21:09:37 +0100 Subject: [PATCH 12/55] remove the offending flag? --- ContractExamples/.cargo/config.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/ContractExamples/.cargo/config.toml b/ContractExamples/.cargo/config.toml index a900bb5f..51f5802c 100644 --- a/ContractExamples/.cargo/config.toml +++ b/ContractExamples/.cargo/config.toml @@ -1,5 +1,2 @@ -[build] -rustflags = ["--cfg", "target_family=\"wasm\""] - [target.wasm32-unknown-unknown] rustflags = ["-C", "target-feature=+bulk-memory"] \ No newline at end of file From f8a7814b0829ef5d5763308e6876628179507655 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 21:16:08 +0100 Subject: [PATCH 13/55] experiment with dependencies again --- .github/workflows/testnet.yml | 3 ++- ContractExamples/Cargo.toml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 3e3f5f32..de08b1e8 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -19,7 +19,8 @@ jobs: - run: cargo version - uses: stellar/stellar-cli@main with: - version: 22.0.0 + version: 21.5.3 + #version: 22.0.0 - run: stellar --version diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index 8fa4f8d2..94cd7355 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -10,8 +10,9 @@ members = [ version = "22.0.0-rc.3" edition = "2021" -[workspace.dependencies] -soroban-sdk = "22.0.0-rc.3" +[dependencies] +soroban-sdk = { version = "22.0.0-rc.3.1" } +soroban-token-sdk = { version = "22.0.0-rc.3.1" } [profile.release] opt-level = "z" From bee330137c61687ae9035a4b42d42f8a15fe5db4 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 21:18:34 +0100 Subject: [PATCH 14/55] hmmm --- .github/workflows/testnet.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index de08b1e8..3e3f5f32 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -19,8 +19,7 @@ jobs: - run: cargo version - uses: stellar/stellar-cli@main with: - version: 21.5.3 - #version: 22.0.0 + version: 22.0.0 - run: stellar --version From 55418d05e81f9d55dc65ccb697ae46530bd2bb40 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Fri, 29 Nov 2024 21:20:49 +0100 Subject: [PATCH 15/55] again and again --- .github/workflows/testnet.yml | 8 ++++---- ContractExamples/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 3e3f5f32..8148a0d6 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -39,15 +39,15 @@ jobs: cd ContractExamples ./scripts/alert-deploy.sh - - name: Deploy timelock + - name: Deploy setter run: | cd ContractExamples - ./scripts/prepare-timelock.sh + ./scripts/setter-populate.sh - - name: Deploy setter + - name: Deploy timelock run: | cd ContractExamples - ./scripts/setter-populate.sh + ./scripts/prepare-timelock.sh #- uses: actions/setup-node@v3 # with: diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index 94cd7355..aebc10b5 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -10,7 +10,7 @@ members = [ version = "22.0.0-rc.3" edition = "2021" -[dependencies] +[workspace.dependencies] soroban-sdk = { version = "22.0.0-rc.3.1" } soroban-token-sdk = { version = "22.0.0-rc.3.1" } From 381e384d25c76d59d5a17323e259ea0ecf3f40e1 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Mon, 2 Dec 2024 15:50:30 +0100 Subject: [PATCH 16/55] comment out reverting transactions --- ContractExamples/scripts/setter-populate.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ContractExamples/scripts/setter-populate.sh b/ContractExamples/scripts/setter-populate.sh index 7eab7776..f6d006c0 100755 --- a/ContractExamples/scripts/setter-populate.sh +++ b/ContractExamples/scripts/setter-populate.sh @@ -62,6 +62,7 @@ stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET \ -- remove_bool +# NOTE: we do not do that in the CI script # we can provoke a failed transaction by submitting 2 transactions in parallel from different accounts -stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET -- set_bool_if_notset & -stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT2 --network $NET -- set_bool_if_notset +#stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT --network $NET -- set_bool_if_notset & +#stellar contract invoke --id $(cat .setter.id) --source $ACCOUNT2 --network $NET -- set_bool_if_notset From 6ac50e45adad6fce764d14fcf650036eed711340 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Mon, 2 Dec 2024 17:42:09 +0100 Subject: [PATCH 17/55] disable reference types --- .github/workflows/testnet.yml | 3 ++- ContractExamples/soroban-examples | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 8148a0d6..79d5c460 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -32,7 +32,8 @@ jobs: run: | cd ContractExamples rustup target add wasm32-unknown-unknown - cargo build --release --all + # it's important to disable reference types, otherwise we get deployment errors + RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release - name: Deploy alert run: | diff --git a/ContractExamples/soroban-examples b/ContractExamples/soroban-examples index e595983e..b6204d94 160000 --- a/ContractExamples/soroban-examples +++ b/ContractExamples/soroban-examples @@ -1 +1 @@ -Subproject commit e595983e7e7c30c2b745f0cdde1096319bb7c90c +Subproject commit b6204d94f03e5cf47d146c6b0f8b3b11a8c6da86 From 2ec5fca1f63e2caeba66a4b07fc15d58a4232d78 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Mon, 2 Dec 2024 17:57:50 +0100 Subject: [PATCH 18/55] saving the hash into a file --- ContractExamples/scripts/prepare-timelock.sh | 25 +++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 2e72f54a..c3e75d32 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -18,12 +18,17 @@ stellar keys address $BOB || (echo "add the account $BOB via stellar keys genera set -x -TOKEN=$( - stellar contract deploy \ +stellar contract deploy \ --source-account alice \ --network testnet \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm -) + --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ + | tee >.token.id + +TOKEN=$(cat .token.id) +if [ -z "$TOKEN" ]; then + echo "Failed to deploy the token contract" + exit 1 +fi echo "Token contract ID: $TOKEN" @@ -47,10 +52,18 @@ stellar contract invoke \ --to alice \ --amount 100 -TIMELOCK=$(stellar contract deploy \ +stellar contract deploy \ --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_timelock_contract.wasm \ --source alice \ - --network testnet) + --network testnet \ + | tee >.timelock.id + +TIMELOCK=$(cat .timelock.id) + +if [ -z "$TIMELOCK" ]; then + echo "Failed to deploy the timelock contract" + exit 1 +fi echo "Timelock contract ID: $TIMELOCK" From 062251dac6a387a235eecfc4a1908649b57c17fc Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Mon, 2 Dec 2024 18:13:20 +0100 Subject: [PATCH 19/55] use salt --- ContractExamples/scripts/prepare-timelock.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index c3e75d32..70913823 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -19,6 +19,7 @@ stellar keys address $BOB || (echo "add the account $BOB via stellar keys genera set -x stellar contract deploy \ + --salt `date +%s` --source-account alice \ --network testnet \ --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ @@ -33,6 +34,7 @@ fi echo "Token contract ID: $TOKEN" stellar contract invoke \ + --salt date +%s --id $TOKEN \ --source alice \ --network testnet \ From fa7895757d6a67ba4e0cc641c25893ce87d05340 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Mon, 2 Dec 2024 19:30:06 +0100 Subject: [PATCH 20/55] fix missing slashes --- ContractExamples/scripts/prepare-timelock.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 70913823..881d9d7e 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -19,7 +19,7 @@ stellar keys address $BOB || (echo "add the account $BOB via stellar keys genera set -x stellar contract deploy \ - --salt `date +%s` + --salt `date +%s` \ --source-account alice \ --network testnet \ --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ @@ -34,7 +34,7 @@ fi echo "Token contract ID: $TOKEN" stellar contract invoke \ - --salt date +%s + --salt date +%s \ --id $TOKEN \ --source alice \ --network testnet \ From 8d666d208dad7d21094bcfbec546c2b309681e0e Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 14:01:00 +0100 Subject: [PATCH 21/55] pin the branch --- .gitmodules | 1 + ContractExamples/scripts/prepare-timelock.sh | 2 +- ContractExamples/soroban-examples | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 14172bca..3fcdd444 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "ContractExamples/soroban-examples"] path = ContractExamples/soroban-examples url = https://github.com/stellar/soroban-examples + branch = v20.2.0 [submodule "ContractExamples/xycloans"] path = ContractExamples/xycloans url = https://github.com/xycloo/xycloans.git diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 881d9d7e..ed99f0a4 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -16,7 +16,7 @@ stellar keys address $ALICE || (echo "add the account $ALICE via stellar keys ge BOB=bob stellar keys address $BOB || (echo "add the account $BOB via stellar keys generate"; exit 1) -set -x +#set -x stellar contract deploy \ --salt `date +%s` \ diff --git a/ContractExamples/soroban-examples b/ContractExamples/soroban-examples index b6204d94..c09e40dd 160000 --- a/ContractExamples/soroban-examples +++ b/ContractExamples/soroban-examples @@ -1 +1 @@ -Subproject commit b6204d94f03e5cf47d146c6b0f8b3b11a8c6da86 +Subproject commit c09e40dd573071315ab40fe3fdc7ed8023db674e From fce73fa9c96cf40cfd2f00d8968545f852a26e19 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 14:04:27 +0100 Subject: [PATCH 22/55] bump soroban examples to 21.6.0 --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 3fcdd444..6241108f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "ContractExamples/soroban-examples"] path = ContractExamples/soroban-examples url = https://github.com/stellar/soroban-examples - branch = v20.2.0 + branch = v21.6.0 [submodule "ContractExamples/xycloans"] path = ContractExamples/xycloans url = https://github.com/xycloo/xycloans.git From cd4e393fcf6c2aa4a8d3338be0df0840cad2e9c9 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 14:06:26 +0100 Subject: [PATCH 23/55] unpin soroban-examples --- .gitmodules | 1 - ContractExamples/soroban-examples | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6241108f..14172bca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,6 @@ [submodule "ContractExamples/soroban-examples"] path = ContractExamples/soroban-examples url = https://github.com/stellar/soroban-examples - branch = v21.6.0 [submodule "ContractExamples/xycloans"] path = ContractExamples/xycloans url = https://github.com/xycloo/xycloans.git diff --git a/ContractExamples/soroban-examples b/ContractExamples/soroban-examples index c09e40dd..b6204d94 160000 --- a/ContractExamples/soroban-examples +++ b/ContractExamples/soroban-examples @@ -1 +1 @@ -Subproject commit c09e40dd573071315ab40fe3fdc7ed8023db674e +Subproject commit b6204d94f03e5cf47d146c6b0f8b3b11a8c6da86 From a6439d80475f86ff4a91d4462f2b477845436b87 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 14:20:47 +0100 Subject: [PATCH 24/55] call the constructor in timelock directly --- ContractExamples/scripts/prepare-timelock.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index ed99f0a4..94f6a042 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -23,6 +23,7 @@ stellar contract deploy \ --source-account alice \ --network testnet \ --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ + -- --admin alice --decimal 18 --name TOK --symbol TOK \ | tee >.token.id TOKEN=$(cat .token.id) @@ -33,18 +34,6 @@ fi echo "Token contract ID: $TOKEN" -stellar contract invoke \ - --salt date +%s \ - --id $TOKEN \ - --source alice \ - --network testnet \ - -- \ - initialize \ - --admin alice \ - --decimal 18 \ - --name '"TOK"' \ - --symbol '"TOK"' - stellar contract invoke \ --id $TOKEN \ --source alice \ From b4f019d37e598b33b5651e77ae28c333f5e67879 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 14:38:21 +0100 Subject: [PATCH 25/55] use the build script --- ContractExamples/scripts/alert-deploy.sh | 2 +- ContractExamples/scripts/prepare-timelock.sh | 9 ++++++--- ContractExamples/scripts/setter-populate.sh | 3 ++- ContractExamples/scripts/xycloans-populate.sh | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ContractExamples/scripts/alert-deploy.sh b/ContractExamples/scripts/alert-deploy.sh index 20a77293..5215f5d5 100755 --- a/ContractExamples/scripts/alert-deploy.sh +++ b/ContractExamples/scripts/alert-deploy.sh @@ -23,6 +23,6 @@ stellar keys address $ACCOUNT || (echo "add the account $ACCOUNT via stellar key set -x -stellar contract build +./scripts/build.sh stellar contract deploy --wasm target/wasm32-unknown-unknown/release/alert.wasm \ --source $ACCOUNT --network $NET \ No newline at end of file diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 94f6a042..491264e3 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -9,7 +9,8 @@ set -e -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +dir=$(cd `dirname $0`; pwd -P) +cd ${dir}/.. ALICE=alice stellar keys address $ALICE || (echo "add the account $ALICE via stellar keys generate"; exit 1) @@ -18,11 +19,13 @@ stellar keys address $BOB || (echo "add the account $BOB via stellar keys genera #set -x +./scripts/build.sh + stellar contract deploy \ --salt `date +%s` \ --source-account alice \ --network testnet \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ + --wasm ./target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ -- --admin alice --decimal 18 --name TOK --symbol TOK \ | tee >.token.id @@ -44,7 +47,7 @@ stellar contract invoke \ --amount 100 stellar contract deploy \ - --wasm $SCRIPT_DIR/../target/wasm32-unknown-unknown/release/soroban_timelock_contract.wasm \ + --wasm ./target/wasm32-unknown-unknown/release/soroban_timelock_contract.wasm \ --source alice \ --network testnet \ | tee >.timelock.id diff --git a/ContractExamples/scripts/setter-populate.sh b/ContractExamples/scripts/setter-populate.sh index f6d006c0..2289c4cf 100755 --- a/ContractExamples/scripts/setter-populate.sh +++ b/ContractExamples/scripts/setter-populate.sh @@ -25,7 +25,8 @@ stellar keys address $ACCOUNT2 || (echo "add the account $ACCOUNT2 via stellar k set -x -stellar contract build +./scripts/build.sh + stellar contract deploy --wasm target/wasm32-unknown-unknown/release/setter.wasm \ --source $ACCOUNT --network $NET | tee >.setter.id diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 65e4ed0c..7392e10b 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -31,7 +31,7 @@ BORROW_AMOUNT=1000 set -x -stellar contract build +../scripts/build.sh stellar contract deploy --wasm target/wasm32-unknown-unknown/release/xycloans_factory.wasm \ --source $ADMIN --network $NET | tee >.xycloans_factory.id From d8847855e836f0296252e7447bf4b82e9d72df7b Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 14:42:06 +0100 Subject: [PATCH 26/55] add the build script --- ContractExamples/scripts/alert-deploy.sh | 2 +- ContractExamples/scripts/build.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 ContractExamples/scripts/build.sh diff --git a/ContractExamples/scripts/alert-deploy.sh b/ContractExamples/scripts/alert-deploy.sh index 5215f5d5..ccc3c7cc 100755 --- a/ContractExamples/scripts/alert-deploy.sh +++ b/ContractExamples/scripts/alert-deploy.sh @@ -11,7 +11,6 @@ set -e dir=$(cd `dirname $0`; pwd -P) - cd ${dir}/.. NET=testnet @@ -24,5 +23,6 @@ stellar keys address $ACCOUNT || (echo "add the account $ACCOUNT via stellar key set -x ./scripts/build.sh + stellar contract deploy --wasm target/wasm32-unknown-unknown/release/alert.wasm \ --source $ACCOUNT --network $NET \ No newline at end of file diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh new file mode 100755 index 00000000..0a10cda4 --- /dev/null +++ b/ContractExamples/scripts/build.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# NOTE: we should use the standard command, but it does not seem to use the right flags +# stellar contract build + +RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file From 39eecdf42a1845ee4ebd52fdcc56888f2607bde0 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 15:09:46 +0100 Subject: [PATCH 27/55] pin rust to 1.82.0 --- .github/workflows/testnet.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 79d5c460..058652b5 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -15,7 +15,10 @@ jobs: git submodule update --init --recursive # see: https://github.com/stellar/soroban-examples/blob/main/.github/workflows/rust.yml - uses: stellar/actions/rust-cache@main - - run: rustup update + # pin the rust version: https://github.com/stellar/rs-soroban-sdk/pull/1353 + - run: | + rustup default 1.82.0 + rustup update - run: cargo version - uses: stellar/stellar-cli@main with: From d589d3aafe1cef7aeafafb9b5ecc5f458a585b41 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 15:36:49 +0100 Subject: [PATCH 28/55] add xycloans --- .github/workflows/testnet.yml | 5 +++++ ContractExamples/scripts/xycloans-populate.sh | 1 + 2 files changed, 6 insertions(+) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 058652b5..48ccd59e 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -53,6 +53,11 @@ jobs: cd ContractExamples ./scripts/prepare-timelock.sh + - name: Deploy xycloans + run: | + cd ContractExamples + ./scripts/xycloans-populate.sh + #- uses: actions/setup-node@v3 # with: # node-version: '16' diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 7392e10b..c1a3c5c0 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -26,6 +26,7 @@ stellar keys address $ALICE || (echo "add the account $ALICE via stellar keys ge BOB=bob stellar keys address $BOB || (echo "add the account $BOB via stellar keys generate"; exit 1) +# XLM SAC token address: https://developers.stellar.org/docs/tokens/stellar-asset-contract XLM_ADDRESS=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC BORROW_AMOUNT=1000 From 416cc299600afa0c33d0e690973a604546916cfe Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 15:42:42 +0100 Subject: [PATCH 29/55] generate the admin account --- .github/workflows/testnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 48ccd59e..1a5ef77d 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -30,6 +30,7 @@ jobs: run: | stellar keys generate --global alice --network testnet --fund stellar keys generate --global bob --network testnet --fund + stellar keys generate --global admin --network testnet --fund - name: Build contract examples run: | From 7126afb83732235dd888857cc13b649051cdbb6d Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 15:59:40 +0100 Subject: [PATCH 30/55] pin xycloans and build it from build.sh --- .gitmodules | 1 + ContractExamples/scripts/build.sh | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitmodules b/.gitmodules index 14172bca..e977e67d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,4 @@ [submodule "ContractExamples/xycloans"] path = ContractExamples/xycloans url = https://github.com/xycloo/xycloans.git + branch = b26e0124ab0b84c1be25c636492671f106653f09 diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index 0a10cda4..7f4c49a4 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -1,6 +1,17 @@ #!/usr/bin/env bash -# NOTE: we should use the standard command, but it does not seem to use the right flags -# stellar contract build +# see: https://github.com/stellar/rs-soroban-sdk/pull/1353 +rustc --version | grep 1.82.0 || (echo "Run: rustup default 1.82.0"; exit 1) -RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file +dir=$(cd `dirname $0`; pwd -P) +cd ${dir}/.. + +# build our contracts and soroban-examples +stellar contract build + +# build xycloans +cd xycloans +stellar contract build + +# When using rust over 1.82.0: +#RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file From 20eca1898526f32f95ad95209d3f930d6713c55f Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 16:07:40 +0100 Subject: [PATCH 31/55] call the build script of xycloans --- ContractExamples/scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index 7f4c49a4..b11db5a0 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -11,7 +11,7 @@ stellar contract build # build xycloans cd xycloans -stellar contract build +./build.sh # When using rust over 1.82.0: #RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file From 8559fd5913104cf1fd0b913f3e05442c477f5666 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 16:14:40 +0100 Subject: [PATCH 32/55] cd up --- ContractExamples/scripts/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index b11db5a0..1b032a49 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -12,6 +12,7 @@ stellar contract build # build xycloans cd xycloans ./build.sh +cd ${dir} # When using rust over 1.82.0: #RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file From 2181f56ab647e0cd1857e8054a1e0093b1ff67f2 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 16:54:00 +0100 Subject: [PATCH 33/55] patch xycloans --- .github/workflows/testnet.yml | 2 +- ContractExamples/patches/xycloans.diff | 16 ++++++++++++++++ ContractExamples/scripts/xycloans-populate.sh | 10 ++++++++-- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 ContractExamples/patches/xycloans.diff diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 1a5ef77d..d70058c0 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -22,7 +22,7 @@ jobs: - run: cargo version - uses: stellar/stellar-cli@main with: - version: 22.0.0 + version: 22.0.1 - run: stellar --version diff --git a/ContractExamples/patches/xycloans.diff b/ContractExamples/patches/xycloans.diff new file mode 100644 index 00000000..fbf383b8 --- /dev/null +++ b/ContractExamples/patches/xycloans.diff @@ -0,0 +1,16 @@ +diff --git a/Cargo.toml b/Cargo.toml +index e3a7104..bcca0fe 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -26,8 +26,8 @@ lto = true + + + [workspace.dependencies.soroban-sdk] +-version = "20.0.0" ++version = "22.0.0-rc.3" + + + [workspace.dependencies.fixed-point-math] +-version = "0.0.2" +\ No newline at end of file ++version = "0.0.2" diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index c1a3c5c0..9f2b58ad 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -12,7 +12,15 @@ set -e dir=$(cd `dirname $0`; pwd -P) +# see: https://github.com/stellar/rs-soroban-sdk/pull/1353 +rustc --version | grep 1.82.0 || (echo "Run: rustup default 1.82.0"; exit 1) + cd ${dir}/../xycloans +patch --forward -p1 <../patches/xycloans.diff || (echo "patch already applied?") + +stellar contract build --package xycloans-pool +stellar contract build --package xycloans-factory +stellar contract build --package simple NET=testnet (stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) @@ -32,8 +40,6 @@ BORROW_AMOUNT=1000 set -x -../scripts/build.sh - stellar contract deploy --wasm target/wasm32-unknown-unknown/release/xycloans_factory.wasm \ --source $ADMIN --network $NET | tee >.xycloans_factory.id stellar contract deploy --wasm target/wasm32-unknown-unknown/release/simple.wasm \ From 967b54751b6412c61b51893cb1dca73f410ff5f9 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 17:06:38 +0100 Subject: [PATCH 34/55] revert to 22.0.0 --- .github/workflows/testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index d70058c0..1a5ef77d 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -22,7 +22,7 @@ jobs: - run: cargo version - uses: stellar/stellar-cli@main with: - version: 22.0.1 + version: 22.0.0 - run: stellar --version From 59989a976618f271ee851cd6cce0051060c0667d Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 17:16:24 +0100 Subject: [PATCH 35/55] fix the order --- ContractExamples/patches/xycloans.diff | 16 +++++++++++++++- ContractExamples/scripts/xycloans-populate.sh | 4 +--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ContractExamples/patches/xycloans.diff b/ContractExamples/patches/xycloans.diff index fbf383b8..f394395e 100644 --- a/ContractExamples/patches/xycloans.diff +++ b/ContractExamples/patches/xycloans.diff @@ -1,7 +1,21 @@ diff --git a/Cargo.toml b/Cargo.toml -index e3a7104..bcca0fe 100644 +index e3a7104..b18672f 100644 --- a/Cargo.toml +++ b/Cargo.toml +@@ -3,11 +3,11 @@ resolver = "2" + members = [ + #"flash-loan", + #"receiver-standard", ++ "pool", ++ "factory", + "examples/simple", + #"vault", + #"vault-interface", +- "factory", +- "pool" + ] + + [profile.release-with-logs] @@ -26,8 +26,8 @@ lto = true diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 9f2b58ad..6388fe1b 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -18,9 +18,7 @@ rustc --version | grep 1.82.0 || (echo "Run: rustup default 1.82.0"; exit 1) cd ${dir}/../xycloans patch --forward -p1 <../patches/xycloans.diff || (echo "patch already applied?") -stellar contract build --package xycloans-pool -stellar contract build --package xycloans-factory -stellar contract build --package simple +stellar contract build NET=testnet (stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) From c04f26884f04184c67a03aa1db7445ff26014a73 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Tue, 3 Dec 2024 17:20:35 +0100 Subject: [PATCH 36/55] downgrade to 1.81.0 --- .github/workflows/testnet.yml | 2 +- ContractExamples/scripts/build.sh | 9 ++------- ContractExamples/scripts/xycloans-populate.sh | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 1a5ef77d..760bffa7 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -17,7 +17,7 @@ jobs: - uses: stellar/actions/rust-cache@main # pin the rust version: https://github.com/stellar/rs-soroban-sdk/pull/1353 - run: | - rustup default 1.82.0 + rustup default 1.81.0 rustup update - run: cargo version - uses: stellar/stellar-cli@main diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index 1b032a49..b66c34ef 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # see: https://github.com/stellar/rs-soroban-sdk/pull/1353 -rustc --version | grep 1.82.0 || (echo "Run: rustup default 1.82.0"; exit 1) +rustc --version | grep 1.81.0 || (echo "Run: rustup default 1.8210"; exit 1) dir=$(cd `dirname $0`; pwd -P) cd ${dir}/.. @@ -9,10 +9,5 @@ cd ${dir}/.. # build our contracts and soroban-examples stellar contract build -# build xycloans -cd xycloans -./build.sh -cd ${dir} - -# When using rust over 1.82.0: +# When using rust over 1.81.0: #RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 6388fe1b..3706c02c 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -13,7 +13,7 @@ set -e dir=$(cd `dirname $0`; pwd -P) # see: https://github.com/stellar/rs-soroban-sdk/pull/1353 -rustc --version | grep 1.82.0 || (echo "Run: rustup default 1.82.0"; exit 1) +rustc --version | grep 1.81.0 || (echo "Run: rustup default 1.81.0"; exit 1) cd ${dir}/../xycloans patch --forward -p1 <../patches/xycloans.diff || (echo "patch already applied?") From 8a5fc2fb24e741d9d4ef419c835851df4c597d1e Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 10:59:39 +0100 Subject: [PATCH 37/55] patch the sample contract --- ContractExamples/patches/xycloans2.diff | 13 +++++++++++++ ContractExamples/scripts/xycloans-populate.sh | 1 + 2 files changed, 14 insertions(+) create mode 100644 ContractExamples/patches/xycloans2.diff diff --git a/ContractExamples/patches/xycloans2.diff b/ContractExamples/patches/xycloans2.diff new file mode 100644 index 00000000..9331bf8d --- /dev/null +++ b/ContractExamples/patches/xycloans2.diff @@ -0,0 +1,13 @@ +diff --git a/examples/simple/src/lib.rs b/examples/simple/src/lib.rs +index 021a924..c75abb1 100644 +--- a/examples/simple/src/lib.rs ++++ b/examples/simple/src/lib.rs +@@ -48,7 +48,7 @@ impl FlashLoanReceiver for FlashLoanReceiverContract { + .get::(&DataKey::Amount) + .unwrap(); + +- let total_amount = borrowed + compute_fee(&borrowed); ++ let total_amount = borrowed + compute_fee(&borrowed) + 1; + + let flash_loan = e + .storage() diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 3706c02c..d982bee8 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -17,6 +17,7 @@ rustc --version | grep 1.81.0 || (echo "Run: rustup default 1.81.0"; exit 1) cd ${dir}/../xycloans patch --forward -p1 <../patches/xycloans.diff || (echo "patch already applied?") +patch --forward -p1 <../patches/xycloans2.diff || (echo "patch already applied?") stellar contract build From 4fea9602ae59f0261cb7264b2994324da26160c4 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 15:19:38 +0100 Subject: [PATCH 38/55] update the unit test setup --- .github/workflows/main.yml | 34 ++++++++++++++-------------------- .github/workflows/testnet.yml | 5 ++--- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b082356..059908fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,29 +56,23 @@ jobs: toolchain: - stable steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - - run: rustup target add wasm32-unknown-unknown - - uses: stellar/binaries@v22 + # see: https://github.com/stellar/soroban-examples/blob/main/.github/workflows/rust.yml + - uses: stellar/actions/rust-cache@main + # pin the rust version: https://github.com/stellar/rs-soroban-sdk/pull/1353 + - run: | + rustup default 1.81.0 + rustup update + - run: cargo version + - uses: stellar/stellar-cli@main with: - name: soroban-cli - version: '20.0.0-rc.4.1' - # version 21 is not available in stellar/binaries yet - #version: '21.0.0-preview.1' + version: 22.0.0 + + - run: stellar --version + - name: build run: cd ContractExamples && cargo build --verbose --workspace --exclude "soroban-timelock-contract" --exclude "soroban-token-contract" - name: unit tests - run: cd ContractExamples && cargo test --verbose --workspace --exclude "soroban-timelock-contract" --exclude "soroban-token-contract" - - # v21 is not available in stellar/binaries yet - #- name: populating Setter - # run: | - # soroban network add \ - # --global testnet \ - # --rpc-url https://soroban-testnet.stellar.org:443 \ - # --network-passphrase "Test SDF Network ; September 2015" - # soroban keys generate --global alice --network testnet - # cd ContractExamples - # ./scripts/setter-populate.sh + run: cd ContractExamples && cargo test --verbose --workspace --exclude "soroban-timelock-contract" --exclude "soroban-token-contract" \ No newline at end of file diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 760bffa7..08fe50e0 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -10,9 +10,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Update submodules - run: | - git submodule update --init --recursive + with: + submodules: true # see: https://github.com/stellar/soroban-examples/blob/main/.github/workflows/rust.yml - uses: stellar/actions/rust-cache@main # pin the rust version: https://github.com/stellar/rs-soroban-sdk/pull/1353 From 1bfa6da789fc602888ed2db231a76586a89d7d6f Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 15:31:03 +0100 Subject: [PATCH 39/55] update sdk versions in the tests --- ContractExamples/Cargo.toml | 2 +- ContractExamples/contracts/alert/Cargo.toml | 2 +- ContractExamples/contracts/megacontract/Cargo.toml | 2 +- ContractExamples/contracts/setter/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index aebc10b5..07213d00 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.package] -version = "22.0.0-rc.3" +version = "22.0.0-rc.3.1" edition = "2021" [workspace.dependencies] diff --git a/ContractExamples/contracts/alert/Cargo.toml b/ContractExamples/contracts/alert/Cargo.toml index 18e030ab..74d2849d 100644 --- a/ContractExamples/contracts/alert/Cargo.toml +++ b/ContractExamples/contracts/alert/Cargo.toml @@ -12,4 +12,4 @@ doctest = false soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "21.6.0", features = ["testutils"] } +soroban-sdk = { version = "22.0.0-rc.3.1", features = ["testutils"] } diff --git a/ContractExamples/contracts/megacontract/Cargo.toml b/ContractExamples/contracts/megacontract/Cargo.toml index 9322746d..5315345e 100644 --- a/ContractExamples/contracts/megacontract/Cargo.toml +++ b/ContractExamples/contracts/megacontract/Cargo.toml @@ -12,4 +12,4 @@ doctest = false soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "21.6.0", features = ["testutils"] } +soroban-sdk = { version = "22.0.0-rc.3.1", features = ["testutils"] } diff --git a/ContractExamples/contracts/setter/Cargo.toml b/ContractExamples/contracts/setter/Cargo.toml index 6ece877a..eb05629c 100644 --- a/ContractExamples/contracts/setter/Cargo.toml +++ b/ContractExamples/contracts/setter/Cargo.toml @@ -12,4 +12,4 @@ doctest = false soroban-sdk = { workspace = true } [dev-dependencies] -soroban-sdk = { version = "21.6.0", features = ["testutils"] } +soroban-sdk = { version = "22.0.0-rc.3.1", features = ["testutils"] } From f26c902549cb3a0951a57a68030cdce9ad5e3fb2 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 15:48:58 +0100 Subject: [PATCH 40/55] update setter hash --- solarkraft/test/integration/callDecoder.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solarkraft/test/integration/callDecoder.test.ts b/solarkraft/test/integration/callDecoder.test.ts index 6a900fde..8a55c2fa 100644 --- a/solarkraft/test/integration/callDecoder.test.ts +++ b/solarkraft/test/integration/callDecoder.test.ts @@ -35,7 +35,7 @@ const SOROBAN_URL = 'https://soroban-testnet.stellar.org:443' // hard-coded WASM code hash of the setter contract on the ledger (deployed via setter-populate.sh) const WASM_HASH = - '61da69e298a4c923eb699c22f4846cfb5f4926ab2b6a572bb85729e108a968d4' + 'c531f315ccc0f4d3f3d393e8b0e54a4911f3a434c3d06cd2cd895d6e3fa291c3' // contract ID of the deployed setter contract (will be set up by `before()`) let CONTRACT_ID: string From 1839444a2593f176d06b409f7bcf7db4bc692f37 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 15:56:52 +0100 Subject: [PATCH 41/55] bump dependencies --- solarkraft/package-lock.json | 532 +++++++++++------------- solarkraft/package.json | 8 +- solarkraft/src/verify_js.ts | 2 +- solarkraft/test/e2e/invokeAlert.test.ts | 2 +- 4 files changed, 247 insertions(+), 297 deletions(-) diff --git a/solarkraft/package-lock.json b/solarkraft/package-lock.json index db904cc4..665a49db 100644 --- a/solarkraft/package-lock.json +++ b/solarkraft/package-lock.json @@ -9,8 +9,8 @@ "version": "0.0.1", "license": "Apache-2.0", "dependencies": { - "@stellar/stellar-base": "^11.0.1", - "@stellar/stellar-sdk": "^12.2.0", + "@stellar/stellar-base": "^12.1.1", + "@stellar/stellar-sdk": "^13.0", "@sweet-monads/either": "^3.3.1", "@sweet-monads/maybe": "^3.3.1", "@types/urijs": "^1.19.25", @@ -29,7 +29,7 @@ "solarkraft": "dist/src/main.js" }, "devDependencies": { - "@eslint/js": "^9.0.0", + "@eslint/js": "^9.16.0", "@types/eventsource": "^1.1.15", "@types/lodash": "^4.17.9", "@types/node": "^20.11.26", @@ -44,7 +44,7 @@ "prettier": "^3.2.5", "ts-node": "^10.9.2", "typescript": "^5.4.5", - "typescript-eslint": "^7.6.0" + "typescript-eslint": "^8.17.0" }, "engines": { "node": ">=18" @@ -119,9 +119,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.0.0.tgz", - "integrity": "sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -321,12 +321,11 @@ "integrity": "sha512-VVolPL5goVEIsvuGqDc5uiKxV03lzfWdvYg1KikvwheDmTBO68CKDji3bAZ/kppZrx5iTA8z3Ld5yuytcvhvOQ==" }, "node_modules/@stellar/stellar-base": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-11.1.0.tgz", - "integrity": "sha512-nMg7QSpFqCZFq3Je/lG12+DY18y01QHRNyCxvjM8i4myS9tPRMDq7zqGcd215BGbCJxenckiOW45YJjQjzdcMQ==", - "deprecated": "⚠️ This version contains breaking changes, use v11.0.1 for compatibility or upgrade to v12.", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-12.1.1.tgz", + "integrity": "sha512-gOBSOFDepihslcInlqnxKZdIW9dMUO1tpOm3AtJR33K2OvpXG6SaVHCzAmCFArcCqI9zXTEiSoh70T48TmiHJA==", "dependencies": { - "@stellar/js-xdr": "^3.1.1", + "@stellar/js-xdr": "^3.1.2", "base32.js": "^0.1.0", "bignumber.js": "^9.1.2", "buffer": "^6.0.3", @@ -338,23 +337,24 @@ } }, "node_modules/@stellar/stellar-sdk": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-12.2.0.tgz", - "integrity": "sha512-Wy5sDOqb5JvAC76f4sQIV6Pe3JNyZb0PuyVNjwt3/uWsjtxRkFk6s2yTHTefBLWoR+mKxDjO7QfzhycF1v8FXQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-13.0.0.tgz", + "integrity": "sha512-+wvmKi+XWwu27nLYTM17EgBdpbKohEkOfCIK4XKfsI4WpMXAqvnqSm98i9h5dAblNB+w8BJqzGs1JY0PtTGm4A==", "dependencies": { - "@stellar/stellar-base": "^12.1.0", - "axios": "^1.7.2", + "@stellar/stellar-base": "^13.0.1", + "axios": "^1.7.7", "bignumber.js": "^9.1.2", "eventsource": "^2.0.2", + "feaxios": "^0.0.20", "randombytes": "^2.1.0", "toml": "^3.0.0", "urijs": "^1.19.1" } }, "node_modules/@stellar/stellar-sdk/node_modules/@stellar/stellar-base": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-12.1.0.tgz", - "integrity": "sha512-pWwn+XWP5NotmIteZNuJzHeNn9DYSqH3lsYbtFUoSYy1QegzZdi9D8dK6fJ2fpBAnf/rcDjHgHOw3gtHaQFVbg==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-13.0.1.tgz", + "integrity": "sha512-Xbd12mc9Oj/130Tv0URmm3wXG77XMshZtZ2yNCjqX5ZbMD5IYpbBs3DVCteLU/4SLj/Fnmhh1dzhrQXnk4r+pQ==", "dependencies": { "@stellar/js-xdr": "^3.1.2", "base32.js": "^0.1.0", @@ -364,7 +364,7 @@ "tweetnacl": "^1.0.3" }, "optionalDependencies": { - "sodium-native": "^4.1.1" + "sodium-native": "^4.3.0" } }, "node_modules/@sweet-monads/either": { @@ -427,12 +427,6 @@ "@types/node": "*" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "node_modules/@types/lodash": { "version": "4.17.9", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.9.tgz", @@ -453,45 +447,37 @@ "undici-types": "~5.26.4" } }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, "node_modules/@types/urijs": { "version": "1.19.25", "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz", "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz", - "integrity": "sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", + "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/type-utils": "7.6.0", - "@typescript-eslint/utils": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", - "debug": "^4.3.4", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/type-utils": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" + "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -500,26 +486,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", + "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -528,16 +514,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz", - "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", + "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0" + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -545,25 +531,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz", - "integrity": "sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", + "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/utils": "7.6.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/utils": "8.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -572,12 +558,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz", - "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", + "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", "dev": true, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -585,22 +571,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz", - "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", + "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", @@ -621,30 +607,10 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -657,47 +623,61 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.6.0.tgz", - "integrity": "sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", + "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", - "semver": "^7.6.0" + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz", - "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", + "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.6.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.17.0", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -833,9 +813,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1601,6 +1581,14 @@ "reusify": "^1.0.4" } }, + "node_modules/feaxios": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/feaxios/-/feaxios-0.0.20.tgz", + "integrity": "sha512-g3hm2YDNffNxA3Re3Hd8ahbpmDee9Fv1Pb1C/NoWsjY7mtD8nyNeJytUzn+DK0Hyl9o6HppeWOrtnqgmhOYfWA==", + "dependencies": { + "is-retry-allowed": "^3.0.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -2104,6 +2092,17 @@ "node": ">=8" } }, + "node_modules/is-retry-allowed": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-3.0.0.tgz", + "integrity": "sha512-9xH0xvoggby+u0uGF7cZXdrutWiBiaFG8ZT4YFPXL8NzkyAwX3AKGLeFQLvzDpM430+nDFBZ1LHkie/8ocL06A==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", @@ -2340,18 +2339,6 @@ "get-func-name": "^2.0.1" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -3070,13 +3057,10 @@ "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==" }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -3144,10 +3128,9 @@ } }, "node_modules/sodium-native": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.1.1.tgz", - "integrity": "sha512-LXkAfRd4FHtkQS4X6g+nRcVaN7mWVNepV06phIsC6+IZFvGh1voW5TNQiQp2twVaMf05gZqQjuS+uWLM6gHhNQ==", - "hasInstallScript": true, + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.3.1.tgz", + "integrity": "sha512-YdP64gAdpIKHfL4ttuX4aIfjeunh9f+hNeQJpE9C8UMndB3zkgZ7YmmGT4J2+v6Ibyp6Wem8D1TcSrtdW0bqtg==", "optional": true, "dependencies": { "node-gyp-build": "^4.8.0" @@ -3405,9 +3388,9 @@ "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" }, "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "engines": { "node": ">=16" @@ -3511,24 +3494,24 @@ } }, "node_modules/typescript-eslint": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.6.0.tgz", - "integrity": "sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.17.0.tgz", + "integrity": "sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "7.6.0", - "@typescript-eslint/parser": "7.6.0", - "@typescript-eslint/utils": "7.6.0" + "@typescript-eslint/eslint-plugin": "8.17.0", + "@typescript-eslint/parser": "8.17.0", + "@typescript-eslint/utils": "8.17.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "eslint": "^8.57.0 || ^9.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -3665,12 +3648,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", @@ -3790,9 +3767,9 @@ } }, "@eslint/js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.0.0.tgz", - "integrity": "sha512-RThY/MnKrhubF6+s1JflwUjPEsnCEmYCWwqa/aRISKWNXGZ9epUwft4bUMM35SdKF9xvBrLydAM1RDHd1Z//ZQ==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true }, "@humanwhocodes/config-array": { @@ -3933,11 +3910,11 @@ "integrity": "sha512-VVolPL5goVEIsvuGqDc5uiKxV03lzfWdvYg1KikvwheDmTBO68CKDji3bAZ/kppZrx5iTA8z3Ld5yuytcvhvOQ==" }, "@stellar/stellar-base": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-11.1.0.tgz", - "integrity": "sha512-nMg7QSpFqCZFq3Je/lG12+DY18y01QHRNyCxvjM8i4myS9tPRMDq7zqGcd215BGbCJxenckiOW45YJjQjzdcMQ==", + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-12.1.1.tgz", + "integrity": "sha512-gOBSOFDepihslcInlqnxKZdIW9dMUO1tpOm3AtJR33K2OvpXG6SaVHCzAmCFArcCqI9zXTEiSoh70T48TmiHJA==", "requires": { - "@stellar/js-xdr": "^3.1.1", + "@stellar/js-xdr": "^3.1.2", "base32.js": "^0.1.0", "bignumber.js": "^9.1.2", "buffer": "^6.0.3", @@ -3947,30 +3924,31 @@ } }, "@stellar/stellar-sdk": { - "version": "12.2.0", - "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-12.2.0.tgz", - "integrity": "sha512-Wy5sDOqb5JvAC76f4sQIV6Pe3JNyZb0PuyVNjwt3/uWsjtxRkFk6s2yTHTefBLWoR+mKxDjO7QfzhycF1v8FXQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/@stellar/stellar-sdk/-/stellar-sdk-13.0.0.tgz", + "integrity": "sha512-+wvmKi+XWwu27nLYTM17EgBdpbKohEkOfCIK4XKfsI4WpMXAqvnqSm98i9h5dAblNB+w8BJqzGs1JY0PtTGm4A==", "requires": { - "@stellar/stellar-base": "^12.1.0", - "axios": "^1.7.2", + "@stellar/stellar-base": "^13.0.1", + "axios": "^1.7.7", "bignumber.js": "^9.1.2", "eventsource": "^2.0.2", + "feaxios": "^0.0.20", "randombytes": "^2.1.0", "toml": "^3.0.0", "urijs": "^1.19.1" }, "dependencies": { "@stellar/stellar-base": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-12.1.0.tgz", - "integrity": "sha512-pWwn+XWP5NotmIteZNuJzHeNn9DYSqH3lsYbtFUoSYy1QegzZdi9D8dK6fJ2fpBAnf/rcDjHgHOw3gtHaQFVbg==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-13.0.1.tgz", + "integrity": "sha512-Xbd12mc9Oj/130Tv0URmm3wXG77XMshZtZ2yNCjqX5ZbMD5IYpbBs3DVCteLU/4SLj/Fnmhh1dzhrQXnk4r+pQ==", "requires": { "@stellar/js-xdr": "^3.1.2", "base32.js": "^0.1.0", "bignumber.js": "^9.1.2", "buffer": "^6.0.3", "sha.js": "^2.3.6", - "sodium-native": "^4.1.1", + "sodium-native": "^4.3.0", "tweetnacl": "^1.0.3" } } @@ -4036,12 +4014,6 @@ "@types/node": "*" } }, - "@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, "@types/lodash": { "version": "4.17.9", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.9.tgz", @@ -4061,87 +4033,79 @@ "undici-types": "~5.26.4" } }, - "@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", - "dev": true - }, "@types/urijs": { "version": "1.19.25", "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz", "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==" }, "@typescript-eslint/eslint-plugin": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.6.0.tgz", - "integrity": "sha512-gKmTNwZnblUdnTIJu3e9kmeRRzV2j1a/LUO27KNNAnIC5zjy1aSvXSRp4rVNlmAoHlQ7HzX42NbKpcSr4jF80A==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.17.0.tgz", + "integrity": "sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==", "dev": true, "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/type-utils": "7.6.0", - "@typescript-eslint/utils": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", - "debug": "^4.3.4", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/type-utils": "8.17.0", + "@typescript-eslint/utils": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/parser": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.6.0.tgz", - "integrity": "sha512-usPMPHcwX3ZoPWnBnhhorc14NJw9J4HpSXQX4urF2TPKG0au0XhJoZyX62fmvdHONUkmyUe74Hzm1//XA+BoYg==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.17.0.tgz", + "integrity": "sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.6.0.tgz", - "integrity": "sha512-ngttyfExA5PsHSx0rdFgnADMYQi+Zkeiv4/ZxGYUWd0nLs63Ha0ksmp8VMxAIC0wtCFxMos7Lt3PszJssG/E6w==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.17.0.tgz", + "integrity": "sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==", "dev": true, "requires": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0" + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0" } }, "@typescript-eslint/type-utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.6.0.tgz", - "integrity": "sha512-NxAfqAPNLG6LTmy7uZgpK8KcuiS2NZD/HlThPXQRGwz6u7MDBWRVliEEl1Gj6U7++kVJTpehkhZzCJLMK66Scw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.17.0.tgz", + "integrity": "sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "7.6.0", - "@typescript-eslint/utils": "7.6.0", + "@typescript-eslint/typescript-estree": "8.17.0", + "@typescript-eslint/utils": "8.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" } }, "@typescript-eslint/types": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.6.0.tgz", - "integrity": "sha512-h02rYQn8J+MureCvHVVzhl69/GAfQGPQZmOMjG1KfCl7o3HtMSlPaPUAPu6lLctXI5ySRGIYk94clD/AUMCUgQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.17.0.tgz", + "integrity": "sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.6.0.tgz", - "integrity": "sha512-+7Y/GP9VuYibecrCQWSKgl3GvUM5cILRttpWtnAu8GNL9j11e4tbuGZmZjJ8ejnKYyBRb2ddGQ3rEFCq3QjMJw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.17.0.tgz", + "integrity": "sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==", "dev": true, "requires": { - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/visitor-keys": "7.6.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/visitor-keys": "8.17.0", "debug": "^4.3.4", - "globby": "^11.1.0", + "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", @@ -4157,24 +4121,10 @@ "balanced-match": "^1.0.0" } }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, "minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -4183,28 +4133,33 @@ } }, "@typescript-eslint/utils": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.6.0.tgz", - "integrity": "sha512-x54gaSsRRI+Nwz59TXpCsr6harB98qjXYzsRxGqvA5Ue3kQH+FxS7FYU81g/omn22ML2pZJkisy6Q+ElK8pBCA==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.17.0.tgz", + "integrity": "sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.4.0", - "@types/json-schema": "^7.0.15", - "@types/semver": "^7.5.8", - "@typescript-eslint/scope-manager": "7.6.0", - "@typescript-eslint/types": "7.6.0", - "@typescript-eslint/typescript-estree": "7.6.0", - "semver": "^7.6.0" + "@typescript-eslint/scope-manager": "8.17.0", + "@typescript-eslint/types": "8.17.0", + "@typescript-eslint/typescript-estree": "8.17.0" } }, "@typescript-eslint/visitor-keys": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.6.0.tgz", - "integrity": "sha512-4eLB7t+LlNUmXzfOu1VAIAdkjbu5xNSerURS9X/S5TUKWFRpXRQZbmtPqgKmYx8bj3J0irtQXSiWAOY82v+cgw==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.17.0.tgz", + "integrity": "sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==", "dev": true, "requires": { - "@typescript-eslint/types": "7.6.0", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.17.0", + "eslint-visitor-keys": "^4.2.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true + } } }, "@ungap/structured-clone": { @@ -4306,9 +4261,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "axios": { - "version": "1.7.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", - "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", + "version": "1.7.9", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", + "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", "requires": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -4855,6 +4810,14 @@ "reusify": "^1.0.4" } }, + "feaxios": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/feaxios/-/feaxios-0.0.20.tgz", + "integrity": "sha512-g3hm2YDNffNxA3Re3Hd8ahbpmDee9Fv1Pb1C/NoWsjY7mtD8nyNeJytUzn+DK0Hyl9o6HppeWOrtnqgmhOYfWA==", + "requires": { + "is-retry-allowed": "^3.0.0" + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -5200,6 +5163,11 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" }, + "is-retry-allowed": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-3.0.0.tgz", + "integrity": "sha512-9xH0xvoggby+u0uGF7cZXdrutWiBiaFG8ZT4YFPXL8NzkyAwX3AKGLeFQLvzDpM430+nDFBZ1LHkie/8ocL06A==" + }, "is-stream": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", @@ -5377,15 +5345,6 @@ "get-func-name": "^2.0.1" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -5903,13 +5862,10 @@ "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==" }, "semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true }, "serialize-javascript": { "version": "6.0.0", @@ -5953,9 +5909,9 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, "sodium-native": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.1.1.tgz", - "integrity": "sha512-LXkAfRd4FHtkQS4X6g+nRcVaN7mWVNepV06phIsC6+IZFvGh1voW5TNQiQp2twVaMf05gZqQjuS+uWLM6gHhNQ==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.3.1.tgz", + "integrity": "sha512-YdP64gAdpIKHfL4ttuX4aIfjeunh9f+hNeQJpE9C8UMndB3zkgZ7YmmGT4J2+v6Ibyp6Wem8D1TcSrtdW0bqtg==", "optional": true, "requires": { "node-gyp-build": "^4.8.0" @@ -6160,9 +6116,9 @@ "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==" }, "ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "requires": {} }, @@ -6222,14 +6178,14 @@ "dev": true }, "typescript-eslint": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.6.0.tgz", - "integrity": "sha512-LY6vH6F1l5jpGqRtU+uK4+mOecIb4Cd4kaz1hAiJrgnNiHUA8wiw8BkJyYS+MRLM69F1QuSKwtGlQqnGl1Rc6w==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.17.0.tgz", + "integrity": "sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "7.6.0", - "@typescript-eslint/parser": "7.6.0", - "@typescript-eslint/utils": "7.6.0" + "@typescript-eslint/eslint-plugin": "8.17.0", + "@typescript-eslint/parser": "8.17.0", + "@typescript-eslint/utils": "8.17.0" } }, "undici-types": { @@ -6327,12 +6283,6 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/solarkraft/package.json b/solarkraft/package.json index aaa45798..edf8c663 100644 --- a/solarkraft/package.json +++ b/solarkraft/package.json @@ -41,8 +41,8 @@ "test": "mocha --loader=ts-node/esm --exclude test/e2e/**/*.test.ts --exclude test/integration/**/*.test.ts test/**/*.test.ts" }, "dependencies": { - "@stellar/stellar-base": "^11.0.1", - "@stellar/stellar-sdk": "^12.2.0", + "@stellar/stellar-base": "^12.1.1", + "@stellar/stellar-sdk": "^13.0", "@sweet-monads/either": "^3.3.1", "@sweet-monads/maybe": "^3.3.1", "@types/urijs": "^1.19.25", @@ -58,7 +58,7 @@ "yargs": "^17.7.2" }, "devDependencies": { - "@eslint/js": "^9.0.0", + "@eslint/js": "^9.16.0", "@types/eventsource": "^1.1.15", "@types/lodash": "^4.17.9", "@types/node": "^20.11.26", @@ -73,7 +73,7 @@ "prettier": "^3.2.5", "ts-node": "^10.9.2", "typescript": "^5.4.5", - "typescript-eslint": "^7.6.0" + "typescript-eslint": "^8.17.0" }, "engines": { "node": ">=18" diff --git a/solarkraft/src/verify_js.ts b/solarkraft/src/verify_js.ts index ca3786c2..ad0efe36 100644 --- a/solarkraft/src/verify_js.ts +++ b/solarkraft/src/verify_js.ts @@ -359,7 +359,7 @@ function logEvaluationError(e: Error) { console.error(' '.repeat(parseInt(pos) - 1) + '^') } }) - } catch (e) { + } catch { // fail silently } } diff --git a/solarkraft/test/e2e/invokeAlert.test.ts b/solarkraft/test/e2e/invokeAlert.test.ts index 18d3af55..93dc6e0e 100644 --- a/solarkraft/test/e2e/invokeAlert.test.ts +++ b/solarkraft/test/e2e/invokeAlert.test.ts @@ -24,7 +24,7 @@ describe('alert contract invocation', () => { sourceKeypair.publicKey() )}` ) - } catch (e) { + } catch { assert(false) } From bd5f0c8c10e0e499d2892c250f65e9b9f1f39b92 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 15:59:01 +0100 Subject: [PATCH 42/55] update after bumping stellar-sdk --- .../test/integration/callDecoder.test.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/solarkraft/test/integration/callDecoder.test.ts b/solarkraft/test/integration/callDecoder.test.ts index 8a55c2fa..e5417158 100644 --- a/solarkraft/test/integration/callDecoder.test.ts +++ b/solarkraft/test/integration/callDecoder.test.ts @@ -18,7 +18,7 @@ import { nativeToScVal, Networks, Operation, - SorobanRpc, + rpc, Transaction, TransactionBuilder, xdr, @@ -84,15 +84,15 @@ async function extractEntry(txHash: string): Promise { // submit a transaction, return its transaction hash and the response async function submitTx( - server: SorobanRpc.Server, + server: rpc.Server, tx: Transaction, keypair: Keypair ): Promise< [ string, ( - | SorobanRpc.Api.GetSuccessfulTransactionResponse - | SorobanRpc.Api.GetFailedTransactionResponse + | rpc.Api.GetSuccessfulTransactionResponse + | rpc.Api.GetFailedTransactionResponse ), ] > { @@ -128,13 +128,13 @@ async function callContract( [ string, ( - | SorobanRpc.Api.GetSuccessfulTransactionResponse - | SorobanRpc.Api.GetFailedTransactionResponse + | rpc.Api.GetSuccessfulTransactionResponse + | rpc.Api.GetFailedTransactionResponse ), ] > { // adapted from https://developers.stellar.org/docs/learn/encyclopedia/contract-development/contract-interactions/stellar-transaction#function - const server = new SorobanRpc.Server(SOROBAN_URL) + const server = new rpc.Server(SOROBAN_URL) // the deployed setter contract const contract = new Contract(CONTRACT_ID) @@ -171,7 +171,7 @@ describe('call decoder from Horizon', function () { // Redeploy a fresh copy of the setter contract WASM from CONTRACT_ID_TEMPLATE console.log(`Creating a contract from WASM code ${WASM_HASH} ...`) - const soroban = new SorobanRpc.Server(SOROBAN_URL) + const soroban = new rpc.Server(SOROBAN_URL) const sourceAccount = await soroban.getAccount(alice.publicKey()) const builtTransaction = new TransactionBuilder(sourceAccount, { fee: BASE_FEE, @@ -1321,7 +1321,7 @@ describe('call decoder from Horizon', function () { // submit 2 conflicting tx in parallel by different accounts to provoke a failed transaction // Craft a conflicting transaction - const server = new SorobanRpc.Server(SOROBAN_URL) + const server = new rpc.Server(SOROBAN_URL) const contract = new Contract(CONTRACT_ID) const sourceAccount = await server.getAccount(bob.publicKey()) const builtTransaction = new TransactionBuilder(sourceAccount, { From e5d7925313f5e7191c9a68afec4f24fc9b4f4e88 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 16:00:43 +0100 Subject: [PATCH 43/55] s/SorobanRpc/rpc --- solarkraft/src/verifier/invokeAlert.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solarkraft/src/verifier/invokeAlert.ts b/solarkraft/src/verifier/invokeAlert.ts index 3eeaf83d..88fcacb2 100644 --- a/solarkraft/src/verifier/invokeAlert.ts +++ b/solarkraft/src/verifier/invokeAlert.ts @@ -1,6 +1,6 @@ import { Contract, - SorobanRpc, + rpc, TransactionBuilder, Networks, BASE_FEE, @@ -33,7 +33,7 @@ export async function invokeAlert( verificationStatus: VerificationStatus ): Promise { const alertContract = new Contract(alertContractId) - const server = new SorobanRpc.Server(sorobanRpcServer) + const server = new rpc.Server(sorobanRpcServer) // We have to build the method params from the JS ones const txHashAsScVal = xdr.ScVal.scvString(txHash) From 921267897434e3949368e13e0c0b0187bc5c272e Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 16:05:46 +0100 Subject: [PATCH 44/55] change testnet to a cron job --- .github/workflows/testnet.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 08fe50e0..28b66606 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -2,8 +2,11 @@ name: Deployment to testnet on: workflow_dispatch: - # TODO: comment out after debugging in the draft PR - pull_request: + schedule: + # This cron expression triggers the workflow at 8:00 UTC every day + - cron: "8 0 * * *" + # uncomment to debug in a PR + #pull_request: jobs: build-and-deploy: From 5cd61969ac341334326937848e9236b9d0dc4282 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 18:50:01 +0100 Subject: [PATCH 45/55] use RPC getTransaction since result_meta_xdr is gone from Horizon --- solarkraft/src/fetch.ts | 8 ++++++-- solarkraft/src/fetcher/callDecoder.ts | 12 ++++++++++-- solarkraft/src/main.ts | 7 ++++++- solarkraft/test/integration/callDecoder.test.ts | 2 ++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/solarkraft/src/fetch.ts b/solarkraft/src/fetch.ts index f32585d2..2bf5fe0e 100644 --- a/solarkraft/src/fetch.ts +++ b/solarkraft/src/fetch.ts @@ -42,7 +42,7 @@ * those values are indistinguishable from vectors at the transaction data layer. */ -import { Horizon } from '@stellar/stellar-sdk' +import { Horizon, rpc } from '@stellar/stellar-sdk' import { extractContractCall } from './fetcher/callDecoder.js' import { loadFetcherState, @@ -67,7 +67,10 @@ export async function fetch(args: any) { return } - const server = new Horizon.Server(args.rpc) + // previously, we used the Horizon API + const server = new Horizon.Server(args.horizon) + // but now we also need the Soroban RPC to extract detailed transactions + const rpcServer = new rpc.Server(args.rpc) const contractId = args.id console.log(`Target contract: ${contractId}...`) @@ -122,6 +125,7 @@ export async function fetch(args: any) { } op = op as Horizon.ServerApi.InvokeHostFunctionOperationRecord const callEntryMaybe = await extractContractCall( + rpcServer, op, (id) => contractId === id, typemapJson diff --git a/solarkraft/src/fetcher/callDecoder.ts b/solarkraft/src/fetcher/callDecoder.ts index 654b2a8b..dd4aa984 100644 --- a/solarkraft/src/fetcher/callDecoder.ts +++ b/solarkraft/src/fetcher/callDecoder.ts @@ -10,7 +10,7 @@ * @license [Apache-2.0](https://github.com/freespek/solarkraft/blob/main/LICENSE) */ -import sdk, { Address, Horizon } from '@stellar/stellar-sdk' +import sdk, { Address, Horizon, rpc } from '@stellar/stellar-sdk' import { ContractCallEntry, emptyContractStorage, @@ -26,6 +26,7 @@ import { Maybe, just, none } from '@sweet-monads/maybe' * @param matcher a quick matcher over the contractId to avoid expensive deserialization */ export async function extractContractCall( + rpcServer: rpc.Server, op: Horizon.ServerApi.InvokeHostFunctionOperationRecord, matcher: (contractId: string) => boolean, typemapJson: any = {} @@ -80,9 +81,16 @@ export async function extractContractCall( // https://developers.stellar.org/network/horizon/api-reference/resources/transactions/object const height = tx.ledger_attr + // Since Horizon does not return tx.result_meta_xdr anymore, make another query with getTransaction + const txDetails = await rpcServer.getTransaction(txHash) + if (txDetails.status == rpc.Api.GetTransactionStatus.NOT_FOUND) { + // this transaction is missing + return none() + } + // The operation itself does not give us the ledger updates. // Deserialize tx.result_meta_xdr. - const meta = sdk.xdr.TransactionMeta.fromXDR(tx.result_meta_xdr, 'base64') + const meta = txDetails.resultMetaXdr // extract transaction metadata for version 3 if (meta.switch() !== 3) { // Is it possible to have older transaction metadata with Soroban? diff --git a/solarkraft/src/main.ts b/solarkraft/src/main.ts index b6ab6640..fa74d404 100644 --- a/solarkraft/src/main.ts +++ b/solarkraft/src/main.ts @@ -42,11 +42,16 @@ const fetchCmd = { type: 'string', require: false, }) - .option('rpc', { + .option('horizon', { desc: 'URL of a Horizon endpoint', type: 'string', default: 'https://horizon-testnet.stellar.org', }) + .option('rpc', { + desc: 'URL of a Soroban RPC endpoint', + type: 'string', + default: 'https://soroban-testnet.stellar.org', + }) .option('height', { desc: 'The height to start with (a negative value -n goes from the latest block - n)', type: 'number', diff --git a/solarkraft/test/integration/callDecoder.test.ts b/solarkraft/test/integration/callDecoder.test.ts index e5417158..d6291093 100644 --- a/solarkraft/test/integration/callDecoder.test.ts +++ b/solarkraft/test/integration/callDecoder.test.ts @@ -57,10 +57,12 @@ const bytes32 = Buffer.from([ // extract the only contract entry from a given ledger async function extractEntry(txHash: string): Promise { const server = new Horizon.Server(HORIZON_URL) + const rpcServer = new rpc.Server(SOROBAN_URL) const operations = await server.operations().forTransaction(txHash).call() let resultingEntry: Maybe = none() for (const op of operations.records) { const entry = await extractContractCall( + rpcServer, op as Horizon.ServerApi.InvokeHostFunctionOperationRecord, (id) => id === CONTRACT_ID ) From 424b3bc91845521a63a8a78c8f2c67cffbeba8bb Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 19:11:18 +0100 Subject: [PATCH 46/55] remove commented out code --- .github/workflows/testnet.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 28b66606..fd48bac9 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -59,9 +59,4 @@ jobs: - name: Deploy xycloans run: | cd ContractExamples - ./scripts/xycloans-populate.sh - - #- uses: actions/setup-node@v3 - # with: - # node-version: '16' - # stellar keys generate --global admin --network testnet --fund \ No newline at end of file + ./scripts/xycloans-populate.sh \ No newline at end of file From def3579b6697ef9d85bbd107ba4b2c3788ae7d6b Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Wed, 4 Dec 2024 19:14:46 +0100 Subject: [PATCH 47/55] fix a typo --- ContractExamples/scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index b66c34ef..a5b0be0d 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # see: https://github.com/stellar/rs-soroban-sdk/pull/1353 -rustc --version | grep 1.81.0 || (echo "Run: rustup default 1.8210"; exit 1) +rustc --version | grep 1.81.0 || (echo "Run: rustup default 1.81.0"; exit 1) dir=$(cd `dirname $0`; pwd -P) cd ${dir}/.. From 41b17deea521bf2e4094c1a368b9b392d19e5329 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 10:34:20 +0100 Subject: [PATCH 48/55] fixed after review --- ContractExamples/.cargo/config.toml | 2 -- ContractExamples/Cargo.toml | 1 - ContractExamples/scripts/prepare-timelock.sh | 1 - solarkraft/src/fetcher/callDecoder.ts | 3 +++ 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 ContractExamples/.cargo/config.toml diff --git a/ContractExamples/.cargo/config.toml b/ContractExamples/.cargo/config.toml deleted file mode 100644 index 51f5802c..00000000 --- a/ContractExamples/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.wasm32-unknown-unknown] -rustflags = ["-C", "target-feature=+bulk-memory"] \ No newline at end of file diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index 07213d00..d8f94cce 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -12,7 +12,6 @@ edition = "2021" [workspace.dependencies] soroban-sdk = { version = "22.0.0-rc.3.1" } -soroban-token-sdk = { version = "22.0.0-rc.3.1" } [profile.release] opt-level = "z" diff --git a/ContractExamples/scripts/prepare-timelock.sh b/ContractExamples/scripts/prepare-timelock.sh index 491264e3..31a62e1b 100755 --- a/ContractExamples/scripts/prepare-timelock.sh +++ b/ContractExamples/scripts/prepare-timelock.sh @@ -22,7 +22,6 @@ stellar keys address $BOB || (echo "add the account $BOB via stellar keys genera ./scripts/build.sh stellar contract deploy \ - --salt `date +%s` \ --source-account alice \ --network testnet \ --wasm ./target/wasm32-unknown-unknown/release/soroban_token_contract.wasm \ diff --git a/solarkraft/src/fetcher/callDecoder.ts b/solarkraft/src/fetcher/callDecoder.ts index dd4aa984..a81def59 100644 --- a/solarkraft/src/fetcher/callDecoder.ts +++ b/solarkraft/src/fetcher/callDecoder.ts @@ -85,6 +85,9 @@ export async function extractContractCall( const txDetails = await rpcServer.getTransaction(txHash) if (txDetails.status == rpc.Api.GetTransactionStatus.NOT_FOUND) { // this transaction is missing + console.log( + `Transaction ${txHash} reported by Horizon but not found by Soroban RPC` + ) return none() } From 6a64b8a0c8575ea82953637ac1d537477f56e61e Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 10:35:42 +0100 Subject: [PATCH 49/55] remove unnecessary profiles --- ContractExamples/Cargo.toml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ContractExamples/Cargo.toml b/ContractExamples/Cargo.toml index d8f94cce..8c7037c0 100644 --- a/ContractExamples/Cargo.toml +++ b/ContractExamples/Cargo.toml @@ -26,10 +26,4 @@ lto = true # For more information about this profile see https://soroban.stellar.org/docs/basic-tutorials/logging#cargotoml-profile [profile.release-with-logs] inherits = "release" -debug-assertions = true - -[profile.release.package.soroban-env-host] -debug = false - -[profile.release.package.stellar-xdr] -debug = false \ No newline at end of file +debug-assertions = true \ No newline at end of file From da6300d4f51777f3d707cd2323fd6d593bce18a8 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 10:40:08 +0100 Subject: [PATCH 50/55] uncomment a workflow --- .github/workflows/testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index fd48bac9..9f958947 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -6,7 +6,7 @@ on: # This cron expression triggers the workflow at 8:00 UTC every day - cron: "8 0 * * *" # uncomment to debug in a PR - #pull_request: + pull_request: jobs: build-and-deploy: From 0ab2f7e295f7f58253276ae3975f70eeb0ad5362 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 10:46:50 +0100 Subject: [PATCH 51/55] remove @stellar/stellar-base --- solarkraft/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/solarkraft/package.json b/solarkraft/package.json index edf8c663..352d04ee 100644 --- a/solarkraft/package.json +++ b/solarkraft/package.json @@ -41,7 +41,6 @@ "test": "mocha --loader=ts-node/esm --exclude test/e2e/**/*.test.ts --exclude test/integration/**/*.test.ts test/**/*.test.ts" }, "dependencies": { - "@stellar/stellar-base": "^12.1.1", "@stellar/stellar-sdk": "^13.0", "@sweet-monads/either": "^3.3.1", "@sweet-monads/maybe": "^3.3.1", From 1a75c78dbe95e97285f31d9d8e9038fde097a48f Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 10:59:25 +0100 Subject: [PATCH 52/55] use build.sh --- ContractExamples/scripts/build.sh | 7 +++++++ ContractExamples/scripts/xycloans-populate.sh | 10 +--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index a5b0be0d..2f4eee0a 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -9,5 +9,12 @@ cd ${dir}/.. # build our contracts and soroban-examples stellar contract build +# build xycloans +cd ${dir}/../xycloans +patch --forward -p1 <../patches/xycloans.diff || (echo "patch already applied?") +patch --forward -p1 <../patches/xycloans2.diff || (echo "patch already applied?") + +stellar contract build + # When using rust over 1.81.0: #RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index d982bee8..3c9230c6 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -12,15 +12,7 @@ set -e dir=$(cd `dirname $0`; pwd -P) -# see: https://github.com/stellar/rs-soroban-sdk/pull/1353 -rustc --version | grep 1.81.0 || (echo "Run: rustup default 1.81.0"; exit 1) - -cd ${dir}/../xycloans -patch --forward -p1 <../patches/xycloans.diff || (echo "patch already applied?") -patch --forward -p1 <../patches/xycloans2.diff || (echo "patch already applied?") - -stellar contract build - +${dir}/build.sh NET=testnet (stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) From 9ffb1bf523ecd6a98e3db3d36ac5e519f3244492 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 11:04:44 +0100 Subject: [PATCH 53/55] go back --- ContractExamples/scripts/build.sh | 2 ++ ContractExamples/scripts/xycloans-populate.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ContractExamples/scripts/build.sh b/ContractExamples/scripts/build.sh index 2f4eee0a..b9582c23 100755 --- a/ContractExamples/scripts/build.sh +++ b/ContractExamples/scripts/build.sh @@ -16,5 +16,7 @@ patch --forward -p1 <../patches/xycloans2.diff || (echo "patch already applied?" stellar contract build +cd ${dir} + # When using rust over 1.81.0: #RUSTFLAGS="-C target-feature=-reference-types" cargo build --target wasm32-unknown-unknown --release \ No newline at end of file diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 3c9230c6..86e344c5 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -13,6 +13,8 @@ set -e dir=$(cd `dirname $0`; pwd -P) ${dir}/build.sh +cd ${dir}/.. + NET=testnet (stellar network ls | grep -q $NET) || (echo "add testnet via stellar network"; exit 1) From 3faccf6978d80439cc51ef20c2b7c900d5783350 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 11:13:08 +0100 Subject: [PATCH 54/55] fix the path --- ContractExamples/scripts/xycloans-populate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ContractExamples/scripts/xycloans-populate.sh b/ContractExamples/scripts/xycloans-populate.sh index 86e344c5..a65d8b95 100755 --- a/ContractExamples/scripts/xycloans-populate.sh +++ b/ContractExamples/scripts/xycloans-populate.sh @@ -33,11 +33,11 @@ BORROW_AMOUNT=1000 set -x -stellar contract deploy --wasm target/wasm32-unknown-unknown/release/xycloans_factory.wasm \ +stellar contract deploy --wasm ./xycloans/target/wasm32-unknown-unknown/release/xycloans_factory.wasm \ --source $ADMIN --network $NET | tee >.xycloans_factory.id -stellar contract deploy --wasm target/wasm32-unknown-unknown/release/simple.wasm \ +stellar contract deploy --wasm ./xycloans/target/wasm32-unknown-unknown/release/simple.wasm \ --source $ADMIN --network $NET | tee >.xycloans_simple.id -stellar contract install --wasm target/wasm32-unknown-unknown/release/xycloans_pool.wasm \ +stellar contract install --wasm ./xycloans/target/wasm32-unknown-unknown/release/xycloans_pool.wasm \ --source $ADMIN --network $NET | tee >.xycloans_pool.wasmhash # initialize the factory contract and deploy a pool From 8a19d02de22a50d9d5bb0eab69456d3d91b56a14 Mon Sep 17 00:00:00 2001 From: Igor Konnov Date: Thu, 5 Dec 2024 11:20:57 +0100 Subject: [PATCH 55/55] comment testnet.yml on pull_request --- .github/workflows/testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index 9f958947..fd48bac9 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -6,7 +6,7 @@ on: # This cron expression triggers the workflow at 8:00 UTC every day - cron: "8 0 * * *" # uncomment to debug in a PR - pull_request: + #pull_request: jobs: build-and-deploy: