Object literal may only specify known properties, and '"internalType"' does not exist in type 'ParamType'.
See original GitHub issueThis is a typescript compile issue, so should be able to fix this by just JSON.stringifying it and then passing it along. Making an issue here since ParamType should be able to hanlde internalType
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"prevBlockHash","type":"bytes32"},{"components":[{"internalType":"address","name":"originator","type":"address"},{"internalType":"address","name":"quotToken","type":"address"},{"internalType":"address","name":"variToken","type":"address"},{"internalType":"uint256","name":"priceNumer","type":"uint256"},{"internalType":"uint256","name":"priceDenom","type":"uint256"},{"internalType":"uint256","name":"tokenLimit","type":"uint256"},{"internalType":"uint8","name":"signatureV","type":"uint8"},{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureS","type":"bytes32"}],"internalType":"struct Engine.Order[]","name":"buyyOrders","type":"tuple[]"},{"components":[{"internalType":"address","name":"originator","type":"address"},{"internalType":"address","name":"quotToken","type":"address"},{"internalType":"address","name":"variToken","type":"address"},{"internalType":"uint256","name":"priceNumer","type":"uint256"},{"internalType":"uint256","name":"priceDenom","type":"uint256"},{"internalType":"uint256","name":"tokenLimit","type":"uint256"},{"internalType":"uint8","name":"signatureV","type":"uint8"},{"internalType":"bytes32","name":"signatureR","type":"bytes32"},{"internalType":"bytes32","name":"signatureS","type":"bytes32"}],"internalType":"struct Engine.Order[]","name":"sellOrders","type":"tuple[]"},{"components":[{"internalType":"uint16","name":"buyyOrderIndex","type":"uint16"},{"internalType":"uint16","name":"sellOrderIndex","type":"uint16"},{"internalType":"uint256","name":"quotTokenTrans","type":"uint256"},{"internalType":"uint256","name":"variTokenTrans","type":"uint256"},{"internalType":"uint256","name":"quotTokenArbit","type":"uint256"}],"internalType":"struct Engine.Exchange[]","name":"exchanges","type":"tuple[]"}],"name":"execute","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"executorOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_executorOracle","type":"address"}],"name":"setExecutorOracle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Why am I getting an error "Object literal may only specify ...
As of TypeScript 1.6, properties in object literals that do not have a corresponding property in the type they're being assigned to are...
Read more >Object literal may only specify known properties in TS
The "Object literal may only specify known properties" error occurs when a property in an object literal does not exist in the object's...
Read more >4. Objects - Learning TypeScript [Book] - O'Reilly
Object literal may only specify known properties, and 'name' // does not exist in type '{ firstName: string; lastName: string; }'. name :...
Read more >Documentation - Object Types - TypeScript
In TypeScript, we represent those through object types. ... Object literal may only specify known properties, but 'raidus' does not exist in type...
Read more >Why is this code not working? Object literal may only specify ...
Object literal may only specify known properties, and '"code"' does not exist in type 'ContactInfo'. In the following, it chokes on setting ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, I’ve been busy with the EIP-1559 changes.
I will look into this (and a few other issues) early this week. I suspect it will be an easy change, I mainly am interested in why this changed; it used to be TS didn’t care about extra properties, only missing ones.
I wonder if they changed how types vs. interfaces work regarding object literals. I just need to look into it to find the best solution; ideally solidity adding new keys shouldn’t break JsonFragments. 😃
4.0.42