Comments (10)
@schmidsi since Address.fromString() is now available. i guess we can close this?
from graph-tooling.
I think this was imagined as a further convenience, but I agree that this is probably not necessary, closing 🙏
from graph-tooling.
Is there any way to overload bind to take an address or a string as a first parameter?
from graph-tooling.
Nope, overloading results in TypeScript compile errors like this one:
ERROR TS2300: Duplicate identifier 'index/LANDRegistry.bind'.
static bind(address: string, blockHash: H256): LANDRegistry {
~~~~
in index.ts(919,9)
from graph-tooling.
We may be able to use overload lists for this, assuming AssemblyScript allows it: https://blog.mariusschulz.com/2016/08/18/function-overloads-in-typescript#version-4-function-overloads. I can try that.
from graph-tooling.
Nah, doesn't work with AssemblyScript.
from graph-tooling.
It works in AssemblyScript but with some limitations. For now you need explicitly resolve all generic types for overloaded functions. In future this will be more fancy.
See this example
from graph-tooling.
@MaxGraey Oh sweet, we'll give that a shot. It looks good enough for the moment. Thanks for the pointer!
from graph-tooling.
What is this tracking now? Having the overloaded version? Because we do have Address.fromString
.
from graph-tooling.
Yeah, multiple implementations of SmartContract.bind()
(one with an Address
, one with a string
parameter). It is a low priority issue right now.
from graph-tooling.
Related Issues (20)
- allow passing `spkg.io` from `graph init` HOT 4
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- Project Roadmap HOT 1
- add `graph publish` command
- allow subgraph manifest to refer to `spkg.io`
- allow passing private key and bypassing web ui for `graph publish` HOT 3
- Build step validation for network names
- Allow passing `--subgraph XXX` to `graph publish` to publish a new version of an existing subgraph
- 'publish' command should allow upgrading an existing subgraph HOT 2
- show warning if user is using unsupported node.js version
- [BUG] camelCase to snake-case conversion issue during `graph init`
- Unable to initialize Subgraph for Self-Hosted Graph Node
- etherscan requests failing HOT 2
- upgrade oclif
- graph-cli failing to generate types for multi-dimensional arrays on graph init and graph add
- `graph publish` should update subgraph metadata if changed
- Subgraph failing with `Could not deploy subgraph on graph-node: subgraph resolve error: resolve error: failed to resolve data source Contract with source_address` HOT 2
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 graph-tooling.