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