Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UNTRACKED] upgrade foundry version #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion evm-cctp-contracts
Submodule evm-cctp-contracts updated 1 files
+2 −1 Dockerfile
17 changes: 9 additions & 8 deletions setup-evm-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.

source versions.sh
echo "Deploying evm-cctp-contracts contracts"

FOUNDRY_PATH=~/.foundry/bin
FOUNDRY_SHORT_VERSION=$(echo ${FOUNDRY_VERSION} | cut -d '-' -f2 | cut -c1-7)

# Check if foundry is installed
if ! "$FOUNDRY_PATH/forge" -V; then
if [ ! -x "$FOUNDRY_PATH/forge" ] || ! "$FOUNDRY_PATH/forge" --version | grep ${FOUNDRY_SHORT_VERSION} ; then
curl -L https://foundry.paradigm.xyz | bash
# 07-14-2023 - The version following this version breaks our build, so setting to this version for now.
if ! "$FOUNDRY_PATH/foundryup" -V; then

if [ ! -x "$FOUNDRY_PATH/foundryup" ]; then
FOUNDRY_PATH=~/.config/.foundry/bin
fi
"$FOUNDRY_PATH/foundryup" --version nightly-d369d2486f85576eec4ca41d277391dfdae21ba7
"$FOUNDRY_PATH/foundryup" --install ${FOUNDRY_VERSION}
fi

cd evm-cctp-contracts
Expand All @@ -39,10 +41,10 @@ git submodule update --init --recursive
yarn install

# Build the anvil image
docker build --no-cache -f Dockerfile -t foundry .
docker build --no-cache --platform linux/amd64 --file Dockerfile --tag foundry --build-arg FOUNDRY_VERSION=${FOUNDRY_VERSION} .

# Create the anvil container
docker stop anvil-eth && docker rm anvil-eth || true
docker rm -f anvil-eth || true
docker run -d -p 8500:8545 --name anvil-eth --rm foundry "anvil --host 0.0.0.0 -a 13 --code-size-limit 250000"

# Define the contract parameters
Expand Down Expand Up @@ -83,8 +85,7 @@ export DOMAIN=0
"$FOUNDRY_PATH/forge" script ../scripts/evm/cctp_deploy.s.sol:DeployScript --rpc-url $RPC_URL_ETH --sender $SENDER --broadcast
mkdir -p cctp-interfaces
cp -R ./out/* ./cctp-interfaces
"$FOUNDRY_PATH/forge" script ../scripts/evm/usdc_deploy.s.sol:USDCDeployScript --rpc-url $RPC_URL_ETH --sender $SENDER --broadcast --force --use 0.6.12
"$FOUNDRY_PATH/forge" script ../scripts/evm/usdc_deploy.s.sol:USDCDeployScript --rpc-url $RPC_URL_ETH --sender $SENDER --broadcast
mkdir -p usdc-interfaces
cp -R ./out/* ./usdc-interfaces

cd ..
1 change: 1 addition & 0 deletions versions.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export APTOS_CLI_VERSION=4.5.0 # github-releases:aptos-labs/aptos-core extractVersion=^aptos-cli-v(?<version>.*)$
export FOUNDRY_VERSION=nightly-5a8bd893eeeeb9489ea66dd52a02eeaa580e3af0
Loading