TransactionGasLimit during deployment a contract on beta-4

Hello there, I’m trying to deploy that contract on beta-4:

Using that test:

From that address fuel1tnt6jrwudexfhfvuprule40vt8c6hxvcpz9zs9m089vq83aag56qfvvrx8 (balance = 5eth)

But I have the next error:

 *  Executing task: cargo test --package src20_sdk --test deploy -- deploy --exact --nocapture 

   Compiling src20_sdk v0.0.3 (/Users/alexey/projects/fuel/src-20)
    Finished test [unoptimized + debuginfo] target(s) in 3.05s
     Running tests/deploy.rs (target/debug/deps/deploy-616e98a2176cc357)

running 1 test
thread 'deploy' panicked at 'called `Result::unwrap()` on an `Err` value: IOError(Custom { kind: Other, error: "Response errors; TransactionGasLimit" })', /Users/alexey/projects/fuel/src-20/src/lib.rs:30:10
stack backtrace:
   0: rust_begin_unwind
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
   2: core::result::unwrap_failed
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/result.rs:1651:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/result.rs:1076:23
   4: src20_sdk::deploy_token_factory_contract::{{closure}}
             at ./src/lib.rs:26:14
   5: deploy::deploy::{{closure}}
             at ./tests/deploy.rs:63:72
   6: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/future/future.rs:125:9
   7: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/future/future.rs:125:9
   8: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:665:57
   9: tokio::runtime::coop::with_budget
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/coop.rs:107:5
  10: tokio::runtime::coop::budget
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/coop.rs:73:5
  11: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:665:25
  12: tokio::runtime::scheduler::current_thread::Context::enter
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:410:19
  13: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:664:36
  14: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:743:68
  15: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/context/scoped.rs:40:9
  16: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/context.rs:176:26
  17: std::thread::local::LocalKey<T>::try_with
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/thread/local.rs:270:16
  18: std::thread::local::LocalKey<T>::with
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/thread/local.rs:246:9
  19: tokio::runtime::context::set_scheduler
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/context.rs:176:9
  20: tokio::runtime::scheduler::current_thread::CoreGuard::enter
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:743:27
  21: tokio::runtime::scheduler::current_thread::CoreGuard::block_on
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:652:19
  22: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:175:28
  23: tokio::runtime::context::runtime::enter_runtime
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/context/runtime.rs:65:16
  24: tokio::runtime::scheduler::current_thread::CurrentThread::block_on
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/scheduler/current_thread/mod.rs:167:9
  25: tokio::runtime::runtime::Runtime::block_on
             at /Users/alexey/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.31.0/src/runtime/runtime.rs:347:47
  26: deploy::deploy
             at ./tests/deploy.rs:74:5
  27: deploy::deploy::{{closure}}
             at ./tests/deploy.rs:16:19
  28: core::ops::function::FnOnce::call_once
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5
  29: core::ops::function::FnOnce::call_once
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
test deploy ... FAILED

failures:

failures:
    deploy

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.70s

error: test failed, to rerun pass `-p src20_sdk --test deploy`

 *  The terminal process "cargo 'test', '--package', 'src20_sdk', '--test', 'deploy', '--', 'deploy', '--exact', '--nocapture'" terminated with exit code: 101. 
 *  Terminal will be reused by tasks, press any key to close it. 

My toolchain

Default host: aarch64-apple-darwin
fuelup home: /Users/alexey/.fuelup

installed toolchains
--------------------
beta-3-aarch64-apple-darwin
beta-4-rc.2-aarch64-apple-darwin (default)
latest-aarch64-apple-darwin
hotfix
my-custom-toolchain

active toolchain
-----------------
beta-4-rc.2-aarch64-apple-darwin (default)
  forc : 0.44.0
    - forc-client
      - forc-deploy : 0.44.0
      - forc-run : 0.44.0
    - forc-doc : 0.44.0
    - forc-explore : 0.28.1
    - forc-fmt : 0.44.0
    - forc-index : 0.19.5
    - forc-lsp : 0.44.0
    - forc-tx : 0.44.0
    - forc-wallet : 0.2.5
  fuel-core : 0.20.4
  fuel-core-keygen : Error getting version string
  fuel-indexer : 0.19.5

fuels versions
---------------
forc : 0.45
forc-wallet : 0.45
1 Like

Hi there!
I’m trying to replicate but can’t compile

error
  --> /.../compolabs/src-20/contract/src/main.sw:50:9
   |
48 |
49 |         storage.total_supply.write(storage.total_supply.try_read().unwrap_or(0) + 1);
50 |         mint_to_address(amount, recipient);
   |         ^^^^^^^^^^^^^^^ Function "mint_to_address" expects 3 arguments but you provided 2.
51 |     }
52 | }
   |

fuelup show

active toolchain

latest-x86_64-unknown-linux-gnu (default)
forc : 0.44.1
- forc-client
- forc-deploy : 0.44.1
- forc-run : 0.44.1
- forc-doc : 0.44.1
- forc-explore : 0.28.1
- forc-fmt : 0.44.1
- forc-index : 0.20.1
- forc-lsp : 0.44.1
- forc-tx : 0.44.1
- forc-wallet : 0.2.5
fuel-core : 0.20.4
fuel-core-keygen : Error getting version string
fuel-indexer : 0.20.1

fuels versions

forc : 0.45

1 Like

You need to go to another branch token-factory

Also, I tried to deploy it using forc wallet and --gas-limit 10000000 helps to resolve the problem

I added gas_limit into my functions, but the error is the same

@sandusky

git clone git@github.com:compolabs/src-20.git
cd src-20
git checkout token-factory
cd contract
forc build
cd ..
echo "ADMIN=<YOUR PRIVATE KEY>" >> .env 
cargo test --package src20_sdk --test deploy -- deploy --exact --nocapture 
1 Like

HI there!

I was able to deploy with:

forc-deploy --node-url https://beta-4.fuel.network/graphql --gas-price 1 --gas-limit 1

Also I was able to replicate your err with the given instructions

IMO It doesn’t seems to be a problem on the node itself but in the sdk

I’ll take it to the sdk team and let you know, thanks

1 Like

This might be the issue:

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.