Conflux-Chain / ConfluxWeb

Conflux JavaScript API, under active development
GNU Lesser General Public License v3.0
7 stars 5 forks source link

the method cfx_sendTransaction does not exist/is not available #11

Open paschal533 opened 2 years ago

paschal533 commented 2 years ago

Hello I tried to call this function from the smart contract I deployed to conflux testnet,

const transaction = await Contract.create( name ).sendTransaction({ from: me.address, gasPrice: 10000000 }).executed();

but It is returning this error Error: the method cfx_sendTransaction does not exist/is not available

Timidan commented 2 years ago

Hi @paschal533 might be an issue with how you're defining your conflux-js instance...check this out

https://github.com/Timidan/CRC721/blob/master/scripts/deploy.ts

paschal533 commented 2 years ago

Ok, now I see where I made the mistake. I didn't deploy the smart contract's abi and bytecode, after migrating it with cfxtruffle. Thank you