ETH paymentTokenAddress in OpenSea plugin createBuyOrder

Hey,
please , to ’ createBuyOrder ’ : what should i put in “paymentTokenAddress” for ETH main net

const dat = await Moralis.Plugins.opensea.createBuyOrder({
network: ‘mainnet’,
tokenAddress: ‘0x495f947276749ce646f68ac8c248420045cb7b5e’,
tokenId: ‘85085507933408271046452238667602385367365441338342966695615583555194389004289’,
tokenType: ‘ERC1155’,
amount: 0.0001,
userAddress: web3Account,
paymentTokenAddress: ‘…’,
});

I am not quite sure but usually you put the token address of Wrapped ETH in there

1 Like

it’s giving me this error :

  !! { i have ETH in my wallet }

Something went wrong
{
“code”: 500004,
“message”: “Cannot generate a valid web3 sign payload”,
“details”: {
“method”: “signBuyOrder”,
“network”: “main”,
“tokenAddress”: “0x495f947276749ce646f68ac8c248420045cb7b5e”,
“tokenId”: “85085507933408271046452238667602385367365441338342966695615583555194389004289”,
“tokenType”: “ERC1155”,
“startAmount”: 0.0001,
“userAddress”: “0x***************************************”,
“error”: “Insufficient balance. You may need to wrap Ether.”
}
}

The error basically says it all.
You have ETH but you dont have WETH. You need to wrap your eth first

1 Like

eth is not same thing as wrapped eth, weth is an erc20 token and eth is the native chain currency

2 Likes

yes, what should i do please ?

i’m getting this now !

MoralisWeb3.js:950 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘triggers’)
at MoralisWeb3.js:950
at tryCatch (runtime.js:63)
at Generator.invoke [as _invoke] (runtime.js:294)
at Generator.next (runtime.js:119)
at tryCatch (runtime.js:63)
at maybeInvokeDelegate (runtime.js:357)
at Generator.invoke [as _invoke] (runtime.js:268)
at Generator.next (runtime.js:119)
at asyncGeneratorStep (asyncToGenerator.js:5)
at _next (asyncToGenerator.js:27)

does this help you: https://github.com/dani69654/moralis_opensea_nodejs/blob/main/modules/buyOrder.js
?

is this an other method to createBuyOrder

i didn’t get all the code process

what are the parameters that you use now?

to paste code in forum, you can see here how tot do it: READ BEFORE POSTING - How to post code in the forum

1 Like

ah thank you!

here is my code :


		const dat = await Moralis.Plugins.opensea.createBuyOrder({
			network: 'mainnet',
			tokenAddress: '0x495f947276749ce646f68ac8c248420045cb7b5e',
			tokenId: '85085507933408271046452238667602385367365441338342966695615583325396458799105',
			tokenType: 'ERC1155',
			amount: 0.0001,
			userAddress: web3Account,
			paymentTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
		});

what version of opensea plugin do you have?
it looks like v0.0.87 is latest version now

1 Like

@cryptokid

yes, i m using Version 0.0.83

what can i do now !

@admins :slight_smile:

it is not possible ?

Hey @pure.roboot

I would like to have a chat with you to check this issue. Do you mind to move this conversation on Discord?
Please ping me there, my Discord user is Dan¡#5011

i am not sure why are you getting this error. you can try these things…

  1. make weth balance… you just need to swap using metamask. or uniswap. (but i had not faced this issue… i do not have weth balance)
  2. amount dont enter in decimal… convert as wei … how i am using is amount * 10^18… working fine