Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"typescript": "5.3.3"
},
"resolutions": {
"@celo/abis": "file:/Users/martinvol/celo/celo-monorepo/packages/protocol/abis/celo-abis-13.0.0-post-audit.0.tgz",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work in the CI, this has to be reverted once the new version ABI's are published after celo-org/celo-monorepo#11745 gets merged

"web3": "1.10.4",
"web3-utils": "1.10.4",
"blind-threshold-bls": "npm:@celo/blind-threshold-bls@1.0.0-beta",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ exports[`network:contracts when version can be obtained runs 2`] = `
"implementation": "0x67bd72d0101905B1928E56f3204058c8C2D53251",
"version": "NONE"
},
{
"contract": "Reserve",
"proxy": "0x153193d9b852Dd791565a2929110282976040e54",
"implementation": "0x6DDBd2A88C55e28ac8283c43D1F7100C295283fb",
"version": "1.1.2.2"
},
{
"contract": "ScoreManager",
"proxy": "0x26B262FbaB2E243a4CEFD2Dbde9e1C203BaCd732",
Expand Down Expand Up @@ -302,12 +296,6 @@ exports[`network:contracts when version cant be obtained still prints rest of co
"implementation": "0x67bd72d0101905B1928E56f3204058c8C2D53251",
"version": "NONE"
},
{
"contract": "Reserve",
"proxy": "0x153193d9b852Dd791565a2929110282976040e54",
"implementation": "0x6DDBd2A88C55e28ac8283c43D1F7100C295283fb",
"version": "1.2.3.4"
},
{
"contract": "ScoreManager",
"proxy": "0x26B262FbaB2E243a4CEFD2Dbde9e1C203BaCd732",
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/src/commands/network/parameters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ testWithAnvilL2('network:parameters', (web3) => {
LockedCelo:
totalLockedGold: 120000000000000000000000 (~1.200e+23)
unlockingPeriod: 6 hours
Reserve:
frozenReserveGoldDays: 0
frozenReserveGoldStartBalance: 0
frozenReserveGoldStartDay: 20278 (~2.028e+4)
otherReserveAddresses:

tobinTaxStalenessThreshold: 3153600000 (~3.154e+9)
SortedOracles:
reportExpiry: 5 minutes
Validators:
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/src/packages-to-be/stable-tokens.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stableTokenABI, stableTokenBrlABI, stableTokenEurABI } from '@celo/abis'
import { ierc20CeloTokensABI } from '@celo/abis'
import { resolveAddress } from '@celo/actions'
import { Client, getContract, GetContractReturnType, PublicClient } from 'viem'

Expand All @@ -7,12 +7,12 @@ export async function getStableTokenUSDContract<T extends Client = PublicClient>
): Promise<StableTokenUSD<T>> {
return getContract({
address: await resolveAddress(client, 'StableToken'),
abi: stableTokenABI,
abi: ierc20CeloTokensABI,
client,
})
}
export type StableTokenUSD<T extends Client = PublicClient> = GetContractReturnType<
typeof stableTokenABI,
typeof ierc20CeloTokensABI,
T
>

Expand All @@ -21,12 +21,12 @@ export async function getStableTokenEurContract<T extends Client = PublicClient>
): Promise<StableTokenEUR<T>> {
return getContract({
address: await resolveAddress(client, 'StableTokenEUR'),
abi: stableTokenEurABI,
abi: ierc20CeloTokensABI,
client,
})
}
export type StableTokenEUR<T extends Client = PublicClient> = GetContractReturnType<
typeof stableTokenEurABI,
typeof ierc20CeloTokensABI,
T
>

Expand All @@ -35,12 +35,12 @@ export async function getStableTokenBrlContract<T extends Client = PublicClient>
): Promise<StableTokenBRL<T>> {
return getContract({
address: await resolveAddress(client, 'StableTokenBRL'),
abi: stableTokenBrlABI,
abi: ierc20CeloTokensABI,
client,
})
}
export type StableTokenBRL<T extends Client = PublicClient> = GetContractReturnType<
typeof stableTokenBrlABI,
typeof ierc20CeloTokensABI,
T
>

Expand Down
2 changes: 0 additions & 2 deletions packages/cli/src/transfer-stable-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export abstract class TransferStableBase extends BaseCommand {
)![0] as StableToken
let stableTokenContract: StableTokenContract<typeof wallet>
try {
// @ts-expect-error - this should be StableTokenContract by for some
// reason it returns `any`
stableTokenContract = await this._stableCurrencyContract(wallet.extend(publicActions))
} catch {
failWith(`The ${stableToken} token was not deployed yet`)
Expand Down
1 change: 0 additions & 1 deletion packages/sdk/contractkit/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export enum CeloContract {
MultiSig = 'MultiSig',
OdisPayments = 'OdisPayments',
Registry = 'Registry',
Reserve = 'Reserve',
ScoreManager = 'ScoreManager',
SortedOracles = 'SortedOracles',
StableToken = 'StableToken',
Expand Down
6 changes: 0 additions & 6 deletions packages/sdk/contractkit/src/contract-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { GovernanceWrapper } from './wrappers/Governance'
import { LockedGoldWrapper } from './wrappers/LockedGold'
import { MultiSigWrapper } from './wrappers/MultiSig'
import { OdisPaymentsWrapper } from './wrappers/OdisPayments'
import { ReserveWrapper } from './wrappers/Reserve'
import { ScoreManagerWrapper } from './wrappers/ScoreManager'
import { SortedOraclesWrapper } from './wrappers/SortedOracles'
import { StableTokenWrapper } from './wrappers/StableTokenWrapper'
Expand All @@ -38,7 +37,6 @@ const WrapperFactories = {
[CeloContract.CeloToken]: GoldTokenWrapper,
[CeloContract.MultiSig]: MultiSigWrapper,
[CeloContract.OdisPayments]: OdisPaymentsWrapper,
[CeloContract.Reserve]: ReserveWrapper,
[CeloContract.ScoreManager]: ScoreManagerWrapper,
[CeloContract.StableToken]: StableTokenWrapper,
[CeloContract.StableTokenEUR]: StableTokenWrapper,
Expand Down Expand Up @@ -87,7 +85,6 @@ interface WrapperCacheMap {
[CeloContract.LockedGold]?: LockedGoldWrapper
[CeloContract.MultiSig]?: MultiSigWrapper
[CeloContract.OdisPayments]?: OdisPaymentsWrapper
[CeloContract.Reserve]?: ReserveWrapper
[CeloContract.ScoreManager]?: ScoreManagerWrapper
[CeloContract.SortedOracles]?: SortedOraclesWrapper
[CeloContract.StableToken]?: StableTokenWrapper
Expand Down Expand Up @@ -169,9 +166,6 @@ export class WrapperCache implements ContractCacheType {
getOdisPayments() {
return this.getContract(CeloContract.OdisPayments)
}
getReserve() {
return this.getContract(CeloContract.Reserve)
}
getScoreManager() {
return this.getContract(CeloContract.ScoreManager)
}
Expand Down
3 changes: 0 additions & 3 deletions packages/sdk/contractkit/src/kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { AttestationsConfig } from './wrappers/Attestations'
import { ElectionConfig } from './wrappers/Election'
import { GovernanceConfig } from './wrappers/Governance'
import { LockedGoldConfig } from './wrappers/LockedGold'
import { ReserveConfig } from './wrappers/Reserve'
import { SortedOraclesConfig } from './wrappers/SortedOracles'
import { StableTokenConfig } from './wrappers/StableTokenWrapper'
import { ValidatorsConfig } from './wrappers/Validators'
Expand Down Expand Up @@ -65,7 +64,6 @@ export interface NetworkConfig {
governance: GovernanceConfig
lockedGold: LockedGoldConfig
sortedOracles: SortedOraclesConfig
reserve: ReserveConfig
validators: ValidatorsConfig
}

Expand Down Expand Up @@ -135,7 +133,6 @@ export class ContractKit {
CeloContract.Governance,
CeloContract.LockedCelo,
CeloContract.SortedOracles,
CeloContract.Reserve,
CeloContract.Validators,
CeloContract.FeeCurrencyDirectory,
CeloContract.EpochManager,
Expand Down
8 changes: 5 additions & 3 deletions packages/sdk/contractkit/src/mini-contract-cache.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { newAccounts } from '@celo/abis/web3/Accounts'
import { newGoldToken } from '@celo/abis/web3/GoldToken'
import { newStableToken } from '@celo/abis/web3/mento/StableToken'
import { newStableTokenBRL } from '@celo/abis/web3/mento/StableTokenBRL'
import { newStableTokenEUR } from '@celo/abis/web3/mento/StableTokenEUR'
import { newIERC20CeloTokens } from '@celo/abis/web3/IERC20CeloTokens'
import { StableToken } from '@celo/base'
import { Connection } from '@celo/connect'
import { AddressRegistry } from './address-registry'
Expand All @@ -13,6 +11,10 @@ import { AccountsWrapper } from './wrappers/Accounts'
import { GoldTokenWrapper } from './wrappers/GoldTokenWrapper'
import { StableTokenWrapper } from './wrappers/StableTokenWrapper'

const newStableToken = newIERC20CeloTokens
const newStableTokenBRL = newIERC20CeloTokens
const newStableTokenEUR = newIERC20CeloTokens

const MINIMUM_CONTRACTS = {
[CeloContract.Accounts]: {
newInstance: newAccounts,
Expand Down
4 changes: 1 addition & 3 deletions packages/sdk/contractkit/src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import { ABI as ScoreManagerABI } from '@celo/abis/web3/ScoreManager'
import { ABI as SortedOraclesABI } from '@celo/abis/web3/SortedOracles'
import { ABI as UniswapFeeHandlerSellerABI } from '@celo/abis/web3/UniswapFeeHandlerSeller'
import { ABI as ValidatorsABI } from '@celo/abis/web3/Validators'
import { ABI as ReserveABI } from '@celo/abis/web3/mento/Reserve'
import { ABI as StableTokenABI } from '@celo/abis/web3/mento/StableToken'
import { ABI as StableTokenABI } from '@celo/abis/web3/IERC20CeloTokens'
import { ABIDefinition, AbiItem } from '@celo/connect'
import Web3 from 'web3'

Expand Down Expand Up @@ -137,7 +136,6 @@ const initializeAbiMap = {
OdisPaymentsProxy: findInitializeAbi(OdisPaymentsABI),
ProxyProxy: findInitializeAbi(ProxyABI),
RegistryProxy: findInitializeAbi(RegistryABI),
ReserveProxy: findInitializeAbi(ReserveABI),
ScoreManagerProxy: findInitializeAbi(ScoreManagerABI),
SortedOraclesProxy: findInitializeAbi(SortedOraclesABI),
StableTokenProxy: findInitializeAbi(StableTokenABI),
Expand Down
7 changes: 1 addition & 6 deletions packages/sdk/contractkit/src/web3-contract-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { newGovernance } from '@celo/abis/web3/Governance'
import { newGovernanceSlasher } from '@celo/abis/web3/GovernanceSlasher'
import { newIERC20 } from '@celo/abis/web3/IERC20'
import { newLockedGold } from '@celo/abis/web3/LockedGold'
import { newReserve } from '@celo/abis/web3/mento/Reserve'
import { newStableToken } from '@celo/abis/web3/mento/StableToken'
import { newIERC20CeloTokens as newStableToken } from '@celo/abis/web3/IERC20CeloTokens'
import { newMentoFeeHandlerSeller } from '@celo/abis/web3/MentoFeeHandlerSeller'
import { newMultiSig } from '@celo/abis/web3/MultiSig'
import { newOdisPayments } from '@celo/abis/web3/OdisPayments'
Expand Down Expand Up @@ -58,7 +57,6 @@ export const ContractFactories = {
[CeloContract.MultiSig]: newMultiSig,
[CeloContract.OdisPayments]: newOdisPayments,
[CeloContract.Registry]: newRegistry,
[CeloContract.Reserve]: newReserve,
[CeloContract.ScoreManager]: newScoreManager,
[CeloContract.SortedOracles]: newSortedOracles,
[CeloContract.StableToken]: newStableToken,
Expand Down Expand Up @@ -150,9 +148,6 @@ export class Web3ContractCache {
getRegistry() {
return this.getContract(CeloContract.Registry)
}
getReserve() {
return this.getContract(CeloContract.Reserve)
}
getScoreManager() {
return this.getContract(CeloContract.ScoreManager)
}
Expand Down
121 changes: 0 additions & 121 deletions packages/sdk/contractkit/src/wrappers/Reserve.test.ts

This file was deleted.

Loading
Loading