Having issues with Truffle migrate. #5887
Unanswered
OGXCHANGE
asked this question in
General Q&A
Replies: 1 comment 2 replies
-
Do you have an repo you can share? It's difficult to assist otherwise. If you do have a repo, please be careful to not share your mnemonic, private keys or other secret credentials. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trying to migrate my contract but not going according to plan. getting this error
"TypeError: tether.transfer is not a function
at module.exports (C:\Users\user\defi-staking-app-starter\defi-staking-app-starter\migrations\2_deploy_contracts.js:23:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
Truffle v5.1.39 (core: 5.1.39)
Node v10.15.3"
below is the 2_deploy_contracts.js file
const RWD = artifacts.require('RWD')
const Tether = artifacts.require('Tether')
const DecentralBank = artifacts.require('DecentralBank')
module.exports = async function(deployer, network, accounts) {
// Deploy Mock Tether Token
await deployer.deploy(Tether)
const tether = await Tether.deployed()
// Deploy RWD Token
await deployer.deploy(RWD)
const rwd = await RWD.deployed()
// Deploy DecentralBank
await deployer.deploy(DecentralBank, rwd.address, tether.address)
const decentralBank = await DecentralBank.deployed()
// Transfer all RWD tokens to Decentral Bank
await rwd.transfer(decentralBank.address, '1000000000000000000000000')
//distribute 100 Tether to investor
await tether.transfer(accounts[2], '1000000000000000000000000')
};
Beta Was this translation helpful? Give feedback.
All reactions