The restricted pim factory deployment is almost the same process as the default factory. The only difference being that the user has to pass factoryType: 'restricted-pim' approve their collateral tokens for the pim-factory and pass the extra parameters required by the factory.
const FORMATTED_MAX_UINT = '115792089237316195423570985008687907853269984665640564039457.584007913129639935' as const // Human Readable MAX_UINT
constcurveShape= { Basic: { reserveRatioForBuying:333_333, reserveRatioForSelling:333_333, initialIssuanceSupply:'200002.999999999999998676', initialCollateralSupply:'296.306333665498798599', },} asconstconstargs= { authorizer: { initialAdmin: <admin_address>, }, fundingManager: { issuanceToken: '0x0000000000000000000000000000000000000000', // At the current state of the SDK this address is still being used as the anchor point to fetch the decimals of the token which will be deployed. Please provide a token address which has the same decimals as the token which you are deploying
bondingCurveParams: { formula: <bancor_formula>, buyFee: <PPM_Amount>, sellFee: <PPM_Amount>, buyIsOpen:true, sellIsOpen:true,...curveShape.Basic, }, collateralToken: <collateral_token_address>, }, issuanceToken: { name: <name_of_the_token>, symbol: <symbol_of_the_token>, decimals: <decimals_of_the_token>, maxSupply:FORMATTED_MAX_UINT }, } asconstsatisfiesGetUserArgs<typeof requestedModules,'restricted-pim'>
Run The Deployment
Note: Approving of the initial collateral deposit is handled by the run