Skip to content

RyanHolanda/Awesome-Solidity-Snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Solidity Snippets

Awesome Solidity Snippets is a collection of codes commonly used for Smart Contract Development with Solidity. This include imports, Contracts, Libraries and much more.

Requirements

VSCode ^1.88.0
Solidity ^0.8.0

Features

• Speeds up development.
• Eliminates the need of Copy and Paste.
• Support imports from multiple providers, such as Chainlink and OpenZeppelin.

drawing

Foundry Compatibility

If you are using Foundry, in order to use the import snippets, make sure you have remappings set

Known Issues

At this time, there are no known issues. If you discover a bug or would like a new snippet, feel free to create a pull request at our GitHub page.

Snippets

Chainlink Snippets

General Snippets

Shortcut Expanded Description
importFeedRegistryI Import Feed Registry Interface Import Feed Registry Interface from @chainlink
importDenominations Import Denominations Import Denominations Library from @chainlink
feedRegistry Feed Registry Create Feed Registry Contract using @chainlink
importLinkTokenI Import Link Token Interface Import Link Token Interface from @chainlink
importerc677receiverI Import ERC677 Receiver Interface Import ERC677 Receiver Interface from @chainlink

Access

Shortcut Expanded Description
importConfirmedOwner Import Confirmed Owner Import Confirmed Owner Contract from @chainlink
confirmedOwner Confirmed Owner Create Confirmed Owner Contract using @chainlink Dependencies

Automation

Shortcut Expanded Description
importStreamsLookupCompatibleI Import Streams Lookup Compatible Interface Import Streams Lookup Compatible Interface using @chainlink Dependencies
streamsLookupCompatibleI Streams Lookup Compatible Interface Create Streams Lookup Compatible Interface using @chainlink Dependencies
importLogAutomationI Import Log Automation Interface Import Log Automation Interface from @chainlink
importAutomationCompatibleI Import Automation Compatible Interface Import Automation Compatible Interface from @chainlink
logAutomation Log Automation Create Log Automation Contract using @chainlink dependencies
automationCompatible Automation Compatible Create Automation Compatible Contract using @chainlink dependencies

CCIP

Shortcut Expanded Description
importRouterClientI Import Router Client Interface Import Router Client Interface from @chainlink
importCCIPReceiver Import CCIP Receiver Import CCIP Receiver Contract from @chainlink
importOwnerIsCreator Import OwnerIsCreator Import OwnerIsCreator Contract from @chainlink
importClientLibrary Import Client Library Import Client Library from @chainlink
ccipReceiver CCIP Receiver Create CCIP Receiver Contract using @chainlink

Data Feeds

Shortcut Expanded Description
importAggregatorV3I Import Aggregator V3 Interface Import AggregatorV3 Interface from @chainlink
importAggregatorV2V3I Import Aggregator V2 V3 Interface Import AggregatorV2V3 Interface from @chainlink

Functions

Shortcut Expanded Description
importFunctionsClient Import Functions Client Import Functions Client Contract from @chainlink
importFunctionsRequest Import Functions Request Import Functions Request Library from @chainlink
functionsRequestForRequest Functions Request For Request Use Functions Request Library for Request type
functionsClient Functions Client Create Functions Client Contract using @chainlink dependencies

Data Streams

Shortcut Expanded Description
importCommon Import Common Import Common Library from @chainlink
importRewardManagerI Import Reward Manager Interface Import Reward Manager Interface from @chainlink
importVerifierFeeManagerI Import Verifier Fee Manager Interface Import Verifier Fee Manager Interface from @chainlink

Mocks

Shortcut Expanded Description
importMockVRFCoordinatorV2 Import Mock VRFCoordinator V2 Import VRF Coordinator V2 Mock from @chainlink
importMockV3Aggregator Import Mock V3 Aggregator Import V3 Aggregator Mock from @chainlink
importMockLink Import Mock Link Import Mock Link Token from @chainlink
importMockERC20 Import Mock ERC20 Import Mock ERC20 from @chainlink

VRF

Shortcut Expanded Description
importVRFConsumerBaseV2 Import VRF Consumer Base V2 Import VRF Consumer Base V2 Contract from @chainlink
importVRFCoordinatorV2I Import VRF Coordinator V2 Interface Import VRF Coordinator V2 Interface from @chainlink
importVRFV2Wrapper Import VRF V2 Wrapper Import VRF V2 Wrapper Contract from @chainlink
importVRFV2WrapperConsumerBase Import VRF V2 Wrapper Consumer Base Import VRF V2 Wrapper Consumer Base Contract from @chainlink
vrfConsumerBaseV2 VRF Consumer Base V2 Create VRF Consumer Base V2 Contract from @chainlink
vrfV2WrapperConsumerBase VRF V2 Wrapper Consumer Base Create VRF V2 Wrapper Consumer Base Contract using @chainlink dependencies

Echidna

General Snippets

Shortcut Expanded Description
echidnaTest Echidna Test Create Echidna Test Contract
testEchidna Test Echidna Create Echidna Test Function

Foundry

Scripts

Shortcut Expanded Description
importFoundryScript Import Foundry Script Import Script contract from Forge
foundryScript Foundry Script Create Script contract using Foundry Tools

Tests

Shortcut Expanded Description
importFoundryTest Import Foundry Test Import Foundry Test contract from Forge
importFoundryInvariant Import Foundry Invariant Import Foundry Invariant contract from Forge
foundryTest Foundry Test Create Foundry Test contract
foundryInvariant Foundry Invariant Create Foundry Invariant contract
foundryInvariantTest Froundry Invariant Test Create Foundry Invariant Test contract
itest Invariant test Create Foundry Invariant Test Function
test Test Create Foundry Test Function

Hardhat

General Snippets

Shortcut Expanded Description
importHardhatConsole Import Hardhat Console Import Hardhat console from Hardhat

OpenZeppelin

Access

Shortcut Expanded Description
importOwnable Import Ownable Import Ownable contract from @openzeppelin
importOwnable2s Import Ownable 2 Step Import Ownable 2 Step contract from @openzeppelin
importAccessControlI Import Access Control Interface Import Access Control Interface from @openzeppelin
importAccessControl Import Access Control Import Access Control contract from @openzeppelin
importAccessControlEnumerableI Import Access Contol Enumerable Interface Import Access Control Enumerable Interface from @openzeppelin
importAccessControlEnumerable Import Access Control Enumerable Import Access Control Enumerable contract from @openzeppelin
importAccessControlDefaultAdminRules Import Access Control Default Admin Rules Import Access Control Default Admin Rules Contract from @openzeppelin
importAccessControlDefaultAdminRulesI Import Access Control Default Admin Rules Interface Import Access Control Default Admin Rules Interface from @openzeppelin
importAuthorityI Import Authority Interface Import Authority Interface from @openzeppelin
importAccessManagerI Import Access Manager Interface Import Access Manager Interface from @openzeppelin
importAccessManagedI Import Access Managed Interface Import Access Managed Interface from @openzeppelin
importAccessManaged Import Access Managed Import Access Managed contract from @openzeppelin
importAuthorityUtils Import Authority Utils Import Authority Utils Library from @openzeppelin
ownable Ownable Create an Ownable contract using @openzeppelin dependencies
ownable2Step Ownable 2 Step Create an Ownable contract using @openzeppelin dependencies
accessControl Access Control Create an Access Control contract using @openzeppelin dependencies
accessControlDefaultAdminRules Access Control Default Admin Rules Create an Access Control Default Admin Rules contract using @openzeppelin dependencies
accessControlEnumerable Access Control Enumerable Create an Access Control Enumerable contract using @openzeppelin dependencies
accessManager AccessManager Create an Access Manager contract using @openzeppelin dependencies
accessManaged Access Managed Create an Access Managed contract using @openzeppelin dependencies

Access Upgradeable

Shortcut Expanded Description
importOwnableUpgradeable Import Ownable Upgradeable Import Ownable Upgradeable contract from @openzeppelin
ownableUpgradeable Ownable Upgradeable Create an Ownable Upgradeable contract using @openzeppelin dependencies

Base 64

Shortcut Expanded Description
importBase64 Import Base 64 Import Base64 library from @openzeppelin

Enumerable Map

Shortcut Expanded Description
importEnumerableMap Import Enumerable Map Import Enumerable Map Library from @openzeppelin
useEnumerableMapForBytes32 Use Enumerable Map For Bytes32 Use Enumerable Map for Bytes32ToBytes32Map
useEnumerableMapForUint Use Enumerable Map For Uint Use Enumerable Map for UintToUint
useEnumerableMapForUintToAddress Use Enumerable Map For Uint to Address Use Enumerable Map for UintToAddress
useEnumerableMapForAddressToUint Use Enumerable Map For Address to Uint Use Enumerable Map for AddressToUint
useEnumerableMapForBytes32ToUint Use Enumerable Map For Bytes32 to UInt Use Enumerable Map for Bytes32ToUint
enumerableMapBytes32 Enumerable Map Bytes32 Declare Enumerable Map for Bytes32ToBytes32Map
enumerableMapUint Enumerable Map Uint Declare Enumerable Map for UintToUint variable
enumerableMapUintAddress Enumerable Map Uint to Address Declare Enumerable Map for UintToAddress variable
enumerableMapAddressUint Enumerable Map Address to Uint Declare Enumerable Map for AddressToUint variable
enumerableMapBytes32Uint Enumerable Map Bytes32 to Uint Declare Enumerable Map for Bytes32ToUint variable

Enumerable Set

Shortcut Expanded Description
importEnumerableSet Import Enumerable Set Import Enumerable Set Library from @openzeppelin
useEnumerableSetForUint Use Enumerable Set For Uint Use Enumerable Set Library for Uint Set
useEnumerableSetForBytes Use Enumerable Set For Bytes Use Enumerable Set Library for Bytes32 Set
useEnumerableSetForAddress Use Enumerable Set For Uint to Address Use Enumerable Set Library for Address Set
useEnumerableSetForSet Use Enumerable Set For Set Use Enumerable Set Library for Set
enumerableSetUint Enumerable Set Uint Declare Enumerable Set for Uint variable
enumerableSetBytes32 Enumerable Set Bytes32 Declare Enumerable Set for Bytes32 variable
enumerableSetAddress Enumerable Set Address Declare Enumerable Set for Address variable
enumerableSetSet Enumerable Set Set Declare Enumerable Set for Set variable

ERC20

Shortcut Expanded Description
importSafeERC20 Import Safe ERC20 Import SafeERC20 library from @openzeppelin
importERC20 Import ERC20 Import ERC20 contract from @openzeppelin
importERC20Mock Import ERC20 Mock Import ERC20 Mock contract from @openzeppelin
importERC20I Import ERC20 Interface Import ERC20 Interface from @openzeppelin
importERC20Permit Import ERC20 Permit Import ERC20 Permit contract from @openzeppelin
importERC20Votes Import ERC20 Votes Import ERC20 Votes contract from @openzeppelin
importERC20Wrapper Import ERC20 Wrapper Import ERC20 Wrapper contract from @openzeppelin
importERC20Burnable Import ERC20 Burnable Import ERC20 Burnable contract from @openzeppelin
importERC20Capped Import ERC20 Capped Import ERC20 Capped contract from @openzeppelin
importERC20FlashMint Import ERC20 Flash Mint Import ERC20 Flash Mint contract from @openzeppelin
importERC20MetadataI Import ERC20 Metadata Interface Import ERC20 Metadata Interface from @openzeppelin
importERC20PermitI Import ERC20 Permit Interface Import ERC20 Permit Interface from @openzeppelin
erc20 ERC20 Create an ERC20 contract using @openzeppelin dependencies
erc20Mock ERC20 Mock Create an ERC20 Mock contract using @openzeppelin dependencies
erc20Permit ERC20 Permit Create an ERC20 Permit contract using @openzeppelin dependencies
erc20Votes ERC20 Votes Create an ERC20 Votes contract using @openzeppelin dependencies
erc20Wrapper ER20 Wrapper Create an ERC20 Wrapper contract using @openzeppelin dependencies
erc20Burnable ERC20 Burnable Create an ERC20 Burnable contract using @openzeppelin dependencies
erc20Capped ERC20 Capped Create a ERC20 Capped contract using @openzeppelin dependencies
erc20FlashMint ERC20 Flash Mint Create a ERC20 Flash Mint contract using @openzeppelin dependencies
useSafeERC20ForIERC20 Use Safe ERC20 For IERC20 Use SafeERC20 library for IERC20 type

ERC20 Upgradeable

Shortcut Expanded Description
importERC20Upgradeable Import ERC20 Upgradeable Import ERC20 Upgradeable contract from @openzeppelin
erc20Upgradeable ERC20 Upgradeable Create an ERC20 Upgradeable contract using @openzeppelin dependencies
importERC20PermitUpgradeable Import ERC20 Permit Upgradeable Import ERC20 Permit Upgradeable contract from @openzeppelin
erc20PermitUpgradeable ERC20 Permit Upgradeable Create an ERC20 Permit Upgradeable contract using @openzeppelin dependencies

ERC165

Shortcut Expanded Description
importERC165 Import ERC165 Import ERC165 Contract from @openzeppelin
importERC165I Import ERC165 Interface Import ERC165 Interface from @openzeppelin
importERC165Checker Import ERC165 Checker Import ERC165 Checker Library from @openzeppelin
erc165 ERC165 Create ERC165 Contract using @openzeppelin dependencies

ERC721

Shortcut Expanded Description
importERC721 Import ERC721 Import ERC721 contract from @openzeppelin
importERC721I Import ERC721 Interface Import ERC721 Interface from @openzeppelin
importERC721ErrorsI Import ERC721 Errors Interface Import ERC721 Errors Interface from @openzeppelin
importERC721MetadataI Import ERC721 Metadata Interface Import ERC721 Metadata Interface from @openzeppelin
importERC721EnumerableI Import ERC721 Enumerable Interface Import ERC721 Enumerable Interface from @openzeppelin
importERC721ReceiverI Import ERC721 Receiver Interface Import ERC721 Receiver Interface from @openzeppelin
importERC721Pausable Import ERC721 Pausable Import ERC721 Pausable contract from @openzeppelin
importERC721Burnable Import ERC721 Burnable Import ERC721 Burnable contract from @openzeppelin
importERC721Consecutive Import ERC721 Consecutive Import ERC721 Consecutive contract from @openzeppelin
importERC721Votes Import ERC721 Votes Import ERC721 Votes contract from @openzeppelin
importERC721Royalty Import ERC721 Royalty Import ERC721 Royalty contract from @openzeppelin
importERC721Wrapper Import ERC721 Wrapper Import ERC721 Wrapper contract from @openzeppelin
importERC721Holder Import ERC721 Holder Import ERC721 Holder contract from @openzeppelin
importERC721Enumerable Import ERC721 Enumerable Import ERC721 Enumerable contract from @openzeppelin
importERC721UriStorage Import ERC721 Uri Storage Import ERC721 URI Storage contract from @openzeppelin
erc721 ERC721 Create an ERC721 contract using @openzeppelin dependencies
erc721Pausable ERC721 Pausable Create an ERC721 Pausable contract using @openzeppelin dependencies
erc721Burnable ERC721 Burnable Create an ERC721 Burnable contract using @openzeppelin dependencies
erc721Consecutive ERC721 Consecutive Create an ERC721 Consecutive contract using @openzeppelin dependencies
erc721Votes ERC721 Votes Create an ERC721 Votes contract using @openzeppelin dependencies
erc721Royalty ERC721 Royalty Create an ERC721 Royalty contract using @openzeppelin dependencies
erc721Wrapper ERC721 Wrapper Create an ERC721 Wrapper contract using @openzeppelin dependencies
erc721Holder ERC721 Holder Create an ERC721 Holder contract using @openzeppelin dependencies
erc721Enumerable ERC721 Enumerable Create an ERC721 Enumerable contract using @openzeppelin dependencies
erc721UriStorage ERC721 URI Storage Create an ERC721 URI Storage contract using @openzeppelin dependencies

ERC1155

Shortcut Expanded Description
importERC1155 Import ERC1155 Import ERC1155 contract from @openzeppelin
importERC1155Pausable Import ERC1155 Pausable Import ERC1155 Pausable contract from @openzeppelin
importERC1155Burnable Import ERC1155 Burnable Import ERC1155 Burnable contract from @openzeppelin
importERC1155Supply Import ERC1155 Supply Import ERC1155 Supply contract from @openzeppelin
importERC1155UriStorage Import ERC1155 Uri Storage Import ERC1155 URI Storage contract from @openzeppelin
importERC1155Holder Import ERC1155 Holder Import ERC1155 Holder contract from @openzeppelin
importERC1155I Import ERC1155 Interface Import ERC115 Interface from @openzeppelin
importERC1155MetadataUriI Import ERC1155 Metadata URI Interface Import ERC1155 Metadata URI Interface from @openzeppelin
importERC1155ErrorsI Import ERC1155 Errors Interface Import ERC1155 Errors Interface from @openzeppelin
importERC1155ReceiverI Import ERC1155 Receiver Interface Import ERC1155 Receiver Interface from @openzeppelin
erc1155 ERC1155 Create ERC1155 contract using @openzeppelin dependencies
erc1155Pausable ERC1155 Pausable Create ERC1155 Pausable contract using @openzeppelin dependencies
erc1155Burnable ERC1155 Burnable Create ERC1155 Burnable contract using @openzeppelin dependencies
erc1155Supply ERC1155 Supply Create ERC1155 Supply contract using @openzeppelin dependencies
erc1155UriStorage ERC1155 URI Storage Create ERC1155 URI Storage contract using @openzeppelin dependencies
erc1155Holder ERC1155 Holder Create ERC1155 Holder contract using @openzeppelin dependencies

ERC1271

Shortcut Expanded Description
importERC1271I Import ERC1271 Interface Import ERC1271 Interface from @openzeppelin

ERC1363

Shortcut Expanded Description
importERC1363I Import ERC1363 Interface Import ERC1363 Interface from @openzeppelin
importERC1363ReceiverI Import ERC1363 Receiver Interface Import ERC1363 Receiver Interface from @openzeppelin
importERC1363SpenderI Import ERC1363 Spender Interface Import ERC1363 Spender Interface from @openzeppelin

ERC1820

Shortcut Expanded Description
importERC1820ImplementerI Import ERC1820 Implementer Interface Import ERC1820 Implementer Interface from @openzeppelin
importERC1820RegistryI Import ERC1820 Registry Interface Import ERC1820 Registry Interface from @openzeppelin

ERC1822

Shortcut Expanded Description
importERC1822ProxiableI Import ERC1822 Proxiable Interface Import ERC1822 Proxiable Interface from @openzeppelin

ERC1967

Shortcut Expanded Description
importERC1967Proxy Import ERC1967 Proxy Import ERC1967 Proxy contract from @openzeppelin
importERC1967Utils Import ERC1967 Utils Import ERC1967 Utils Library from @openzeppelin
erc1967Proxy Import ERC1967 Proxy Create ERC1967 Proxy contract using @openzeppelin dependencies

ERC2612

Shortcut Expanded Description
importERC2612I Import ERC2612 Interface Import ERC2612 Interface from @openzeppelin

ERC2771

Shortcut Expanded Description
importERC2771Context Import ERC2771 Context Import ERC2771 Context Contract from @openzeppelin
importERC2771Forwader Import ERC2771 Forwarder Import ERC2771 Forwarder Contract from @openzeppelin
erc2771Context ERC2771 Context Create ERC2771 Context Contract using @openzeppelin dependencies
erc2771Forwarder ERC2771 Forwarder Create ERC2771 Forwarder Contract using @openzeppelin dependencies

ERC2981

Shortcut Expanded Description
importERC2981 Import ERC2981 Import ERC2981 contract from @openzeppelin
importERC2981I Import ERC2981 Interface Import ERC2981 Interface from @openzeppelin

ERC3156

Shortcut Expanded Description
importERC3156FlashLenderI Import ERC3156 Flash Lender Interface Import ERC3156 Flash Lender Interface from @openzeppelin
importERC3156FlashBorrowerI Import ERC3156 Flash Borrower Interface Import ERC3156 Flash Borrower Interface from @openzeppelin

ERC4626

Shortcut Expanded Description
importERC4626 Import ERC4626 Import ERC4626 contract from @openzeppelin
importERC4626I Import ERC4626 Interface Import ERC4626 Interface from @openzeppelin
erc4626 ERC4626 Create ERC4626 contract using @openzeppelin dependencies

ERC5267

Shortcut Expanded Description
importERC5267I Import ERC5267 Interface Import ERC5267 Interface from @openzeppelin

ERC5313

Shortcut Expanded Description
importERC5313I Import ERC5313 Interface Import ERC5313 Interface from @openzeppelin

ERC6372

Shortcut Expanded Description
importERC6372I Import ERC6372 Interface Import ERC6372 Interface from @openzeppelin

Finance

Shortcut Expanded Description
importVestingWallet Import Vesting Wallet Import Vesting Wallet contract from @openzeppelin
vestingWallet Vesting Wallet Create Vesting Wallet contract using @openzeppelin dependencies

Governance

Shortcut Expanded Description
importGovernor Import Governor Import Governor contract from @openzeppelin
importGovernorI Import Governor Interface Import Governor Interface from @openzeppelin
importGovernorCountingSimple Import Governor Counting Simple Import Governor Counting Simple contract from @openzeppelin
importGovernorVotes Import Governor Votes Import Governor Votes contract from @openzeppelin
importGovernorVotesQuorumFraction Import Governor Votes Quorum Fraction Import Governor Votes Quorum Fraction contract from @openzeppelin
importGovernorTimelockControl Import Governor Timelock Control Import Governor Timelock Control contract from @openzeppelin
importGovernorTimelockCompound Import Governor Timelock Compound Import Governor Timelock Compound contract from @openzeppelin
importGovernorSettings Import Governor Settings Import Governor Settings contract from @openzeppelin
importGovernorPreventLateQuorum Import Governor Prevent Late Quorum Import Governor Prevent Late Quorum contract from @openzeppelin
importGovernorStorage Import Governor Storage Import Governor Storage contract from @openzeppelin
importTimelockController Import TimeLock Controller Import Timelock Controller contract from @openzeppelin
importVotes Import Votes Import Votes contract from @openzeppelin
importVotesI Import Votes Interface Import Votes Interface from @openzeppelin
governor Governor Create Governor contract using @openzeppelin dependencies
governorCountingSimple Governor Counting Simple Create Governor Counting Simple contract using @openzeppelin dependencies
governorVotes Governor Votes Create Votes contract using @openzeppelin dependencies
governorVotesQuorumFraction Governor Votes Quorum Fraction Create Votes Quorum Fraction contract using @openzeppelin dependencies
governorTimelockControl Governor Timelock Control Create Governor Timelock Control contract using @openzeppelin dependencies
governorTimelockCompound Governor Timelock Compound Create Governor Timelock Compound contract using @openzeppelin dependencies
governorSettings Governor Settings Create Governor Settings contract using @openzeppelin dependencies
governorPreventLateQuorum Governor Prevent Late Quorum Create Governor Prevent Late Quorum contract using @openzeppelin dependencies
governorStorage Governor Storage Create Governor Storage contract using @openzeppelin dependencies
timelockController Timelock Controller Create Timelock Controller contract using @openzeppelin dependencies
votes Votes Create Votes contract using @openzeppelin dependencies

Multicall

Shortcut Expanded Description
importMulticall Import Multicall Import Multicall contract from @openzeppelin
multicall Multicall Create Multicall contract using @openzeppelin dependencies

Proxy

Shortcut Expanded Description
importProxy Import Proxy Import Proxy contract from @openzeppelin
importTransparentUpgradeableProxy Import Transparent Upgradeable Proxy Import Transparent Upgradeable Proxy contract from @openzeppelin
importProxyAdmin Import Proxy Admin Import Proxy Admin contract from @openzeppelin
importBeaconProxy Import Beacon Proxy Import Beacon Proxy contract from @openzeppelin
importUpgradeableBeacon Import Upgradeable Beacon Import Upgradeable Beacon contract from @openzeppelin
importInitializable Import Initializable Import Initializable contract from @openzeppelin
importUUPSUpgradeable Import Transparent UUPS Upgradeable Import UUPS Upgradeable contract from @openzeppelin
importBeaconI Import Beacon Interface Import Beacon Interface from @openzeppelin
importClones Import Clones Import Clones Library from @openzeppelin
proxy Proxy Create Proxy contract using @openzeppelin dependencies
transparentUpgradeableProxy Transparent Upgradeable Proxy Create Transparent Upgradeable Proxy contract using @openzeppelin dependencies
proxyAdmin Proxy Admin Create Proxy Admin contract using @openzeppelin dependencies
beaconProxy Beacon Proxy Create Beacon Proxy contract using @openzeppelin dependencies
upgradeableBeaconProxy Upgradeable Beacon Proxy Create Upgradeable Beacon Proxy contract using @openzeppelin dependencies
uupsUpgradeableProxy UUPS Upgradeable Proxy Create UUPS Upgradeable Proxy contract using @openzeppelin dependencies

Reentracy Guard

Shortcut Expanded Description
importReentrancyGuard Import Reentrancy Guard Import Reentrancy Guard contract from @openzeppelin
reentrancyGuard Reentrancy Guard Create Reentrancy Guard contract using @openzeppelin dependencies

Utils

Shortcut Expanded Description
importMath Import Math Import Math Library from @openzeppelin
importSignedMath Import Signed Math Import Signed Math Library from @openzeppelin
importSafeCast Import Safe Cast Import Safe Cast Library from @openzeppelin
importStrings Import Strings Import String utils library from @openzeppelin
importECDSA Import ECDSA Import ECDSA Library from @openzeppelin
importMessageHash Import Message Hash Import Message Hash Utils Library from @openzeppelin
importSignatureChecker Import Signature Checker Import Signature Checker Library from @openzeppelin
importMerkleProof Import Merkle Proof Import Merkle Proof Library from @openzeppelin
importEIP712 Import EIP712 Import EIP712 Contract from @openzeppelin
importPausable Import Pausable Import Pausable Contract from @openzeppelin
importNonces Import Nonces Import Nonces Contract from @openzeppelin
importDoubleEndedQueue Import Double Ended Queue Import Doubled Ended Queue Library from @openzeppelin
importCheckpoints Import Checkpoints Import Checkpoints Library from @openzeppelin
importCreate2 Import Create 2 Import Create2 Library from @openzeppelin
importAddress Import Address Import Address Library from @openzeppelin
importArrays Import Array Import Arrays Library from @openzeppelin
importShortStrings Import Short Strings Import Short Strings Library from @openzeppelin
importStorageSlot Import Storage Slot Import Storage Slot Library from @openzeppelin
importContext Import Context Import Context Library from @openzeppelin"
useStringsForAdress Use Strings For Address Use Strings Library For Address type
useStringsForUint256 Use Strings For Uint256 Use Strings Library For Uint256 type

Solmate

Auth

Shortcut Expanded Description
importAuth Import Auth Import Auth Contract from solmate
importOwned Import Owned Import Owned Contract from solmate
auth Auth Create Auth Contract using solmate dependencies
owned Owned Create Owned Contract using solmate dependencies

Authorities

Shortcut Expanded Description
importRolesAuthority Import Roles Authority Import Roles Authority Contract from solmate
importMultiRolesAuthority Import Multi Roles Authority Import Multi Roles Authority Contract from solmate
rolesAuthority Roles Authority Create Roles Authority Contract using solmate dependencies
multiRolesAuthority Multi Roles Authority Create Multi Roles Authority Contract using solmate dependencies

Utils

Shortcut Expanded Description
importSSTORE2 Import SSTORE2 Import SSTORE2 library from solmate
importCREATE3 Import CREATE3 Import CREATE3 library from solmate
importLibString Import LibString Import LibString library from solmate
importSignedWadMath Import Signed Wad Math Import SignedWadMath library from solmate
importMerkleProofLib Import Merkle Proof Lib Import MerkleProofLib library from solmate
importFixedPointMathLib Import Fixed Point Math Lib Import FixedPointMathLib library from solmate
importBytes32AddressLib Import Bytes32 Address Lib Import Bytes32AddressLib library from solmate
importSafeTransferLib Import Safe Transfer Lib Import SafeTransferLib library from solmate

WETH

Shortcut Expanded Description
importWETH Import WETH Import WETH Contract from solmate

Balancer

Distributors

Shortcut Expanded Description
importDistributorCallbackI Import Distributor Callback Interface Import Distributor Callback Interface from balancer-v2 interfaces

Liquidity Mining

Shortcut Expanded Description
importArbitrumFeeProviderI Import Arbitrum Fee Provider Interface Import Arbitrum Fee Provider Interface from balancer-v2 interfaces
importAuthorizerAdaptorI Import Authorizer Adaptor Interface Import Authorizer Adaptor Interface from balancer-v2 interfaces
importAuthorizerAdaptorEntrypointI Import Authorizer Adaptor Entrypoint Interface Import Authorizer Adaptor Entrypoint Interface from balancer-v2 interfaces
importBalancerMinterI Import Balancer Minter Interface Import Balancer Minter Interface from balancer-v2 interfaces
importBalancerTokenI Import Balancer Token Interface Import Balancer Token Interface from balancer-v2 interfaces
importBalancerTokenAdminI Import Balancer Token Admin Interface Import Balancer Token Admin Interface from balancer-v2 interfaces
importChildChainGaugeI Import Child Chain Gauge Interface Import Child Chain Gauge Interface from balancer-v2 interfaces
importChildChainLiquidityGaugeFactoryI Import Child Chain Liquidity Gauge Factory Interface Import Child Chain Liquidity Gauge Factory Interface from balancer-v2 interfaces
importChildChainStreamerI Import Child Chain Streamer Interface Import Child Chain Streamer Interface from balancer-v2 interfaces
importFeeDistributorI Import Fee Distributor Interface Import Fee Distributor Interface from balancer-v2 interfaces
importGaugeAdderI Import Gauge Adder Interface Import Gauge Adder Interface from balancer-v2 interfaces
importGaugeControllerI Import Gauge Controller Interface Import Gauge Controller Interface from balancer-v2 interfaces
importLMGettersI Import LM Getters Interface Import LM Getters Interface from balancer-v2 interfaces
importLiquidityGaugeI Import Liquidity Gauge Interface Import Liquidity Gauge Interface from balancer-v2 interfaces
importLiquidityGaugeFactoryI Import Liquidity Gauge Factory Interface Import Liquidity Gauge Factory Interface from balancer-v2 interfaces
importMainnetBalancerMinterI Import Mainnet Balancer Minter Interface Import Mainnet Balancer Minter Interface from balancer-v2 interfaces
importOptimismGasLimitProviderI Import Optimism Gas Limit Provider Interface Import Optimism Gas Limit Provider Interface from balancer-v2 interfaces
importRewardTokenDistributorI Import Reward Token Distributor Interface Import Reward Token Distributor Interface from balancer-v2 interfaces
importRewardsOnlyGaugeI Import Rewards Only Gauge Interface Import Rewards Only Gauge Interface from balancer-v2 interfaces
importSmartWalletCheckerI Import Smart Wallet Checker Interface Import Smart Wallet Checker Interface from balancer-v2 interfaces
importStakelessGaugeI Import Stakeless Gauge Interface Import Stakeless Gauge Interface from balancer-v2 interfaces
importStakingLiquidityGaugeI Import Staking Liquidity Gauge Interface Import Staking Liquidity Gauge Interface from balancer-v2 interfaces
importVeDelegationI Import ve Delegation Interface Import ve Delegation Interface from balancer-v2 interfaces
importVotingEscrowI Import Voting Escrow Interface Import Voting Escrow Interface from balancer-v2 interfaces

Pool Linear

Shortcut Expanded Description
importLinearPoolI Import Linear Pool Interface Import Linear Pool Interface from balancer-v2 interfaces
importERC4626I Import ERC4626 Interface Import ERC4626 Interface from balancer-v2 interfaces

Pool Stable

Shortcut Expanded Description
importComposableStablePoolRatesI Import Composable Stable Pool Interface Import Composable Stable Pool Interface from balancer-v2 interfaces
importStablePoolUserData Import Stable Pool User Data Import Stable Pool User Data Library from balancer-v2 interfaces

Pool Utils

Shortcut Expanded Description
importBasePoolUserData Import Base Pool User Data Library Import Base Pool User Data Library from @balancer-labs/v2-interfaces
importBasePoolControllerI Import Base Pool Controller Interface Import Base Pool Controller Interface from @balancer-labs/v2-interfaces
importBasePoolFactoryI Import Base Pool Factory Interface Import Base Pool Factory Interface from @balancer-labs/v2-interfaces
importControlledPoolI Import Controlled Pool Interface Import Controlled Pool Interface from @balancer-labs/v2-interfaces
importFactoryCreatedPoolVersionI Import Factory Created Pool Version Interface Import Factory Created Pool Version Interface from @balancer-labs/v2-interfaces
importLastCreatedPoolFactoryI Import Last Created Pool Factory Interface Import Last Created Pool Factory Interface from @balancer-labs/v2-interfaces
importManagedPoolI Import Managed Pool Interface Import Managed Pool Interface from @balancer-labs/v2-interfaces
importPoolVersionI Import Pool Version Interface Import Pool Version Interface from @balancer-labs/v2-interfaces
importProtocolFeeCacheI Import Protocol Fee Cache Interface Import Protocol Fee Cache Interface from @balancer-labs/v2-interfaces
importRateProviderI Import Rate Provider Interface Import Rate Provider Interface from @balancer-labs/v2-interfaces
importRateProviderPoolI Import Rate Provider Pool Interface Import Rate Provider Pool Interface from @balancer-labs/v2-interfaces
importRecoveryModeI Import Recovery Mode Interface Import Recovery Mode Interface from @balancer-labs/v2-interfaces
importRecoveryModeHelperI Import Recovery Mode Helper Interface Import Recovery Mode Helper Interface from @balancer-labs/v2-interfaces
importVersionI Import Version Interface Import Version Interface from @balancer-labs/v2-interfaces

Pool Weighted

Shortcut Expanded Description
importExternalWeightedMathI Import External Weighted Math Interface Import External Weighted Math Interface from balancer-v2 interfaces
importWeightedPoolUserData Import Weighted Pool User Data Import Weighted Pool User Data Library from balancer-v2 interfaces

Standalone Utils

Shortcut Expanded Description
importATokenI Import A Token Interface Import A Token Interface from @balancer-labs/v2-interfaces
importBALTokenHolderI Import BAL Token Holder Interface Import BAL Token Holder Interface from @balancer-labs/v2-interfaces
importBALTokenHolderFactoryI Import BAL Token Holder Factory Interface Import BAL Token Holder Factory Interface from @balancer-labs/v2-interfaces
importBalancerQueriesI Import Balancer Queries Interface Import Balancer Queries Interface from @balancer-labs/v2-interfaces
importBalancerRelayerI Import Balancer Relayer Interface Import Balancer Relayer Interface from @balancer-labs/v2-interfaces
importButtonWrapperI Import Button Wrapper Interface Import Button Wrapper Interface from @balancer-labs/v2-interfaces
importCTokenI Import C Token Interface Import C Token Interface from @balancer-labs/v2-interfaces
importEulerTokenI Import Euler Token Interface Import Euler Token Interface from @balancer-labs/v2-interfaces
importGearboxDieselTokenI Import Gearbox Diesel Token Interface Import Gearbox Diesel Token Interface from @balancer-labs/v2-interfaces
importProtocolFeePercentagesProviderI Import Protocol Fee Percentages Provider Interface Import Protocol Fee Percentages Provider Interface from @balancer-labs/v2-interfaces
importProtocolFeeSplitterI Import Protocol Fee Splitter Interface Import Protocol Fee Splitter Interface from @balancer-labs/v2-interfaces
importProtocolFeesWithdrawerI Import Protocol Fees Withdrawer Interface Import Protocol Fees Withdrawer Interface from @balancer-labs/v2-interfaces
importProtocolIdRegistryI Import Protocol ID Registry Interface Import Protocol ID Registry Interface from @balancer-labs/v2-interfaces
importReaperTokenVaultI Import Reaper Token Vault Interface Import Reaper Token Vault Interface from @balancer-labs/v2-interfaces
importShareTokenI Import Share Token Interface Import Share Token Interface from @balancer-labs/v2-interfaces
importSiloI Import Silo Interface Import Silo Interface from @balancer-labs/v2-interfaces
importStaticATokenLMI Import Static A Token LM Interface Import Static A Token LM Interface from @balancer-labs/v2-interfaces
importTetuSmartVaultI Import Tetu Smart Vault Interface Import Tetu Smart Vault Interface from @balancer-labs/v2-interfaces
importTetuStrategyI Import Tetu Strategy Interface Import Tetu Strategy Interface from @balancer-labs/v2-interfaces
importUnbuttonTokenI Import Unbutton Token Interface Import Unbutton Token Interface from @balancer-labs/v2-interfaces
importYearnTokenVaultI Import Yearn Token Vault Interface Import Yearn Token Vault Interface from @balancer-labs/v2-interfaces
importstETHI Import stETH Interface Import stETH Interface from @balancer-labs/v2-interfaces
importwstETHI Import wstETH Interface Import wstETH Interface from @balancer-labs/v2-interfaces

Vault

Shortcut Expanded Description
importAssetI Import Asset Interface Import Asset Interface from @balancer-labs/v2-interfaces
importAuthorizerI Import Authorizer Interface Import Authorizer Interface from @balancer-labs/v2-interfaces
importBasePoolI Import Base Pool Interface Import Base Pool Interface from @balancer-labs/v2-interfaces
importBasicAuthorizerI Import Basic Authorizer Interface Import Basic Authorizer Interface from @balancer-labs/v2-interfaces
importFlashLoanRecipientI Import Flash Loan Recipient Interface Import Flash Loan Recipient Interface from @balancer-labs/v2-interfaces
importGeneralPoolI Import General Pool Interface Import General Pool Interface from @balancer-labs/v2-interfaces
importMinimalSwapInfoPoolI Import Minimal Swap Info Pool Interface Import Minimal Swap Info Pool Interface from @balancer-labs/v2-interfaces
importPoolSwapStructsI Import Pool Swap Structs Interface Import Pool Swap Structs Interface from @balancer-labs/v2-interfaces
importProtocolFeesCollectorI Import Protocol Fees Collector Interface Import Protocol Fees Collector Interface from @balancer-labs/v2-interfaces
importVaultI Import Vault Interface Import Vault Interface from @balancer-labs/v2-interfaces

Solhint

Shortcut Expanded Description
solhintDisableNextLine Solhint Disable Next Line Disable solhint linter for next line
solhintDisableLine Solhint Disable Line Disable solhint linter for current line
solhintDisable Solhint Disable Disable solhint linter for current file
solhintEnable Solhint Enable Enable solhint linter for current file

Slither

Shortcut Expanded Description
slitherDisableNextLine Slither Disable Next Line Disable slither detector for next line
slitherDisableStart Slither Disable Start Disable slither detector starting from line
slitherDisableEnd Slither Disable End Disable slither detector until line

Solidity

Variables

Bytes

Shortcut Expanded Description
bytes*Private Bytes* Private Create a bytes* private variable
bytes*PrivateConstant Bytes* Private Constant Create a bytes* private constant variable
bytes*Public Bytes* Public Create a bytes* public variable
bytes*PublicConstant Bytes* Public Constant Create a bytes* public constant variable
bytes*Internal Bytes* Internal Create a bytes* internal variable
bytes*InternalConstant Bytes* Internal Constant Create a bytes* internal constant variable
bytes*PrivateImmutable* Bytes* Private Immutable Create a bytes* private immutable variable
bytes*PublicImmutable* Bytes* Public Immutable Create a bytes* public immutable variable
bytes*InternalImmutable* Bytes* Internal Immutable Create a bytes* internal immutable variable

Address

Shortcut Expanded Description
addressPrivate Address Private Create an address private variable
addressPrivateConstant Address Private Constant Create an address private constant variable
addressPublic Address Public Create an address public variable
addressPublicConstant Address Public Constant Create an address public constant variable
addressInternal Address Internal Create an address internal variable
addressInternalConstant Address Internal Constant Create an address internal constant variable
addressPrivateImmutable* Address Private Immutable Create an address private immutable variable
addressPublicImmutable* Address Public Immutable Create an address public immutable variable
addressInternalImmutable* Address Internal Immutable Create an address internal immutable variable

String

Shortcut Expanded Description
stringPrivate String Private Create a string private variable
stringPrivateConstant String Private Constant Create a string private constant variable
stringPublic String Public Create a string public variable
stringPublicConstant String Public Constant Create a string public constant variable
stringInternal String Internal Create a string internal variable
stringInternalConstant String Internal Constant Create a string internal constant variable

Bool

Shortcut Expanded Description
boolPrivate Bool Private Create a bool private variable
boolPrivateConstant Bool Private Constant Create a bool private constant variable
boolPrivateImmutable Bool Private Immutable Create a bool private immutable variable
boolPublic Bool Public Create a bool public variable
boolPublicImmutable Bool Public Immutable Create a bool public immutable variable
boolPublicConstant Bool Public Constant Create a bool public constant variable
boolInternal Bool Internal Create a bool internal variable
boolInternalConstant Bool Internal Constant Create a bool internal constant variable
boolInternalImmutable Bool Internal Immutable Create a bool internal immutable variable

Uint

Shortcut Expanded Description
uint*Private Uint* Private Create an uint* private variable
uint*PrivateConstant Uint* Private Constant Create an uint* private constant variable
uint*PrivateImmutable Uint* Private Immutable Create an uint* private immutable variable
uint*Public Uint* Public Create an uint* public variable
uint*PublicConstant Uint* Public Constant Create an uint* public constant variable
uint*PublicImmutable Uint* Public Immutable Create an uint* public immutable variable
uint*Internal Uint* Internal Create an uint* internal variable
uint*InternalConstant Uint* Internal Constant Create an uint* internal constant variable
uint*InternalImmutable Uint* Internal Immutable Create an uint* internal immutable variable

Int

Shortcut Expanded Description
int*Private Int* Private Create an int* private variable
int*PrivateConstant Int* Private Constant Create an int* private constant variable
int*PrivateImmutable Int* Private Immutable Create an int* private immutable variable
int*Public Int* Public Create an int* public variable
int*PublicConstant Int* Public Constant Create an int* public constant variable
int*PublicImmutable Int* Public Immutable Create an int* public immutable variable
int*Internal Int* Internal Create an int* internal variable
int*InternalConstant Int* Internal Constant Create an int* internal constant variable
int*InternalImmutable Int* Internal Immutable Create an int* internal immutable variable

Mapping

Shortcut Expanded Description
mappingPrivate Mapping Private Create an mapping private variable
mappingPublic Mapping Public Create an mapping public variable
mappingInternal Mapping Internal Create an mapping internal variable

Arrays

Shortcut Expanded Description
{bytes, address, string, bool, uint, int, mapping}[]Private {bytes, address, string, bool, uint, int, mapping}[] Private Create a {bytes, address, string, bool, uint, int, mapping}[] private variable
{bytes, address, string, bool, uint, int, mapping}[]Public {bytes, address, string, bool, uint, int, mapping}[] Public Create a {bytes, address, string, bool, uint, int, mapping}[] public variable
{bytes, address, string, bool, uint, int, mapping}[]Internal {bytes, address, string, bool, uint, int, mapping}[] Internal Create a {bytes, address, string, bool, uint, int, mapping}[] internal variable

Functions

Shortcut Expanded Description
externalFunctionViewReturn External Function View Return Create an external view function with return
externalFunctionPureReturn External Function Pure Return Create an external pure function with return
externalFunctionReturn External Function Return Create an external function with return
externalFunction External Function Create an external function without return
publicFunctionViewReturn Public Function View Return Create an public view function with return
publicFunctionPureReturn Public Function Pure Return Create an public pure function with return
publicFunctionReturn Public Function Return Create an public function with return
publicFunction Public Function Create an public function without return
internalFunctionViewReturn Internal Function View Return Create an internal view function with return
internalFunctionPureReturn Internal Function Pure Return Create an internal pure function with return
internalFunctionReturn Internal Function Return Create an internal function with return
internalFunction Internal Function Create an internal function without return
privateFunctionViewReturn Private Function View Return Create an private view function with return
privateFunctionPureReturn Private Function Pure Return Create an private pure function with return
privateFunctionReturn Private Function Return Create an private function with return
privateFunction Private Function Create an private function without return

Licenses

Shortcut Expanded Description
unlicensedLicense Unlicensed License Create Unlicensed License
mitLicense MIT License Create MIT License
busl1.1License BUSL-1.1 License Create BUSL-1.1 License
gplv3License GPLv3 License Create GPLv3 License
apacheLicense2 Apache 2.0 License Create Apache 2.0 License
bsd3ClauseLicense BSD 3-Clause License Create BSD 3-Clause License
bsd2ClauseLicense BSD 2-Clause License Create BSD 2-Clause License
iscLicense ISC License Create ISC License
cc0License CC0 License Create CC0 1.0 License
agpl3License AGPL-3.0 License Create AGPL-3.0 License

NatSpec

Shortcut Expanded Description
@notice @notice Create natspec notice
@dev @dev Create natspec dev
@title @title Create natspec title
@custom @custom Create natspec custom
@author @author Create natspec author
@inheritdoc @inheritdoc Create natspec inheritdoc
@return @return Create natspec return
@param @param Create natspec param

General Snippets

Shortcut Expanded Description
using Using Use X Library for Y Type
constructor Constructor Create Constructor
event Event Create Event
maxUint256 Max Uint256 Create maxUint256
unchecked Unchecked Create unchecked Block
modifier Modifier Create Modifier
error Error Create Error

Release Notes

1.2.0

  • Added Balancer Interfaces Snippets
  • Added Slither Snippets
  • Added Solhint Snippets
  • Added OpenZeppelin Access snippets
  • Added OpenZeppelin ERC20 snippets

1.1.0

  • Added OpenZeppelin Upgradable snippets
  • added 2 more using {lib} for {type}

1.0.1

  • Added Profile Picture and Adjusted Package.json

1.0.0

  • Initial release of Awesome Solidity