Comments (8)
Here is the IPFS file format for TCR items (in particular for TCR of TCRs) to the review.
IPFS file format for TCR of TCRs items
File type: JSON.
{
"address": "0x81e1269708582ae17560b6acc0f45d0416df8d68",
"name": "My TCR",
"fields": [],
"localization": {},
"customization": {},
}
- address - TCR contract address, required
- name - human-readable TCR name,
- fields - list of TCR item properties’ description (
Field
), - localization - localization config,
- customization - ui customization config
Field format
{
"name": "myProp",
"type": "String",
"default": "My property",
"required": true
}
- name - property name, string;
- type - property type, one of:
String
,Number
,Boolean
,Any
or JSON object with Array or Object description (ObjectType
orArrayType
format); - default - default property value;
- required - boolean, is property required?
ObjectType format
{
"fields": []
}
- fields - list of properties’ description -
Field
format
ArrayType format
{
"type": {
"fields": [
{
"name": "myProp",
"type": "String",
"default": "My property",
"required": true
}
]
}
}
- type - property type, one of:
String
,Number
,Boolean
,Any
or JSON object with Array or Object description (ObjectType
orArrayType
format);
Localization format
{
"en": {
"registryName": "My Super TCR",
"apply": "Apply",
"buy": "Buy",
"candidate": "Candidate",
"applicant": "Applicant",
"tokenHolder": "Token holder",
},
"de": {
...
},
...
}
Object with properties - language codes. Every property contains key-value pairs of localized strings.
Open question: should we store localization config file to IPFS? Or should it be a link to a third-party service? IPFS over IPNS?
Custiomization format
{
"defaultTextColor": "#000",
"defaultFont": "Arial",
"headerColor": "#FFF",
...
}
An object with key-value pairs of ui properties.
Open question: should we store UIconfig to IPFS file? Or should it be a link to a third-party service?
from tcr.
https://github.com/kangarang/tcr-ui/blob/master/docs/IPFS.md#prospect-park-ipfs-conventions
from tcr.
Making the identifier constant id
would be helpful.
What's that multiurl spec that can use used to standardizing strings that include the information "if you support ipfs, here's the ipfs hash, otherwise here's a web url that responds in json" mutli-url
? multi-schema
? something like that
from tcr.
@shrugs @skmgoldin i prefer identifier
over id
only because it likely will not be a number. unless im missing something!
@hodkov thank you for posting those ipfs file formats. it's much larger than the scope of this issue; however this is still really great. i've been learning ipfs recently so it's nice to see it in the context of what i'm currently working on.
from tcr.
@shrugs i've been looking all over for what you mentioned, but still am not sure about it. was it multiplexing?
from tcr.
@hodkov, i like the localization config. i dont think we need to store ui config data in ipfs. frontend apps can manage that in their build. the Field
part is still a bit hazy to me. could you expand on that please? are fields the transaction arguments?
from tcr.
@kangarang honestly can't remember the name, it's very infuriating 😢
I'm not partial to id
vs identifier
, just as long as everything gets a guid of some sort
from tcr.
i just realized i was way overthinking the implementation, trying to fix problems that weren't even there hahah
from tcr.
Related Issues (20)
- Increase test coverage to at least 85% for branches and 95% for statements HOT 1
- While a listing is locked in a challenge, tokens cannot be withdrawn if the withdrawal would leave the listing with < minDeposit unstakedDeposit HOT 1
- Document how tokens are supported modularly HOT 1
- Publish package to ethpm
- semantic improvements: determineReward / claimReward / tokenClaims HOT 2
- Deprecation warnings when compiling Registry and Parameterizer HOT 1
- Save gas by using a ParameterizerInterface in Registry HOT 2
- Factory/proxy - new token HOT 1
- Has this project been audited? HOT 7
- PLCRFactory fails to deploy - can't deploy TCR HOT 8
- config.json is not actually used HOT 2
- Debug error with factory pattern HOT 1
- Error: Invalid JSON RPC response: "" HOT 1
- Make exitTimeDelay and exitPeriodLen a single value
- Update owners manual to cover new stuff in the develop branch
- Node 10 npm install failure HOT 1
- error deploying proxy script deploy_proxies.js HOT 1
- Update isWhitelisted to return false if a listing is inside its own init or finalize exit windows
- Running migration: 4_parameterizer_factory.js Error encountered, bailing. Network state unknown. Review successful transactions manually. Error: The contract code couldn't be stored, please check your gas amount
- Require check in challenge function has unnecessary part of conditional
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 tcr.