{"id":21082724,"url":"https://github.com/renproject/gateway-sol","last_synced_at":"2025-05-16T09:32:07.128Z","repository":{"id":38279723,"uuid":"287161449","full_name":"renproject/gateway-sol","owner":"renproject","description":"Ren gateway contracts written in Solidity","archived":false,"fork":false,"pushed_at":"2022-11-01T06:03:05.000Z","size":4684,"stargazers_count":16,"open_issues_count":4,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-09T07:09:46.159Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/renproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-13T02:25:57.000Z","updated_at":"2024-07-23T18:16:35.000Z","dependencies_parsed_at":"2023-01-20T18:02:09.718Z","dependency_job_id":null,"html_url":"https://github.com/renproject/gateway-sol","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fgateway-sol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fgateway-sol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fgateway-sol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Fgateway-sol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renproject","download_url":"https://codeload.github.com/renproject/gateway-sol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225419562,"owners_count":17471434,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T20:15:09.571Z","updated_at":"2024-11-19T20:15:10.338Z","avatar_url":"https://github.com/renproject.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `⛩️ gateway-sol`\n\n## EVM contracts for minting and burning ren-assets\n\nRen has two repositories for its Solidity contract:\n\n-   [`darknode-sol`](https://github.com/renproject/darknode-sol) - contracts on Ethereum for managing darknode registrations.\n-   `gateway-sol` (this repository) - contracts on multiple EVM chains for minting and burning of ren-assets.\n\n## ~ [Documentation](https://renproject.github.io/ren-client-docs/contracts/) ~\n\n-   For the latest contract addresses, see the [contract addresses](https://renproject.github.io/ren-client-docs/contracts/deployments) page.\n-   For a summary of each contract, see the [summary of contracts](https://renproject.github.io/ren-client-docs/contracts/summary) page.\n\n## Contract summary\n\nThere are three core layers in the gateway-sol contracts:\n\n-   **GatewayRegistry** - responsible for deploying and tracking gateway and asset instances\n-   **RenAsset** - ERC20s backed 1:1 by a corresponding asset on another chain. e.g. renDAI on Fantom is backed by DAI on Ethereum\n-   **Gateways** - responsible for minting and burning (_MintGateway_) and locking and releasing (_LockGateway_) Ren assets.\n\n![gateway-sol diagram](https://user-images.githubusercontent.com/2221955/137038758-bbdba875-d73d-445b-8c81-76eec038a02d.png)\n\nFor example, minting renDAI on Fantom backed by DAI on Ethereum involves the following contracts:\n\n-   On Ethereum:\n    -   The Ethereum GatewayRegistry\n    -   A DAI LockGateway\n-   On Fantom:\n    -   The Fantom GatewayRegistry\n    -   A DAI MintGateway\n    -   A renDAI RenAsset\n\n\u003cdetails\u003e\n\n\u003csummary\u003eDevelopment notes\u003c/summary\u003e\n\n## INSTALL\n\n```bash\nyarn\n```\n\n## TEST\n\n```bash\nyarn test\n```\n\n## SCRIPTS\n\nHere is the list of npm scripts you can execute:\n\nSome of them relies on [./config/\\_scripts.js](./config/_scripts.js) to allow parameterizing it via command line argument (have a look inside if you need modifications)\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn prepare`\n\nAs a standard lifecycle npm script, it is executed automatically upon install. It generate config file and typechain to get you started with type safe contract interactions\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn lint`, `yarn lint:fix`, `yarn format` and `yarn format:fix`\n\nThese will lint and format check your code. the `:fix` version will modifiy the files to match the requirement specified in `.eslintrc` and and the prettier config in `package.json`\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn compile`\n\nThese will compile your contracts\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn void:deploy`\n\nThis will deploy your contracts on the in-memory hardhat network and exit, leaving no trace. quick way to ensure deployments work as intended without consequences\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn test [mocha args...]`\n\nThese will execute your tests using mocha. you can pass extra arguments to mocha\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn coverage`\n\nThese will produce a coverage report in the `coverage/` folder\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn gas`\n\nThese will produce a gas report for function used in the tests\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn dev`\n\nThese will run a local hardhat network on `localhost:8545` and deploy your contracts on it. Plus it will watch for any changes and redeploy them.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn local:dev`\n\nThis assumes a local node it running on `localhost:8545`. It will deploy your contracts on it. Plus it will watch for any changes and redeploy them.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn execute \u003cnetwork\u003e \u003cfile.ts\u003e [args...]`\n\nThis will execute the script `\u003cfile.ts\u003e` against the specified network\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn deploy \u003cnetwork\u003e [args...]`\n\nThis will deploy the contract on the specified network.\n\nBehind the scene it uses `hardhat deploy` command so you can append any argument for it\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn export \u003cnetwork\u003e \u003cfile.json\u003e`\n\nThis will export the abi+address of deployed contract to `\u003cfile.json\u003e`\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:execute \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [--deploy] \u003cfile.ts\u003e [args...]`\n\nThis will execute the script `\u003cfile.ts\u003e` against a temporary fork of the specified network\n\nif `--deploy` is used, deploy scripts will be executed\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:deploy \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [args...]`\n\nThis will deploy the contract against a temporary fork of the specified network.\n\nBehind the scene it uses `hardhat deploy` command so you can append any argument for it\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:test \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [mocha args...]`\n\nThis will test the contract against a temporary fork of the specified network.\n\u003cbr/\u003e\u003cbr/\u003e\n\n`yarn fork:dev \u003cnetwork\u003e [--blockNumber \u003cblockNumber\u003e] [args...]`\n\nThis will deploy the contract against a fork of the specified network and it will keep running as a node.\n\nBehind the scene it uses `hardhat node` command so you can append any argument for it\n\n## Verifying\n\n`yarn hardhat --network kovan etherscan-verify --api-key ETHERSCAN_KEY --license GPL-3.0`\n\nFor contracts that use a Proxy, you then need to go to the Etherscan page, select \"More Options\" and then \"Is this a proxy?\":\n\n![image](https://user-images.githubusercontent.com/2221955/110889473-4c881900-8342-11eb-8c50-0fd09c4e239a.png)\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenproject%2Fgateway-sol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenproject%2Fgateway-sol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenproject%2Fgateway-sol/lists"}