Skip to content

logion-network/logion-ink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logion-ink

Logion Smart Contract library for Ink!

Development setup

Refer to Astar Docs ink! environment for details.

In a nutshell, for Ubuntu:

cargo install cargo-dylint dylint-link
cargo install cargo-contract --force --locked

Test

cd contracts/logion_psp34
cargo test

Build

cd contracts/logion_psp34
cargo contract build --release

Deploy

Prerequisite

Manual, with Contract UI

  • Go to Contract UI and connect to Astar Shibuya.
  • Click "Add New Contract".
  • Click "Upload New Contract".
  • Choose an Account with enough SHY.
  • Choose a Contract Name.
  • Under "Upload Contract Bundle" select logion_psp34.contract under target/ink/logion_psp34.
  • Provide a value for nonce, collectionLocId and certHost.
  • Click "Next" and review the summary.
  • Click "Upload and Instantiate".
  • Sign

Manual, with polkadot.js

A similar procedure is available on Polkadot-JS:

  • Use polkadot.js to connect to Shibuya.
  • Click "Developers > Contracts" to access a UI similar to Contract UI.
  • Follow the same steps.

WARNING On 8/9/2023 attempt, this method did not succeed to deploy.

Use a Contract

In order to use a contract that someone else deployed, you need to know the Contract Address and the ABI metadata (json):

  • Go to Contract UI and connect to Astar Shibuya.
  • Click "Add New Contract".
  • Click "Use On-Chain Contract Address".
  • Provide the Contract Address, Name
  • Click "Upload Metadata" and select logion_psp34.json under target/ink/logion_psp34.
  • Click "Add Contract".

Publish

Note: It's not possible at the moment (Sep 2023) to publish a package to crates.io, due to the dependency to openbrush.

  1. Update the version in Cargo.toml
  2. Commit, tag (v0.1.0 for version = "0.1.0") and push.

Deployment Log

Date URL Contract Address
2023-09-06 https://contracts-ui.substrate.io/contract/XyNVZ92vFrYf4rCj8EoAXMRWRG7okRy7gxhn167HaYQZqTc XyNVZ92vFrYf4rCj8EoAXMRWRG7okRy7gxhn167HaYQZqTc
2023-09-08 https://contracts-ui.substrate.io/contract/ZEoCdLf7zXHNw2BEtzL6mptzHKKFWAc2jYyeuRkVQUW7ddw ZEoCdLf7zXHNw2BEtzL6mptzHKKFWAc2jYyeuRkVQUW7ddw
2023-09-08 https://contracts-ui.substrate.io/contract/ai7fX8imUNnUaJfPxQMHhGagp9Bx7YGKxF3Xdnoe7tcUXbU ai7fX8imUNnUaJfPxQMHhGagp9Bx7YGKxF3Xdnoe7tcUXbU
2023-09-13 https://contracts-ui.substrate.io/contract/YvRHB73h5oa1x5ALrTrz5iA8g58iZausvrg9B5BmYnD2Em4 YvRHB73h5oa1x5ALrTrz5iA8g58iZausvrg9B5BmYnD2Em4

About

Logion Smart Contract library for Ink!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages