I am creating a staking exchange for staking and unstaking coins from chains like Polkadot.
I am trying to build the contract and I get this error error: failed to parse manifest at /tmp/cargo-contract_LllVxq/Cargo.toml
Caused by:
the target staking_exchange
is a binary and can't have any crate-types set (currently "cdylib, rlib")
ERROR:
I understand that the contract should be considered as library and not as a binary so I would like to know why this is happening . I don't have main.rs or src . My lib.rs is in the root directory and so is my Cargo.toml . This is my Cargo.toml :
[package]
name = "staking_exchange"
version = "0.1.0"
authors = ["*********** <******************>"]
edition = "2021"
[dependencies]
ink = { version = "5.0.0", default-features = false }
ink_storage = { version = "5.0.0", default-features = false }
parity-scale-codec = { version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2.6", default-features = false, features = ["derive"], optional = true }
[dev-dependencies]
ink_e2e = { version = "5.0.0" }
[lib]
crate-type = ["cdylib", "rlib"]
path = "lib.rs"
[features]
default = ["std"]
std = [
"ink/std",
"ink_storage/std",
"parity-scale-codec/std",
"scale-info/std"
]
ink-as-dependency =
e2e-tests =