use-ink / ink-examples

A set of examples for ink! smart contract language. Happy hacking!
https://use.ink
The Unlicense
104 stars 54 forks source link

fix: address build failures in some contracts (#24) #35

Closed 0xf333 closed 1 year ago

0xf333 commented 1 year ago

The build process for some contracts was failing due to issues in certain Cargo.toml files; Aside from some dependencies paths that needed to be adjusted, there seems to be conflicts with the crate-type setting when using the updated version of the Ink contract compiler. Additionally, the no_main attribute was missing in some contracts.

Description

Impacts

This pull request addresses issue #24

.

0xf333 commented 1 year ago

@SkymanOne

SkymanOne commented 1 year ago

I think in this case and better course of action would be to use workspace dependencies like here https://github.com/paritytech/ink/issues/1814

0xf333 commented 1 year ago

Thanks for taking care of the examples. Left a few comments. I would also use workspace settings in order to maintain all examples with the latest version of ink! Alternatively, can please also update all contracts to point to the latest ink! minor version?

Hi @SkymanOne , Changes requested have been implemented. However, the cargo-contract compiler currently seems to not support workspace inheritance feature; for more details, you can refer to this link: https://github.com/paritytech/cargo-contract/issues/1265

I would probably look into the issue #1265 myself and give it a try if I had the opportunity to focus full-time on these.

SkymanOne commented 1 year ago

In this case, no need to bother with the workspace. As long as all dependencies are up to date, we should be good to go