Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add overloaded function selectors of ERC725Y in constants.sol #126

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

CJ42
Copy link
Collaborator

@CJ42 CJ42 commented Jun 3, 2022

What does this PR introduce?

The syntax Contract.function.selector is not available in Solidity for overloaded functions.
See ethereum/solidity#3556 for more details about the issue.

Feat

In the Solidity constant file constants.sol, include the bytes4 function selectors of the two overloaded ERC725Y functions:

  • setData(bytes32,bytes)
  • setData(bytes32[],bytes[])

These two selectors can then be imported individually in contracts, to adapt behaviours depending on if one or multiple data keys are being set.

@CJ42 CJ42 requested review from frozeman and YamenMerhi June 3, 2022 10:36
@CJ42 CJ42 changed the title feat: add overloaded function selectors for ERC725Y feat: add overloaded function selectors of ERC725Y in constants.sol Jun 3, 2022
@frozeman frozeman merged commit a4e6b52 into develop Jun 3, 2022
@frozeman frozeman deleted the feat/constants branch June 3, 2022 14:04
@CJ42 CJ42 mentioned this pull request Jun 7, 2022
frozeman added a commit that referenced this pull request Jun 7, 2022
* chore: fix + disable linter warnings (#122)

* chore: disable linter warning for operation CREATE

* chore: add revert reason string for interface ID checks

* chore: disable + fix linter error in helpers

* chore: disable linter in utils contracts

* refactor!: remove `value` param in `DataChanged` event (#123)

* ci: add workflow to release package on NPM (#113)

* ci: add workflow steps as comment

* ci: continue draft of ERC725 release workflow

* ci: add steps for Github release + npm publish

* ci: clean comments + fix compile step

* ci(wip): comment steps for testing

* ci: update paths for marketplace gh

* test: test with a hypothetical release and CHANGELOG

* ci(wip): test worklow in branch

* ci: fix incorrect yaml syntax

* ci(wip): fix with block in gh

* ci: comment out step to check

* ci(wip): edit file path to package.json

* ci: debug by adding github token

* ci: debug file path

* ci: test: skipping version increase

* ci(wip): put diff-search to true

* ci(wip); basic test if version has increased in package.json

* ci(wip): test other steps in workflow

* ci(debug): replace `Head~` -> `HEAD`

* ci(debug): test package.json increase

* ci(debug): fix paths in release notes steps

* ci(test): add environnement variable for step check

* ci(debug): test steps with main ref check

* build: put back package.json to 3.0.3

* build: update `package-lock.json` to fix failing tests

* build: fix issue with `package-lock.json`

* docs: update CHANGELOG manually to included changes introduced since 0.3.0

* docs: add links for each version in CHANGELOT

* docs: fix hsub headings in CHANGELOG

* ci!: edit release CI to run only on `main`

* ci: fix comments

* Update package.json

* feat: add overloaded function selectors of ERC725Y in `constants.sol` (#126)

* feat: add overloaded function selectors for ERC725Y

* changed the namings

Co-authored-by: Fabian Vogelsteller <[email protected]>

* style: move get / set data single function first (#127)

* style: move get / set data single first in `ERC725Y` interface

* docs: move get / set data function first in docs

* docs: move position of get / set data in interface cheat sheet

* docs: add extra space in comment of interface cheat sheet

* style: put `getData(bytes32[])` in 2nd position

* docs: put `getData(bytes32[])` in 2nd position

* style: clean the contracts (natspec, variable names, etc) (#128)

* style: change nastpec wording (#130)

* refactor: remove `Context` contract (#129)

* refactor: remove `Context` contract

* style: edit nastpec block for OwnableUnset contract

* chore(release): prepare release of 3.1.1 (#131)

* chore(release): 3.1.1

* chore: edit CHANGELOG for release 3.1.1

* chore: remove duplicates in CHANGELOG

* chore: add Context changes in CHANGELOG for 3.1.1

Co-authored-by: Fabian Vogelsteller <[email protected]>
Co-authored-by: Yamen Merhi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants