Hi guys, I'm trying deploy token using node and ethers but I get contract exceed limit, anyone know how I can set optimise true and number of runs ?
Sep 21, 2023, 12:58 PM
Divide it up into multiple contracts, remove unnecessary functions, use libraries
https://ethereum.org/en/developers/tutorials/downsizing-contracts-to-fight-the-contract-size-limit/
Sep 21, 2023, 1:02 PM
the problem is that the token uses DividendTracker for reflection and DividendTracker uses IterableMapping, i can't divide it in different contracts, in hardhat using optimise true and 200 runs works fine, but i don't know how to do it in ethers js
Thanks I will take look
Sep 21, 2023, 1:04 PM
may I ask
why you don't want to use hardhat or foundry or others tools?
why you don't want to use hardhat or foundry or others tools?
Sep 21, 2023, 1:07 PM
becouse i'm deploying using telegram bot, users can deploy token easily using the bot, the bot was working fine with a simple token, but after adding Dividend Tracker it exceeds the limit, so I need use ethers js
Sep 21, 2023, 1:12 PM
wait you want to deploy the same contract over and over?
btw noone blocks you from using hardhat anyway
Sep 21, 2023, 1:14 PM
Yes, same contract with different configuration
Sep 21, 2023, 1:18 PM
I HIGHLY suggest to check minimal proxy pattern
also known as Clones
Sep 21, 2023, 1:18 PM
Mmm on node script?
Okay, I will take look, thanks mate
Sep 21, 2023, 1:19 PM
yes isn't hardhat for node?😜
Sep 21, 2023, 1:19 PM
Yes you're right xD
I solved using hardhat, thanks for your suggestion man 🤜🤛
Sep 22, 2023, 3:11 PM
Have you find the solution? I'm also stuck 🫤
Sep 23, 2023, 3:22 PM
Yes, send you tomorrow I'm not on pc today
Sep 23, 2023, 3:44 PM