{"id":29795469,"url":"https://github.com/ubisoft/genesis-contracts","last_synced_at":"2025-07-28T04:11:07.670Z","repository":{"id":213395734,"uuid":"734016791","full_name":"ubisoft/genesis-contracts","owner":"ubisoft","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-10T08:19:07.000Z","size":9094,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-09T19:21:55.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubisoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":"audit/Champions Tactics_ Grimoria Chronicles Audit.pdf","citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-20T16:56:39.000Z","updated_at":"2024-09-10T08:19:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ceadaef4-a533-44b6-b469-b96bb3116d8d","html_url":"https://github.com/ubisoft/genesis-contracts","commit_stats":null,"previous_names":["ubisoft/genesis-contracts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ubisoft/genesis-contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fgenesis-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fgenesis-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fgenesis-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fgenesis-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubisoft","download_url":"https://codeload.github.com/ubisoft/genesis-contracts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fgenesis-contracts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267459933,"owners_count":24090784,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-07-28T04:11:06.914Z","updated_at":"2025-07-28T04:11:07.650Z","avatar_url":"https://github.com/ubisoft.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genesis Contracts\n\nSmart contracts for [Champions Tactics™ Grimoria Chronicles](https://championstactics.ubisoft.com/) written in [Solidity](https://soliditylang.org/).\n\nChampions Tactics™ Grimoria Chronicles is a PVP Tactical RPG game on PC by Ubisoft. Assemble a team of mythical Champions and craft you legend in the dark and mystical world of Grimoria.\n\n## Architecture\n\nFor a global overview of the contracts, refer to the diagram below\n\n![Architecture diagram](architecture.png 'Genesis contracts architecture')\n\n## Security\n\n`GenesisPFP` is deployed on Ethereum mainnet at address `0xE841e6e68BECFC54b621A23a41f8C1a829a4cf44` and has been audited by KALOS. The report can be found [here](\u003c./audit/[KALOS] Ubisoft Genesis PFP Audit Report v1.0 (ENG).pdf\u003e).\n\n`GenesisChampionFactory`, `GenesisChampion`, `GenesisMinter`, `GenesisCrafter`, `GenesisRewardsDistributor`, `GenesisCrafterRule` have been audited by Halborn.\nThe report can be found [here](\u003c./audit/Champions Tactics_ Grimoria Chronicles Audit.pdf\u003e).\n\n### Deployments\n\nPlease find below the addresses of deployed contracts:\n\n| Contract name            | Contract address                           | Network          |\n| ------------------------ | ------------------------------------------ | ---------------- |\n| GenesisPFP               | 0xE841e6e68BECFC54b621A23a41f8C1a829a4cf44 | Ethereum mainnet |\n| GenesisChampion          | 0x9d13bddc0e8e19a2a4a88a5a39fe0c12f005fa16 | Oasys Homeverse  |\n| GenesisChampionFactory   | 0xfb6d4eccab107bfdbfd6ee78668acda3b55c2ace | Oasys Homeverse  |\n| GenesisMinter            | 0xe92e9adb3056cd7afc08ae4550ea8db972d0388b | Oasys Homeverse  |\n| AuthenticatedRelay       | 0x89806ee417308debd454c24d0e5b9da3ee93dd07 | Oasys Homeverse  |\n\n### Slither reports\n\n- [Checklist report can be found here](./slither-report-checklist.md)\n- [Human summary report can be found here](./slither-report-human-summary.md)\n\n## Installation\n\n### From source\n\n1. Install [Foundry](https://book.getfoundry.sh/getting-started/installation)\n2. Clone this repository\n3. Initialize the submodules\n\n```bash\n# when switching branch, it's recommended to deinit the submodules first with:\n# git submodule deinit --force .\ngit submodule update --init --recursive\n```\n\n4. Install external dependencies for `lib/authenticated-relay` (see [README.md](./lib/authenticated-relay/README.md))\n\n```\ncd lib/authenticated-relay\nforge install\n# build sequence contracts dependencies:\npushd lib/contracts-library\nyarn \u0026\u0026 yarn build\npopd\n```\n\n5. Install node dependencies: `npm install`\n\n## Contract documentation\n\nContract documentation is auto-generated using `forge doc`.\n\n`forge doc -s` allows you to serve it locally at [localhost:3000](http://localhost:3000).\n\n## Build, test and deploy\n\n### Build\n\n```bash\nforge build\n```\n\n### Test\n\n```bash\nforge clean \u0026\u0026 forge test --ffi --force --summary --detailed\n```\n\n\u003e [GenesisCrafter](./src/GenesisCrafter.sol) and [GenesisMinter](./src/GenesisMinter.sol) use [openzeppelin-foundry-upgrades](https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades) to make safety checks before upgrading proxy implementations, we need to use the `--ffi` flag that will run external processes (i.e. shell scripts) from Solidity code.\n\n### Deploy\n\n**Deploying Locally**\n\n1. Start a local testnet using [anvil](https://book.getfoundry.sh/anvil/) or any local testnet client\n2. In another terminal, setup the required env variables and run `forge create` to deploy the contract as below\n\n\u003e Use the `--unlocked` flag with Anvil's first test account used as sender with `ETH_FROM`\n\nFor GenesisPFP\n\n```bash\nexport ETH_FROM=\"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266\"\nexport MINTER_ADDRESS=\"0x...\"\nexport VAULT_ADDRESS=\"0x...\"\nexport LINK_ADDRESS=\"0x0000000000000000000000000000000000000000\"\nexport VRF_WRAPPER_ADDRESS=\"0x0000000000000000000000000000000000000000\"\nexport RPC_URL=\"http://localhost:8545\" # Anvil local RPC\n\nforge create                                    \\\n    --rpc-url $RPC_URL --unlocked               \\\n    src/GenesisPFP.sol:GenesisPFP               \\\n    --constructor-args \"Genesis PFP\" \"PFP\" \"1\"  \\\n        $MINTER_ADDRESS $VAULT_ADDRESS          \\\n        $LINK_ADDRESS $VRF_WRAPPER_ADDRESS\n```\n\n```bash\nsource ./script/GenesisChampionFactory/anvil.env\nforge script script/GenesisChampionFactory/Deploy.s.sol --sig \"deploy()\" --rpc-url http://localhost:8545 --broadcast\n\n# GenesisChampionFactory deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3\n✅  [Success]Hash: 0x5fc8eb0e8498bf7c5dae6f6884a27a1c7d083288b28878f2062dc7e3f8784165\nContract Address: 0x5FbDB2315678afecb367f032d93F642f64180aa3\nBlock: 1\nPaid: 0.016042904 ETH (4010726 gas * 4 gwei)\n\n# GenesisChampion implementation deployed using `GenesisChampionFactory.deploy()`\n✅  [Success]Hash: 0x9da0f622ce953256f5d0bddac9849bfd6b0baf78785bfef7aa4ccb385894777d\nBlock: 2\nPaid: 0.011808357309540703 ETH (3021259 gas * 3.908422717 gwei)\n\n# Implementation address can be called using cast\ncast call 0x5fbdb2315678afecb367f032d93f642f64180aa3 \"getLatestDeployment()\"\n0x000000000000000000000000a16e02e87b7454126e5e10d957a927a7f5b5d2be\n```\n\n**Deploy on a public network (GenesisPFP)**\n\nWe use the Sepolia testnet to deploy and test our contracts in dev environment.\n\nChainlink's VRF configuration for Sepolia can be found [here](https://docs.chain.link/resources/link-token-contracts#sepolia-testnet).\n\nDeployment parameters are listed below in the same order as the contract constructor takes them:\n\n| Parameter      | Value                                                 |\n| -------------- | ----------------------------------------------------- |\n| Name           | GenesisPFP                                            |\n| Symbol         | PFP                                                   |\n| Version        | 1                                                     |\n| Minter address | Address granted with MINTER_ROLE on contract creation |\n| Vault address  | Address receiving marketplace royalties               |\n| LINK Token     | 0x779877A7B0D9E8603169DdbD7836e478b4624789            |\n| VRF Wrapper    | 0xab18414CD93297B0d12ac29E63Ca20f515b3DB46            |\n\nYou will need to provide a mnemonic phrase, private key, ledger or any wallet solution to deploy your contract on a live network. Please refer to Foundry's documentation for options.\n\nTo deploy the contracts on Sepolia, run the following command (replace `$RPC_URL` with a valid Sepolia RPC endpoint):\n\n```bash\n$forge create                                    \\\n    --rpc-url $RPC_URL                  \\\n    src/GenesisPFP.sol:GenesisPFP               \\\n    --constructor-args \"Genesis PFP\" \"PFP\" \"1\"  \\\n        $MINTER_ADDRESS $VAULT_ADDRESS          \\\n        $LINK_ADDRESS $VRF_WRAPPER_ADDRESS\n```\n\n## Authors\n\n- Nicolas LAW YIM WAN\n- Louis GAROCHE\n\n## License\n\nThis project is available under the [Apache 2.0 License](./LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubisoft%2Fgenesis-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubisoft%2Fgenesis-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubisoft%2Fgenesis-contracts/lists"}