I trying to develop token dapp (psp22) with swanky.
And I tried compile contract but bellow error occured.
======== Found contracts ========
mytoken
======== Compiling mytoken ========
warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
ERROR: Error invoking `cargo metadata`
Caused by:
`cargo metadata` exited with an error: warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
Updating crates.io index
error: failed to get `ink_engine` as a dependency of package `mytoken v0.1.0 (/Users/harukikondo/git/Astar-FT/mytoken/contracts/mytoken)`
Caused by:
failed to load source for dependency `ink_engine`
Caused by:
Unable to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
process didn't exit successfully: `git fetch --force --update-head-ok 'https://github.com/rust-lang/crates.io-index' '+HEAD:refs/remotes/origin/HEAD'` (exit status: 255)
--- stderr
error: cannot open 'FETCH_HEAD': Permission denied
Error: Command failed: cargo +nightly contract build --manifest-path contracts/mytoken/Cargo.toml
warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
ERROR: Error invoking `cargo metadata`
Caused by:
`cargo metadata` exited with an error: warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
warning: Both `/Users/harukikondo/.cargo/config` and `/Users/harukikondo/.cargo/config.toml` exist. Using `/Users/harukikondo/.cargo/config`
Updating crates.io index
error: failed to get `ink_engine` as a dependency of package `mytoken v0.1.0 (/Users/harukikondo/git/Astar-FT/mytoken/contracts/mytoken)`
Caused by:
failed to load source for dependency `ink_engine`
Caused by:
Unable to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
process didn't exit successfully: `git fetch --force --update-head-ok 'https://github.com/rust-lang/crates.io-index' '+HEAD:refs/remotes/origin/HEAD'` (exit status: 255)
--- stderr
error: cannot open 'FETCH_HEAD': Permission denied
at checkExecSyncError (node:child_process:871:11)
at execSync (node:child_process:943:15)
at main (/Users/harukikondo/git/Astar-FT/mytoken/node_modules/@supercolony/typechain-compiler/index.ts:88:12)
at Object.<anonymous> (/Users/harukikondo/git/Astar-FT/mytoken/node_modules/@supercolony/typechain-compiler/index.ts:143:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module.m._compile (/Users/harukikondo/git/Astar-FT/mytoken/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Object.require.extensions.<computed> [as .ts] (/Users/harukikondo/git/Astar-FT/mytoken/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1037:32) {
status: 1,
signal: null,
output: [
null,
Buffer(156) [Uint8Array] [
27, 91, 50, 109, 50, 48, 50, 50, 45, 49, 50, 45,
50, 48, 84, 49, 51, 58, 48, 57, 58, 49, 48, 46,
52, 53, 51, 48, 57, 56, 90, 27, 91, 48, 109, 32,
27, 91, 51, 50, 109, 32, 73, 78, 70, 79, 27, 91,
48, 109, 32, 27, 91, 50, 109, 99, 97, 114, 103, 111,
95, 99, 111, 110, 116, 114, 97, 99, 116, 58, 58, 99,
114, 97, 116, 101, 95, 109, 101, 116, 97, 100, 97, 116,
97, 27, 91, 48, 109, 27, 91, 50, 109, 58, 27, 91,
48, 109, 32, 70,
... 56 more items
],
Buffer(1336) [Uint8Array] [
119, 97, 114, 110, 105, 110, 103, 58, 32, 66, 111, 116,
104, 32, 96, 47, 85, 115, 101, 114, 115, 47, 104, 97,
114, 117, 107, 105, 107, 111, 110, 100, 111, 47, 46, 99,
97, 114, 103, 111, 47, 99, 111, 110, 102, 105, 103, 96,
32, 97, 110, 100, 32, 96, 47, 85, 115, 101, 114, 115,
47, 104, 97, 114, 117, 107, 105, 107, 111, 110, 100, 111,
47, 46, 99, 97, 114, 103, 111, 47, 99, 111, 110, 102,
105, 103, 46, 116, 111, 109, 108, 96, 32, 101, 120, 105,
115, 116, 46, 32,
... 1236 more items
]
],
pid: 5852,
stdout: Buffer(156) [Uint8Array] [
27, 91, 50, 109, 50, 48, 50, 50, 45, 49, 50, 45,
50, 48, 84, 49, 51, 58, 48, 57, 58, 49, 48, 46,
52, 53, 51, 48, 57, 56, 90, 27, 91, 48, 109, 32,
27, 91, 51, 50, 109, 32, 73, 78, 70, 79, 27, 91,
48, 109, 32, 27, 91, 50, 109, 99, 97, 114, 103, 111,
95, 99, 111, 110, 116, 114, 97, 99, 116, 58, 58, 99,
114, 97, 116, 101, 95, 109, 101, 116, 97, 100, 97, 116,
97, 27, 91, 48, 109, 27, 91, 50, 109, 58, 27, 91,
48, 109, 32, 70,
... 56 more items
],
stderr: Buffer(1336) [Uint8Array] [
119, 97, 114, 110, 105, 110, 103, 58, 32, 66, 111, 116,
104, 32, 96, 47, 85, 115, 101, 114, 115, 47, 104, 97,
114, 117, 107, 105, 107, 111, 110, 100, 111, 47, 46, 99,
97, 114, 103, 111, 47, 99, 111, 110, 102, 105, 103, 96,
32, 97, 110, 100, 32, 96, 47, 85, 115, 101, 114, 115,
47, 104, 97, 114, 117, 107, 105, 107, 111, 110, 100, 111,
47, 46, 99, 97, 114, 103, 111, 47, 99, 111, 110, 102,
105, 103, 46, 116, 111, 109, 108, 96, 32, 101, 120, 105,
115, 116, 46, 32,
... 1236 more items
]
}
✔ Contract compiled successfully
⠋ Copying artifacts[Error: ENOENT: no such file or directory, copyfile '/Users/harukikondo/git/Astar-FT/mytoken/artifacts/mytoken.contract' -> '/Users/harukikondo/git/Astar-FT/mytoken/artifacts/mytoken/1671541750870/mytoken.wasm'] {
errno: -2,
code: 'ENOENT',
syscall: 'copyfile',
path: '/Users/harukikondo/git/Astar-FT/mytoken/artifacts/mytoken.contract',
dest: '/Users/harukikondo/git/Astar-FT/mytoken/artifacts/mytoken/1671541750870/mytoken.wasm'
}
✔ Copying artifacts OK
✔ Writing config OK