SIP 17: Bytes4 to Bytes32 currencyKeys Source

AuthorJackson Chan, Clinton Ennis
Discussions-Tohttps://discord.gg/CDTvjHY
StatusImplemented
Created2019-08-29

Simple Summary

Upgrade type of currencyKeys from Bytes4 to Bytes32.

Abstract

Synthetix wants to create new synths with symbols longer than 4 chars. i.e sATOM, sDEFI This is currently not possible with currencyKeys type defined as Bytes4.

Motivation

The system was originally built with currencyKeys as Bytes4 to save storage space. However the system requirements have changed to require Symbols longer than 4 charactors for Synths like the DeFI index token sDEFI.

Specification

Change all instances of Bytes4 to Bytes32 in Synth.sol and Synthetix.sol.

Rationale

Test Cases

https://github.com/Synthetixio/synthetix/commit/908028f492187bb85dd519db4435d9c1964f8b4c

Implementation

https://github.com/Synthetixio/synthetix/commit/908028f492187bb85dd519db4435d9c1964f8b4c

Copyright and related rights waived via CC0.