The method eth_sendTransaction does not exist/is not available...
See original GitHub issueTrying to fulfill an order:
import Web3 from "web3";
import { OpenSeaPort, Network } from "opensea-js";
const provider = new Web3.providers.HttpProvider(
"https://rinkeby.infura.io/v3/aRxxxxxxxxxxxxxxxxxx"
);
const seaport = new OpenSeaPort(provider, {
networkName: Network.Rinkeby,
apiKey: "xxxxxxxxxxxxxxxxxx",
});
const collectionAddress = "0xafc3cd70db252e17bbcc6ff9575cdd63514576k8";
const testedTokenId = 1;
const openSeaAsset = await seaport.api.getAsset({
tokenAddress: collectionAddress,
tokenId: testedTokenId,
});
const makerWalletAddress = openSeaAsset.owner.address;
const order = await seaport.api.getOrder({
asset_contract_address: collectionAddress,
token_id: testedTokenId,
side: 1,
maker: makerWalletAddress,
sale_kind: 0,
});
const myWalletAddress = "0xCxxxxxxxxxxxxxxxxxxxx";
await seaport.fulfillOrder({
order: order,
accountAddress: myWalletAddress,
});
I’m able to get results for getAsset, getOrder, etc. However when trying to fulfillOrder, I get this error message:
/Users/noam/Documents/Code/OpenseaSdk/node_modules/opensea-js/lib/seaport.js:3012 throw new Error("Failed to authorize transaction: \"" + (error_14.message
Error: Failed to authorize transaction: "The method eth_sendTransaction does not exist/is not available..." at OpenSeaPort.<anonymous> (/Users/noam/Documents/Code/OpenseaSdk/node_modules/opensea-js/lib/seaport.js:3012:31) at step (/Users/noam/Documents/Code/OpenseaSdk/node_modules/opensea-js/lib/seaport.js:44:23) at Object.throw (/Users/noam/Documents/Code/OpenseaSdk/node_modules/opensea-js/lib/seaport.js:25:53) at rejected (/Users/noam/Documents/Code/OpenseaSdk/node_modules/opensea-js/lib/seaport.js:17:65)
Read somewhere that Infura doesn’t support sendTransaction. Not sure about it. Any idea how to solve this? Sorry for the format- I’m new here…
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top GitHub Comments
I use you example but I also get error. I think you example is outdated. Here is my output
Can you give my newer solution? @esteban-OpenSea
This issue has been solved, since you are calling from client side please follow this guidance: https://github.com/ProjectOpenSea/opensea-js/issues/344#issuecomment-1020570900
@HagosAlema , I recommend you go through the opensea tutorial: https://docs.opensea.io/docs/developer-tutorials