cast send -r polygon --gas-limit 15000000 --account DedicatedServerMsgSender 0x6DBFfd2846d4a556349a3bc53297700d89a94034 'call(address[])' [0x7337bf358b4B2e5d0a1AEbE7BbD65b46D6208ED2,0xa313547075DEd50854C1427b3C82878c010E7e35,]
cast send -r polygon --gas-limit 15000000 --account DedicatedServerMsgSender 0x2FfeB278BB1Fb9f3B48619AbaBe955526942ac8c 'call(address[])' [0xf6164dE791FDD7028001977bf207e42c59076A48,0x62146825d787EaD9C5bB8ADc8e7EFd3Ec3d7189a,]```
Use IFactory.addFarms
method via explorer.
solidity
struct Farm {
uint status;
address pool;
string strategyLogicId;
address[] rewardAssets;
address[] addresses;
uint[] nums;
int24[] ticks;
}
/// @notice Add farm to factory
/// @param farms_ Settings and data required to work with the farm.
function addFarms(Farm[] memory farms_) external;
- Factory polygonscan
- Connect operator wallet
1. addFarms
[[0, "0xAE81FAc689A1b4b1e06e7ef4a2ab4CD8aC0A087D", "DefiEdge QuickSwap Merkl Farm", ["0x958d208Cdf087843e9AD98d23823d32E17d723A1"], ["0x29f177EFF806b8A71Ff8C7259eC359312CaCE22D"], [0], []]]
Use IFactory.setStrategyAvailableInitParams
method via explorer.
solidity
/// @notice Initial addition or change of strategy available init params
/// @param id Strategy ID string
/// @param initParams Init params variations that will be parsed by strategy
function setStrategyAvailableInitParams(string memory id, StrategyAvailableInitParams memory initParams) external;
- Factory polygonscan
- Connect operator wallet
4. setStrategyAvailableInitParams (0x6c2713a3)
- fill params
cast send -i --rpc-url sonic 0xe52fcf607a8328106723804de1ef65da512771be 'addPools((address,address,address,address)[],bool)' '[("0xE72b6DD415cDACeAC76616Df2C9278B33079E0D3","0xaf95468b1a624605bbfb862b0fb6e9c73ad847b8","0x29219dd400f2Bf60E5a23d13Be72B486D4038894","0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38")]' true
solidity
struct AddPoolData {
address pool;
string ammAdapterId;
address tokenIn;
address tokenOut;
}
function addPools(AddPoolData[] memory pools, bool rewrite) external;
- Swapper sonicscan
- Connect operator wallet
3. addPools
- pools_ (tuple[]):
[["0x139f8eCC5fC8Ef11226a83911FEBecC08476cfB1","0xE3374041F173FFCB0026A82C6EEf94409F713Cf9","0xddF26B42C1d903De8962d3F79a74a501420d5F19","0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38"],["0xbCbC5777537c0D0462fb82BA48Eeb6cb361E853f","0xE3374041F173FFCB0026A82C6EEf94409F713Cf9","0x50c42dEAcD8Fc9773493ED674b675bE577f2634b","0x29219dd400f2Bf60E5a23d13Be72B486D4038894"]]
- rewrite (bool): false
Use IFactory.setVaultConfig
method.
View current building prices and vault type string IDs on Factory 24. vaultTypes
solidity
struct VaultConfig {
string vaultType;
address implementation;
bool deployAllowed;
bool upgradeAllowed;
uint buildingPrice;
}
/// @notice Initial addition or change of vault type settings.
/// Operator can add new vault type. Governance or multisig can change existing vault type config.
/// @param vaultConfig_ Vault type settings
function setVaultConfig(VaultConfig memory vaultConfig_) external;
Call it via Safe Transaction Builder:
- New transasction
- Connect signer wallet
- Address: 0xa14EaAE76890595B3C7ea308dAEBB93863480EAD
ABI
[{"inputs": [{"components": [{"internalType": "string","name": "vaultType","type": "string"},{"internalType": "address","name": "implementation","type": "address"},{"internalType": "bool","name": "deployAllowed","type": "bool"},{"internalType": "bool","name": "upgradeAllowed","type": "bool"},{"internalType": "uint256","name":"buildingPrice","type": "uint256"}],"internalType": "struct IFactory.VaultConfig","name": "vaultConfig_","type": "tuple"}],"name": "setVaultConfig","outputs": [],"stateMutability": "nonpayable","type": "function"}]
- vaultConfig_:
["<Vault type string ID>","<implementation address>",true,true,"<price SDIV>"]
- Add transaction, Create batch, Simulate, Send batch, Sign
- Ask other signers to confirm and execute
Use IFactory.setStrategyLogicConfig
method.
This need to add new strategy, upgrade strategy implementation or disable vaults building.
solidity
struct StrategyLogicConfig {
string id;
address implementation;
bool deployAllowed;
bool upgradeAllowed;
bool farming;
uint tokenId;
}
/// @notice Initial addition or change of strategy logic settings.
/// Operator can add new strategy logic. Governance or multisig can change existing logic config.
/// @param config Strategy logic settings
/// @param developer Strategy developer is receiver of minted StrategyLogic NFT on initial addition
function setStrategyLogicConfig(StrategyLogicConfig memory config, address developer) external;
Call it via Safe Transaction Builder:
- New transasction
- Connect signer wallet
- Address:
0xa14EaAE76890595B3C7ea308dAEBB93863480EAD
ABI
[{"type": "function","name": "strategyLogicConfig","inputs": [{"name": "idHash","type": "bytes32","internalType": "bytes32"}],"outputs": [{"name": "config","type": "tuple","internalType": "struct IFactory.StrategyLogicConfig","components": [{"name": "id","type": "string","internalType": "string"},{"name": "implementation","type": "address","internalType": "address"},{"name": "deployAllowed","type": "bool","internalType": "bool"},{"name": "upgradeAllowed","type": "bool","internalType": "bool"},{"name": "farming","type": "bool","internalType": "bool"},{"name": "tokenId","type": "uint256","internalType": "uint256"}]}],"stateMutability": "view"},{"type": "function","name": "setStrategyLogicConfig","inputs": [{"name": "config","type": "tuple","internalType": "struct IFactory.StrategyLogicConfig","components": [{"name": "id","type": "string","internalType": "string"},{"name": "implementation","type": "address","internalType": "address"},{"name": "deployAllowed","type": "bool","internalType": "bool"},{"name": "upgradeAllowed","type": "bool","internalType": "bool"},{"name": "farming","type": "bool","internalType": "bool"},{"name": "tokenId","type": "uint256","internalType": "uint256"}]},{"name": "developer","type": "address","internalType": "address"}],"outputs": [],"stateMutability": "nonpayable"}]
- config:
["<Strategy string ID>","<implementation address>",true,true,<is farming?>,0]
- developer: 0x0000000000000000000000000000000000000000 (zero address for upgrades and NFT receiver address for new logic)
- Add transaction, Create batch, Simulate, Send batch, Sign
- Ask other signers to confirm and execute