evm: clean up deployment script (#24)
Co-authored-by: gator-boi <gator-boi@users.noreply.github.com>
This commit is contained in:
parent
565d4abdfa
commit
9572867afc
|
@ -27,7 +27,7 @@ export RELEASE_WORMHOLE_ADDRESS=0x
|
||||||
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0x
|
export RELEASE_CIRCLE_BRIDGE_ADDRESS=0x
|
||||||
|
|
||||||
# Circle Message Transmitter Address
|
# Circle Message Transmitter Address
|
||||||
export RELEASE_MESSAGE_TRANSMITTER_ADDRESS=0x
|
export RELEASE_WORMHOLE_FINALITY=
|
||||||
```
|
```
|
||||||
|
|
||||||
Then run the following command to deploy (and set up) the proxy contract:
|
Then run the following command to deploy (and set up) the proxy contract:
|
||||||
|
|
|
@ -13,12 +13,11 @@ import {IMessageTransmitter} from "../src/interfaces/circle/IMessageTransmitter.
|
||||||
import {CircleIntegrationSetup} from "../src/circle_integration/CircleIntegrationSetup.sol";
|
import {CircleIntegrationSetup} from "../src/circle_integration/CircleIntegrationSetup.sol";
|
||||||
import {CircleIntegrationImplementation} from "../src/circle_integration/CircleIntegrationImplementation.sol";
|
import {CircleIntegrationImplementation} from "../src/circle_integration/CircleIntegrationImplementation.sol";
|
||||||
import {CircleIntegrationProxy} from "../src/circle_integration/CircleIntegrationProxy.sol";
|
import {CircleIntegrationProxy} from "../src/circle_integration/CircleIntegrationProxy.sol";
|
||||||
|
import {ICircleIntegration} from "../src/interfaces/ICircleIntegration.sol";
|
||||||
import {WormholeSimulator} from "wormhole-forge-sdk/WormholeSimulator.sol";
|
|
||||||
|
|
||||||
contract ContractScript is Script {
|
contract ContractScript is Script {
|
||||||
// Wormhole
|
// Wormhole
|
||||||
WormholeSimulator wormholeSimulator;
|
IWormhole wormhole;
|
||||||
|
|
||||||
// Circle
|
// Circle
|
||||||
ICircleBridge circleBridge;
|
ICircleBridge circleBridge;
|
||||||
|
@ -30,8 +29,7 @@ contract ContractScript is Script {
|
||||||
|
|
||||||
function setUp() public {
|
function setUp() public {
|
||||||
// Wormhole
|
// Wormhole
|
||||||
wormholeSimulator = wormholeSimulator = new WormholeSimulator(
|
wormhole = IWormhole(vm.envAddress("RELEASE_WORMHOLE_ADDRESS"));
|
||||||
vm.envAddress("RELEASE_WORMHOLE_ADDRESS"), 0);
|
|
||||||
|
|
||||||
// Circle
|
// Circle
|
||||||
circleBridge = ICircleBridge(vm.envAddress("RELEASE_CIRCLE_BRIDGE_ADDRESS"));
|
circleBridge = ICircleBridge(vm.envAddress("RELEASE_CIRCLE_BRIDGE_ADDRESS"));
|
||||||
|
@ -44,17 +42,19 @@ contract ContractScript is Script {
|
||||||
// next Implementation
|
// next Implementation
|
||||||
implementation = new CircleIntegrationImplementation();
|
implementation = new CircleIntegrationImplementation();
|
||||||
|
|
||||||
|
console.log("Wormhole address: %s, chainId: %s", address(wormhole), wormhole.chainId());
|
||||||
|
|
||||||
// setup Proxy using Implementation
|
// setup Proxy using Implementation
|
||||||
proxy = new CircleIntegrationProxy(
|
proxy = new CircleIntegrationProxy(
|
||||||
address(setup),
|
address(setup),
|
||||||
abi.encodeWithSelector(
|
abi.encodeWithSelector(
|
||||||
bytes4(keccak256("setup(address,address,uint8,address,uint16,bytes32)")),
|
bytes4(keccak256("setup(address,address,uint8,address,uint16,bytes32)")),
|
||||||
address(implementation),
|
address(implementation),
|
||||||
address(wormholeSimulator.wormhole()),
|
address(wormhole),
|
||||||
uint8(1), // finality
|
uint8(vm.envUint("RELEASE_WORMHOLE_FINALITY")),
|
||||||
address(circleBridge),
|
address(circleBridge),
|
||||||
wormholeSimulator.governanceChainId(),
|
wormhole.governanceChainId(),
|
||||||
wormholeSimulator.governanceContract()
|
wormhole.governanceContract()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ contract CircleIntegration is CircleIntegrationMessages, CircleIntegrationGovern
|
||||||
using BytesLib for bytes;
|
using BytesLib for bytes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice Emitted when Circle-support assets have been minted to the mintRecipient
|
* @notice Emitted when Circle-supported assets have been minted to the mintRecipient
|
||||||
* @param emitterChainId Wormhole chain ID of emitter contract on source chain
|
* @param emitterChainId Wormhole chain ID of emitter contract on source chain
|
||||||
* @param emitterAddress Address (bytes32 zero-left-padded) of emitter on source chain
|
* @param emitterAddress Address (bytes32 zero-left-padded) of emitter on source chain
|
||||||
* @param sequence Sequence of Wormhole message used to mint tokens
|
* @param sequence Sequence of Wormhole message used to mint tokens
|
||||||
|
|
Loading…
Reference in New Issue