Allowlist data for Web3Checks.
The allowlist stores the mapping between a verified dApp domain and its known contracts. The allowlist is NOT exhaustive and SHOULD NO be considered as such. The aim of this allowlist is to give positive feedback to end users when they interact with a dApp.
The global allowlist is a JSON file with the following format :
{
"allowlist": {
"someBlockChain": [
{
"name": "dappName",
"domain": "dappDomain",
"token": "someTokenOrNull",
"contracts": [
{
"address": "someContractAddress",
},
{
"address": "someOtherContractAddress",
}
]
},
{ "..." }
],
"someOtherBlockChain": []
}
}Allow lists are per by dApp aka webdomain, then blockchain, and each blockchain has a list of contracts.
Domains and contracts on this allowlist are added by hand. Any contributions are welcome, just open a PR and ask a review from CODEOWNERS.
Example: if you want to add a contract for the dApp https://mydapp.com on the Ethereum blockchain, you would add the following to the dapp-allowlist.json file in a folder named dapps/mydapp.com:
{
"schemaVersion" : 1,
"$schema" : "../dapp-allowlist.schema.json",
"name" : "My DApp",
"domain" : "mydapp.com",
"chains" : {
"ethereum" : [
{
"address" : "0x0000000000000000000000000000000000000000"
},
{
"address" : "0x0000000000000000000000000000000000000000"
}
]
}
}Note that:
schemaVersionis the version of the schema used to interpret the file. It should be1for now.$schemais the path to the schema file used to validate the file. It should be../dapp-allowlist.schema.jsonfor now. This is used by IDEs to validate the file.nameis the name of the dApp.domainis the domain of the dApp- without the protocol (e.g.
mydapp.com). - subdomains are not allowed by default (e.g.
www.mydapp.comandmydapp.comare not the same dApp). - the domain is case insensitive (e.g.
mydapp.comandMYDAPP.COMare the same dApp). - if all subdomains are allowed, the domain should be
*.mydapp.com(e.g.app.myapp.comandwww.mydapp.comare the same dApp). - use
"subdomains": ["app1", "app2"], if only a specific subdomains is allowed.
- without the protocol (e.g.
chainsis a map of blockchain to a list of contracts.
This PR will be reviewed by the CODEOWNERS of this repository. If the PR is approved, it will be merged and the allowlist will be updated.
DO NOT update all-dapps-allowlist.json by hand. It is generated automatically from dapp specific allowlists in ./dapps.
Once a PR has been reviewed and merged, the allowlist will be updated automatically by the CI.
The allowlist can also be generated by hand by running :
# given a valid Github token with porper auth to org `LedgerHQ`
perl -i -pe 's/{{ GITHUB_TOKEN }}/$ENV{GITHUB_TOKEN}/' .github/scripts/validate-and-merge-cli.scala
scala-cli .github/scripts/validate-and-merge-cli.scala --main-class main -- all-dapp-allowlist.jsonTBD