Logion Smart Contract library for Ink!
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
cd contracts/logion_psp34
cargo test
cd contracts/logion_psp34
cargo contract build --release
- Get some SHY to your Polkadot account with the Shibuya faucet.
- 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
undertarget/ink/logion_psp34
. - Provide a value for
nonce
,collectionLocId
andcertHost
. - Click "Next" and review the summary.
- Click "Upload and Instantiate".
- Sign
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.
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
undertarget/ink/logion_psp34
. - Click "Add Contract".
Note: It's not possible at the moment (Sep 2023) to publish a package to crates.io, due to the dependency to openbrush.
- Update the
version
in Cargo.toml - Commit, tag (
v0.1.0
forversion = "0.1.0"
) and push.
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 |