Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support showing all contract source code #1330

Open
Keith-CY opened this issue Feb 17, 2023 · 6 comments
Open

Support showing all contract source code #1330

Keith-CY opened this issue Feb 17, 2023 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Keith-CY
Copy link
Member

Now only the most outside contract will be displayed in the contract tab on the account page(https://v1.testnet.gwscan.com/account/0x2998dcc6c7a8f7ecc6aa72cf75a88de6824f3ae6?tab=contract). It would be facilitating to list all base contracts so some inherited methods could be viewed, as etherscan does.

But the contract viewer of etherscan is powerful and requires much work. At this stage, listing all code is enough.

All the codes can be found on sourcify because it's used for verification.

Please add some detail about this feature so we can start improving the contract viewer graduately.

@Keith-CY Keith-CY added the documentation Improvements or additions to documentation label Feb 17, 2023
@Danie0918 Danie0918 moved this to 🆕 New in Layer2 Explorer Feb 26, 2023
@Danie0918 Danie0918 moved this from 🆕 New to 📌Planning in Layer2 Explorer Mar 2, 2023
@Keith-CY
Copy link
Member Author

Keith-CY commented Mar 12, 2023

Front-end PR: Magickbase/godwoken-explorer-ui#923

@Keith-CY Keith-CY moved this from 📌Planning to 🏗 In Progress in Layer2 Explorer Mar 12, 2023
@Naupio Naupio assigned Naupio and zmcNotafraid and unassigned zmcNotafraid Mar 13, 2023
@zmcNotafraid zmcNotafraid removed their assignment Mar 20, 2023
@Naupio Naupio mentioned this issue Mar 28, 2023
@Naupio Naupio moved this from 🏗 In Progress to 👀 Testing in Layer2 Explorer Apr 3, 2023
@Naupio Naupio assigned FrederLu and unassigned Naupio Apr 3, 2023
@Naupio
Copy link
Contributor

Naupio commented Apr 4, 2023

exmaple:

query {
  smart_contracts(
    input: { sorter: [{ sort_type: ASC, sort_value: EX_TX_COUNT }] }
  ) {
    entries {
      name
      account_id
      account {
        eth_address
      }
      contract_source_code
      sourcify_metadata
    }
    metadata {
      total_count
      after
      before
    }
  }
}

@Keith-CY
Copy link
Member Author

Keith-CY commented Apr 5, 2023

exmaple:

query {
  smart_contracts(
    input: { sorter: [{ sort_type: ASC, sort_value: EX_TX_COUNT }] }
  ) {
    entries {
      name
      account_id
      account {
        eth_address
      }
      contract_source_code
      sourcify_metadata
    }
    metadata {
      total_count
      after
      before
    }
  }
}

The contract_source_code is typed as a string in the staging environment
image
, an array is expected here for a list of source code file

@Keith-CY
Copy link
Member Author

Keith-CY commented Apr 6, 2023

The field including all files is sourcify_metadata

@FrederLu
Copy link

Verified.

@FrederLu FrederLu moved this from 👀 Testing to 🚩Pre Release in Layer2 Explorer Apr 10, 2023
@Keith-CY
Copy link
Member Author

@sunchengzhu This feature has been deployed on the mainnet and testnet, as shown at https://v1.gwscan.com/account/0x1f92717dba177dac187cbd4139bec50205c54453?tab=contract
The metadata.json will be hidden by Magickbase/godwoken-explorer-ui#935

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: 🚩Pre Release
Development

No branches or pull requests

6 participants