-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
105 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
# spec for deploying contracts | ||
# {{name}} is replaced with one of the following, whichever matches first | ||
# This file contains a sample spec for sending Txs to contracts. | ||
# This spec can be used for sending any tx to a contract, including proxy upgrades, calling setters, transferring ownership, etc. | ||
# similar to in contract specs, {{name}} is replaced with one of the following, whichever matches first | ||
# - the deployed contract address whose name matches `name` (not factoryName) | ||
# - variables of the running chain, e.g. {{chain.chainName}}, {{chain.chainId}} | ||
# NOTE: order of the contracts matters, as some contracts depend on others | ||
# contracts with no deps should be placed before those with deps | ||
# - deployment factory names from written deployment files | ||
# NOTE: order of the txs matters, as some txs might depend on others | ||
# deployer: must be a valid name in accountRegistry; default to 'default' if not specified | ||
|
||
# call on a given factoryname | ||
- name: DispatcherUpgradeII | ||
description: 'Upgrade for dispatcher contract' | ||
deployer: 'KEY_POLYMER' # can be set in the accounts.yaml | ||
signature: "upgradeTo(address)" | ||
factoryName: "Dispatcher" | ||
args: | ||
## The following arguments can be specified in contracts spec: | ||
# name: name of entry that will be stored in tx registry | ||
# description: description in tx registry | ||
# factoryName: factory to use to read abi to send tx | ||
# deployer: can be set in the accounts.yaml | ||
# address: address of contract to call method on | ||
# signature: signature of method to call for this tx | ||
# args: args to make the function call with, need to be compatible with the signature | ||
|
||
- name: DispatcherUpgrade | ||
description: 'UUPS Upgrade for dispatcher contract implementation' | ||
deployer: 'KEY_POLYMER' | ||
signature: "upgradeTo(address)" | ||
address: '{{DispatcherProxy}}' | ||
factoryName: "Dispatcher" | ||
args: | ||
- '{{Dispatcher}}' |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,37 @@ | ||
import path from "path"; | ||
|
||
// Defaults | ||
export const DEFAULT_DEPLOYER = "default"; | ||
export const DEFAULT_RPC_URL = "http://127.0.0.1:8545"; | ||
export const DEFAULT_CHAIN_ID = 31337; | ||
import path from "path"; | ||
const MODULE_ROOT_PATH = "./node_modules/@open-ibc/vibc-core-smart-contracts/"; | ||
|
||
const DEFAULT_ARTIFACTS_PATH = path.join(MODULE_ROOT_PATH, "out"); | ||
const DEFAULT_DEPLOYMENTS_PATH = "./deployments"; | ||
const DEFAULT_SPECS_PATH = path.join(MODULE_ROOT_PATH, "./specs"); | ||
|
||
// The path where we access artifacts for already deployed contracts | ||
export const ARTIFACTS_PATH = process.env.ARTIFACTS_PATH | ||
? process.env.ARTIFACTS_PATH | ||
: "./node_modules/@open-ibc/vibc-core-smart-contracts"; // Used for importing both | ||
export const BASE_OUT_PATH = process.env.DEPLOYMENTS_PATH | ||
: DEFAULT_ARTIFACTS_PATH; // Used for importing both | ||
|
||
// The path where we save deployments | ||
export const DEPLOYMENTS_PATH = process.env.DEPLOYMENTS_PATH | ||
? process.env.DEPLOYMENTS_PATH | ||
: ARTIFACTS_PATH; | ||
export const BASE_DEPLOYMENTS_PATH = path.join(BASE_OUT_PATH, "deployments"); | ||
: DEFAULT_DEPLOYMENTS_PATH; | ||
|
||
const SPECS_BASE_PATH = process.env.SPECS_BASE_PATH | ||
? process.env.SPECS_BASE_PATH | ||
: DEFAULT_SPECS_PATH; | ||
|
||
export const DEPLOY_SPECS_PATH = process.env.DEPLOY_SPECS_PATH | ||
? process.env.DEPLOY_SPECS_PATH | ||
: path.join(SPECS_BASE_PATH, "contracts.spec.yaml"); | ||
|
||
export const UPGRADE_SPECS_PATH = process.env.UPGRADE_SPECS_PATH | ||
? process.env.UPGRADE_SPECS_PATH | ||
: path.join(SPECS_BASE_PATH, "upgrade.spec.yaml"); | ||
|
||
export const ACCOUNTS_SPECS_PATH = process.env.ACCOUNTS_SPECS_PATH | ||
? process.env.ACCOUNTS_SPECS_PATH | ||
: path.join(SPECS_BASE_PATH, "evm.accounts.yaml"); |
This file contains 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