Skip to content

Instantly share code, notes, and snippets.

@critesjosh
Last active January 9, 2023 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save critesjosh/a53aa1afc5042a8dfbba4d379356314f to your computer and use it in GitHub Desktop.
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
// 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