In fund-contract.js when running npx truffle exec scripts/fund-contract.js --network live after successfully migrating(deploying) the default contract MyContract.sol, the contract will hang at const token = await LinkToken.at(tokenAddress); due to what is believed to be metamask changes. See the truffle issue for more information.
Steps to Reproduce
Set up a new Chainlinked project, you can follow the documentation to do this here
mkdir MyChainlinkedProject
cd MyChainlinkedProject/
truffle unbox smartcontractkit/box
Due to the issue with truffle & metamask (mentioned above) you will have to changed one package in package.json:
"@truffle/hdwallet-provider": "^1.0.30", -> "@truffle/hdwallet-provider": "next",
then run:
npm install
Then proceed to set your RPC_URL to interact with the ropsten chain and your MNEMONIC (seed phrase) from your metamask account.
export RPC_URL=asdfasfas
export MNEMONIC='cat dog frog......'
Run the migration script to deploy 'MyContract.sol'
npm run migrate:live
After it is deployed, just run
npx truffle exec scripts/fund-contract.js --network live
After some testing, the output will hang on the fund-contracts file on this line:
const token = await LinkToken.at(tokenAddress);
I was able to get it past this line by adding some pieces of code and a try catch to see the error:
Funding contract: 0x64738dc4359739c402fE1523Ff96308DDa47ea5C
Error: Returned error: The method eth_sendTransaction does not exist/is not available
at module.exports (/Users/patrick/code/demos/truffle/MyChainlinkedProject/scripts/fund-contract.js:20:28)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Truffle v5.1.32 (core: 5.1.32)
Node v14.5.0
Expected Behavior
The contract that was deployed during npm run migrate:live will be funded
Actual Results
The script hangs and never completes.
Environment
Operating System: macOS Catalina 10.15.5
Ethereum client: Infura
Truffle version (truffle version): ("@truffle/hdwallet-provider": "^1.0.36") / ("@truffle/hdwallet-provider": "next")
Issue
In
fund-contract.js
when runningnpx truffle exec scripts/fund-contract.js --network live
after successfully migrating(deploying) the default contractMyContract.sol
, the contract will hang atconst token = await LinkToken.at(tokenAddress);
due to what is believed to be metamask changes. See the truffle issue for more information.Steps to Reproduce
Set up a new Chainlinked project, you can follow the documentation to do this here
Due to the issue with truffle & metamask (mentioned above) you will have to changed one package in
package.json
:"@truffle/hdwallet-provider": "^1.0.30",
->"@truffle/hdwallet-provider": "next",
then run:npm install
Then proceed to set your RPC_URL to interact with the ropsten chain and your MNEMONIC (seed phrase) from your metamask account.
Run the migration script to deploy 'MyContract.sol'
After it is deployed, just run
After some testing, the output will hang on the fund-contracts file on this line:
I was able to get it past this line by adding some pieces of code and a try catch to see the error:
And the error we get is:
Expected Behavior
The contract that was deployed during
npm run migrate:live
will be fundedActual Results
The script hangs and never completes.
Environment
truffle version
): ("@truffle/hdwallet-provider": "^1.0.36") / ("@truffle/hdwallet-provider": "next")node --version
): v14.5.0npm --version
): 6.14.5