Skip to content

Commit

Permalink
Contract scripts improvements (#73)
Browse files Browse the repository at this point in the history
## Related Issue(s)
https://pookydevs.atlassian.net/browse/SGO-1621

## Description
This PR is adding more changes for amoy contract deployments and docs

## Changes Made
- Added deployment scripts for:
  - pookyball RefillableSale
  - pookyball pressure
  - rewards
- added flatten scripts which is very useful in verifying manually the
contract's code on oklink explorer:
- forge is not able at this point to do it automatically so we need to
go on each new deployed contract and manually verifying by providing:
     - contract code
     - compiler version
     - number of optimizations
     - licence
     - what evm type we had ( we are using paris ) 
 - all deployed smart contracts are verified now
- added env file as example ( has amoy addresses ) 
- added documentation for all deployed smart contracts addresses
- added documentation for alchemy webhooks 

## Checklist
Please review and check the following before submitting your PR:

- [x] Code follows the project's coding guidelines and style.
- [x] Tests have been added or updated to cover the changes.
- [x] Comments in code have been updated, if applicable.
- [x] No backwards-incompatible changes were introduced.

## Comments [Optional]
- we will have to change them in our services
- future work is to do changes for chainlink vrf when they will make
integration with amoy
- also with paper.xyz
  • Loading branch information
buildwithme authored Apr 4, 2024
2 parents d30a3cc + 9fa3fa2 commit 764f304
Show file tree
Hide file tree
Showing 77 changed files with 36,013 additions and 3,055 deletions.
47 changes: 47 additions & 0 deletions .env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
RPC_URL=https://rpc-amoy.polygon.technology/
CHAIN_ID=80002

SALT=0x1234567890abcdef

DEPLOYER_ADDRESS=0xC0DE54132cA2B4BAce7C02AF31Aa9d3c1905f379
DEPLOYER_PK=

ADMIN_ADDRESS=0xF00Db2f08D1F6b3f6089573085B5826Bb358e319
ADMIN_PK=

OPERATOR_ADDRESS=0x481074326aC46C7BC52f0b25D2F7Aaf40f586472

BACKEND_ADDRESS=0xCAFE3e690bf74Ec274210E1c448130c1f8228513

TREASURY_ADDRESS=0xBABA035d2e22073C3a2AadA404dae4f6A9D57BD7

ROYALTY_RECEIVER_ADDRESS=0x2dfCa6e357a73D180B8e6aa8f7690A315a4395F7

VRF_COORDINATOR_ADDRESS=0x7a1BaC17Ccc5b313516C5E16fb24f7659aA5ebed
VRF_KEY_HASH=0x4b09e658ed251bcafeebbc69400383d49f344ace09b9576fe248bb02c003fe9f
VRF_SUB_ID=2307
VRF_MINIMUM_REQUEST_CONFIRMATIONS=10
VRF_CALLBACK_GAS_LIMIT=2500000

POLYGONSCAN_API_KEY=

POOKYBALL_BASE_URI=https://tokens.pooky.tech/
POOKYBALL_CONTRACT_URI=https://static.pooky.tech/contracts/Pookyball.json

CONTRACT_POK_ADDRESS=0x66e4E3d15F14DEEE674e44666A60aC9D43CF3D1A
CONTRACT_ENERGY_ADDRESS=0xcE3bAF0c9989beC8e39B0D063Ffdf5C09373a510
CONTRACT_NONCE_REGISTRY_ADDRESS=0x2787DA764ebfaB0766f8737CA2Ce849Ea1c6fD88
CONTRACT_BOOST_PXP_ADDRESS=0xd2141454Ba77aEf88FF7dD865334abaf8eFa83C3
CONTRACT_POOKYBALL_ADDRESS=0x91290239CD991eB8B748FaFe3fb2401C5ec3c988
CONTRACT_POOKYBALL_LEVEL_UP_ADDRESS=0xEd78B7932d7fb92b28436de95B64C5C12DdD23a7
CONTRACT_POOKYBALL_REFIILABLE_SALE_ADDRESS=0xee62bA98Deee1cFfa61F1AA07329c2d5fcC8ea17
CONTRACT_PRESSURE_ADDRESS=0x3876E098488092af30aFACBF4e99553372CaAedD
CONTRACT_POOKYBALL_REROLL_ADDRESS=0x5c2E6a21813751411c4d445F9DFa2638c8271f61
CONTRACT_STICKERS_ADDRESS=0x975d59D5ff4c1D4ED908892377E23Bf00c40f7aD
CONTRACT_STICKERS_LEVEL_UP_ADDRESS=0x92ddB44c3D33Ef49F0f8EeE3ca6F1bD07e4188C4
CONTRACT_STICKERS_SALE_ADDRESS=0xa3C4BD44E80cD3E83BCBB33EB6C3B3Eb24286073
CONTRACT_STICKERS_CONTROLLER_ADDRESS=0xB9b85d3DCF4bB8c064D9F594354F07F5DCE12daF
CONTRACT_STICKERS_MANAGER_ADDRESS=0x17FBe0246aC8F13D457dDcc2b46FBCD6E80eA675
CONTRACT_STICKERS_ASCENSION=0xCb20FEe5113F10fE06BD9452d2E5cD1972161006
CONTRACT_POOKYBALL_ASCENSION_ADDRESS=0x1369B4e6B4B1A8f1a6C3c79dCB5DbB251EdC0D30
CONTRACT_REWARDS=0xBa609c15697617f9a243A5E0A609371044497719
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ etc.

- [Foundry Book](https://book.getfoundry.sh/)
- [OpenZeppelin Contracts 4.x](https://docs.openzeppelin.com/contracts/4.x/)
- [Polygon Mumbai Testnet Faucet](https://mumbaifaucet.com/)
- [Polygon Amoy Testnet Faucet](https://faucet.polygon.technology/)
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,49 @@

For more details about the internal architecture of the repository, see [CONTRIBUTING.md](CONTRIBUTING.md).

## Contracts

| Contract | Address on Polygon |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [`Energy`](https://github.com/pooky-labs/smart-contracts/blob/a9cb86055339ccb3b313b35ffbca7ecdf12358f6/src/common/Energy.sol) | [`0x356fB0fE98023239b240795003595dbCb63c57cd`](https://polygonscan.com/address/0x356fB0fE98023239b240795003595dbCb63c57cd#code) |
| [`NonceRegistry`](https://github.com/pooky-labs/smart-contracts/blob/f15873dd3cffa045fd0029763c50fa00ab8c2134/src/common/NonceRegistry.sol) | [`0xB08Ee469Dcf9c40B77261d8665A8BbdFad22B818`](https://polygonscan.com/address/0xB08Ee469Dcf9c40B77261d8665A8BbdFad22B818#code) |
| [`Rewards`](https://github.com/pooky-labs/smart-contracts/blob/5f4932e4525771953b91d349a3a615b338f02d43/src/game/Rewards.sol) | [`0x64A85fb2Ca5ebdC70cBa233a7Ea94672BeF5B372`](https://polygonscan.com/address/0x64A85fb2Ca5ebdC70cBa233a7Ea94672BeF5B372#code) |
| [`Pookyball`](https://github.com/pooky-labs/smart-contracts/blob/9f11c880e8bd31c9a266b3738c8b17463cf77cfa/src/tokens/Pookyball.sol) | [`0xb4859acd9B0A65CA4897c31e5cb5160D9Ff32C0A`](https://polygonscan.com/address/0xb4859acd9B0A65CA4897c31e5cb5160D9Ff32C0A#code) |
| [`PookyballAscension`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/pookyball/PookyballAscension.sol) | [`0x2a3b939f2deaf2bd16806b7f4b48af23f1bcc515`](https://polygonscan.com/address/0x2a3b939f2deaf2bd16806b7f4b48af23f1bcc515#code) |
| [`PookyballLevelUp`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/pookyball/PookyballLevelUp.sol) | [`0x13e887fca91d6f9ff5d44dcf44f9b9074b314aab`](https://polygonscan.com/address/0x13e887fca91d6f9ff5d44dcf44f9b9074b314aab#code) |
| [`PookyballReroll`](https://github.com/pooky-labs/smart-contracts/blob/1c40639834a1f5f7bafb191c2cc7c94a8a2be92f/src/pookyball/PookyballReroll.sol) | [`0x336033401230245EA9BD940Cb1b4cA91AF16415f`](https://polygonscan.com/address/0x336033401230245EA9BD940Cb1b4cA91AF16415f#code) |
| [`Pressure`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/pookyball/Pressure.sol) | [`0xa34223AD4d42CB041056287784FE1F91a7e5b21A`](https://polygonscan.com/address/0xa34223AD4d42CB041056287784FE1F91a7e5b21A#code) |
| [`RefillableSale`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/pookyball/RefillableSale.sol) | [`0x57f48000b7573dd55963f15a1bf2490e43fee41c`](https://polygonscan.com/address/0x57f48000b7573dd55963f15a1bf2490e43fee41c#code) |
| [`Stickers`](https://github.com/pooky-labs/smart-contracts/blob/f15873dd3cffa045fd0029763c50fa00ab8c2134/src/stickers/Stickers.sol) | [`0x440D4955a914D5e29F861aC024A608aE41c56cB6`](https://polygonscan.com/address/0x440D4955a914D5e29F861aC024A608aE41c56cB6#code) |
| [`StickerAscension`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/stickers/StickersAscension.sol) | [`0x49d0e15af6c939670c628cea99512ae22c79fa7c`](https://polygonscan.com/address/0x49d0e15af6c939670c628cea99512ae22c79fa7c#code) |
| [`StickersController`](https://github.com/pooky-labs/smart-contracts/blob/f15873dd3cffa045fd0029763c50fa00ab8c2134/src/stickers/StickersController.sol) | [`0x75cc3c6329930758659eD87338B926c90e16d05F`](https://polygonscan.com/address/0x75cc3c6329930758659eD87338B926c90e16d05F#code) |
| [`StickersManager`](https://github.com/pooky-labs/smart-contracts/blob/f15873dd3cffa045fd0029763c50fa00ab8c2134/src/stickers/StickersManager.sol) | [`0x534Fda3d9C8A08FD0E57DE8c1Af9B32987614bA1`](https://polygonscan.com/address/0x534Fda3d9C8A08FD0E57DE8c1Af9B32987614bA1#code) |
| [`StickersLevelUp`](https://github.com/pooky-labs/smart-contracts/blob/f15873dd3cffa045fd0029763c50fa00ab8c2134/src/stickers/StickersLevelUp.sol) | [`0x766e81AF624Cd6D2615EF675bDca2aB1ffBCBCbE`](https://polygonscan.com/address/0x766e81AF624Cd6D2615EF675bDca2aB1ffBCBCbE#code) |
| [`StickersSale`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/stickers/StickersSale.sol) | [`0x5d10f5685271b4dc21943438eac77ca549ac3d36`](https://polygonscan.com/address/0x5d10f5685271b4dc21943438eac77ca549ac3d36#code) |
| [`POK`](https://github.com/pooky-labs/smart-contracts/blob/fba76ea65e3b99b425b473bf5d689837ebedeb18/src/tokens/POK.sol) | [`0x7b7E3B03f34b17d70C276C4886467D58867Bbc94`](https://polygonscan.com/address/0x7b7E3B03f34b17d70C276C4886467D58867Bbc94#code) |
## Contracts Polygon Mainnet

| Contract | Address on Polygon |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
| POK | [`0x7b7E3B03f34b17d70C276C4886467D58867Bbc94`](https://polygonscan.com/address/0x7b7E3B03f34b17d70C276C4886467D58867Bbc94#code) |
| Energy | [`0x356fB0fE98023239b240795003595dbCb63c57cd`](https://polygonscan.com/address/0x356fB0fE98023239b240795003595dbCb63c57cd#code) |
| NonceRegistry | [`0xB08Ee469Dcf9c40B77261d8665A8BbdFad22B818`](https://polygonscan.com/address/0xB08Ee469Dcf9c40B77261d8665A8BbdFad22B818#code) |
| BoostPXP | [`0xB08Ee469Dcf9c40B77261d8665A8BbdFad22B818`](https://polygonscan.com/address/0xB08Ee469Dcf9c40B77261d8665A8BbdFad22B818#code) |
| Pookyball | [`0xb4859acd9B0A65CA4897c31e5cb5160D9Ff32C0A`](https://polygonscan.com/address/0xb4859acd9B0A65CA4897c31e5cb5160D9Ff32C0A#code) |
| PookyballLevelUp | [`0x13e887fca91d6f9ff5d44dcf44f9b9074b314aab`](https://polygonscan.com/address/0x13e887fca91d6f9ff5d44dcf44f9b9074b314aab#code) |
| RefillableSale | [`0x57f48000b7573dd55963f15a1bf2490e43fee41c`](https://polygonscan.com/address/0x57f48000b7573dd55963f15a1bf2490e43fee41c#code) |
| Pressure | [`0xa34223AD4d42CB041056287784FE1F91a7e5b21A`](https://polygonscan.com/address/0xa34223AD4d42CB041056287784FE1F91a7e5b21A#code) |
| PookyballReroll | [`0x336033401230245EA9BD940Cb1b4cA91AF16415f`](https://polygonscan.com/address/0x336033401230245EA9BD940Cb1b4cA91AF16415f#code) |
| Stickers | [`0x440D4955a914D5e29F861aC024A608aE41c56cB6`](https://polygonscan.com/address/0x440D4955a914D5e29F861aC024A608aE41c56cB6#code) |
| StickersLevelUp | [`0x766e81AF624Cd6D2615EF675bDca2aB1ffBCBCbE`](https://polygonscan.com/address/0x766e81AF624Cd6D2615EF675bDca2aB1ffBCBCbE#code) |
| StickersSale | [`0x5d10f5685271b4dc21943438eac77ca549ac3d36`](https://polygonscan.com/address/0x5d10f5685271b4dc21943438eac77ca549ac3d36#code) |
| StickersController | [`0x75cc3c6329930758659eD87338B926c90e16d05F`](https://polygonscan.com/address/0x75cc3c6329930758659eD87338B926c90e16d05F#code) |
| StickersManager | [`0x534Fda3d9C8A08FD0E57DE8c1Af9B32987614bA1`](https://polygonscan.com/address/0x534Fda3d9C8A08FD0E57DE8c1Af9B32987614bA1#code) |
| StickerAscension | [`0x49d0e15af6c939670c628cea99512ae22c79fa7c`](https://polygonscan.com/address/0x49d0e15af6c939670c628cea99512ae22c79fa7c#code) |
| PookyballAscension | [`0x2a3b939f2deaf2bd16806b7f4b48af23f1bcc515`](https://polygonscan.com/address/0x2a3b939f2deaf2bd16806b7f4b48af23f1bcc515#code) |
| Rewards | [`0x64A85fb2Ca5ebdC70cBa233a7Ea94672BeF5B372`](https://polygonscan.com/address/0x64A85fb2Ca5ebdC70cBa233a7Ea94672BeF5B372#code) |

## Contracts Polygon Amoy Testnet

| Contract | Address on Polygon |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| POK | [`0x66e4E3d15F14DEEE674e44666A60aC9D43CF3D1A`](https://www.oklink.com/amoy/address/0x66e4E3d15F14DEEE674e44666A60aC9D43CF3D1A/contract) |
| Energy | [`0xcE3bAF0c9989beC8e39B0D063Ffdf5C09373a510`](https://www.oklink.com/amoy/address/0xcE3bAF0c9989beC8e39B0D063Ffdf5C09373a510/contract) |
| NonceRegistry | [`0x2787DA764ebfaB0766f8737CA2Ce849Ea1c6fD88`](https://www.oklink.com/amoy/address/0x2787DA764ebfaB0766f8737CA2Ce849Ea1c6fD88/contract) |
| BoostPXP | [`0xd2141454Ba77aEf88FF7dD865334abaf8eFa83C3`](https://www.oklink.com/amoy/address/0xd2141454Ba77aEf88FF7dD865334abaf8eFa83C3/contract) |
| Pookyball | [`0x91290239CD991eB8B748FaFe3fb2401C5ec3c988`](https://www.oklink.com/amoy/address/0x91290239CD991eB8B748FaFe3fb2401C5ec3c988/contract) |
| PookyballLevelUp | [`0xEd78B7932d7fb92b28436de95B64C5C12DdD23a7`](https://www.oklink.com/amoy/address/0xEd78B7932d7fb92b28436de95B64C5C12DdD23a7/contract) |
| RefillableSale | [`0xee62bA98Deee1cFfa61F1AA07329c2d5fcC8ea17`](https://www.oklink.com/amoy/address/0xee62bA98Deee1cFfa61F1AA07329c2d5fcC8ea17/contract) |
| Pressure | [`0x3876E098488092af30aFACBF4e99553372CaAedD`](https://www.oklink.com/amoy/address/0x3876E098488092af30aFACBF4e99553372CaAedD/contract) |
| PookyballReroll | [`0x5c2E6a21813751411c4d445F9DFa2638c8271f61`](https://www.oklink.com/amoy/address/0x5c2E6a21813751411c4d445F9DFa2638c8271f61/contract) |
| Stickers | [`0x975d59D5ff4c1D4ED908892377E23Bf00c40f7aD`](https://www.oklink.com/amoy/address/0x975d59D5ff4c1D4ED908892377E23Bf00c40f7aD/contract) |
| StickersLevelUp | [`0x92ddB44c3D33Ef49F0f8EeE3ca6F1bD07e4188C4`](https://www.oklink.com/amoy/address/0x92ddB44c3D33Ef49F0f8EeE3ca6F1bD07e4188C4/contract) |
| StickersSale | [`0xa3C4BD44E80cD3E83BCBB33EB6C3B3Eb24286073`](https://www.oklink.com/amoy/address/0xa3C4BD44E80cD3E83BCBB33EB6C3B3Eb24286073/contract) |
| StickersController | [`0xB9b85d3DCF4bB8c064D9F594354F07F5DCE12daF`](https://www.oklink.com/amoy/address/0xB9b85d3DCF4bB8c064D9F594354F07F5DCE12daF/contract) |
| StickersManager | [`0x17FBe0246aC8F13D457dDcc2b46FBCD6E80eA675`](https://www.oklink.com/amoy/address/0x17FBe0246aC8F13D457dDcc2b46FBCD6E80eA675/contract) |
| StickerAscension | [`0xCb20FEe5113F10fE06BD9452d2E5cD1972161006`](https://www.oklink.com/amoy/address/0xCb20FEe5113F10fE06BD9452d2E5cD1972161006/contract) |
| PookyballAscension | [`0x1369B4e6B4B1A8f1a6C3c79dCB5DbB251EdC0D30`](https://www.oklink.com/amoy/address/0x1369B4e6B4B1A8f1a6C3c79dCB5DbB251EdC0D30/contract) |
| Rewards | [`0xBa609c15697617f9a243A5E0A609371044497719`](https://www.oklink.com/amoy/address/0xBa609c15697617f9a243A5E0A609371044497719/contract) |

## Governance

Expand Down
92 changes: 92 additions & 0 deletions abi/common/BaseERC721A.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 764f304

Please sign in to comment.