# Error: received a generic error from Geth that can be caused by hitting revert in a contract constructor or running out of gas

**URL:** <https://devforum.kaia.io/t/error-received-a-generic-error-from-geth-that-can-be-caused-by-hitting-revert-in-a-contract-constructor-or-running-out-of-gas/4202>\
**Category:** Kaia\
**Tags:** smart-contract, klaytn\
**Created:** [3월 4, 2022, 5:37오전 UTC](https://devforum.kaia.io/t/error-received-a-generic-error-from-geth-that-can-be-caused-by-hitting-revert-in-a-contract-constructor-or-running-out-of-gas/4202 "2022-03-04T05:37:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_peter.s](https://yyz1.discourse-cdn.com/flex035/user_avatar/devforum.kaia.io/_peter.s/32/1637_2.png) [@\_peter.s](https://devforum.kaia.io/u/_peter.s)\
**Post date:** [3월 4, 2022, 5:37오전 UTC](https://devforum.kaia.io/t/error-received-a-generic-error-from-geth-that-can-be-caused-by-hitting-revert-in-a-contract-constructor-or-running-out-of-gas/4202/1 "2022-03-04T05:37:49Z")

</div>

안녕하세요

테스트넷(baobab)에 토큰을 발행 하려는데  
received a generic error from Geth that  
can be caused by hitting revert in a contract constructor or running out of gas  
에러가 발생합니다.

 ![스크린샷 2022-03-04 오후 2.34.14](https://canada1.discourse-cdn.com/flex035/uploads/klaytn/original/2X/5/59bd814f7c0ff9f0532c3f4dc0fc22f5fa238f3f.png)

truffle.config

```auto
  // See <http://truffleframework.com/docs/advanced/configuration>
  // for more about customizing your Truffle configuration!
  networks: {
    klaytn: {
      provider: () => new HDWalletProvider(PRIVATE_KEY, URL),
      gas: GASLIMIT,
      network_id: NETWORK_ID,
      gasPrice: null,
      byzantiumBlock: "0",
    },
  },

  compilers: {
    solc: {
      version: "0.8.0",
    },
  },
};

```

2\_deploy\_contract.js

```auto
const MSToken = artifacts.require("./MSToken.sol");
const fs = require("fs");

const _name = "MSToken2";
const _symbol = "MS2";
const _decimals = 18;
const _total_supply = 1000000;

module.exports = function (deployer) {
  deployer
    .deploy(MSToken, _name, _symbol, _decimals, _total_supply)
    .then(() => {
      // deployer.deploy(MSToken, _name, _symbol).then(() => {
      if (MSToken._json) {
        fs.writeFile(
          "./client/deployedMSTokenABI",
          JSON.stringify(MSToken._json.abi, 2),
          (err) => {
            if (err) throw err;
            console.log("MSTOKEN ABI 파일 FETCH");
          }
        );
        fs.writeFile(
          "./client/deployedMSTokenAddress",
          MSToken.address,
          (err) => {
            if (err) throw err;
            console.log("MSTOKEN Address 파일 FETCH");
          }
        );
      }
    });
};

```

이렇게 셋팅했는데 error가 발생합니다. 가스비가 부족해서 그럴까요?? 계좌에는 4.2 klay가 있습니다.
