Last active
January 9, 2023 18:54
-
-
Save critesjosh/a53aa1afc5042a8dfbba4d379356314f to your computer and use it in GitHub Desktop.
example script for deploying a bridge contract to aztec devnet, original file here https://github.com/critesjosh/aztec-connect-starter/blob/nft-bridge/src/deployment/registry/AddressRegistryDeployment.s.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: Apache-2.0 | |
// Copyright 2022 Aztec. | |
pragma solidity >=0.8.4; | |
import {BaseDeployment} from "../base/BaseDeployment.s.sol"; | |
import {AddressRegistry} from "../../bridges/registry/AddressRegistry.sol"; | |
contract AddressRegistryDeployment is BaseDeployment { | |
function deploy() public returns (address) { | |
emit log("Deploying AddressRegistry bridge"); | |
vm.broadcast(); | |
AddressRegistry bridge = new AddressRegistry(ROLLUP_PROCESSOR); | |
emit log_named_address( | |
"AddressRegistry bridge deployed to", | |
address(bridge) | |
); | |
return address(bridge); | |
} | |
function deployAndList() public returns (address) { | |
address bridge = deploy(); | |
uint256 addressId = listBridge(bridge, 120500); | |
emit log_named_uint("AddressRegistry bridge address id", addressId); | |
return bridge; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment