7

You have not set a script to run. Set it with @custom:dev-run-script NatSpec tag

The notification message

I have written a simple program of Hello World in the Remix IDE.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Ayushi George
  • 71
  • 2
  • 4

2 Answers2

5

It's an easy fix - Just add these lines before declaring your contract.

  /**
   * @title ContractName
   * @dev ContractDescription
   * @custom:dev-run-script file_path
   */
  contract ContractName {}

Learn more from here

botCoder
  • 315
  • 2
  • 3
1

The default workshop includes two scripts to deploy contracts:
scripts/deploy_with_ethers.ts
scripts/deploy_with_web3.ts

If you choose the first one, you have to edit it to set the name of the contract to edit, the default value is Storage from 1_Storage.sol.

import { deploy } from './ethers-lib'

(async () => {
    try {
        const result = await deploy('Storage', [])
        console.log(`address: ${result.address}`)
    } catch (e) {
        console.log(e.message)
    }
  })()

Then you add at the beginning of your contract:

  /**
   * @title ContractName
   * @dev ContractDescription
   * @custom:dev-run-script scripts/deploy_with_ethers.ts
   */
  contract ContractName {}

Now when you hit control+shift+S, the contract is saved and published to the network configured in the "Deploy & run transaction" section (last icon from top to bottom on the left margin).

vicenteherrera
  • 1,442
  • 17
  • 20