Skip to content

Commit

Permalink
Merge pull request #758 from OpenZeppelin/Add-carrusel
Browse files Browse the repository at this point in the history
✨ feat: new levels `Impersonator` and `MagicAnimalCarousel`
  • Loading branch information
xaler5 authored Nov 11, 2024
2 parents 06dc0b4 + 947e1e3 commit 54ebfd1
Show file tree
Hide file tree
Showing 32 changed files with 8,143 additions and 3 deletions.
20 changes: 20 additions & 0 deletions client/public/imgs/BigLevel32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,893 changes: 3,893 additions & 0 deletions client/public/imgs/BigLevel33.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions client/public/imgs/Level32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,665 changes: 3,665 additions & 0 deletions client/public/imgs/Level33.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified client/public/imgs/levels-ai.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion client/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const NETWORKS = {
AMOY: {
name: "amoy",
id: "80002",
url: `${process.env.ALL_CAPS_NAME_HOST}`,
url: `${process.env.AMOY_HOST}`,
privKey: `${process.env.PRIV_KEY}`,
},
};
Expand Down
23 changes: 22 additions & 1 deletion client/src/gamedata/authors.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,27 @@
"https://www.linkedin.com/in/afonso-dalvi-711635112/"
],
"emails": ["gwdeps@gmail.com","afonsodalvia@gmail.com"]
},
"Gianfranco":{
"name": [
"Gianfranco"
],
"websites":
[
"https://github.com/GianfrancoBazzani/"
],
"donate" : "gianfrancobazzani.uni.eth",
"emails": ["bazzanigianfranco@gmail.com"]
},
"Gianfranco&carlitox477":{
"name": [
"carlitox477", "Gianfranco"
],
"websites":
[
"www.x.com/carlitox477", "https://github.com/GianfrancoBazzani/"
],
"emails": ["carlitox477.auditor@gmail.com", "bazzanigianfranco@gmail.com"]
}
}
}
}
4 changes: 3 additions & 1 deletion client/src/gamedata/deploy.amoy.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
"29": "0xf97EEDfFe70bFa579DbB26FD8Dd469F00ea9071f",
"30": "0xC7c121270efDB1DEE00DD0462187F4E8Bd4358f6",
"31": "0x33bE665704a6E2132f79E6b06C70660A11181374",
"32": "0x6F9cf195B9B4c1259E8FCe5b4e30F7142f779DeA",
"33": "0x40F5513a90fb7e2ac2C3E12A6d16B9279D1e94Ed",
"ethernaut": "0x0917c9EEd9EF51D57AAa27357C5FeE4F3590D42e",
"implementation": "0x30c3249cD8E29D7d0fb48aAec78413E6588072e3",
"proxyAdmin": "0x74008e22B826C3163604B248f03df5164f20955F",
"proxyStats": "0x1Bee003fdcb598Bb079Cc4ABDb03Ecf51229B73D"
}
}
2 changes: 2 additions & 0 deletions client/src/gamedata/deploy.holesky.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"29": "0x1bFb120Ac1361ece092FC64BD8ECdb3244463071",
"30": "0x716747Fbc1FcE4c36F2B369F87aDB5D4580e807f",
"31": "0x32FFB8d4244B350F5D3E074e9b731A135531B975",
"32": "0x465f1E2c7FFDe5452CFe92aC3aa1230B76B2B1CB",
"33": "0xd8630853340e23CeD1bb87a760e2BaF095fb4009",
"ethernaut": "0xB877915d8Ba049e7cAFc1525F85CEc322A362767",
"implementation": "0x86C8eC9b2bE1600571183eE157C7eb3B96a5c3FF",
"proxyAdmin": "0x8f3189256cb686D0aCD642bAa3982Fda156fB01D",
Expand Down
2 changes: 2 additions & 0 deletions client/src/gamedata/deploy.sepolia-arbitrum.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"29": "0xd4e6B977d9Dea283797AaD71a09eC65DfdAc98f5",
"30": "0xA62fE5344FE62AdC1F356447B669E9E6D10abaaF",
"31": "0x7ae0655F0Ee1e7752D7C62493CEa1E69A810e2ed",
"32": "0x0AA237C34532ED79676BCEa22111eA2D01c3d3e7",
"33": "0x37c07983Aad7DCA30C05FBA609590c73e58663e8",
"ethernaut": "0xD991431D8b033ddCb84dAD257f4821E9d5b38C33",
"implementation": "0x42E7014a9D1f6765e76fA2e69532d808F2fe27E3",
"proxyAdmin": "0xBd886a37faD1f596221f33ca568122815ED48c81",
Expand Down
2 changes: 2 additions & 0 deletions client/src/gamedata/deploy.sepolia-optimism.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"29": "0xDCa6065818935c33D6AF9AbDB7d5f679BB43508A",
"30": "0x5c7Fe23aeFc74E85E99EB8235807fE53bcC9c58f",
"31": "0x708f096A1AE25dD1b2De076fA90F5158bb01D209",
"32": "0xE536c365A795bb76CBb341D1Db49835e4974AF4d",
"33": "0x2f79281a5284ADD81B4Fd95Fa8e7CCB6900aeef8",
"ethernaut": "0xD991431D8b033ddCb84dAD257f4821E9d5b38C33",
"implementation": "0x50E1785EeE794253c5E33B8fE123e77124736e38",
"proxyAdmin": "0x492e18ddBd7591638453d2f1B1847F86711105C8",
Expand Down
2 changes: 2 additions & 0 deletions client/src/gamedata/deploy.sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"29": "0xb2aBa0e156C905a9FAEc24805a009d99193E3E53",
"30": "0xd459773f02e53F6e91b0f766e42E495aEf26088F",
"31": "0xB99f27b94fCc8b9b6fF88e29E1741422DFC06224",
"32": "0x9D75AF88C98C2524600f20B614ee064aE356C19C",
"33": "0x68839EDF716D5Ba1fb5C1e724bF160B23fa523b5",
"ethernaut": "0xa3e7317E591D5A0F1c605be1b3aC4D2ae56104d6",
"implementation": "0x49662cAeF8386f84d99873c34280E24d3e742e4f",
"proxyAdmin": "0x545d848827bD9e0E30794a9E53f5ab04EA71d78a",
Expand Down
1 change: 1 addition & 0 deletions client/src/gamedata/en/descriptions/levels/impersonator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SlockDotIt’s new product, **ECLocker**, integrates IoT gate locks with Solidity smart contracts, utilizing Ethereum ECDSA for authorization. When a valid signature is sent to the lock, the system emits an `Open` event, unlocking doors for the authorized controller. SlockDotIt has hired you to assess the security of this product before its launch. Can you compromise the system in a way that anyone can open the door?
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Congratulations! You've successfully unlocked the secrets of the elliptic curve signatures!

As described in [EIP-2](https://eips.ethereum.org/EIPS/eip-2), allowing values of `0 < s < secp256k1n` in our verification logic, as is currently the case, opens a signature malleability concern. One can take any signature, flip the `s` value from `s` to `secp256k1n - s`, change the `v` value (27 -> 28, 28 -> 27), and the resulting signature would still recover the same signer.

It is important to use safe implementations unless you know exactly what you are doing. Check the [OpenZeppelin implementation](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/448efeea6640bbbc09373f03fbc9c88e280147ba/contracts/utils/cryptography/ECDSA.sol#L128-L154) to learn how to use ecrecover safely.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Welcome, dear Anon, to the Magic Carousel, where creatures spin and twirl in a boundless spell. In this magical, infinite digital wheel, they loop and whirl with enchanting zeal.

Add a creature to join the fun, but heed the rule, or the game’s undone.
If an animal joins the ride, take care when you check again, that same animal must be there!

Can you break the magic rule of the carousel?
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Congratulations, you’ve broken the magical rule of the carousel! In the realm of low-level data manipulation, it’s crucial to remember the details, especially when working with compacting data in storage slots.
30 changes: 30 additions & 0 deletions client/src/gamedata/gamedata.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,36 @@
"deployId": "31",
"instanceGas": 750000,
"author": "Waiandt&Dalvi"
},
{
"name": "Impersonator",
"created": "2024-11-04",
"difficulty": "8",
"description": "impersonator.md",
"completedDescription": "impersonator_complete.md",
"levelContract": "ImpersonatorFactory.sol",
"instanceContract": "Impersonator.sol",
"revealCode": true,
"deployParams": [],
"deployFunds": 0,
"deployId": "32",
"instanceGas": 750000,
"author": "Gianfranco"
},
{
"name": "Magic Animal Carousel",
"created": "2024-11-04",
"difficulty": "6",
"description": "magicanimalcarousel.md",
"completedDescription": "magicanimalcarousel_complete.md",
"levelContract": "MagicAnimalCarouselFactory.sol",
"instanceContract": "MagicAnimalCarousel.sol",
"revealCode": true,
"deployParams": [],
"deployFunds": 0,
"deployId": "33",
"instanceGas": 750000,
"author": "Gianfranco&carlitox477"
}
]
}
1 change: 1 addition & 0 deletions contracts/out/Context.sol/Context.0.8.28.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"abi":[],"bytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"deployedBytecode":{"object":"0x","sourceMap":"","linkReferences":{}},"methodIdentifiers":{},"rawMetadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Provides information about the current execution context, including the sender of the transaction and its data. While these are generally available via msg.sender and msg.data, they should not be accessed in such a direct manner, since when dealing with meta-transactions the account sending and paying for execution may not be the actual sender (as far as an application is concerned). This contract is only required for intermediate, library-like contracts.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"lib/openzeppelin-contracts-08/contracts/utils/Context.sol\":\"Context\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[\":ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts-06/=lib/openzeppelin-contracts-06/contracts/\",\":openzeppelin-contracts-08/=lib/openzeppelin-contracts-08/contracts/\",\":openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/\",\":openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/\",\":openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/\"]},\"sources\":{\"lib/openzeppelin-contracts-08/contracts/utils/Context.sol\":{\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92\",\"dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3\"]}},\"version\":1}","metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[],"devdoc":{"kind":"dev","methods":{},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"remappings":["ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","openzeppelin-contracts-06/=lib/openzeppelin-contracts-06/contracts/","openzeppelin-contracts-08/=lib/openzeppelin-contracts-08/contracts/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/"],"optimizer":{"enabled":true,"runs":1000},"metadata":{"bytecodeHash":"ipfs"},"compilationTarget":{"lib/openzeppelin-contracts-08/contracts/utils/Context.sol":"Context"},"evmVersion":"shanghai","libraries":{}},"sources":{"lib/openzeppelin-contracts-08/contracts/utils/Context.sol":{"keccak256":"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7","urls":["bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92","dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3"],"license":"MIT"}},"version":1},"id":1}
1 change: 1 addition & 0 deletions contracts/out/Impersonator.sol/ECLocker.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/out/Impersonator.sol/Impersonator.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions contracts/out/Impersonator.t.sol/TestImpersonator.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 54ebfd1

Please sign in to comment.