Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
  • CASINO
Crypto Flexs
  • DIRECTORY
  • CRYPTO
    • ETHEREUM
    • BITCOIN
    • ALTCOIN
  • BLOCKCHAIN
  • EXCHANGE
  • ADOPTION
  • TRADING
  • HACKING
  • SLOT
  • CASINO
Crypto Flexs
Home»HACKING NEWS»CI/CD wave for Web3
HACKING NEWS

CI/CD wave for Web3

By Crypto FlexsApril 16, 20244 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
CI/CD wave for Web3
Share
Facebook Twitter LinkedIn Pinterest Email

So you want to write and deploy smart contracts?

As a professional, do your best to use general best practices for the best software. There is no need to reinvent the wheel and change the processes that work. Sometimes we need to adjust our tooling. That’s what this article is about.

For our sample project, let’s set up this environment from scratch.

Repository settings

Starting with two repositories is considered a good idea. One is public for the main activity, the second is private and also holds the codebase. This is because some activities in the project should not be discussed publicly, for example live vulnerabilities/security patches that may affect users. This approach helps prevent hackers who can exploit bugs disclosed in pull requests before they are fixed in the released code.

To avoid complicating this tutorial, we will focus only on the public repository (GitHub).

Let’s step through the repository setup and consider changing important parameters, such as branch protection rules or access control for your team.

Project initialization

Clone an empty repository and enter it. In the repository folder, initialize the project’s template with:

This command prepares all the necessary folders, including the .gitignore file.

Write code

Now you are ready to write code. Let’s start with the one created next. OpenZeppelin Solidity Wizard There are some changes (bugs):

This code includes some packages, so you’ll need to add them using npm (don’t forget to add node_modules to .gitignore).

Once you install the package, you can test compilation.

As it stands, I have a working project with the following structure:

Write a test

First we need to initialize pytype for our source code.

Then we’ll write some basic tests.

And you can run your tests using:

Write a deployment script

We will be deploying the contract on the Holesky testnet. Writing a deployment script is very similar to writing tests.

Before deploying, you can set the private key in an .env file, retrieve it using the dotenv library, and test your deployment.

Since everything works as expected – testing, deploying, compiling – you can proceed to write a pipeline to automate these steps.

Create a Pipeline

Let’s start by creating a folder for our pipeline.



Then create a pipeline.yml file in this folder.

We have two jobs. One is a pull request to master test and analyze the new code that will be merged. The second task is for deployment and is triggered only when merging/pushing to master. we are using Wake Settings Action Set up an environment for testing and deployment. Then we are using professional ones. Wake detection task For scanning code for vulnerabilities. The deployment part requires passing the private key along with dotenv via GitHub secret. That secret must be set in your repository settings.

Once you’ve set up your secret, let’s get started.

distribution

Everything is set. You can check out different branches and push your codebase. After the push, nothing is triggered because there is no pipeline defined for this action. That’s expected.

After creating a pull request, you will see the pipeline triggered (skip deployment).

Obviously, we haven’t run any static analysis before, so we can see bugs being detected in the pipeline and attached to the pull request.

Therefore, depending on your repository policy, you may not be able to merge to master until the issue is fully resolved.

Let’s go back to the code to fix the problem. Remove unused imports and replace tx.origin with msg.sender.

You will now see that you are ready to deploy.

Let’s merge!

You have successfully deployed your contract through GitHub Actions.

final remarks

This tutorial showed you how to use GitHub Actions to enhance your CI/CD process.

These actions will help make your project more sustainable and efficient. The examples provided are purely for informational purposes, so it’s now up to you to find what works best for your project.

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

Related Posts

Partner relationship with SBI HOLDINGS to distribute RLUSD Stablecoin

August 22, 2025

Resupplyfi Nuclear Analysis -Ackee Blockchain

August 20, 2025

Stake key encryption assets also require inheritance.

August 18, 2025
Add A Comment

Comments are closed.

Recent Posts

Ethereum Breaks $4,750 Support As Pepeto Crosses $6,287,248 In Presale Funding

August 23, 2025

Builders, Investors, And Developers Meet Again To Shape The Web Space

August 23, 2025

Bitcoin News Today: Ether (ETH) is 5K $ 5K and BTC Eyes is recorded as Powell Sparks Rally. DAT transaction risk: Be careful with asset managers

August 23, 2025

Bitcoin analysts bet on $ 200K after hints of Fed.

August 23, 2025

Ether ETF is a comeback of $ 280 million, with bitcoin leaked stripes hit on the 5th.

August 22, 2025

Will Cardano (ADA) step back and push the bear back low?

August 22, 2025

Partner relationship with SBI HOLDINGS to distribute RLUSD Stablecoin

August 22, 2025

MetaWin Announces “MetaWin Create” – Free AI Tools For All MetaWinners NFT Holders

August 22, 2025

A new era of encryption? A Doj official says that a developer with a good intention is not a goal.

August 22, 2025

ESCAPE Presale Live On Ethereum With $280K Raised, Hacken Audited And SolidProof KYC Verified

August 21, 2025

WhalePlay Beta Launch: Next-Level Social IGaming Platform

August 21, 2025

Crypto Flexs is a Professional Cryptocurrency News Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of Cryptocurrency. We hope you enjoy our Cryptocurrency News as much as we enjoy offering them to you.

Contact Us : Partner(@)Cryptoflexs.com

Top Insights

Ethereum Breaks $4,750 Support As Pepeto Crosses $6,287,248 In Presale Funding

August 23, 2025

Builders, Investors, And Developers Meet Again To Shape The Web Space

August 23, 2025

Bitcoin News Today: Ether (ETH) is 5K $ 5K and BTC Eyes is recorded as Powell Sparks Rally. DAT transaction risk: Be careful with asset managers

August 23, 2025
Most Popular

Sky Mavis Co-Founder Jeffrey Zirlin’s Wallet Hacked with $9.7 Million in ETH: Peckshield

February 23, 2024

Binance Plans to Delist ARPA/BNB, COMP/TUSD, EDU/BNB, and PENDLE/TUSD

March 13, 2024

Cboe BZX is in the process of filing forms for its 21 Shares and VanEck Solana ETFs, seeking regulatory approval.

July 8, 2024
  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
© 2025 Crypto Flexs

Type above and press Enter to search. Press Esc to cancel.