Uniswap / v3-periphery

🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v3
https://uniswap.org
GNU General Public License v2.0
1.16k stars 1.08k forks source link

INonfungiblePositionManager.positions(tokenId) stack error #273

Open evansmj opened 2 years ago

evansmj commented 2 years ago

When trying to use the INonfungiblePositionManager.positions(tokenId); call, I and others get the following compile error:

CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack. Error HH600: Compilation failed.

Different optimizer settings, yul settings, haven't worked.

t4sk commented 2 years ago

Try setting from this project

  solidity: {
    compilers: [
      {
        version: "0.7.6",
        settings: {
          evmVersion: "istanbul",
          optimizer: {
            enabled: true,
            runs: 1000,
          },
        },
      },
    ],
  },

https://github.com/Uniswap/v3-periphery/blob/22a7ead071fff53f00d9ddc13434f285f4ed5c7d/hardhat.config.ts#L87-L88

garyng2000 commented 2 years ago

change that but still no luck, at the end of the day, I just suppress the generateSVGImage call so the uri has an invalid image attribute. It is not critical for my usage as it is purely for presentation. though I wonder how it was compiled in the first place(a different compiler?)

garyng2000 commented 2 years ago

though it is strange that if I compile from the project directly, it works but if I put it in remix, it doesn't.