Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

155
Views
Deploying a smart contract from the 2nd user account

how do I deploy a smart contract using a 2nd account?

const xxx = artifacts.require("xxx");
var web3 = require('web3');

module.exports = function (deployer, accounts) {
  deployer.deploy(xxx, {from: accounts[1]});
};

There is an error.

Error: *** Deployment Failed ***

"xxx" -- Provided address e is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted. -- Reason given: Custom error (could not decode)..

May I know how to fix it?

Also, what is the difference between accounts[1] and web3.eth.accounts[1]?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I managed to remove the error by adding 'network' as one of the parameters in the function.

module.exports = function (deployer, network, accounts) {

Let me know if there are alternative ways to do it.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!