Skip to content

Commit

Permalink
Re removes grandamento and all references
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmgdr committed Jan 12, 2024
1 parent e374dd9 commit 7dfbcd6
Show file tree
Hide file tree
Showing 30 changed files with 10 additions and 1,636 deletions.
9 changes: 9 additions & 0 deletions .changeset/plenty-bananas-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@celo/contractkit': patch
---

Reremoves grandamento

While 9ab9d00eb previously removed grandamento it was added back temporarily because the celo cli required the wrappers to be available in order to execute the proposal to remove it from governance. It is now gone for good. RIP.

Due to previous removal this is not considered a breaking change.
13 changes: 0 additions & 13 deletions packages/cli/src/test-utils/grandaMento.ts

This file was deleted.

40 changes: 0 additions & 40 deletions packages/cli/src/utils/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { Address } from '@celo/connect'
import { StableToken } from '@celo/contractkit'
import { AccountsWrapper } from '@celo/contractkit/lib/wrappers/Accounts'
import { GovernanceWrapper, ProposalStage } from '@celo/contractkit/lib/wrappers/Governance'
import {
ExchangeProposalState,
GrandaMentoWrapper,
} from '@celo/contractkit/lib/wrappers/GrandaMento'
import { LockedGoldWrapper } from '@celo/contractkit/lib/wrappers/LockedGold'
import { MultiSigWrapper } from '@celo/contractkit/lib/wrappers/MultiSig'
import { ValidatorsWrapper } from '@celo/contractkit/lib/wrappers/Validators'
Expand Down Expand Up @@ -103,14 +99,6 @@ class CheckBuilder {
}
}

withGrandaMento<A>(f: (accounts: GrandaMentoWrapper) => A): () => Promise<Resolve<A>> {
return async () => {
const kit = await this.getKit()
const accounts = await kit.contracts.getGrandaMento()
return f(accounts) as Resolve<A>
}
}

withGovernance<A>(
f: (governance: GovernanceWrapper, signer: Address, account: Address, ctx: CheckBuilder) => A
): () => Promise<Resolve<A>> {
Expand Down Expand Up @@ -150,34 +138,6 @@ class CheckBuilder {
this.withGovernance((governance) => governance.proposalExists(proposalID))
)

grandaMentoProposalExists = (proposalID: string) =>
this.addCheck(
`${proposalID} is an existing proposal`,
this.withGrandaMento((grandaMento) => grandaMento.exchangeProposalExists(proposalID))
)

grandaMentoProposalHasState = (proposalID: string, state: ExchangeProposalState) =>
this.addCheck(
`${proposalID} has state ${ExchangeProposalState[state]}`,
this.withGrandaMento(async (grandaMento) => {
const exchangeProposal = await grandaMento.getExchangeProposal(proposalID)
return exchangeProposal.state === state
})
)

grandaMentoProposalIsExecutable = (proposalID: string) => {
this.grandaMentoProposalHasState(proposalID, ExchangeProposalState.Approved)
return this.addCheck(
`${proposalID} veto period has elapsed`,
this.withGrandaMento(async (grandaMento) => {
const exchangeProposal = await grandaMento.getExchangeProposal(proposalID)
return exchangeProposal.approvalTimestamp
.plus(exchangeProposal.vetoPeriodSeconds)
.isLessThanOrEqualTo(Date.now() / 1000)
})
)
}

proposalInStage = (proposalID: string, stage: keyof typeof ProposalStage) =>
this.addCheck(
`${proposalID} is in stage ${stage}`,
Expand Down
125 changes: 0 additions & 125 deletions packages/docs/command-line-interface/grandamento.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/docs/sdk/docs/contractkit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ There are many core contracts.
- GasPriceMinimumWrapper
- GoldTokenWrapper
- GovernanceWrapper
- GrandaMentoWrapper
- LockedGoldWrapper
- MultiSigWrapper
- ReserveWrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Consider Using {@link MiniWrapperCache}, building your own, or if you only need
* [getGasPriceMinimum](_contract_cache_.wrappercache.md#getgaspriceminimum)
* [getGoldToken](_contract_cache_.wrappercache.md#getgoldtoken)
* [getGovernance](_contract_cache_.wrappercache.md#getgovernance)
* [getGrandaMento](_contract_cache_.wrappercache.md#getgrandamento)
* [getLockedGold](_contract_cache_.wrappercache.md#getlockedgold)
* [getMultiSig](_contract_cache_.wrappercache.md#getmultisig)
* [getReserve](_contract_cache_.wrappercache.md#getreserve)
Expand Down Expand Up @@ -282,16 +281,6 @@ ___

___

### getGrandaMento

**getGrandaMento**(): *Promise‹[GrandaMentoWrapper](_wrappers_grandamento_.grandamentowrapper.md)‹››*

*Defined in [packages/sdk/contractkit/src/contract-cache.ts:178](https://github.com/celo-org/celo-monorepo/blob/master/packages/sdk/contractkit/src/contract-cache.ts#L178)*

**Returns:** *Promise‹[GrandaMentoWrapper](_wrappers_grandamento_.grandamentowrapper.md)‹››*

___

### getLockedGold

**getLockedGold**(): *Promise‹[LockedGoldWrapper](_wrappers_lockedgold_.lockedgoldwrapper.md)‹››*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

[GasPriceMinimumWrapper](_wrappers_gaspriceminimum_.gaspriceminimumwrapper.md)

[GrandaMentoWrapper](_wrappers_grandamento_.grandamentowrapper.md)

[ReserveWrapper](_wrappers_reserve_.reservewrapper.md)

[SortedOraclesWrapper](_wrappers_sortedoracles_.sortedoracleswrapper.md)
Expand Down
Loading

0 comments on commit 7dfbcd6

Please sign in to comment.