This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "./IERC1155.sol"; | |
import "./IERC1155Receiver.sol"; | |
import "./extensions/IERC1155MetadataURI.sol"; | |
import "../../utils/Address.sol"; | |
import "../../utils/Context.sol"; | |
import "../../utils/introspection/ERC165.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract HelloWorld { | |
string public str; | |
constructor(){ | |
str = "Hello World"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/** | |
CHALLENGE | |
Replace the green comments below with the correct data type to get the code to run | |
and set result = 5 | |
NOTE you won't need to use this but below there's uint(int256()) this is type casting. And it converts types to eachother. using uint256() on a int256 will convert it to a uint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract OwnerOnly { | |
address owner; | |
constructor() { | |
owner = msg.sender; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
contract Functions { | |
string public str; | |
/// NOTE if you're having a hard time reading the output in remix look at the last function for a way to make it easier. | |
// A constructor is technically a function too! Just a special one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/** | |
Demo of state-changing functions, view and pure functions | |
**/ | |
contract ViewPure { | |
uint price; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.0; | |
contract KingOfTheHill { | |
address public king; | |
uint public highestPaid; | |
function pay() external payable{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.0; | |
contract KingOfTheHill { | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |
function name() public view returns (string memory){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"eth": { | |
"token": { | |
"WETH": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", | |
"WEETH": "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee", | |
"apxETH": "0x9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6", | |
"pxETH": "0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6", | |
"pufETH": "0xD9A442856C234a39a81a089C06451EBAa4306a72", | |
"wstETH": "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0", | |
"stETH": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", |