> For the complete documentation index, see [llms.txt](https://lexy-team.gitbook.io/sunya/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lexy-team.gitbook.io/sunya/getting-started/contract-deployment.md).

# Contract Deployment

**Declaring & Deploy on Starknet -> Could write bot for this.**

Run this command to declare your contract using the default Starknet Sequencer’s Gateway:

```bash
starkli declare ./target/dev/ownable_starknet_ownable.contract_class.json
```

To deploy a smart contract, you’ll need to instantiate it on Starknet’s testnet. This process involves executing a command that requires two main components:

1. The class hash of your smart contract.
2. Any constructor arguments that the contract expects.

The command would look like this:

```bash
starkli deploy \
    <CLASS_HASH> \
    <CONSTRUCTOR_INPUTS>
```

**Deploying on EVM Chain -> Another Bash**

```javascript
require("@nomicfoundation/hardhat-toolbox");

// Ensure your configuration variables are set before executing the script
const { vars } = require("hardhat/config");

// Go to https://infura.io, sign up, create a new API key
// in its dashboard, and add it to the configuration variables
const INFURA_API_KEY = vars.get("INFURA_API_KEY");

// Add your Sepolia account private key to the configuration variables
// To export your private key from Coinbase Wallet, go to
// Settings > Developer Settings > Show private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Beware: NEVER put real Ether into testing accounts
const SEPOLIA_PRIVATE_KEY = vars.get("SEPOLIA_PRIVATE_KEY");

module.exports = {
  solidity: "0.8.24",
  networks: {
    sepolia: {
      url: `https://sepolia.infura.io/v3/${INFURA_API_KEY}`,
      accounts: [SEPOLIA_PRIVATE_KEY],
    },
  },
};
```

<br>
