Access via Accounts
The most straightforward and common way to access a SKALE Chain for deployment is by having an externally owned account (EOA) added to the chain allow list. An account that is added to this list is givenDEPLOYER_ROLE which allows it to directly bypass all restrictions and deploy ANY smart contract to a SKALE Chain as long as it fits within the block gas limit.
See how to add address to whitelist and how to remove from whitelist to understand how to manage your access control layer.
Access via Factories
Another common method for deployment is via factories. SKALE Chain owners and operators can deploy popular generic factories such as CREATE2Factory, SingletonFactory, and CreateX to their chain and allow developers to use them when deploying to their chain. Additionally, developers themselves can create contracts to deploy other contracts making specific factories for their uses.Open Factory Usage
Open factory usage is where the SKALE Chain owner or operator grantsDEPLOYER_ROLE to a smart contract that is acting as the factory. This then allows ANY account or smart to use the whitelisted factory to deploy a smart contract through.
Example: SushiSwap
On the SKALE Europa Hub, SushiSwap which is based off of Uniswap; has a factory contract that creates liquidity pairs. This contract is dedicated to SushiSwap and allows for liquidity pairs (which are smart contracts) to be created by anyone via the UniswapV2/V3 factories that are deployed as part of SushiSwap’s core architecture.
This then allows anyone to deploy a smart contract via the factory regardless of their direct status on the allow list.
Closed Factory Usage
Closed factory usage is where the SKALE Chain owner or operator allows a specific account or set of accounts to deploy through a factory. The unique part about this design is:- The accounts whitelisted on the specific factory DO NOT have the ability to deploy directly to the blockchain or through other factories
-
Accounts provided with
DEPLOYER_ROLEgenerally on the blockchain can deploy via the contract IF the contract allows generic deployment rights -
Accounts without
DEPLOYER_ROLEcannot deploy through the factory IF the factory does not haveDEPLOYER_ROLEdirectly; sufficiently securing the contract and chain from spam
