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')
};
if i remove await tether.transfer(accounts[2], '1000000000000000000000000')
then it migrates successfully, i dont know why?