use-ink / contracts-ui

Web application for deploying wasm smart contracts on Substrate chains that include the FRAME contracts pallet
https://contracts-ui.substrate.io/
GNU General Public License v3.0
61 stars 45 forks source link

feat: allow users to copy the code hash #430

Closed peetzweg closed 1 year ago

peetzweg commented 1 year ago

The hash of the deployed contract can now easily be copied from the contract page itself.

Screenshot 2023-03-13 at 14 45 48

I've took the liberty to upgrade the used react-tooltip library from v4 to v5, which fixes a displaying issue present with v4.

before

before

after

Screenshot 2023-03-13 at 14 48 08
netlify[bot] commented 1 year ago

Deploy Preview for contracts-ui ready!

Name Link
Latest commit 3c047625002c5a767f8f8bf6080bcef801b8d9bf
Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/64107e14b0eb810008263149
Deploy Preview https://deploy-preview-430--contracts-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

statictype commented 1 year ago

thanks for updating react-tooltip and getting rid of that annoying circle! the copy button in the header of the contract page is for the contract address. the issue is actually about being able to copy the code hash which you can find on the instantiate from code hash page

Screenshot 2023-03-13 at 19 18 53

i think the best solution here would be to not truncate it, just display the whole hash

peetzweg commented 1 year ago

Ah thanks for pointing this out @statictype, wasn't aware there are two relevant hashes for a contract.

Just added the CopyButton to the Code hash: section.

Screenshot 2023-03-14 at 10 32 58