Skip to content

Commit

Permalink
Fix substrate transfer precompile event testnet (#385)
Browse files Browse the repository at this point in the history
* Initialize a project with Hardhat

* git ignore certain directories created by Hardhat

* Add the smart-contract-development/with-hardhat location to Dependabot config

* Update Hardhat README with more info for the user

* Add files for a simple counter contract on Creditcoin

- the contract itself
- a simple test
- an ignition deployment module

* Add CI job to exercise the Hardhat examples

plus a network configuration to deploy to creditcoin_local

WARNING: Use a different configuration file when deploying to creditcoin_testnet
otherwise local development will need to define a hardhat variable!

* Try forking Creditcoin Testnet EVM with Hardhat

this is shown in our documentation at
https://cc3-docs.creditcoin.network/smart-contract-guides/hardhat-smart-contract-development#forking-cc3-evm

but frankly isn't fully documented and currently doesn't work!

Skip this step for now so we can close this PR and revist once we get
more information from the Hardhat community.

* Conditionally deploy smart-contracts on Devnet, Testnet or Mainnet

depending on which is the target branch for a pull request

* build(deps): bump taiki-e/install-action from 2.33.11 to 2.33.35

Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.33.11 to 2.33.35.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@v2.33.11...v2.33.35)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump parity-scale-codec from 3.6.9 to 3.6.12

Bumps [parity-scale-codec](https://github.com/paritytech/parity-scale-codec) from 3.6.9 to 3.6.12.
- [Release notes](https://github.com/paritytech/parity-scale-codec/releases)
- [Changelog](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md)
- [Commits](paritytech/parity-scale-codec@v3.6.9...v3.6.12)

---
updated-dependencies:
- dependency-name: parity-scale-codec
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump paste from 1.0.14 to 1.0.15

Bumps [paste](https://github.com/dtolnay/paste) from 1.0.14 to 1.0.15.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](dtolnay/paste@1.0.14...1.0.15)

---
updated-dependencies:
- dependency-name: paste
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump parking_lot from 0.12.2 to 0.12.3

Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.12.2 to 0.12.3.
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](Amanieu/parking_lot@0.12.2...0.12.3)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump scale-info from 2.11.2 to 2.11.3

Bumps [scale-info](https://github.com/paritytech/scale-info) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/paritytech/scale-info/releases)
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md)
- [Commits](paritytech/scale-info@v2.11.2...v2.11.3)

---
updated-dependencies:
- dependency-name: scale-info
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump commander from 12.0.0 to 12.1.0 in /cli

Bumps [commander](https://github.com/tj/commander.js) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](tj/commander.js@v12.0.0...v12.1.0)

---
updated-dependencies:
- dependency-name: commander
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): bump tokio from 1.37.0 to 1.38.0

Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.37.0 to 1.38.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](tokio-rs/tokio@tokio-1.37.0...tokio-1.38.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Add config for deploying to a running Hardhat node

* Add test steps to deploy contracts to a local Hardhat instance

* Specify --reset when deploying smart contracts via Hardhat

- good for local development example b/c hardhat keeps an internal cache
- good in case there is a prior state stored between the different steps
  in the CI job

* Confirm Hardhat deployment and reset via ENV variables to prevent interactive prompts

* Upload a git diff for auto-updated files

* Reformat files with prettier

* build(deps): bump ubuntu from 22.04 to 24.04

Bumps ubuntu from 22.04 to 24.04.

---
updated-dependencies:
- dependency-name: ubuntu
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Replace Ubuntu 22.04 with 24.04 in CI

including Linode's self-hosted runners

* Do not pip3 install globally

- latest Ubuntu versions don't like this b/c it can break the system
  version of Python
- not necessary in this case anyway

- switch to using pipx instead of pip3 which is the recommended new way
  of doing things. Already pre-installed in the hosted-runner!

- the linode-cli executable will be installed at ~/.local/bin/linode-cli
  which seems to be in $PATH anyway

* Update GitHub actions/runner while I am at it

* Add 2 more URL to .lycheeignore

these are accessible via browser but 403 when probed via MegaLinter so
probably these hosts are blacklisting GitHub's IP address space.

* Add a missing import which doesn't seem to be needed

b/c we've got CI steps which already successfully deploy to Devnet
without this import. For example:
https://github.com/gluwa/creditcoin3/actions/runs/9369193529/job/25796327016?pr=380

* fix(precompile): correctly declare substrate transfer event + test (#384)

* fix(precompile): correctly declare substrate transfer event + test

* chore: clippy

* chore: bump to 3.28

* Replace Ubuntu 22.04 with 24.04 for Azure self-hosted runners (#381)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Alex Todorov <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dylan <[email protected]>
  • Loading branch information
4 people authored Jun 7, 2024
1 parent f040538 commit 588cd7a
Show file tree
Hide file tree
Showing 38 changed files with 8,008 additions and 172 deletions.
10 changes: 9 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ updates:
schedule:
interval: "monthly"

# Maintain dependencies for Node.js
- package-ecosystem: "npm"
directory: "/testing"
schedule:
Expand All @@ -117,11 +118,18 @@ updates:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

# Maintain dependencies for Node.js
- package-ecosystem: "npm"
directory: "/cli"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

- package-ecosystem: "npm"
directory: "/docs/smart-contract-development/with-hardhat"
schedule:
interval: "monthly"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
2 changes: 1 addition & 1 deletion .github/provision-github-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mkdir actions-runner
pushd actions-runner || exit 1

curl -L https://github.com/actions/runner/releases/download/v2.316.1/actions-runner-linux-x64-2.316.1.tar.gz > runner.tar.gz
curl -L https://github.com/actions/runner/releases/download/v2.317.0/actions-runner-linux-x64-2.317.0.tar.gz > runner.tar.gz

tar xzf ./runner.tar.gz
sudo ./bin/installdependencies.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/runner.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ param adminUsername string = 'ubuntu'
param adminPasswordOrKey string

@description('The Ubuntu version for the VM. This will pick a fully patched image of this given Ubuntu version.')
param ubuntuOSVersion string = '22_04-lts'
param ubuntuOffer string = '0001-com-ubuntu-server-jammy'
param ubuntuOSVersion string = 'ubuntu-pro-gen1'
param ubuntuOffer string = 'ubuntu-24_04-lts'

@description('Location for all resources.')
param location string = resourceGroup().location
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-runtime-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions: read-all

jobs:
check-version:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -20,7 +20,7 @@ jobs:
./.github/check-version.sh "remotes/origin/$GITHUB_BASE_REF" "$GITHUB_SHA"
# dangerous conditions that will brick the blockchain
danger-will-brick-the-blockchain:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
Expand Down
Loading

0 comments on commit 588cd7a

Please sign in to comment.