Deploy new TestRecipients & blacklist old one on testnet (#1957)

### Description

Context https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/1956

### Drive-by changes

New TestRecipient salts, made TestRecipient ownable so that there's some
access control on setting the ISM

### Related issues

- Fixes https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/1956

### 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?_

Deployed
pull/1345/merge
Trevor Porter 2 years ago committed by GitHub
parent c854784be6
commit ddd3bbd698
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      solidity/.gas-snapshot
  2. 11
      solidity/contracts/test/TestRecipient.sol
  3. 38
      typescript/infra/config/environments/mainnet2/testrecipient/addresses.json
  4. 128
      typescript/infra/config/environments/mainnet2/testrecipient/verification.json
  5. 10
      typescript/infra/config/environments/testnet3/agent.ts
  6. 38
      typescript/infra/config/environments/testnet3/testrecipient/addresses.json
  7. 128
      typescript/infra/config/environments/testnet3/testrecipient/verification.json
  8. 11
      typescript/infra/src/testcontracts/testrecipient.ts

@ -1,24 +1,24 @@
GasRouterTest:testDispatchWithGas(uint256) (runs: 256, μ: 408670, ~: 408670)
GasRouterTest:testQuoteGasPayment(uint256) (runs: 256, μ: 85774, ~: 85774)
GasRouterTest:testDispatchWithGas(uint256) (runs: 256, μ: 413789, ~: 413789)
GasRouterTest:testQuoteGasPayment(uint256) (runs: 256, μ: 85818, ~: 85818)
GasRouterTest:testSetDestinationGas(uint256) (runs: 256, μ: 73808, ~: 75985)
InterchainAccountRouterTest:testBytes32Owner() (gas: 210236)
InterchainAccountRouterTest:testCannotSetOwner(address) (runs: 256, μ: 505585, ~: 505741)
InterchainAccountRouterTest:testCannotSetOwnerTwice(address) (runs: 256, μ: 854698, ~: 854698)
InterchainAccountRouterTest:testCannotSetOwner(address) (runs: 256, μ: 505663, ~: 505741)
InterchainAccountRouterTest:testCannotSetOwnerTwice(address) (runs: 256, μ: 854620, ~: 854698)
InterchainAccountRouterTest:testOwner() (gas: 210393)
InterchainAccountRouterTest:testReceiveValue(uint256) (runs: 256, μ: 148364, ~: 150014)
InterchainAccountRouterTest:testSendValue(uint256) (runs: 256, μ: 556925, ~: 556925)
InterchainAccountRouterTest:testSetOwner(address) (runs: 256, μ: 540147, ~: 540147)
InterchainGasPaymasterTest:testClaim() (gas: 90697)
InterchainGasPaymasterTest:testClaim() (gas: 90675)
InterchainGasPaymasterTest:testConstructorSetsBeneficiary() (gas: 7648)
InterchainGasPaymasterTest:testGetExchangeRateAndGasPrice() (gas: 41721)
InterchainGasPaymasterTest:testGetExchangeRateAndGasPriceRevertsIfNoGasOracleSet() (gas: 10815)
InterchainGasPaymasterTest:testInitializeRevertsIfCalledTwice() (gas: 10960)
InterchainGasPaymasterTest:testPayForGas() (gas: 92790)
InterchainGasPaymasterTest:testGetExchangeRateAndGasPrice() (gas: 41743)
InterchainGasPaymasterTest:testGetExchangeRateAndGasPriceRevertsIfNoGasOracleSet() (gas: 10837)
InterchainGasPaymasterTest:testInitializeRevertsIfCalledTwice() (gas: 11087)
InterchainGasPaymasterTest:testPayForGas() (gas: 92812)
InterchainGasPaymasterTest:testPayForGasRevertsIfPaymentInsufficient() (gas: 44808)
InterchainGasPaymasterTest:testQuoteGasPaymentRemoteVeryCheap() (gas: 41729)
InterchainGasPaymasterTest:testQuoteGasPaymentRemoteVeryExpensive() (gas: 41709)
InterchainGasPaymasterTest:testQuoteGasPaymentRevertsIfNoGasOracleSet() (gas: 10781)
InterchainGasPaymasterTest:testQuoteGasPaymentSimilarExchangeRate() (gas: 41774)
InterchainGasPaymasterTest:testQuoteGasPaymentRemoteVeryCheap() (gas: 41751)
InterchainGasPaymasterTest:testQuoteGasPaymentRemoteVeryExpensive() (gas: 41731)
InterchainGasPaymasterTest:testQuoteGasPaymentRevertsIfNoGasOracleSet() (gas: 10803)
InterchainGasPaymasterTest:testQuoteGasPaymentSimilarExchangeRate() (gas: 41796)
InterchainGasPaymasterTest:testSetBeneficiary() (gas: 18694)
InterchainGasPaymasterTest:testSetBeneficiaryRevertsIfNotOwner() (gas: 11033)
InterchainGasPaymasterTest:testSetGasOracle() (gas: 40459)
@ -26,7 +26,7 @@ InterchainGasPaymasterTest:testSetGasOracleRevertsIfNotOwner() (gas: 13783)
InterchainQueryRouterTest:testCannotCallbackReverting() (gas: 1506125)
InterchainQueryRouterTest:testCannotQueryReverting() (gas: 1173880)
InterchainQueryRouterTest:testQueryAddress(address) (runs: 256, μ: 1536915, ~: 1536915)
InterchainQueryRouterTest:testQueryUint256(uint256) (runs: 256, μ: 1685046, ~: 1685124)
InterchainQueryRouterTest:testQueryUint256(uint256) (runs: 256, μ: 1685124, ~: 1685124)
LiquidityLayerRouterTest:testCannotSendToRecipientWithoutHandle() (gas: 662979)
LiquidityLayerRouterTest:testDispatchWithTokenTransfersMovesTokens() (gas: 545350)
LiquidityLayerRouterTest:testDispatchWithTokensCallsAdapter() (gas: 551460)
@ -34,14 +34,14 @@ LiquidityLayerRouterTest:testDispatchWithTokensRevertsWithFailedTransferIn() (ga
LiquidityLayerRouterTest:testDispatchWithTokensRevertsWithUnkownBridgeAdapter() (gas: 20663)
LiquidityLayerRouterTest:testDispatchWithTokensTransfersOnDestination() (gas: 781605)
LiquidityLayerRouterTest:testProcessingRevertsIfBridgeAdapterReverts() (gas: 596435)
LiquidityLayerRouterTest:testSendToRecipientWithoutHandleWhenSpecifyingNoMessage() (gas: 1055907)
LiquidityLayerRouterTest:testSendToRecipientWithoutHandleWhenSpecifyingNoMessage() (gas: 1197693)
LiquidityLayerRouterTest:testSetLiquidityLayerAdapter() (gas: 23363)
MessagingTest:testSendMessage(string) (runs: 256, μ: 277522, ~: 296005)
MessagingTest:testSendMessage(string) (runs: 256, μ: 277791, ~: 296095)
OverheadIgpTest:testDestinationGasAmount() (gas: 33814)
OverheadIgpTest:testDestinationGasAmountWhenOverheadNotSet() (gas: 7912)
OverheadIgpTest:testInnerIgpSet() (gas: 7632)
OverheadIgpTest:testPayForGas() (gas: 65328)
OverheadIgpTest:testQuoteGasPayment() (gas: 42746)
OverheadIgpTest:testQuoteGasPayment() (gas: 42768)
OverheadIgpTest:testSetDestinationGasAmounts() (gas: 63435)
OverheadIgpTest:testSetDestinationGasAmountsNotOwner() (gas: 12018)
PausableReentrancyGuardTest:testNonreentrant() (gas: 9628)
@ -57,10 +57,10 @@ StorageGasOracleTest:testSetRemoteGasData() (gas: 38836)
StorageGasOracleTest:testSetRemoteGasDataConfigs() (gas: 69238)
StorageGasOracleTest:testSetRemoteGasDataConfigsRevertsIfNotOwner() (gas: 12227)
StorageGasOracleTest:testSetRemoteGasDataRevertsIfNotOwner() (gas: 11275)
TestQuerySenderTest:testSendAddressQuery(address) (runs: 256, μ: 1075135, ~: 1075135)
TestQuerySenderTest:testSendAddressQuery(address) (runs: 256, μ: 1075001, ~: 1075157)
TestQuerySenderTest:testSendAddressQueryRequiresGasPayment() (gas: 383215)
TestQuerySenderTest:testSendBytesQuery(uint256) (runs: 256, μ: 1708408, ~: 1708486)
TestQuerySenderTest:testSendBytesQuery(uint256) (runs: 256, μ: 1708430, ~: 1708508)
TestQuerySenderTest:testSendBytesQueryRequiresGasPayment() (gas: 383236)
TestQuerySenderTest:testSendUint256Query(uint256) (runs: 256, μ: 1708483, ~: 1708561)
TestQuerySenderTest:testSendUint256Query(uint256) (runs: 256, μ: 1708505, ~: 1708583)
TestQuerySenderTest:testSendUint256QueryRequiresGasPayment() (gas: 383203)
ValidatorAnnounceTest:testAnnounce() (gas: 245554)

@ -1,10 +1,13 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IMessageRecipient} from "../../interfaces/IMessageRecipient.sol";
import {IInterchainSecurityModule, ISpecifiesInterchainSecurityModule} from "../../interfaces/IInterchainSecurityModule.sol";
contract TestRecipient is
Ownable,
IMessageRecipient,
ISpecifiesInterchainSecurityModule
{
@ -23,10 +26,6 @@ contract TestRecipient is
event ReceivedCall(address indexed caller, uint256 amount, string message);
function setInterchainSecurityModule(address _ism) external {
interchainSecurityModule = IInterchainSecurityModule(_ism);
}
function handle(
uint32 _origin,
bytes32 _sender,
@ -42,4 +41,8 @@ contract TestRecipient is
lastCaller = msg.sender;
lastCallMessage = message;
}
function setInterchainSecurityModule(address _ism) external onlyOwner {
interchainSecurityModule = IInterchainSecurityModule(_ism);
}
}

@ -0,0 +1,38 @@
{
"bsc": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"avalanche": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"polygon": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"celo": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"arbitrum": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"optimism": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"ethereum": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"moonbeam": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"gnosis": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
}
}

@ -0,0 +1,128 @@
{
"bsc": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"avalanche": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"polygon": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"celo": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"arbitrum": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"optimism": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"ethereum": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"moonbeam": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"gnosis": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
]
}

@ -40,7 +40,15 @@ export const hyperlane: AgentConfig = {
validators,
relayer: {
default: {
blacklist: releaseCandidateHelloworldMatchingList,
blacklist: [
...releaseCandidateHelloworldMatchingList,
{
// In an effort to reduce some giant retry queues that resulted
// from spam txs to the old TestRecipient before we were charging for
// gas, we blacklist the old TestRecipient address.
recipientAddress: '0xBC3cFeca7Df5A45d61BC60E7898E63670e1654aE',
},
],
gasPaymentEnforcement: [
{
type: GasPaymentEnforcementPolicyType.None,

@ -0,0 +1,38 @@
{
"alfajores": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"fuji": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"mumbai": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"bsctestnet": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"goerli": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"sepolia": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"moonbasealpha": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"optimismgoerli": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
},
"arbitrumgoerli": {
"TestRecipient": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"TestTokenRecipient": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb"
}
}

@ -0,0 +1,128 @@
{
"alfajores": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"fuji": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"mumbai": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"bsctestnet": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"goerli": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"sepolia": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"moonbasealpha": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"optimismgoerli": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
],
"arbitrumgoerli": [
{
"name": "TestRecipient",
"address": "0x36FdA966CfffF8a9Cdc814f546db0e6378bFef35",
"isProxy": false,
"constructorArguments": "0x"
},
{
"name": "TestTokenRecipient",
"address": "0x85ac1164878e017b67660a74ff1f41f3D05C02Bb",
"isProxy": false,
"constructorArguments": "0x"
}
]
}

@ -33,17 +33,24 @@ export class TestRecipientDeployer extends HyperlaneDeployer<
);
}
async deployContracts(chain: ChainName) {
const deployer = await this.multiProvider.getSignerAddress(chain);
const TestRecipient = await this.deployContract(
chain,
'TestRecipient',
[],
{ create2Salt: 'testtest32' },
{
create2Salt: 'TestRecipient-March-17-2023',
initCalldata: new TestRecipient__factory().interface.encodeFunctionData(
'transferOwnership',
[deployer],
),
},
);
const TestTokenRecipient = await this.deployContract(
chain,
'TestTokenRecipient',
[],
{ create2Salt: 'TestTokenRecipient' },
{ create2Salt: 'TestRecipient-March-17-2023' },
);
return {
TestRecipient,

Loading…
Cancel
Save