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: UNLICENSED | |
| pragma solidity 0.8.28; | |
| import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; | |
| import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
| import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol"; | |
| import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; | |
| import {IVesting} from "./interfaces/IVesting.sol"; | |
| import {ISamuraiTiers} from "./interfaces/ISamuraiTiers.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: UNLINCENSED | |
| pragma solidity 0.8.28; | |
| import {Script} from "forge-std/Script.sol"; | |
| import {Vesting} from "../src/Vesting.sol"; | |
| import {IVesting} from "../src/interfaces/IVesting.sol"; | |
| import {console} from "forge-std/console.sol"; | |
| import {SamuraiTiers} from "../src/SamuraiTiers.sol"; | |
| import {ISamuraiTiers} from "../src/interfaces/ISamuraiTiers.sol"; | |
| import {ERC20Mock} from "../src/mocks/ERC20Mock.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
| // MyContract constructor | |
| constructor(address,uint256,MyInterface.MyStruct[] memory,bool,bool) | |
| // Script used in deploy | |
| function run() external returns (MyContract myContract) { | |
| address someAddress = 0x...; | |
| uint256 totalMax = 100_000 ether; | |
| MyInterface.MyStruct[] memory strs = new MyInterface.MyStruct[](6); |
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: UNLICENSED | |
| pragma solidity ^0.8.20; | |
| import "forge-std/Script.sol"; | |
| import "../src/Sam.sol"; | |
| contract SamScript is Script { | |
| function run() public { | |
| uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); |
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
| extension CharacterSet { | |
| static let vowels = CharacterSet(charactersIn: "aeiou") | |
| static let consonants = CharacterSet.letters.subtracting(vowels) | |
| } | |
| extension String { | |
| var specialChars: String { | |
| self | |
| .components(separatedBy: .punctuationCharacters) |
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
| curl https://api.github.com/authorizations --user lucasfernandes --header "X-GitHub-OTP: 921217" |
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
| protocol ItemStoring { | |
| associatedtype DataType | |
| var items: [DataType] { get set } | |
| mutating func add(item: DataType) | |
| } | |
| extension ItemStoring { | |
| mutating func add(item: DataType) { | |
| items.append(item) |
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
| /* Presentational */ | |
| import { Navigator } from 'navigation'; | |
| const App = () => ( | |
| <Provider store={store}> | |
| <PersistGate persistor={persistor}> | |
| <Navigator /> | |
| </PersistGate> | |
| </Provider> | |
| ); |
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
| /* Reducers */ | |
| import { navReducer, middleware } from 'navigation'; | |
| const rootReducer = combineReducers({ | |
| nav: navReducer, | |
| }); | |
| // Calling a separated store manager | |
| const store = configureStore(rootReducer, rootSaga, middleware); |
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
| const rootReducer = combineReducers({ | |
| nav: navReducer, | |
| }); | |
| ... | |
| const store = configureStore(rootReducer, rootSaga, middleware); | |
| ... |
NewerOlder