feat: added config for h contract deployment#331
feat: added config for h contract deployment#331yashvanthbl137-crypto wants to merge 2 commits intomasterfrom
Conversation
72a99b5 to
cdbc140
Compare
cdbc140 to
150feca
Compare
150feca to
efc6aeb
Compare
Ticket: CGARD-454 Made-with: Cursor
efc6aeb to
c187ade
Compare
scripts/deploy.ts
Outdated
| // Humanity: Skip balance check due to unreliable gas estimation | ||
| const skipBalanceCheck = | ||
| Number(chainId) === 6985385 || Number(chainId) === 7080969; | ||
|
|
||
| if (skipBalanceCheck) { | ||
| console.log('⚠️ Skipping balance check for Humanity'); | ||
| console.log(' Estimated deployment cost: ~0.01-0.02 H'); | ||
| } else { | ||
| await checkSufficientBalance( | ||
| deployerAddress, | ||
| estimatedCost, | ||
| 'all V4 contracts' | ||
| ); |
There was a problem hiding this comment.
Why is it unreliable? Can you add some details? Removing gas estimation like this is not ideal.
There was a problem hiding this comment.
During local testing on Humanity testnet, estimateGas() consistently failed with "contract creation code storage out of gas". However, when we bypassed estimation and used explicit gas parameters (30M gas limit, 2 Gwei), the actual deployments succeeded.
solution:
chainConfig.ts (line 347): Set gasLimit: 100B to bypass the estimation check (deploy.ts line 58: gasLimit > 10B)
deploy.ts (lines 35-39): Override with realistic values before deployment: 30M gas limit, 2 Gwei maxFee
Skip balance check since it would calculate based on the 100B placeholder
Precedent: This follows the same pattern as Mantle (chainConfig.ts lines 161-170), which also uses gasLimit: 100B for similar issues.
e314a81 to
64e10c7
Compare
| script: | | ||
| const tag = process.env.GITHUB_REF_NAME; | ||
| const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth|zketh|tzketh|baseeth|tbaseeth|bera|tbera|tavaxc|avaxc|toas|oas|tcoredao|coredao|tflr|flr|tsgb|sgb|txdc|xdc|twemix|wemix|tmon|mon|tstt|stt|tsoneium|soneium|world|tworld|tctc|ctc|tapechain|apechain|tphrs|phrs|thypeevm|hypeevm|tsonic|sonic|seievm|tseievm|kaia|tkaia|irys|tirys|tlineaeth|lineaeth|ip|tip|plasma|tplasma|kavaevm|tkavaevm|plume|tplume|zksyncera|tzksyncera|tog|og|flow|tflow|megaeth|tmegaeth|hbarevm|thbarevm|fluenteth|tfluenteth|mantle|tmantle|dogeos|tdogeos|opBNB|topBNB|jovayeth|tjovayeth|okb|tokb|ftm|morpheth|tmorpheth|arcusdc|tarcusdc|chiliz|tchiliz|unichain|tunichain|hpp|thpp|hoodeth|thoodeth)$/; | ||
| const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth|zketh|tzketh|baseeth|tbaseeth|bera|tbera|tavaxc|avaxc|toas|oas|tcoredao|coredao|tflr|flr|tsgb|sgb|txdc|xdc|twemix|wemix|tmon|mon|tstt|stt|tsoneium|soneium|world|tworld|tctc|ctc|tapechain|apechain|tphrs|phrs|thypeevm|hypeevm|tsonic|sonic|seievm|tseievm|kaia|tkaia|irys|tirys|tlineaeth|lineaeth|ip|tip|plasma|tplasma|kavaevm|tkavaevm|plume|tplume|zksyncera|tzksyncera|tog|og|flow|tflow|megaeth|tmegaeth|hbarevm|thbarevm|fluenteth|tfluenteth|mantle|tmantle|dogeos|tdogeos|opBNB|topBNB|jovayeth|tjovayeth|okb|tokb|ftm|morpheth|tmorpheth|arcusdc|tarcusdc|chiliz|tchiliz|unichain|tunichain|hpp|thpp|h|th|hoodeth|thoodeth)$/; |
There was a problem hiding this comment.
h as a regex matcher with no strict start and end? wow, that's a heck of a regex. i wonder what else it be matching? based on the current list it will probably match 10 other symbols.


added config for h contract deployment (hardhat, chainIds, chainConfig, GitHub workflows).
Humanity Protocol (H)
Deployed on local pointing to Humanity Protocol Testnet (th, chain 7080969):
{ "walletImplementation": "0x2178dA1b5e53340b49a29E420D9BFB647D6E1ef2", "walletFactory": "0x17369D73DA373DA6e46478ff49703b0A3FBF804C", "forwarderImplementation": "0x57F40EBFA83Ef50281c16360c931ccab3D280942", "forwarderFactory": "0xBD578c7EA545Eb8874d48EB6F46f2E54F9B4df7a" }{ "batcher": "0x0496cbF96E3472D64366c87bd51cf278d21867b6" }All five contracts verified on humanity-testnet.explorer.alchemy.com.
Special Configuration:
deploymentGasOverridesto bypass 100B estimation limitTicket: CGARD-454