Skip to content

Instantly share code, notes, and snippets.

View JorgeAtPaladin's full-sized avatar

Paladin - Team Account JorgeAtPaladin

View GitHub Profile
@JorgeAtPaladin
JorgeAtPaladin / layerzero_V2_error_codes.txt
Created January 30, 2024 05:08
LayerZero V2 error codes
AddressCast_InvalidAddress() 0x6281faa2
AddressCast_InvalidSizeForAddress() 0x18456c9b
AddressSizeConfig_AddressSizeAlreadySet() 0xe4df7bef
AddressSizeConfig_InvalidAddressSize() 0x6f85e1b7
AdminAccessDenied() 0xf0d4b23e
AdminCallFailed() 0x1545a425
AxelarDVNAdapter_EidNotSupported(uint32) 0xf0951e97
AxelarDVNAdapter_InsufficientBalance(uint256,uint256) 0x576cbba3
AxelarDVNAdapter_OnlyWorkerFeeLib() 0x611136c8
AxelarDVNAdapter_OptionsUnsupported() 0x26cbb933
@JorgeAtPaladin
JorgeAtPaladin / riddle.txt
Created September 30, 2022 20:21
There's only one way to really become the King of both Links. This secret lies within the riddle of the ancient Sith.
My wrist is as strong as steel,
my mind is as sharp as a knife.
Yours is as weak as water,
while mine is as strong as stone.
Now, you understand why you will never win.
zane, the quick brown fox,
Qwerty, the curious cat.
1,000,000 dollars,
Only dollars dollars.
@JorgeAtPaladin
JorgeAtPaladin / ERC721Staking.sol
Created April 15, 2022 00:21
ERC721Staking.sol
// SPDX-License-Identifier: MIT // OK
// Creator: andreitoma8 // OK
pragma solidity ^0.8.4; // OK
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; // OK
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // OK
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; // OK
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; // OK
import "@openzeppelin/contracts/access/Ownable.sol"; // OK
@JorgeAtPaladin
JorgeAtPaladin / HardcoreGambleAudit.sol
Created April 14, 2022 23:29
HardcoreGamble Audit
// SPDX-License-Identifier: MIT // OK
pragma solidity ^0.8.12; // OK
import "./SafeMath.sol"; // OK
//rules are described in README.txt // OK
contract HardcoreGamble { // @audit HIGH SEVERITY: Tokenomics: An advanced party can always win after someone deposits by depositing with several larger stakes after them and calling withdraw with the largest of their stakes. The win requirements are not safe against collusion between multiple accounts. Using a flashloan this can be done exceptionally cheaply.
address private owner; // @audit Bad practice: private variable that is important
address private top_stake; //the participant with currently highest bid // @audit Bad practice: private variable that is important
address private winner; // OK
uint256 pool; // OK
uint256 risk_pool; //the pool at the moment of the highest stake transaction // @audit Bad practice: private variable that is important