-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(connection): updates docstring for `defaultFeeCurrency` ERC20 address should be whitelisted, but this is not checked or enforced. * refactor(kit): updates `setFeeCurrency` - becomes synchronous call - accepts `string` instead of `CeloTokenContract` * chore(setFeeCurrency): adds hex type and address validation Does NOT validate it's a whitelisted fee currency, but asserts it's a valid hexadecimal address. * nit(connect): adds feeCurrency type todo * chore(kit): adds error handling in `setFeeCurrency` I checked how errors are handled in other places. For example: https://github.com/celo-org/developer-tooling/blob/319d00d54569b421dc994cb7848b7c96c1b524bf/packages/sdk/base/src/contacts.ts#L15 * nit(contrackit): adds TODO in README code example * chore(kit): adds `throws` docstring in `setFeeCurrency` For better developer experience * nit(contrackit): adds another TODO in README code example * nit(cli): adds TODO related to `setFeeCurrency` * nit(connect): adds TODO related to hex address typing * chore(kit): uses `isAddress` instead of `isHexString` - web3js > `isAddress` - @celo/base > `isHexString` * chore(cli): automatic linting * nit(CONTRIBUTING): fixes incorrect hyperlink * chore(cli): adds TODOs re fee currencies * chore(cli): adds pseudo-code to fetch fee currency whitelist on-chain * chore(contractkit): adds TODO in README * chore(cli): implements `getGasOptions` helper function Untested, not sure this works as expected. * chore(cli): adds TODO notes on `gasOptions` * test(cli): adds test for `getGasOptions` helper function * nit(README): fixes title To be consistent with other READMEs, which use the package name as title * test(helpers): fixes bug that caused test to fail Passes as expected now. * chore(cli): adds TODO * chore(helpers): removes `return await` In favour of `return ... as Promise<..>` (which is the same as `return await ...`) Also renames the function for better readability * chore(cli): adds TODOs and updates example * chore(cli): adds incomplete/WIP changes Committing my current work in progress, before handing over to Nico * feat: change feeCurrency to be a StrongAddress is most places * chore: regenerate docs * chore: upgrade celo abis cr11 * fix: only throw if the flag has been passed and the value is undefined * fix: celocli tests * fix: add feecurency whitelisted currencies * test: add wrong feeCurrency test * test: add failing tests * fix: gas estimation when submitting a tx * fix: test * fix: proper gas/value check * refactor: test displays the faulty value * chore: regenerate docs * fix: rollback to celo-legacy tx * chore: regenerate docs * fix: revert some unwanted chaanges * fix: remove CELO from the whitelisted currencies * refactor: Address->StrongAddress * fix: tests failing due to StrongAddress typings * feat(BREAKING): change default behaviour of transfer commands to defaults to eip1559 if no --gasCurrency flag was passed * fix: StrongAddress * fix: type * chore: regenerate docs * fix: getting gas balance * fix: ElectionActivate tests * chore: regenerate docs * feat: add FeeCurrencyWhitelist wrapper and refactor kit and cli to use it * await registerAccount() to pass all checks for "shows no pending votes" election:activate test * chore: remove pasted comments * chore: regenerate docs * fix: gasCurrency fallback * chore: remove comment * feat: handle adapted token in the whitelist * fix: prevent unecessary network call for every command * fix: ts-expect-error directive * chore: regenerate docs * chore: add changeset * fix: handle feeCurrency capitalization * fix: handle compatibility issues with config and gasCurrency * refactor: some PR review feedback addressed * fix: handle CELO as a gasCurrency * chore: add one changeset per package changed * test: test adapted tokens too * fix: handle CELO capitalization --------- Co-authored-by: Nicolas Brugneaux <[email protected]> Co-authored-by: Leszek Stachowski <[email protected]> Co-authored-by: Leszek Stachowski <[email protected]>
- Loading branch information
1 parent
fd8c6c9
commit d6d82e8
Showing
159 changed files
with
1,949 additions
and
985 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@celo/contractkit': major | ||
--- | ||
|
||
The following changes are related to adding support for more fee currencies in the @celo packages. | ||
|
||
(BREAKING): `setFeeCurrency` changed to accept an address instead of previously accepting a StableToken | ||
(CHANGED): all places referring to gasCurrencies have been changed from `string` to `StrongAddress` for safer types. This shouldn't impact you as you already should have been giving `0x${string}` in these places | ||
(CHANGED): reinforced the types of most contract wrappers to use `StrongAddress` where appropriate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@celo/celocli': major | ||
--- | ||
|
||
The following changes are related to adding support for more fee currencies in the @celo packages. | ||
|
||
(BREAKING): `--gasCurrency` changed to accept only whitelisted addresses or the string `CELO` instead of previously accepting a StableToken or 'auto' | ||
(ADDED): `celocli network:whitelist` prints the whitelisted feeCurrencies | ||
(ADDED): the cli will automagically convert the previous gasCurrency such as cEUR, cUSD, cREAL, CELO into its address if necessary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@celo/utils': patch | ||
--- | ||
|
||
The following changes are related to adding support for more fee currencies in the @celo packages. | ||
|
||
(CHANGED): all places referring to gasCurrencies have been changed from `string` to `StrongAddress` for safer types. This shouldn't impact you as you already should have been giving `0x${string}` in these places |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@celo/connect': patch | ||
--- | ||
|
||
The following changes are related to adding support for more fee currencies in the @celo packages. | ||
|
||
(CHANGED): all places referring to gasCurrencies have been changed from `string` to `StrongAddress` for safer types. This shouldn't impact you as you already should have been giving `0x${string}` in these places |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@celo/base': patch | ||
--- | ||
|
||
The following changes are related to adding support for more fee currencies in the @celo packages. | ||
|
||
(CHANGED): all places referring to gasCurrencies have been changed from `string` to `StrongAddress` for safer types. This shouldn't impact you as you already should have been giving `0x${string}` in these places |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.