Skip to content

Commit

Permalink
Merge branch 'master' into aaronmgdr/cli-notice
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrugneaux authored Feb 27, 2024
2 parents 646d355 + eeeba23 commit d8393a0
Show file tree
Hide file tree
Showing 46 changed files with 1,178 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .changeset/good-cheetahs-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/celocli': patch
---

Fix issue where core contracts not having proxy could break cli
5 changes: 5 additions & 0 deletions .changeset/two-poems-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/celocli': patch
---

Require addresses the cli sends from or to not to be sanctioned
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# Developer Tooling

> **NOTE** This is a relatively new repository and is still under active development.
> Some of the packages and release processes may not be fully documented yet.
This repository contains the source code for various JS/TS developer tools and CLI(s) released by cLabs
for the Celo community.

This includes:
## How we work

We are a GitHub-first team, which means we have a strong preference for communicating via GitHub.
Please use GitHub to:

🐞 [File a bug report](https://github.com/celo-org/developer-tooling/issues/new/choose)

💬 [Ask a question](https://github.com/celo-org/developer-tooling/discussions)

[Suggest a feature](httpsi//github.com/celo-org/developer-tooling/issues/new/choose)

🧑‍💻 [Contribute!](/CONTRIBUTING.md)

🚔 [Report a security vulnerability](https://github.com/celo-org/developer-tooling/issues/new/choose)

> [!TIP]
>
> Please avoid messaging us via Slack, Telegram, or email. We are more likely to respond to you on
> GitHub than if you message us anywhere else. We actively monitor GitHub, and will get back to you shortly 🌟
## Code

This repository contains source code for:

- [`@celo/celocli`](https://www.npmjs.com/package/@celo/celocli)
- [`@celo/base`](https://www.npmjs.com/package/@celo/base)
Expand All @@ -17,7 +36,7 @@ This includes:
- [`@celo/governance`](https://www.npmjs.com/package/@celo/governance)
- [`@celo/keystore`](https://www.npmjs.com/package/@celo/keystores)
- [`@celo/network-utils`](https://www.npmjs.com/package/@celo/network-utils)
- [`@celo/phone-utils`](https://www.npmjs.com/package/@celo/phone-utils) (may be deprecated soon ⚠️)
- [`@celo/phone-utils`](https://www.npmjs.com/package/@celo/phone-utils)
- [`@celo/transaction-uri`](https://www.npmjs.com/package/@celo/transactions-uri)
- Wallet related packages including:
- [`@celo/wallet-base`](https://www.npmjs.com/package/@celo/wallet-base)
Expand Down
20 changes: 20 additions & 0 deletions packages/cli/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"dependencies": {
"@celo/abis": "10.0.0",
"@celo/base": "^6.0.0",
"@celo/compliance": "~1.0.17",
"@celo/connect": "^5.1.2",
"@celo/contractkit": "^7.0.0",
"@celo/cryptographic-utils": "^5.0.7",
Expand All @@ -60,6 +61,7 @@
"bip32": "3.1.0",
"chalk": "^2.4.2",
"command-exists": "^1.2.9",
"cross-fetch": "3.0.6",
"debug": "^4.1.1",
"ethers": "5",
"fs-extra": "^8.1.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/src/commands/exchange/celo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ export default class ExchangeCelo extends BaseCommand {
const minBuyAmount = res.flags.forAtLeast
const stableToken = stableTokenOptions[res.flags.stableToken]

await newCheckBuilder(this).hasEnoughCelo(res.flags.from, sellAmount).runChecks()
await newCheckBuilder(this)
.isNotSanctioned(res.flags.from)
.hasEnoughCelo(res.flags.from, sellAmount)
.runChecks()

const [celoToken, stableTokenAddress, { mento, brokerAddress }] = await Promise.all([
kit.contracts.getGoldToken(),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/lockedgold/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class Withdraw extends BaseCommand {
kit.defaultAccount = flags.from
const lockedgold = await kit.contracts.getLockedGold()

await newCheckBuilder(this).isAccount(flags.from).runChecks()
await newCheckBuilder(this).isAccount(flags.from).isNotSanctioned(flags.from).runChecks()

const currentTime = Math.round(new Date().getTime() / 1000)
let madeWithdrawal = false
Expand Down
Loading

0 comments on commit d8393a0

Please sign in to comment.