Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverheadIGP.sol, deploy new IGPs, deploy ValidatorAnnounce #1572

Merged
merged 44 commits into from
Jan 24, 2023

Conversation

tkporter
Copy link
Collaborator

Description

  • Adds OverheadGasIgp (very open to better names here). This is what will serve as the "ISM-specific IGP". It lets an owner configure overhead gas amounts for destination domains, and for the IGP functions the OverheadGasIgp will just add the stored overhead gas amount to the provided _gasAmount and forward the call along to the inner IGP.
  • Moves the IGPs into their own dir
  • Deploy tooling for this will come separately with On-chain fee quoting: tooling for the default ISM-specific IGP #1299

Drive-by changes

None

Related issues

Backward compatibility

Are these changes backward compatible?

Yes

Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling?

None

Testing

What kind of testing have these changes undergone?

Unit Tests

Copy link
Member

@yorhodes yorhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work! one question about the destination keys

solidity/contracts/igps/GasOverheadIgp.sol Outdated Show resolved Hide resolved
solidity/contracts/igps/GasOverheadIgp.sol Outdated Show resolved Hide resolved
solidity/contracts/igps/GasOverheadIgp.sol Outdated Show resolved Hide resolved
solidity/contracts/igps/GasOverheadIgp.sol Outdated Show resolved Hide resolved
solidity/contracts/igps/GasOverheadIgp.sol Outdated Show resolved Hide resolved
solidity/test/igps/GasOverheadIgp.t.sol Outdated Show resolved Hide resolved
@yorhodes
Copy link
Member

see #1588 before responding to PR comments

solidity/contracts/igps/OverheadIgp.sol Show resolved Hide resolved
solidity/test/igps/OverheadIgp.t.sol Show resolved Hide resolved
solidity/test/isms/multisigIsm.test.ts Show resolved Hide resolved
solidity/test/isms/multisigIsm.test.ts Outdated Show resolved Hide resolved
solidity/test/lib/mailboxes.ts Outdated Show resolved Hide resolved
typescript/sdk/src/core/contracts.ts Outdated Show resolved Hide resolved
typescript/sdk/src/core/contracts.ts Outdated Show resolved Hide resolved
@tkporter tkporter changed the title IGP "proxy" that adds configured overhead gas amounts OverheadIGP.sol, deploy new IGPs, deploy ValidatorAnnounce Jan 24, 2023
@tkporter tkporter enabled auto-merge (squash) January 24, 2023 12:47
@github-actions
Copy link
Contributor

Forge Coverage Report

Coverage after merging trevor/on-chain-fee-ism-igp into main will be
20.74%▴ +6.14%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
../node_modules/@openzeppelin/contracts-upgradeable/access
   OwnableUpgradeable.sol85.71%75%85.71%90%67, 75
../node_modules/@openzeppelin/contracts-upgradeable/proxy/utils
   Initializable.sol0%0%0%0%145, 145, 145–146, 146, 146–148, 156, 163
../node_modules/@openzeppelin/contracts-upgradeable/token/ERC20
   ERC20Upgradeable.sol66%54.55%55%74.14%100, 187–189, 207–209, 209, 209, 211, 214, 236–237, 242, 265, 291, 296, 326–327, 56, 60–61, 68, 76, 93
../node_modules/@openzeppelin/contracts-upgradeable/utils
   AddressUpgradeable.sol0%0%0%0%100, 119, 134, 134, 134–136, 146, 160–161, 176, 176, 176–177, 177, 177, 180, 180, 180, 182, 184, 199, 199, 199–200, 202, 208, 208, 208, 216, 41, 61, 61, 61, 63–64, 64, 64, 86
   ContextUpgradeable.sol33.33%100%25%50%28
../node_modules/@openzeppelin/contracts/access
   Ownable.sol82.35%75%80%87.50%62, 70
../node_modules/@openzeppelin/contracts/proxy
   Proxy.sol0%100%0%0%59–60, 68
../node_modules/@openzeppelin/contracts/proxy/ERC1967
   ERC1967Proxy.sol0%100%0%0%30
   ERC1967Upgrade.sol0%0%0%0%117, 124, 124, 124–125, 134–135, 153, 160, 160, 160–161, 161, 161, 165, 179–181, 181, 181–182, 39, 46, 46, 46–47, 56–57, 70–71, 71, 71–72, 89, 89, 89–90, 92, 97
../node_modules/@openzeppelin/contracts/proxy/transparent
   ProxyAdmin.sol0%0%0%0%24–25, 25, 25–26, 39–40, 40, 40–41, 52, 63, 79
   TransparentUpgradeableProxy.sol0%0%0%0%107, 114, 121, 121, 121–122, 63, 76, 87, 96
../node_modules/@openzeppelin/contracts/utils
   Address.sol0%0%0%0%100, 119, 134, 134, 134–136, 146, 160–161, 171, 185–186, 201, 201, 201–202, 202, 202, 205, 205, 205, 207, 209, 224, 224, 224–225, 227, 233, 233, 233, 241, 41, 61, 61, 61, 63–64, 64, 64, 86
   Context.sol50%100%50%50%22
   Create2.sol0%0%0%0%35, 35, 35–36, 36, 36, 39, 41, 41, 41, 49, 80
   StorageSlot.sol0%100%0%0%55, 65, 75, 85
   Strings.sol0%0%0%0%20–22, 25, 28, 33–34, 34, 34, 36, 45, 53–58, 60, 60, 60–61, 68
../node_modules/@openzeppelin/contracts/utils/cryptography
   ECDSA.sol43.55%28.57%50%47.37%106–108, 121–123, 147–148, 153–154, 170–172, 198, 211, 24, 26, 26, 26–28, 28, 28–30, 30, 30–31, 56, 70
../node_modules/@openzeppelin/contracts/utils/math
   Math.sol0%0%0%0%102, 105, 108, 112, 117, 121–126, 132–133, 146–147, 147, 147–148, 150, 159, 159, 159–160, 173, 180–187, 196–197, 20, 206, 208, 208, 208–210, 212, 212, 212–214, 216, 216, 216–218, 220, 220, 220–222, 224, 224, 224–226, 228, 228, 228–230, 232, 232, 232–234, 236, 236, 236–237, 240, 249–250, 259, 261, 261, 261–263, 265, 265, 265–267, 269, 269, 269, 27, 270–271, 273, 273, 273–275, 277, 277, 277–279, 281, 281, 281–283, 285, 285, 285–286, 289, 298–299, 310, 312, 312, 312–314, 316, 316, 316–318, 320, 320, 320–322, 324, 324, 324–326, 328, 328, 328–329, 332, 341–342, 36, 47, 64–65, 68–69, 73, 73, 73–74, 78, 78, 78, 85, 88, 91–92, 99
../node_modules/@openzeppelin/contracts/utils/structs
   EnumerableMap.sol0%0%0%0%103, 117–118, 126–127, 127, 127–128, 130,

@github-actions
Copy link
Contributor

Hardhat Coverage Report

Coverage after merging trevor/on-chain-fee-ism-igp into main will be
49.35%▾ -8.50%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
solidity/contracts
   Create2Factory.sol0%0%0%0%101, 110, 110, 110, 112, 33, 58, 64–65, 65, 65, 77–78, 98, 98, 98
   HyperlaneConnectionClient.sol52.38%50%58.33%50%100–101, 131, 160, 160, 160, 164–165, 58, 76–77, 85–86, 98–99
   Mailbox.sol97.06%100%92.31%97.56%231
   OwnableMulticall.sol0%100%0%0%18, 22, 26
   PausableReentrancyGuard.sol95.65%83.33%100%100%30
   Router.sol85.71%87.50%78.57%88.89%111, 46, 53, 64
   ValidatorAnnounce.sol0%0%0%0%106–108, 110, 115, 55–56, 75, 78, 78, 78–79, 82, 84–85, 85, 85, 88, 88, 88–89, 91–93
solidity/contracts/igps
   InterchainGasPaymaster.sol85.19%50%100%100%101, 61, 66, 68
   OverheadIgp.sol0%100%0%0%102, 122, 130–131, 45, 65, 82–83
solidity/contracts/isms
   MultisigIsm.sol97.12%86.36%100%100%102, 155, 263
solidity/contracts/libs
   Call.sol0%100%0%0%13–18, 24–29, 39, 41–44, 48–50
   EnumerableMapExtended.sol53.33%100%57.14%50%45, 61, 69–70
   Merkle.sol97.14%87.50%100%98.25%30, 44
   Message.sol90.91%100%90.91%90.91%109
   MinimalProxy.sol0%100%0%0%14
   MultisigIsmMetadata.sol100%100%100%100%
   TypeCasts.sol44.44%100%66.67%33.33%11–13, 17
   ValidatorAnnouncements.sol0%100%0%0%23, 30
solidity/contracts/middleware
   InterchainAccountRouter.sol0%0%0%0%107, 120–122, 122, 122–126, 128, 142, 155, 168, 172, 40, 42–43, 59, 76, 91–93
   InterchainQueryRouter.sol0%0%0%0%105–109, 122, 122, 122, 126, 130, 143–144, 144, 144–145, 154–157, 157–158, 162–163, 65, 87–91
solidity/contracts/middleware/liquidity-layer
   LiquidityLayerRouter.sol0%0%0%0%103, 108, 116, 116, 116–117, 131–132, 140, 142, 142, 142, 34, 50, 55, 55, 55, 63, 71, 81, 91
solidity/contracts/middleware/liquidity-layer/adapters
   CircleBridgeAdapter.sol0%0%0%0%100, 100, 100, 107, 107, 107, 112, 119–120, 131, 135, 141–142, 142, 142, 147–148, 148, 148, 157, 157, 157, 159, 169, 176, 178, 185, 185, 185, 191–192, 192, 192, 194–195, 195, 195, 200–201, 203, 211–212, 212, 212, 214–215, 215, 215, 221–222, 224, 239, 58, 58, 58–59, 75, 77–78, 81, 90–91, 91, 91, 96, 99
   PortalAdapter.sol0%0%0%0%102, 114–115, 132, 134, 138, 138, 138, 143, 149, 149, 149–150, 159, 161, 166, 172, 180, 192, 199, 201, 214, 52, 52, 52–53, 69, 71–73, 88–89, 93, 97, 97, 97
solidity/contracts/middleware/liquidity-layer/interfaces
   ILiquidityLayerAdapter.sol100%100%100%100%
solidity/contracts/middleware/liquidity-layer/interfaces/circle
   ICircleMessageTransmitter.sol100%100%100%100%
   ITokenMessenger.sol100%100%100%100%
solidity/contracts/middleware/liquidity-layer/interfaces/portal
   IPortalTokenBridge.sol100%100%100%100%
solidity/contracts/mock
   MockCircleMessageTransmitter.sol0%100%0%0%12, 20, 28, 36–37, 41
   MockCircleTokenMessenger.sol0%0%0%0%12, 21–23, 23, 23–25, 35–36
   MockHyperlaneEnvironment.sol0%100%0%0%21–22, 24–25, 27–28, 30–31, 33–34, 36–37, 39–40, 42–43, 49, 56, 60, 65–66, 70, 74
   MockMailbox.sol94.74%50%100%100%41
   MockPortalBridge.sol0%100%0%0%13, 24–27, 31, 35, 42, 47, 49, 61, 65–66, 74, 87
   MockToken.sol0%100%0%0%12, 8
solidity/contracts/upgrade
   ProxyAdmin.sol100%100%100%100%
   TransparentUpgradeableProxy.sol100%100%100%100%
   Versioned.sol100%100%100%100%

@tkporter tkporter merged commit bf9d0ae into main Jan 24, 2023
@tkporter tkporter deleted the trevor/on-chain-fee-ism-igp branch January 24, 2023 14:40
@yorhodes yorhodes mentioned this pull request Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On-chain fee quoting: create ISM-specific IGP contract
2 participants