You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
soroban version
soroban 20.3.1 (ae5446f63ca8a275e61912019199254d598f3bd5)
soroban-env 20.2.1 (18a10592853d9edf4e341b565b0b1638f95f0393)
soroban-env interface version 85899345920
stellar-xdr 20.1.0 (8b9d623ef40423a8462442b86997155f2c04d3a1)
xdr curr (b96148cd4acc372cc9af17b909ffe4b12c43ecb6)
cargo version
cargo 1.77.0 (3fe68eabf 2024-02-29)
node --version
v21.6.1
What did you do?
Initialized a directory with hello world and incement then ran
soroban contract init ./ --frontend-template https://github.com/AhaLabs/soroban-astro-template
ℹ️ Initializing project at ./
...
thread 'main' panicked at ${HOME}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/soroban-cli-20.3.1/src/commands/contract/init.rs:407:49:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
What did you expect to see?
Expected a successful initializaton
What did you see instead?
Failed initialization
$ mkdir api
$ cd api
$ soroban contract init getting-started-tutorial
ℹ️ Initializing project at getting-started-tutorial
➕ Writing getting-started-tutorial/.gitignore
➕ Writing getting-started-tutorial/Cargo.lock
➕ Writing getting-started-tutorial/Cargo.toml
➕ Writing getting-started-tutorial/README.md
$ ls -al
total 12
drwxrwxr-x 3 david david 4096 Mar 28 09:01 .
drwxrwxr-x 7 david david 4096 Mar 28 09:01 ..
drwxrwxr-x 2 david david 4096 Mar 28 09:01 getting-started-tutorial
$ cd getting-started-tutorial/
$ ls
Cargo.lock Cargo.toml README.md
$ soroban contract init hello-soroban
ℹ️ Initializing project at hello-soroban
➕ Writing hello-soroban/.gitignore
➕ Writing hello-soroban/Cargo.lock
➕ Writing hello-soroban/Cargo.toml
➕ Writing hello-soroban/README.md
$ ls -al
total 64
drwxrwxr-x 3 david david 4096 Mar 28 09:01 .
drwxrwxr-x 3 david david 4096 Mar 28 09:01 ..
-rw-rw-r-- 1 david david 37912 Mar 28 09:01 Cargo.lock
-rw-rw-r-- 1 david david 458 Mar 28 09:01 Cargo.toml
-rw-rw-r-- 1 david david 96 Mar 28 09:01 .gitignore
drwxrwxr-x 2 david david 4096 Mar 28 09:01 hello-soroban
-rw-rw-r-- 1 david david 976 Mar 28 09:01 README.md
$ soroban contract init ./ --with-example increment
ℹ️ Initializing project at ./
ℹ️ Skipped creating ./.gitignore as it already exists
ℹ️ Skipped creating ./Cargo.lock as it already exists
➕ Writing ./Cargo.toml
ℹ️ Skipped creating ./README.md as it already exists
ℹ️ Initializing example contract: increment
➕ Writing ./contracts/increment/Cargo.toml
➕ Writing ./contracts/increment/Cargo.lock
➕ Writing ./contracts/increment/src/lib.rs
➕ Writing ./contracts/increment/src/test.rs
$ mv hello-soroban/ contracts/
$ ls -al
total 64
drwxrwxr-x 3 david david 4096 Mar 28 09:02 .
drwxrwxr-x 3 david david 4096 Mar 28 09:01 ..
-rw-rw-r-- 1 david david 37912 Mar 28 09:01 Cargo.lock
-rw-rw-r-- 1 david david 458 Mar 28 09:02 Cargo.toml
drwxrwxr-x 4 david david 4096 Mar 28 09:02 contracts
-rw-rw-r-- 1 david david 96 Mar 28 09:01 .gitignore
-rw-rw-r-- 1 david david 976 Mar 28 09:01 README.md
$ git init
Initialized empty Git repository in ${HOME}/work/api/getting-started-tutorial/.git/
$ git add .
$ git commit -a -m 'initial commit'
[main (root-commit) eeb7993] initial commit
12 files changed, 4678 insertions(+)
create mode 100644 .gitignore
create mode 100644 Cargo.lock
create mode 100644 Cargo.toml
create mode 100644 README.md
create mode 100644 contracts/hello-soroban/.gitignore
create mode 100644 contracts/hello-soroban/Cargo.lock
create mode 100644 contracts/hello-soroban/Cargo.toml
create mode 100644 contracts/hello-soroban/README.md
create mode 100644 contracts/increment/Cargo.lock
create mode 100644 contracts/increment/Cargo.toml
create mode 100644 contracts/increment/src/lib.rs
create mode 100644 contracts/increment/src/test.rs
$ soroban contract init ./ --frontend-template https://github.com/AhaLabs/soroban-astro-template
ℹ️ Initializing project at ./
ℹ️ Skipped creating ./.gitignore as it already exists
ℹ️ Skipped creating ./Cargo.lock as it already exists
➕ Writing ./Cargo.toml
ℹ️ Skipped creating ./README.md as it already exists
ℹ️ Initializing with frontend template
ℹ️ Skipped creating ./Cargo.toml as it already exists
➕ Writing ./astro.config.mjs
➕ Writing ./.env.example
➕ Writing ./initialize.js
➕ Writing ./public/favicon.svg
➕ Writing ./tsconfig.json
ℹ️ Skipped creating ./README.md as it already exists
➕ Writing ./package.json
ℹ️ Skipped creating ./Cargo.lock as it already exists
➕ Writing ./src/env.d.ts
➕ Writing ./src/layouts/Layout.astro
➕ Writing ./src/components/Card.astro
➕ Writing ./src/contracts/util.ts
➕ Writing ./src/pages/index.astro
➕ Writing ./CONTRIBUTING.md
➕ Writing ./.gitattributes
➕ Writing ./packages/.gitkeep
➕ Writing ./package-lock.json
thread 'main' panicked at ${HOME}/.cargo/registry/src/index.crates.io-6f17d22bba15001f/soroban-cli-20.3.1/src/commands/contract/init.rs:407:49:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
This was resolved as of release v20.3.4, specifically in this PR: #1224. I've tested this out with v20.3.4 and the most recent release (21.0.0) and was not able to reproduce this error on those releases.
What version are you using?
What did you do?
Initialized a directory with hello world and incement then ran
What did you expect to see?
Expected a successful initializaton
What did you see instead?
Failed initialization
The text was updated successfully, but these errors were encountered: