argotorg / argotorg/solc-js

ABI translator improvements

Open
#237 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
TypeScript
Stars
1.5k
Forks
349
Avg merge
8m
Merged PRs (30d)
1

Description

There is a simple tool in solc-js providing an "upgrade" path for ABI JSON output by any compiler version to be translated to "latest standards".

This function is in `abi.js` and is called `update(compilerVersion, abi)`.

Practically this means it translates it to whatever solc 0.5.0 would output.

It would make sense to expand this into a generic translator method: `translate(abi, inputVersion, outputVersion)`.

If we consider the current `update` changing the JSON from anything to 0.5.0 compatible one, then `update` could become:
```
function update(compilerVersion, abi) {
return translate(abi, compilerVersion, “0.5.0”)
}
```

@ekpyron has suggested that in order to simplify the translation, internally it could "upgrade" to the current version and then "downgrade" from there, in order to maintain a single base line.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in abi.js at update(compilerVersion, abi) and review how it currently translates ABI JSON to the solc 0.5.0 format. Define the supported input and output versions and how the proposed translate(abi, inputVersion, outputVersion) relates to update. Done means the generic translation path and its compatibility behavior are specified and covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, solidity
Domain
compilers, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.