@celo/contractkit"wrappers/ReleaseGold"ReleaseGoldWrapper

Class: ReleaseGoldWrapper

Contract for handling an instance of a ReleaseGold contract.

Hierarchy

ReleaseGoldWrapper

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new ReleaseGoldWrapper(kit: ContractKit, contract: ReleaseGold): ReleaseGoldWrapper

Inherited from BaseWrapper.constructor

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:30

Parameters:

Name Type
kit ContractKit
contract ReleaseGold

Returns: ReleaseGoldWrapper

Properties

_relockGold

_relockGold: function = proxySend( this.kit, this.contract.methods.relockGold, tupleParser(valueToString, valueToString) )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:372

Relocks gold that has been unlocked but not withdrawn.

param The index of the pending withdrawal to relock from.

param The value to relock from the specified pending withdrawal.

Type declaration:

▸ (index: number, value: BigNumber.Value): CeloTransactionObject‹void›

Parameters:

Name Type
index number
value BigNumber.Value

createAccount

createAccount: function = proxySend(this.kit, this.contract.methods.createAccount)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:401

Beneficiary creates an account on behalf of the ReleaseGold contract.

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

eventTypes

eventTypes: EventsEnum‹T› = Object.keys(this.events).reduce>( (acc, key) => ({ ...acc, [key]: key }), {} as any )

Inherited from BaseWrapper.eventTypes

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:61


events

events: ReleaseGold["events"] = this.contract.events

Inherited from BaseWrapper.events

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:59


getBeneficiary

getBeneficiary: function = proxyCall(this.contract.methods.beneficiary)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:103

Returns the beneficiary of the ReleaseGold contract

returns The address of the beneficiary.

Type declaration:

▸ (): Promise‹Address›


getCanValidate

getCanValidate: function = proxyCall(this.contract.methods.canValidate)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:135

Returns true if the contract can validate

returns If the contract can validate

Type declaration:

▸ (): Promise‹boolean›


getCanVote

getCanVote: function = proxyCall(this.contract.methods.canVote)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:141

Returns true if the contract can vote

returns If the contract can vote

Type declaration:

▸ (): Promise‹boolean›


getCurrentReleasedTotalAmount

getCurrentReleasedTotalAmount: function = proxyCall( this.contract.methods.getCurrentReleasedTotalAmount, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:267

Returns the total amount that has already released up to now

returns The already released gold amount up to the point of call

Type declaration:

▸ (): Promise‹BigNumber›


getLiquidityProvisionMet

getLiquidityProvisionMet: function = proxyCall( this.contract.methods.liquidityProvisionMet )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:127

Returns true if the liquidity provision has been met for this contract

returns If the liquidity provision is met.

Type declaration:

▸ (): Promise‹boolean›


getMaxDistribution

getMaxDistribution: function = proxyCall( this.contract.methods.maxDistribution, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:158

Returns the maximum amount of gold (regardless of release schedule) currently allowed for release.

returns The max amount of gold currently withdrawable.

Type declaration:

▸ (): Promise‹BigNumber›


getOwner

getOwner: function = proxyCall(this.contract.methods.owner)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:121

Returns the owner's address of the ReleaseGold contract

returns The owner's address.

Type declaration:

▸ (): Promise‹Address›


getRefundAddress

getRefundAddress: function = proxyCall(this.contract.methods.refundAddress)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:115

Returns the refund address of the ReleaseGold contract

returns The refundAddress.

Type declaration:

▸ (): Promise‹Address›


getReleaseOwner

getReleaseOwner: function = proxyCall(this.contract.methods.releaseOwner)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:109

Returns the releaseOwner address of the ReleaseGold contract

returns The address of the releaseOwner.

Type declaration:

▸ (): Promise‹Address›


getRemainingLockedBalance

getRemainingLockedBalance: function = proxyCall( this.contract.methods.getRemainingLockedBalance, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:257

Returns the remaining locked gold balance in the ReleaseGold instance

returns The remaining locked ReleaseGold instance gold balance

Type declaration:

▸ (): Promise‹BigNumber›


getRemainingTotalBalance

getRemainingTotalBalance: function = proxyCall( this.contract.methods.getRemainingTotalBalance, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:237

Returns the the sum of locked and unlocked gold in the ReleaseGold instance

returns The remaining total ReleaseGold instance balance

Type declaration:

▸ (): Promise‹BigNumber›


getRemainingUnlockedBalance

getRemainingUnlockedBalance: function = proxyCall( this.contract.methods.getRemainingUnlockedBalance, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:247

Returns the remaining unlocked gold balance in the ReleaseGold instance

returns The available unlocked ReleaseGold instance gold balance

Type declaration:

▸ (): Promise‹BigNumber›


getTotalBalance

getTotalBalance: function = proxyCall( this.contract.methods.getTotalBalance, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:227

Returns the total balance of the ReleaseGold instance

returns The total ReleaseGold instance balance

Type declaration:

▸ (): Promise‹BigNumber›


getTotalWithdrawn

getTotalWithdrawn: function = proxyCall( this.contract.methods.totalWithdrawn, undefined, valueToBigNumber )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:147

Returns the total withdrawn amount from the ReleaseGold contract

returns The total withdrawn amount from the ReleaseGold contract

Type declaration:

▸ (): Promise‹BigNumber›


isRevoked

isRevoked: function = proxyCall(this.contract.methods.isRevoked)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:203

Indicates if the release grant is revoked or not

returns A boolean indicating revoked releasing (true) or non-revoked(false).

Type declaration:

▸ (): Promise‹boolean›


lockGold

lockGold: function = proxySend( this.kit, this.contract.methods.lockGold, tupleParser(valueToString) )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:301

Locks gold to be used for voting.

param The amount of gold to lock

Type declaration:

▸ (value: BigNumber.Value): CeloTransactionObject‹void›

Parameters:

Name Type
value BigNumber.Value

methodIds

methodIds: Record‹keyof T["methods"], string› = Object.keys(this.contract.methods).reduce, string>>( (acc, method: Methods) => { const methodABI = this.contract.options.jsonInterface.find((item) => item.name === method)

  acc[method] =
    methodABI === undefined
      ? '0x'
      : this.kit.connection.getAbiCoder().encodeFunctionSignature(methodABI)

  return acc
},
{} as any

)

Inherited from BaseWrapper.methodIds

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:66


refundAndFinalize

refundAndFinalize: function = proxySend( this.kit, this.contract.methods.refundAndFinalize )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:292

Refund refundAddress and beneficiary after the ReleaseGold schedule has been revoked.

returns A CeloTransactionObject

Type declaration:

▸ (): CeloTransactionObject‹void›


revokeBeneficiary

revokeBeneficiary: function = this.revokeReleasing

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:286

Revoke a vesting CELO schedule from the contract's beneficiary.

returns A CeloTransactionObject

Type declaration:

▸ (): CeloTransactionObject‹void›


revokeReleasing

revokeReleasing: function = proxySend( this.kit, this.contract.methods.revoke )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:277

Revoke a Release schedule

returns A CeloTransactionObject

Type declaration:

▸ (): CeloTransactionObject‹void›


setAccount

setAccount: function = proxySend(this.kit, this.contract.methods.setAccount)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:409

Beneficiary creates an account on behalf of the ReleaseGold contract.

param The name to set

param The key to set

param The address to set

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setAccountDataEncryptionKey

setAccountDataEncryptionKey: function = proxySend( this.kit, this.contract.methods.setAccountDataEncryptionKey )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:433

Sets the data encryption of the account

param The key to set

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setAccountMetadataURL

setAccountMetadataURL: function = proxySend(this.kit, this.contract.methods.setAccountMetadataURL)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:421

Sets the metadataURL for the account

param The url to set

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setAccountName

setAccountName: function = proxySend(this.kit, this.contract.methods.setAccountName)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:415

Sets the name for the account

param The name to set

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setAccountWalletAddress

setAccountWalletAddress: function = proxySend(this.kit, this.contract.methods.setAccountWalletAddress)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:427

Sets the wallet address for the account

param The address to set

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setBeneficiary

setBeneficiary: function = proxySend(this.kit, this.contract.methods.setBeneficiary)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:457

Sets the contract's beneficiary

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setCanExpire

setCanExpire: function = proxySend(this.kit, this.contract.methods.setCanExpire)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:447

Sets the contract's canExpire field to _canExpire

param If the contract can expire EXPIRATION_TIME after the release schedule finishes.

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setLiquidityProvision

setLiquidityProvision: function = proxySend(this.kit, this.contract.methods.setLiquidityProvision)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:441

Sets the contract's liquidity provision to true

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

setMaxDistribution

setMaxDistribution: function = proxySend(this.kit, this.contract.methods.setMaxDistribution)

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:452

Sets the contract's max distribution

Type declaration:

▸ (...args: InputArgs): CeloTransactionObject‹Output›

Parameters:

Name Type
...args InputArgs

transfer

transfer: function = proxySend( this.kit, this.contract.methods.transfer, tupleParser(stringIdentity, valueToString) )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:307

Type declaration:

▸ (to: Address, value: BigNumber.Value): CeloTransactionObject‹void›

Parameters:

Name Type
to Address
value BigNumber.Value

unlockGold

unlockGold: function = proxySend( this.kit, this.contract.methods.unlockGold, tupleParser(valueToString) )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:317

Unlocks gold that becomes withdrawable after the unlocking period.

param The amount of gold to unlock

Type declaration:

▸ (value: BigNumber.Value): CeloTransactionObject‹void›

Parameters:

Name Type
value BigNumber.Value

withdraw

withdraw: function = proxySend( this.kit, this.contract.methods.withdraw, tupleParser(valueToString) )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:392

Transfer released gold from the ReleaseGold instance back to beneficiary.

param The requested gold amount

Type declaration:

▸ (value: BigNumber.Value): CeloTransactionObject‹void›

Parameters:

Name Type
value BigNumber.Value

withdrawLockedGold

withdrawLockedGold: function = proxySend( this.kit, this.contract.methods.withdrawLockedGold, tupleParser(valueToString) )

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:382

Withdraw gold in the ReleaseGold instance that has been unlocked but not withdrawn.

param The index of the pending locked gold withdrawal

Type declaration:

▸ (index: BigNumber.Value): CeloTransactionObject‹void›

Parameters:

Name Type
index BigNumber.Value

Accessors

address

get address(): string

Inherited from BaseWrapper.address

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:35

Contract address

Returns: string

Methods

authorizeAttestationSigner

authorizeAttestationSigner(signer: Address, proofOfSigningKeyPossession: Signature): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:575

Authorizes an address to sign attestation messages on behalf of the account.

Parameters:

Name Type Description
signer Address The address of the attestation signing key to authorize.
proofOfSigningKeyPossession Signature The account address signed by the signer address.

Returns: Promise‹CeloTransactionObject‹void››

A CeloTransactionObject


authorizeValidatorSigner

authorizeValidatorSigner(signer: Address, proofOfSigningKeyPossession: Signature): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:486

Authorizes an address to sign validation messages on behalf of the account.

Parameters:

Name Type Description
signer Address The address of the validator signing key to authorize.
proofOfSigningKeyPossession Signature The account address signed by the signer address.

Returns: Promise‹CeloTransactionObject‹void››

A CeloTransactionObject


authorizeValidatorSignerAndBls

authorizeValidatorSignerAndBls(signer: Address, proofOfSigningKeyPossession: Signature, blsPublicKey: string, blsPop: string): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:537

Authorizes an address to sign consensus messages on behalf of the contract's account. Also switch BLS key at the same time.

Parameters:

Name Type Description
signer Address The address of the signing key to authorize.
proofOfSigningKeyPossession Signature The contract's account address signed by the signer address.
blsPublicKey string The BLS public key that the validator is using for consensus, should pass proof of possession. 48 bytes.
blsPop string The BLS public key proof-of-possession, which consists of a signature on the account address. 96 bytes.

Returns: Promise‹CeloTransactionObject‹void››

A CeloTransactionObject


authorizeVoteSigner

authorizeVoteSigner(signer: Address, proofOfSigningKeyPossession: Signature): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:465

Authorizes an address to sign votes on behalf of the account.

Parameters:

Name Type Description
signer Address The address of the vote signing key to authorize.
proofOfSigningKeyPossession Signature The account address signed by the signer address.

Returns: Promise‹CeloTransactionObject‹void››

A CeloTransactionObject


getHumanReadableReleaseSchedule

getHumanReadableReleaseSchedule(): Promise‹object›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:88

Returns the underlying Release schedule of the ReleaseGold contract

Returns: Promise‹object›

A ReleaseSchedule.


getPastEvents

getPastEvents(event: Events‹ReleaseGold›, options: PastEventOptions): Promise‹EventLog[]›

Inherited from BaseWrapper.getPastEvents

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:55

Contract getPastEvents

Parameters:

Name Type
event Events‹ReleaseGold›
options PastEventOptions

Returns: Promise‹EventLog[]›


getReleaseSchedule

getReleaseSchedule(): Promise‹ReleaseSchedule›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:72

Returns the underlying Release schedule of the ReleaseGold contract

Returns: Promise‹ReleaseSchedule›

A ReleaseSchedule.


getReleasedBalanceAtRevoke

getReleasedBalanceAtRevoke(): Promise‹string›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:218

Returns the balance of released gold when the grant was revoked

Returns: Promise‹string›

The balance at revocation time. 0 can also indicate not revoked.


getRevocationInfo

getRevocationInfo(): Promise‹RevocationInfo›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:168

Returns the underlying Revocation Info of the ReleaseGold contract

Returns: Promise‹RevocationInfo›

A RevocationInfo struct.


getRevokeTime

getRevokeTime(): Promise‹number›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:209

Returns the time at which the release schedule was revoked

Returns: Promise‹number›

The timestamp of the release schedule revocation


isRevocable

isRevocable(): Promise‹boolean›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:194

Indicates if the release grant is revocable or not

Returns: Promise‹boolean›

A boolean indicating revocable releasing (true) or non-revocable(false).


relockGold

relockGold(value: BigNumber.Value): Promise‹Array‹CeloTransactionObject‹void›››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:334

Relocks gold in the ReleaseGold instance that has been unlocked but not withdrawn.

Parameters:

Name Type Description
value BigNumber.Value The value to relock from the specified pending withdrawal.

Returns: Promise‹Array‹CeloTransactionObject‹void›››


revoke

revoke(account: Address, group: Address, value: BigNumber): Promise‹Array‹CeloTransactionObject‹void›››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:665

Revokes value from pending/active aggregate

deprecated prefer revokeValueFromVotes

Parameters:

Name Type Description
account Address The account to revoke from.
group Address The group to revoke the vote for.
value BigNumber The amount of gold to revoke.

Returns: Promise‹Array‹CeloTransactionObject‹void›››


revokeActive

revokeActive(account: Address, group: Address, value: BigNumber): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:631

Revokes active votes

deprecated Prefer revokeActiveVotes

Parameters:

Name Type Description
account Address The account to revoke from.
group Address The group to revoke the vote for.
value BigNumber The amount of gold to revoke.

Returns: Promise‹CeloTransactionObject‹void››


revokeActiveVotes

revokeActiveVotes(group: Address, value: BigNumber): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:655

Revokes active votes

Parameters:

Name Type Description
group Address The group to revoke the vote for.
value BigNumber The amount of gold to revoke.

Returns: Promise‹CeloTransactionObject‹void››


revokeAllVotesForAllGroups

revokeAllVotesForAllGroups(): Promise‹CeloTransactionObject‹void›[]›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:713

Returns: Promise‹CeloTransactionObject‹void›[]›


revokeAllVotesForGroup

revokeAllVotesForGroup(group: Address): Promise‹CeloTransactionObject‹void›[]›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:695

Parameters:

Name Type
group Address

Returns: Promise‹CeloTransactionObject‹void›[]›


revokePending

revokePending(account: Address, group: Address, value: BigNumber): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:597

Revokes pending votes

deprecated prefer revokePendingVotes

Parameters:

Name Type Description
account Address The account to revoke from.
group Address -
value BigNumber The amount of gold to revoke.

Returns: Promise‹CeloTransactionObject‹void››


revokePendingVotes

revokePendingVotes(group: Address, value: BigNumber): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:621

Revokes pending votes

Parameters:

Name Type Description
group Address -
value BigNumber The amount of gold to revoke.

Returns: Promise‹CeloTransactionObject‹void››


revokeValueFromVotes

revokeValueFromVotes(group: Address, value: BigNumber): Promise‹CeloTransactionObject‹void›[]›

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:692

Revokes value from pending/active aggregate

Parameters:

Name Type Description
group Address The group to revoke the vote for.
value BigNumber The amount of gold to revoke.

Returns: Promise‹CeloTransactionObject‹void›[]›


unlockAllGold

unlockAllGold(): Promise‹CeloTransactionObject‹void››

Defined in packages/sdk/contractkit/src/wrappers/ReleaseGold.ts:323

Returns: Promise‹CeloTransactionObject‹void››


version

version(): Promise‹NonNullable‹T["methods"] extends object ? ContractVersion<> : never››

Inherited from BaseWrapper.version

Defined in packages/sdk/contractkit/src/wrappers/BaseWrapper.ts:39

Returns: Promise‹NonNullable‹T["methods"] extends object ? ContractVersion<> : never››