It is showing error on migrating to the testnetwork-
$ truffle migrate --network ourTestNet
Compiling ./contracts/Wrestling.sol...
Compilation warnings encountered:
/home/mayank/Desktop/Truffle/trial/contracts/Wrestling.sol:35:9: Warning: Invoking events without "emit" prefix is deprecated.
WrestlingStartsEvent(wrestler1,wrestler2);
^---------------------------------------^
,/home/mayank/Desktop/Truffle/trial/contracts/Wrestling.sol:68:9: Warning: Invoking events without "emit" prefix is deprecated.
EndOfRoundEvent(wrestler1Deposit,wrestler2Deposit);
^------------------------------------------------^
,/home/mayank/Desktop/Truffle/trial/contracts/Wrestling.sol:75:9: Warning: Invoking events without "emit" prefix is deprecated.
EndOfWrestlingEvent(theWinner,gains);
^----------------------------------^
Writing artifacts to ./build/contracts
Using network 'ourTestNet'.
Running migration: 1_initial_migration.js
Deploying Migrations...
... undefined
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: unknown account
at Object.InvalidResponse (/usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/errors.js:38:1)
at /usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/requestmanager.js:86:1
at /usr/lib/node_modules/truffle/build/webpack:/~/truffle-migrate/index.js:225:1
at /usr/lib/node_modules/truffle/build/webpack:/~/truffle-provider/wrapper.js:134:1
at XMLHttpRequest.request.onreadystatechange (/usr/lib/node_modules/truffle/build/webpack:/~/web3/lib/web3/httpprovider.js:128:1)
at XMLHttpRequestEventTarget.dispatchEvent (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:64:1)
at XMLHttpRequest._setReadyState (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:354:1)
at XMLHttpRequest._onHttpResponseEnd (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:509:1)
at IncomingMessage.<anonymous> (/usr/lib/node_modules/truffle/build/webpack:/~/xhr2/lib/xhr2.js:469:1)
at IncomingMessage.emit (events.js:185:15)
at endReadableNT (_stream_readable.js:1101:12)
at process._tickCallback (internal/process/next_tick.js:114:19)
Migration.sol-
pragma solidity ^0.4.17;
contract Migrations {
address public owner;
uint public last_completed_migration;
modifier restricted() {
if (msg.sender == owner) _;
}
function Migrations() public {
owner = msg.sender;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
}
}
truffle.js-
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*" // Match any network id
},
ourTestNet: {
host: "127.0.0.1",
port: 7000,
network_id: "*"
}
}
};