question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createBuyOrder: TypeError: name.startsWith is not a function

See original GitHub issue

I can not createBuyOrder

import * as Web3 from "web3";
import { OpenSeaPort, Network } from "opensea-js";
// This example provider won't let you make transactions, only read-only calls:
// const provider = new Web3.providers.HttpProvider("https://mainnet.infura.io");
const provider = window.web3.currentProvider;
const seaport = new OpenSeaPort(provider, {
  networkName: Network.Main,
});


let offer = {
    "asset": {
        "tokenId": "11711650659115239570970277149455128752276294326970855605298725886352808738817",
        "tokenAddress": "0x495f947276749ce646f68ac8c248420045cb7b5e"
    },
    "accountAddress": "0xe07fb6009e9c195c7429aad1d0828720f51f42a0",
    "startAmount": "2.21",
    "referrerAddress": "0x96b4784E127dD9Ad6CcC3AF96Ef9fc6873669647",
    "expirationTime": 1619004625
}
 let order = await seaport.createBuyOrder(offer);
TypeError: name.startsWith is not a function
    at elementaryName (index.js?eaf3:10)
    at Function.ABI.rawEncode (index.js?eaf3:347)
    at Object.exports.encodeCall (schema.js?efc2:16)
    at Object.exports.encodeBuy (schema.js?efc2:71)
    at OpenSeaPort.eval (seaport.js?8b9d:1991)
    at step (seaport.js?8b9d:40)
    at Object.eval [as next] (seaport.js?8b9d:21)
    at fulfilled (seaport.js?8b9d:12)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
imagezerocommented, Apr 20, 2021

Adding schemaName: “ERC1155” did not help either

0reactions
esteban-OpenSeacommented, Apr 19, 2022

Checking in again, please make sure you are using the latest SDK and Node version

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Solved] TypeError: startsWith is not a function - ItsJavaScript
The TypeError: startsWith is not a function occurs if we call a startsWith() method on the value that is not of a type...
Read more >
startsWith is not a function getting called for no reason
startsWith (1)) , would occur with a TypeError due to startsWith() requiring a string. We can tell this is a TypeError from the...
Read more >
TypeError: startsWith is not a Function in JavaScript - Linux Hint
TypeError: startsWith is not a function” occurs when method is called on non-string type values. To fix it use “toString()” method with startsWith()...
Read more >
TypeError: startsWith is not a function in JavaScript | bobbyhadz
The "startsWith is not a function" error occurs when we call the startsWith() method on a value that is not a string.
Read more >
TypeError: key.startsWith is not a function - Node-RED Forum
Getting this error for function, "TypeError: key.startsWith is not a function" and I don't know what happens. Can anyone help me to solve...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found