Issue Deploying Contract LinkedIn Course - Ethereum: Building Blockchain Decentralized Apps (DApps)

by Shaye   Last Updated June 12, 2019 12:28 PM

I'm completely new to Ethereum Smart Contracts. I'm following the course on LinkedIn [Ethereum: Building Blockchain Decentralized Apps (DApps)].

I've been able to compile the smart contract as per tutorial but I am unable to Miigrate it to my test server.

I get the following error:

PS C:\Users\xxxx\desktop\contracts> truffle migrate development

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.


Starting migrations...
======================
> Network name:    'development'
> Network id:      5777
> Block gas limit: 0x6691b7


2_deploy_contracts.js
=====================
Error: SyntaxError: Unexpected token {
    at Object.run (C:\Users\xxxx\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\truffle-migrate\index.js:92:1)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
Truffle v5.0.21 (core: 5.0.21)
Node v12.4.0

I'm running on Windows 10

As instructed on LinkedIn. Truffle config is:

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 9545,
      network_id: "*"
    }
  }
}

And script for deploying the contract is:

var ApprovalContract = artifacts.require("ApprovalContract");

module.exports = funtion(deployer) {
  deployer.deploy(ApprovalContract);
}

Thanks



Answers 1


You have a spelling mistake in function keyword in the migration script.

Sanjay S B
Sanjay S B
June 12, 2019 12:25 PM

Related Questions


Updated July 04, 2018 16:28 PM

Updated November 09, 2017 13:28 PM

Updated November 15, 2017 00:28 AM

Updated December 14, 2017 12:28 PM

Updated October 24, 2017 06:28 AM