How to create an instance of contract in Truffle console

0 votes

Hi,

I am writing the following command at Truffle console to create an instance of the deployed contract but I am getting the message "undefined":

Victim.deployed().then(contract => victim = contract)

undefined

truffle(ganache)> truffle version

Truffle v5.1.27 (core: 5.1.27)

Solidity v0.5.16 (solc-js)

Node v8.10.0

Web3.js v1.2.1

truffle(ganache)>

Somebody please guide me how to create an instance of contract in Truffle Console?

Zulfi.

Jun 17, 2020 in Blockchain by Edureka
• 120 points
2,030 views

1 answer to this question.

0 votes
answered Jun 17, 2020 by Gitika
• 65,770 points

Related Questions In Blockchain

0 votes
1 answer

How to manually create the instance of the contract in truffle?

You can try to do it like ...READ MORE

answered Sep 24, 2018 in Blockchain by slayer
• 29,370 points
2,770 views
0 votes
1 answer

How to create a contract in truffle?

The command you are using to create ...READ MORE

answered Dec 11, 2018 in Blockchain by Omkar
• 69,220 points
1,657 views
0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,100 points
3,625 views
0 votes
1 answer

How to track changes of an object in exonum?

You have to describe each component in ...READ MORE

answered Jul 23, 2018 in Blockchain by slayer
• 29,370 points
662 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,947 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,470 views
0 votes
1 answer
0 votes
2 answers

how save data from different account using web3.py to smart contract

Hey, @Amal, It will automatically take the address ...READ MORE

answered Jul 28, 2020 in Blockchain by Rajiv
• 8,870 points
1,542 views
0 votes
1 answer

Can someone tell me how to solve the Hyperledger playground installation issue?

Hey, @Ratul, I would suggest using this command ...READ MORE

answered May 13, 2020 in Blockchain by Gitika
• 65,770 points
935 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP