Unverified Commit fc424c23 authored by Andrew Jones's avatar Andrew Jones Committed by GitHub

[examples] remove config made redundant by cargo-contract (#456)

* Incrementer

* DNS

* ERC 20

* [examples] set all crate-types to cdylib

* [examples] delegator

* [examples] remove remaining abi and profile.release cruft

* Restore rlib to delegator dependencies

* Remove redundant reexports

* Restore reexports for delegator sub contracts

* Fix type

* Install version of cargo-contract from branch

* Use cargo-contract ink-ci branch

* dns crate type
parent cf6e7106
Pipeline #98199 failed with stages
in 10 minutes and 4 seconds
......@@ -166,8 +166,10 @@ fmt:
#### stage: examples
.update-cargo-contract: &update-cargo-contract
# `cargo install` returns an error if there is nothing to update, so have to supress it here temporarily
- cargo install cargo-contract || echo $?
# `cargo install` returns an error if there is nothing to update, so have to suppress it here temporarily
# restore this once ink! 3.0 is published and the new version of cargo-contract has been released to crates.io
# - cargo install cargo-contract || echo $?
- cargo install --git https://github.com/paritytech/cargo-contract --tag ink-ci || echo $?
- cargo contract -V
examples-test:
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "delegator" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -20,12 +20,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "delegator"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -45,20 +40,9 @@ std = [
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen",
"accumulator",
"adder",
"subber",
]
exclude = [
".ink"
]
......@@ -14,7 +14,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::delegator::Delegator;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "dns" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -16,12 +16,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "dns"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -36,18 +31,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
......@@ -14,7 +14,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::dns::DomainNameService;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "erc20" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -16,12 +16,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "erc20"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -36,18 +31,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
......@@ -14,7 +14,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::erc20::Erc20;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "erc721" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -16,12 +16,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "erc721"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -36,18 +31,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
......@@ -64,7 +64,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::erc721::Erc721;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "flipper" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -16,12 +16,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "flipper"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -36,18 +31,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
......@@ -14,7 +14,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::flipper::Flipper;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "incrementer" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -16,12 +16,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "incrementer"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -36,18 +31,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
......@@ -14,7 +14,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::incrementer::Incrementer;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "multisig_plain" }
ink_lang = { path = "../../../../lang", package = "ink_lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -17,12 +17,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "multisig_plain"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -38,18 +33,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
[package]
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
publish = false
[[bin]]
name = "abi-gen"
path = "main.rs"
[dependencies]
ink_abi = { path = "../../../../abi" }
contract = { path = "../..", package = "runtime_storage" }
ink_lang = { path = "../../../../lang" }
serde = "1.0"
serde_json = "1.0"
extern crate contract;
extern "Rust" {
fn __ink_generate_metadata() -> ink_abi::InkProject;
}
fn main() -> Result<(), std::io::Error> {
let ink_project = unsafe { __ink_generate_metadata() };
let contents = serde_json::to_string_pretty(&ink_project)?;
std::fs::create_dir("target").ok();
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
......@@ -17,12 +17,7 @@ scale-info = { version = "0.2", default-features = false, features = ["derive"],
[lib]
name = "runtime_storage"
path = "lib.rs"
crate-type = [
# Used for normal contract Wasm blobs.
"cdylib",
# Used for ABI generation.
"rlib",
]
crate-type = ["cdylib"]
[features]
default = ["std"]
......@@ -37,18 +32,3 @@ std = [
"scale-info/std",
]
ink-as-dependency = []
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1
[workspace]
members = [
".ink/abi_gen"
]
exclude = [
".ink"
]
......@@ -14,7 +14,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
pub use self::runtime_storage::RuntimeStorage;
use ink_lang as ink;
#[ink::contract(version = "0.1.0")]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment