Last login: Fri Mar 25 16:27:54 on ttys000
>~
➜ /Users/sarath/Public/eth-todo-list
>eth-todo-list
➜ truffle version
Truffle v5.0.2 (core: 5.0.2)
Solidity v0.5.0 (solc-js)
Node v14.18.0
>eth-todo-list
➜ truffle init
✔ Preparing to download
✔ Downloading
✔ Cleaning up temporary files
✔ Setting up box
Unbox successful. Sweet!
Commands:
Compile: truffle compile
Migrate: truffle migrate
Test contracts: truffle test
>eth-todo-list
➜ git init
Initialized empty Git repository in /Users/sarath/Public/eth-todo-list/.git/
>eth-todo-list git:(main) ✗
➜ git status
On branch main
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
contracts/
migrations/
truffle-config.js
nothing added to commit but untracked files present (use "git add" to track)
>eth-todo-list git:(main) ✗
➜ git add .
>eth-todo-list git:(main) ✗
➜ git commit -m "tuffle init"
[main (root-commit) 336b34b] tuffle init
3 files changed, 123 insertions(+)
create mode 100644 contracts/Migrations.sol
create mode 100644 migrations/1_initial_migration.js
create mode 100644 truffle-config.js
>eth-todo-list git:(main)
➜ git checkout -b dependencies
Switched to a new branch 'dependencies'
>eth-todo-list git:(dependencies)
➜ idea .
env: python: No such file or directory
>eth-todo-list git:(dependencies)
➜ webstorm .
env: python: No such file or directory
>eth-todo-list git:(dependencies)
➜ code .
>eth-todo-list git:(dependencies)
➜ npm install
npm ERR! code ETARGET
npm ERR! notarget No matching version found for chai-bignumber@^2.3.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sarath/.npm/_logs/2022-03-25T10_08_45_661Z-debug-0.log
>eth-todo-list git:(dependencies) ✗
➜
>eth-todo-list git:(dependencies) ✗
➜
>eth-todo-list git:(dependencies) ✗
➜ npm install
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated truffle-error@0.0.3: WARNING: This package has been renamed to @truffle/error.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated truffle-blockchain-utils@0.0.5: WARNING: This package has been renamed to @truffle/blockchain-utils.
npm WARN deprecated truffle-contract@3.0.6: WARNING: This package has been renamed to @truffle/contract.
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sarath/.npm/_logs/2022-03-25T10_11_34_676Z-debug-0.log
>eth-todo-list git:(dependencies) ✗
➜ npm install
npm WARN deprecated truffle-blockchain-utils@0.0.5: WARNING: This package has been renamed to @truffle/blockchain-utils.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated truffle-error@0.0.3: WARNING: This package has been renamed to @truffle/error.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated truffle-contract@3.0.6: WARNING: This package has been renamed to @truffle/contract.
npm WARN deprecated truffle-contract-schema@2.0.3: WARNING: This package has been renamed to @truffle/contract-schema.
npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
added 519 packages, and audited 520 packages in 14s
9 packages are looking for funding
run `npm fund` for details
22 vulnerabilities (1 low, 14 moderate, 7 high)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
>eth-todo-list git:(dependencies) ✗
➜ touch .gitignore
>eth-todo-list git:(dependencies) ✗
➜ ll
total 864
drwxr-xr-x 3 sarath staff 96B Mar 25 16:45 contracts
drwxr-xr-x 3 sarath staff 96B Mar 25 16:45 migrations
drwxr-xr-x 368 sarath staff 12K Mar 25 17:12 node_modules
-rw-r--r-- 1 sarath staff 416K Mar 25 17:12 package-lock.json
-rw-r--r-- 1 sarath staff 658B Mar 25 17:11 package.json
drwxr-xr-x 2 sarath staff 64B Mar 25 16:45 test
node_modules/
-rw-r--r-- 1 sarath staff 4.1K Mar 25 16:45 truffle-config.js
>eth-todo-list git:(dependencies) ✗
➜ echo "./node_modules" > .gitignore
>eth-todo-list git:(dependencies) ✗
➜ cat .gitignore
./node_modules
>eth-todo-list git:(dependencies) ✗
➜ gst
On branch dependencies
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
node_modules/
package-lock.json
package.json
nothing added to commit but untracked files present (use "git add" to track)
>eth-todo-list git:(dependencies) ✗
➜ vim .gitignore
>eth-todo-list git:(dependencies) ✗
➜
>eth-todo-list git:(dependencies) ✗
➜ gst
On branch dependencies
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
package-lock.json
package.json
nothing added to commit but untracked files present (use "git add" to track)
>eth-todo-list git:(dependencies) ✗
➜ git add .
>eth-todo-list git:(dependencies) ✗
➜ gcam "installed dependencies"
[dependencies 2f6c153] installed dependencies
3 files changed, 10145 insertions(+)
create mode 100644 .gitignore
create mode 100644 package-lock.json
create mode 100644 package.json
>eth-todo-list git:(dependencies)
➜
>eth-todo-list git:(dependencies) ✗
➜
>eth-todo-list git:(dependencies) ✗
➜
>eth-todo-list git:(dependencies) ✗
➜ git checkout -b start-contract
Switched to a new branch 'start-contract'
>eth-todo-list git:(start-contract) ✗
➜ gst
On branch start-contract
Untracked files:
(use "git add <file>..." to include in what will be committed)
contracts/TodoList.sol
nothing added to commit but untracked files present (use "git add" to track)
>eth-todo-list git:(start-contract) ✗
➜ truffle compile
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/TodoList.sol...
Writing artifacts to ./build/contracts
>eth-todo-list git:(start-contract) ✗
➜
>eth-todo-list git:(start-contract) ✗
➜
>eth-todo-list git:(start-contract) ✗
➜ truffle compile
Compiling ./contracts/TodoList.sol...
Writing artifacts to ./build/contracts
>eth-todo-list git:(start-contract) ✗
➜
>eth-todo-list git:(start-contract) ✗
➜
>eth-todo-list git:(start-contract) ✗
➜ truffle migrate
⚠️ Important ⚠️
If you're using an HDWalletProvider, it must be Web3 1.0 enabled or your migration will hang.
Starting migrations...
======================
> Network name: 'development'
> Network id: 5777
> Block gas limit: 6721975
1_initial_migration.js
======================
Deploying 'Migrations'
----------------------
> transaction hash: 0x1ca8260a5de52179249a048f0c47ed946ac6078f60a9ec72ab6baff7bece0261
> Blocks: 0 Seconds: 0
> contract address: 0x28dEc79B8001ca775b89BdcA9b7e1873739a2034
> account: 0x62FE1B861c6B444D3E7E7A6B176Dd6a83ef462c6
> balance: 99.99586798
> gas used: 206601
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.00413202 ETH
> Saving artifacts
-------------------------------------
> Total cost: 0.00413202 ETH
2_deploy_contracts.js
=====================
Deploying 'TodoList'
--------------------
> transaction hash: 0x42f13bd01d50fe549c91e341c5d6795ae411256de70d218287ded7ced927df1e
> Blocks: 0 Seconds: 0
> contract address: 0x682B01E5DEF451deadde909f421522B98D8fEF3e
> account: 0x62FE1B861c6B444D3E7E7A6B176Dd6a83ef462c6
> balance: 99.99410592
> gas used: 88103
> gas price: 20 gwei
> value sent: 0 ETH
> total cost: 0.00176206 ETH
> Saving artifacts
-------------------------------------
> Total cost: 0.00176206 ETH
Summary
=======
> Total deployments: 2
> Final cost: 0.00589408 ETH
>eth-todo-list git:(start-contract) ✗
➜ truffle console
truffle(development)> todoList = await TodoList.deployed()
undefined
truffle(development)> todoList
TruffleContract {
constructor: [Function: TruffleContract] {
_constructorMethods: {
setProvider: [Function: setProvider],
new: [Function: new],
at: [Function: at],
deployed: [Function: deployed],
defaults: [Function: defaults],
hasNetwork: [Function: hasNetwork],
isDeployed: [Function: isDeployed],
detectNetwork: [Function: detectNetwork],
setNetwork: [Function: setNetwork],
setWallet: [Function: setWallet],
resetAddress: [Function: resetAddress],
link: [Function: link],
clone: [Function: clone],
addProp: [Function: addProp],
toJSON: [Function: toJSON],
decodeLogs: [Function: decodeLogs]
},
_properties: {
contract_name: [Object],
contractName: [Object],
gasMultiplier: [Object],
timeoutBlocks: [Object],
autoGas: [Object],
numberFormat: [Object],
abi: [Object],
network: [Function: network],
networks: [Function: networks],
address: [Object],
transactionHash: [Object],
links: [Function: links],
events: [Function: events],
binary: [Function: binary],
deployedBinary: [Function: deployedBinary],
unlinked_binary: [Object],
bytecode: [Object],
deployedBytecode: [Object],
sourceMap: [Object],
deployedSourceMap: [Object],
source: [Object],
sourcePath: [Object],
legacyAST: [Object],
ast: [Object],
compiler: [Object],
schema_version: [Function: schema_version],
schemaVersion: [Function: schemaVersion],
updated_at: [Function: updated_at],
updatedAt: [Function: updatedAt],
userdoc: [Function: userdoc],
devdoc: [Function: devdoc]
},
_property_values: {},
_json: {
contractName: 'TodoList',
abi: [Array],
bytecode: '0x608060405260008055348015601357600080fd5b50609e806100226000396000f3fe608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063b6cb58a5146044575b600080fd5b348015604f57600080fd5b506056606c565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a723058207be0ad4d329192b557f78de6014da139715b86a15da7c5c60568bc20605fb4fb0029',
deployedBytecode: '0x608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063b6cb58a5146044575b600080fd5b348015604f57600080fd5b506056606c565b6040518082815260200191505060405180910390f35b6000548156fea165627a7a723058207be0ad4d329192b557f78de6014da139715b86a15da7c5c60568bc20605fb4fb0029',
sourceMap: '25:52:1:-;;;72:1;49:24;;25:52;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:52:1;;;;;;;',
deployedSourceMap: '25:52:1:-;;;;;;;;;;;;;;;;;;;;;;;;49:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;49:24:1;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o',
source: 'pragma solidity ^0.5.0;\n' +
'\n' +
'contract TodoList {\n' +
' uint public taskCount =0;\n' +
'\n' +
'}\n',
sourcePath: '/Users/sarath/Public/eth-todo-list/contracts/TodoList.sol',
ast: [Object],
legacyAST: [Object],
compiler: [Object],
networks: [Object],
schemaVersion: '3.0.1',
updatedAt: '2022-03-25T12:55:15.115Z',
devdoc: [Object],
userdoc: [Object]
},
setProvider: [Function: bound setProvider],
new: [Function: bound new] {
estimateGas: [Function: bound estimateDeployment]
},
at: [Function: bound at],
deployed: [Function: bound deployed],
defaults: [Function: bound defaults],
hasNetwork: [Function: bound hasNetwork],
isDeployed: [Function: bound isDeployed],
detectNetwork: [Function: bound detectNetwork],
setNetwork: [Function: bound setNetwork],
setWallet: [Function: bound setWallet],
resetAddress: [Function: bound resetAddress],
link: [Function: bound link],
clone: [Function: bound clone],
addProp: [Function: bound addProp],
toJSON: [Function: bound toJSON],
decodeLogs: [Function: bound decodeLogs],
web3: Web3 {
currentProvider: [Getter/Setter],
_requestManager: [RequestManager],
givenProvider: null,
providers: [Object],
_provider: [HttpProvider],
setProvider: [Function (anonymous)],
BatchRequest: [Function: bound Batch],
extend: [Function],
version: '1.0.0-beta.37',
utils: [Object],
eth: [Eth],
shh: [Shh],
bzz: [Bzz]
},
class_defaults: {
from: '0x62FE1B861c6B444D3E7E7A6B176Dd6a83ef462c6',
gas: 6721975,
gasPrice: 20000000000
},
currentProvider: HttpProvider {
host: 'http://127.0.0.1:7545',
httpAgent: [Agent],
timeout: 0,
headers: undefined,
connected: true,
send: [Function (anonymous)],
_alreadyWrapped: true
},
network_id: '5777'
},
methods: {
'taskCount()': [Function (anonymous)] {
call: [Function (anonymous)],
sendTransaction: [Function (anonymous)],
estimateGas: [Function (anonymous)],
request: [Function (anonymous)]
}
},
abi: [
{
constant: true,
inputs: [],
name: 'taskCount',
outputs: [Array],
payable: false,
stateMutability: 'view',
type: 'function',
signature: '0xb6cb58a5'
}
],
address: '0x682B01E5DEF451deadde909f421522B98D8fEF3e',
transactionHash: undefined,
contract: Contract {
currentProvider: [Getter/Setter],
_requestManager: RequestManager {
provider: [HttpProvider],
providers: [Object],
subscriptions: {}
},
givenProvider: null,
providers: {
WebsocketProvider: [Function: WebsocketProvider],
HttpProvider: [Function: HttpProvider],
IpcProvider: [Function: IpcProvider]
},
_provider: HttpProvider {
host: 'http://127.0.0.1:7545',
httpAgent: [Agent],
timeout: 0,
headers: undefined,
connected: true,
send: [Function (anonymous)],
_alreadyWrapped: true
},
setProvider: [Function (anonymous)],
BatchRequest: [Function: bound Batch],
extend: [Function: ex] {
formatters: [Object],
utils: [Object],
Method: [Function: Method]
},
clearSubscriptions: [Function (anonymous)],
options: { address: [Getter/Setter], jsonInterface: [Getter/Setter] },
defaultAccount: [Getter/Setter],
defaultBlock: [Getter/Setter],
methods: {
taskCount: [Function: bound _createTxObject],
'0xb6cb58a5': [Function: bound _createTxObject],
'taskCount()': [Function: bound _createTxObject]
},
events: { allEvents: [Function: bound ] },
_address: '0x682B01E5DEF451deadde909f421522B98D8fEF3e',
_jsonInterface: [ [Object] ]
},
taskCount: [Function (anonymous)] {
call: [Function (anonymous)],
sendTransaction: [Function (anonymous)],
estimateGas: [Function (anonymous)],
request: [Function (anonymous)]
},
sendTransaction: [Function (anonymous)],
send: [Function (anonymous)],
allEvents: [Function (anonymous)],
getPastEvents: [Function (anonymous)]
}
truffle(development)>
undefined
truffle(development)>
undefined
truffle(development)> todoList.address
'0x682B01E5DEF451deadde909f421522B98D8fEF3e'
truffle(development)> todoList.taskCount()
BN { negative: 0, words: [ 0, <1 empty item> ], length: 1, red: null }
truffle(development)> taskCount = await todoList.taskCount()
undefined
truffle(development)> taskCount.toNumber()
0
truffle(development)> exit
evalmachine.<anonymous>:0
exit
^
Uncaught ReferenceError: exit is not defined
at evalmachine.<anonymous>:0:1
at Script.runInContext (vm.js:144:12)
at runScript (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:199:1)
at Console.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:213:1)
at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/repl.js:118:1)
at bound (domain.js:421:15)
at REPLServer.runBound [as eval] (domain.js:432:12)
at REPLServer.onLine (repl.js:909:10)
at REPLServer.emit (events.js:400:28)
at REPLServer.emit (domain.js:475:12)
truffle(development)> quit()
evalmachine.<anonymous>:0
quit()
^
Uncaught ReferenceError: quit is not defined
at evalmachine.<anonymous>:0:1
at Script.runInContext (vm.js:144:12)
at runScript (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:199:1)
at Console.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:213:1)
at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/repl.js:118:1)
at bound (domain.js:421:15)
at REPLServer.runBound [as eval] (domain.js:432:12)
at REPLServer.onLine (repl.js:909:10)
at REPLServer.emit (events.js:400:28)
at REPLServer.emit (domain.js:475:12)
truffle(development)> exit();
evalmachine.<anonymous>:0
exit();
^
Uncaught ReferenceError: exit is not defined
at evalmachine.<anonymous>:0:1
at Script.runInContext (vm.js:144:12)
at runScript (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:199:1)
at Console.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/console.js:213:1)
at ReplManager.interpret (/usr/local/lib/node_modules/truffle/build/webpack:/packages/truffle-core/lib/repl.js:118:1)
at bound (domain.js:421:15)
at REPLServer.runBound [as eval] (domain.js:432:12)
at REPLServer.onLine (repl.js:909:10)
at REPLServer.emit (events.js:400:28)
at REPLServer.emit (domain.js:475:12)
truffle(development)> .exit
>eth-todo-list git:(start-contract) ✗
➜
time: 22:03