Comments (8)
@jacogr We would be very grateful if you could tackle this soonish. The context is that we're about to release ink! 5.0 and just now realized that polkadot-js/api
needs to be updated.
from api.
I'm uploading a zip with two contracts here: erc20-4.0-vs-5.0.zip. It contains:
- ERC-20 with ink! 4.0
- ERC-20 with ink! 5.0
The diff comes down to
"events": [
{
"args": [ ... ],
"docs": [ ... ],
"label": "...",
+ "module_path": "erc20::erc20",
+ "signature_topic": "0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb"
},
...
]
from api.
@ascjones Is this actually ink!
specific? Would ask!
and solang
compiled contract emit events in the same way?
from api.
@ascjones Is this actually
ink!
specific? Wouldask!
andsolang
compiled contract emit events in the same way?
I'm not sure what the current state is, but we would expect them to emit events in this way in the future i.e. have the first topic be the signature topic and include that in the metadata. /cc @xermicus
from api.
Would be a bit of a hassle to not only treat contract compiled with different ink version differently but also languages. Is there something like an language overarching specification how pallet-contracts wasm contracts should behave?
from api.
That's basically the ink! metadata. Solang & co just implement the same metadata format as ink!, Solang also uses the ink! crates for parts of that. I think Solang is still on the Metadata v4.
When interpreting the metadata there should be no language-specific logic needed.
from api.
Yes as soon as ink! 5.0 is released I'll keep Solang up and make a new release. As for the events, this shouldn't be any issue to adapt.
In general the metadata is mostly compatible. The only compromise so far is about how Solang Solidity contracts make use of lang_error
, because the concepts of errors and error handling is fundamentally different between Solidity and ink!. We might be able to solve this by changing ink! metadata. Maybe it's also just way more pragramatic to just have some "special cases" instead of trying to make the ink! metadata format too generic (I don't have a hard opinion). But this is the status quo already and not related to events, which I should be able to adapt in solang without problems.
from api.
Related Issues (20)
- `ApiPromise` prints an error message when initializing HOT 4
- Transfer breaks for substrate-node HOT 3
- polkadot-types-from-chain removes imports which are used later in the same file HOT 4
- RPC-CORE error when calling `api.derive.society.members()` HOT 3
- When using a front-end framework for multi-end development, an error occurred when compiling the Android app using this plugin
- Underlying storage for exposures has changed HOT 3
- conflicting and duplicate types when generating types for multiple networks, in the same project HOT 2
- Use multiple API Augmentations in the same DApp
- How to use the metadata type in a custom type?
- Block with more than u16 events fails to be decoded
- About the callback issue encountered by nodejs when using @ polkadot/API
- api.tx.staking.bond takes in 3 params but it should be 2 HOT 1
- Call hash differs in UI vs created with API HOT 2
- Connecting to Polkadot/Api HOT 3
- `Unable to decode storage society.candidates` when there's a vouch in the candidates list HOT 4
- Memory Leak in `query.entriesPaged`
- [Parachain] Trying to add an already reserved node 12D3KooWJb4BDK6gRLH27mYnd22igZQi6W3xraAJsvSanaccPNVx as reserved on SetId(0). HOT 6
- `api-contracts`: handle foreign events gracefully HOT 7
- Rework documentation on types-support, and typegen HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.