Skip to content

Commit

Permalink
rename GuessTheNumberArgs to guessArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Oct 11, 2024
1 parent 4462f5d commit e5cdb45
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/types/src/interfaces/augment-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { Assignment, AssignmentCount, AssignmentParams, Attestation, Attest
import type { FixedI64F64, IpfsCid, PalletString } from '@encointer/types/interfaces/common';
import type { AnnouncementSigner, Bip340, CidDigest, CidName, CommunityCeremony, CommunityIdentifier, CommunityMetadataType, CommunityRules, DegreeFixed, DegreeRpc, GeoHash, Location, LocationRpc, NominalIncomeType } from '@encointer/types/interfaces/community';
import type { EncointerBalanceTransferArgs, EncointerGetter, EncointerGetterArgs, EncointerPublicGetter, EncointerTrustedCall, EncointerTrustedCallSigned, EncointerTrustedGetter, EncointerTrustedGetterSigned, GrantReputationArgs, RegisterAttestationsArgs, RegisterParticipantArgs } from '@encointer/types/interfaces/encointerWorker';
import type { AttemptsArg, BalanceSetBalanceArgs, BalanceShieldArgs, BalanceTransferArgs, BalanceUnshieldArgs, GuessTheNumberArgs, GuessTheNumberInfo, GuessTheNumberPublicGetter, GuessTheNumberSetWinningsArgs, GuessTheNumberTrustedCall, GuessTheNumberTrustedGetter, GuessType, IntegriteeGetter, IntegriteePublicGetter, IntegriteeTrustedCall, IntegriteeTrustedCallSigned, IntegriteeTrustedGetter, IntegriteeTrustedGetterSigned, IntegriteeTrustedOperation, TimestampSetArgs } from '@encointer/types/interfaces/integriteeWorker';
import type { AttemptsArg, BalanceSetBalanceArgs, BalanceShieldArgs, BalanceTransferArgs, BalanceUnshieldArgs, GuessArgs, GuessTheNumberInfo, GuessTheNumberPublicGetter, GuessTheNumberSetWinningsArgs, GuessTheNumberTrustedCall, GuessTheNumberTrustedGetter, GuessType, IntegriteeGetter, IntegriteePublicGetter, IntegriteeTrustedCall, IntegriteeTrustedCallSigned, IntegriteeTrustedGetter, IntegriteeTrustedGetterSigned, IntegriteeTrustedOperation, TimestampSetArgs } from '@encointer/types/interfaces/integriteeWorker';
import type { SchedulerState, SystemNumber } from '@encointer/types/interfaces/scheduler';
import type { DirectRequestStatus, Enclave, EnclaveFingerprint, GetterArgs, ParentchainId, ParentchainInfo, ParentchainsInfo, Request, RpcReturnValue, ShardIdentifier, TrustedOperationStatus, Vault, WorkerEncoded } from '@encointer/types/interfaces/worker';
import type { Data, StorageKey } from '@polkadot/types';
Expand Down Expand Up @@ -595,7 +595,7 @@ declare module '@polkadot/types/types/registry' {
GrantReputationArgs: GrantReputationArgs;
GroupIndex: GroupIndex;
GroupRotationInfo: GroupRotationInfo;
GuessTheNumberArgs: GuessTheNumberArgs;
GuessArgs: GuessArgs;
GuessTheNumberInfo: GuessTheNumberInfo;
GuessTheNumberPublicGetter: GuessTheNumberPublicGetter;
GuessTheNumberSetWinningsArgs: GuessTheNumberSetWinningsArgs;
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/interfaces/integriteeWorker/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default {
_enum: {
set_winnings: 'GuessTheNumberSetWinningsArgs',
push_by_one_day: 'AccountId',
guess: 'GuessTheNumberArgs',
guess: 'GuessArgs',
}
},
GuessType: 'u32',
Expand All @@ -224,6 +224,6 @@ export default {
maybe_last_winning_distance: 'Option<GuessType>',
},
GuessTheNumberSetWinningsArgs: '(AccountId, Balance)',
GuessTheNumberArgs: '(AccountId, GuessType)',
GuessArgs: '(AccountId, GuessType)',
}
}
6 changes: 3 additions & 3 deletions packages/types/src/interfaces/integriteeWorker/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export interface BalanceTransferArgs extends ITuple<[AccountId, AccountId, Balan
/** @name BalanceUnshieldArgs */
export interface BalanceUnshieldArgs extends ITuple<[AccountId, AccountId, BalanceType, ShardIdentifier]> {}

/** @name GuessTheNumberArgs */
export interface GuessTheNumberArgs extends ITuple<[AccountId, GuessType]> {}
/** @name GuessArgs */
export interface GuessArgs extends ITuple<[AccountId, GuessType]> {}

/** @name GuessTheNumberInfo */
export interface GuessTheNumberInfo extends Struct {
Expand Down Expand Up @@ -55,7 +55,7 @@ export interface GuessTheNumberTrustedCall extends Enum {
readonly isPushByOneDay: boolean;
readonly asPushByOneDay: AccountId;
readonly isGuess: boolean;
readonly asGuess: GuessTheNumberArgs;
readonly asGuess: GuessArgs;
readonly type: 'SetWinnings' | 'PushByOneDay' | 'Guess';
}

Expand Down
4 changes: 2 additions & 2 deletions packages/worker-api/src/integriteeWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ export class IntegriteeWorker extends Worker {
const nonce = signerOptions?.nonce ?? await this.getNonce(account, shard, signerOptions, requestOptions)

const shardT = this.createType('ShardIdentifier', bs58.decode(shard));
const params = this.createType('GuessTheNumberArgs', [asString(account), guess])
const guessThNumberCall = guessTheNumberCall(this, ['guess', 'GuessTheNumberArgs'], params);
const params = this.createType('GuessArgs', [asString(account), guess])
const guessThNumberCall = guessTheNumberCall(this, ['guess', 'GuessArgs'], params);
const call = createTrustedCall(this, ['guess_the_number', 'GuessTheNumberTrustedCall'], guessThNumberCall);
const signed = await signTrustedCall(this, call, account, shardT, mrenclave, nonce, signerOptions);

Expand Down

0 comments on commit e5cdb45

Please sign in to comment.