Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dan)!: update nft address format #1129

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5cde4a7
fix(dan): update nft address format
therealdannzor Sep 3, 2024
0e24bb1
fix(dan): various autogenerated bindings
therealdannzor Sep 3, 2024
a14e185
fix(dan): remove print
therealdannzor Sep 3, 2024
682624d
Merge branch 'development' into fix-improve-nft-address-format
therealdannzor Sep 3, 2024
9753a80
fix(dan): update nft address format
therealdannzor Sep 3, 2024
2e6d8bc
Merge branch 'fix-improve-nft-address-format' of github.com:therealda…
therealdannzor Sep 3, 2024
ffe9835
Merge branch 'development' into fix-improve-nft-address-format
therealdannzor Sep 3, 2024
e24adf9
chore: make linter happy
therealdannzor Sep 3, 2024
8345396
Merge branch
therealdannzor Sep 3, 2024
5d5385a
fix(dan): nft format comment
therealdannzor Sep 3, 2024
605ed6a
chore: linter happy
therealdannzor Sep 3, 2024
8f0d90f
fix(dan): update nft address format
therealdannzor Sep 4, 2024
6282dd6
chore: linter happy
therealdannzor Sep 4, 2024
d7e0f4c
Merge branch 'development' into fix-improve-nft-address-format
therealdannzor Sep 4, 2024
0f4679e
Merge branch 'development' into fix-improve-nft-address-format
therealdannzor Sep 4, 2024
8dbaee2
fix(dan): refactor nft address parse
therealdannzor Sep 4, 2024
6863eb7
chore: linter and revert change
therealdannzor Sep 4, 2024
8dd22e6
ensure that substate_id to_string and from_str impls are correct (test)
sdbondi Sep 5, 2024
aa85277
rebuild bindings
sdbondi Sep 5, 2024
9430bcd
fix mint_specific_id test
sdbondi Sep 5, 2024
7ea5281
fix .license.ignore
sdbondi Sep 5, 2024
d7c253d
Merge branch 'development' into fix-improve-nft-address-format
sdbondi Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .license.ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
./applications/tari_indexer/src/substate_storage_sqlite/schema.rs
./networking/sqlite_message_logger/src/schema.rs
./dan_layer/bindings/src/types/Account.ts
./dan_layer/bindings/src/types/Claims.ts
./dan_layer/bindings/src/types/ConfidentialTransferInputSelection.ts
./dan_layer/bindings/src/types/JrpcPermission.ts
./dan_layer/bindings/src/types/JrpcPermissions.ts
./dan_layer/bindings/src/types/NonFungibleToken.ts
./dan_layer/bindings/src/types/TransactionStatus.ts
./dan_layer/storage_sqlite/src/global/schema.rs
./dan_layer/state_store_sqlite/src/schema.rs
./dan_layer/wallet/storage_sqlite/src/schema.rs
./networking/sqlite_message_logger/src/schema.rs
2 changes: 1 addition & 1 deletion bindings/dist/types/AccessRule.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RestrictedAccessRule } from "./RestrictedAccessRule";
export type AccessRule = "AllowAll" | "DenyAll" | {
Restricted: RestrictedAccessRule;
"Restricted": RestrictedAccessRule;
};
4 changes: 2 additions & 2 deletions bindings/dist/types/Arg.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type Arg = {
Workspace: Array<number>;
"Workspace": Array<number>;
} | {
Literal: Array<number>;
"Literal": Array<number>;
};
20 changes: 10 additions & 10 deletions bindings/dist/types/Command.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ import type { ForeignProposalAtom } from "./ForeignProposalAtom";
import type { MintConfidentialOutputAtom } from "./MintConfidentialOutputAtom";
import type { TransactionAtom } from "./TransactionAtom";
export type Command = {
LocalOnly: TransactionAtom;
"LocalOnly": TransactionAtom;
} | {
Prepare: TransactionAtom;
"Prepare": TransactionAtom;
} | {
LocalPrepare: TransactionAtom;
"LocalPrepare": TransactionAtom;
} | {
AllPrepare: TransactionAtom;
"AllPrepare": TransactionAtom;
} | {
SomePrepare: TransactionAtom;
"SomePrepare": TransactionAtom;
} | {
LocalAccept: TransactionAtom;
"LocalAccept": TransactionAtom;
} | {
AllAccept: TransactionAtom;
"AllAccept": TransactionAtom;
} | {
SomeAccept: TransactionAtom;
"SomeAccept": TransactionAtom;
} | {
ForeignProposal: ForeignProposalAtom;
"ForeignProposal": ForeignProposalAtom;
} | {
MintConfidentialOutput: MintConfidentialOutputAtom;
"MintConfidentialOutput": MintConfidentialOutputAtom;
} | "EndEpoch";
16 changes: 8 additions & 8 deletions bindings/dist/types/Instruction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,42 @@ import type { ConfidentialClaim } from "./ConfidentialClaim";
import type { LogLevel } from "./LogLevel";
import type { ResourceAddress } from "./ResourceAddress";
export type Instruction = {
CreateAccount: {
"CreateAccount": {
owner_public_key: string;
workspace_bucket: string | null;
};
} | {
CallFunction: {
"CallFunction": {
template_address: Uint8Array;
function: string;
args: Array<Arg>;
};
} | {
CallMethod: {
"CallMethod": {
component_address: ComponentAddress;
method: string;
args: Array<string>;
};
} | {
PutLastInstructionOutputOnWorkspace: {
"PutLastInstructionOutputOnWorkspace": {
key: Array<number>;
};
} | {
EmitLog: {
"EmitLog": {
level: LogLevel;
message: string;
};
} | {
ClaimBurn: {
"ClaimBurn": {
claim: ConfidentialClaim;
};
} | {
ClaimValidatorFees: {
"ClaimValidatorFees": {
epoch: number;
validator_public_key: string;
};
} | "DropAllProofsInWorkspace" | {
AssertBucketContains: {
"AssertBucketContains": {
key: Array<number>;
resource_address: ResourceAddress;
min_amount: Amount;
Expand Down
8 changes: 4 additions & 4 deletions bindings/dist/types/NonFungibleId.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export type NonFungibleId = {
U256: Array<number>;
"U256": Array<number>;
} | {
String: string;
"String": string;
} | {
Uint32: number;
"Uint32": number;
} | {
Uint64: number;
"Uint64": number;
};
4 changes: 2 additions & 2 deletions bindings/dist/types/OwnerRule.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { AccessRule } from "./AccessRule";
export type OwnerRule = "OwnedBySigner" | "None" | {
ByAccessRule: AccessRule;
"ByAccessRule": AccessRule;
} | {
ByPublicKey: Array<number>;
"ByPublicKey": Array<number>;
};
14 changes: 7 additions & 7 deletions bindings/dist/types/RejectReason.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
export type RejectReason = {
InvalidTransaction: string;
"InvalidTransaction": string;
} | {
ExecutionFailure: string;
"ExecutionFailure": string;
} | {
OneOrMoreInputsNotFound: string;
"OneOrMoreInputsNotFound": string;
} | "NoInputs" | {
FailedToLockInputs: string;
"FailedToLockInputs": string;
} | {
FailedToLockOutputs: string;
"FailedToLockOutputs": string;
} | {
ForeignShardGroupDecidedToAbort: string;
"ForeignShardGroupDecidedToAbort": string;
} | {
FeesNotPaid: string;
"FeesNotPaid": string;
} | "Unknown";
6 changes: 3 additions & 3 deletions bindings/dist/types/RequireRule.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { RuleRequirement } from "./RuleRequirement";
export type RequireRule = {
Require: RuleRequirement;
"Require": RuleRequirement;
} | {
AnyOf: Array<RuleRequirement>;
"AnyOf": Array<RuleRequirement>;
} | {
AllOf: Array<RuleRequirement>;
"AllOf": Array<RuleRequirement>;
};
9 changes: 3 additions & 6 deletions bindings/dist/types/ResourceContainer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@ import type { Amount } from "./Amount";
import type { NonFungibleId } from "./NonFungibleId";
import type { ResourceAddress } from "./ResourceAddress";
export type ResourceContainer = {
Fungible: {
"Fungible": {
address: ResourceAddress;
amount: Amount;
locked_amount: Amount;
};
} | {
NonFungible: {
"NonFungible": {
address: ResourceAddress;
token_ids: Array<NonFungibleId>;
locked_token_ids: Array<NonFungibleId>;
};
} | {
Confidential: {
"Confidential": {
address: ResourceAddress;
commitments: Record<string, ConfidentialOutput>;
revealed_amount: Amount;
locked_commitments: Record<string, ConfidentialOutput>;
locked_revealed_amount: Amount;
};
};
import { ConfidentialOutput } from "./ConfidentialOutput";
6 changes: 3 additions & 3 deletions bindings/dist/types/RestrictedAccessRule.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { RequireRule } from "./RequireRule";
export type RestrictedAccessRule = {
Require: RequireRule;
"Require": RequireRule;
} | {
AnyOf: Array<RestrictedAccessRule>;
"AnyOf": Array<RestrictedAccessRule>;
} | {
AllOf: Array<RestrictedAccessRule>;
"AllOf": Array<RestrictedAccessRule>;
};
8 changes: 4 additions & 4 deletions bindings/dist/types/RuleRequirement.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import type { ComponentAddress } from "./ComponentAddress";
import type { NonFungibleAddress } from "./NonFungibleAddress";
import type { ResourceAddress } from "./ResourceAddress";
export type RuleRequirement = {
Resource: ResourceAddress;
"Resource": ResourceAddress;
} | {
NonFungibleAddress: NonFungibleAddress;
"NonFungibleAddress": NonFungibleAddress;
} | {
ScopedToComponent: ComponentAddress;
"ScopedToComponent": ComponentAddress;
} | {
ScopedToTemplate: Uint8Array;
"ScopedToTemplate": Uint8Array;
};
16 changes: 8 additions & 8 deletions bindings/dist/types/SubstateId.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import type { TransactionReceiptAddress } from "./TransactionReceiptAddress";
import type { UnclaimedConfidentialOutputAddress } from "./UnclaimedConfidentialOutputAddress";
import type { VaultId } from "./VaultId";
export type SubstateId = {
Component: ComponentAddress;
"Component": ComponentAddress;
} | {
Resource: ResourceAddress;
"Resource": ResourceAddress;
} | {
Vault: VaultId;
"Vault": VaultId;
} | {
UnclaimedConfidentialOutput: UnclaimedConfidentialOutputAddress;
"UnclaimedConfidentialOutput": UnclaimedConfidentialOutputAddress;
} | {
NonFungible: NonFungibleAddress;
"NonFungible": NonFungibleAddress;
} | {
NonFungibleIndex: NonFungibleIndexAddress;
"NonFungibleIndex": NonFungibleIndexAddress;
} | {
TransactionReceipt: TransactionReceiptAddress;
"TransactionReceipt": TransactionReceiptAddress;
} | {
FeeClaim: FeeClaimAddress;
"FeeClaim": FeeClaimAddress;
};
16 changes: 8 additions & 8 deletions bindings/dist/types/SubstateValue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ import type { TransactionReceipt } from "./TransactionReceipt";
import type { UnclaimedConfidentialOutput } from "./UnclaimedConfidentialOutput";
import type { Vault } from "./Vault";
export type SubstateValue = {
Component: ComponentHeader;
"Component": ComponentHeader;
} | {
Resource: Resource;
"Resource": Resource;
} | {
Vault: Vault;
"Vault": Vault;
} | {
NonFungible: NonFungibleContainer;
"NonFungible": NonFungibleContainer;
} | {
NonFungibleIndex: NonFungibleIndex;
"NonFungibleIndex": NonFungibleIndex;
} | {
UnclaimedConfidentialOutput: UnclaimedConfidentialOutput;
"UnclaimedConfidentialOutput": UnclaimedConfidentialOutput;
} | {
TransactionReceipt: TransactionReceipt;
"TransactionReceipt": TransactionReceipt;
} | {
FeeClaim: FeeClaim;
"FeeClaim": FeeClaim;
};
2 changes: 1 addition & 1 deletion bindings/dist/types/TemplateDef.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { TemplateDefV1 } from "./TemplateDefV1";
export type TemplateDef = {
V1: TemplateDefV1;
"V1": TemplateDefV1;
};
6 changes: 3 additions & 3 deletions bindings/dist/types/TransactionResult.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { RejectReason } from "./RejectReason";
import type { SubstateDiff } from "./SubstateDiff";
export type TransactionResult = {
Accept: SubstateDiff;
"Accept": SubstateDiff;
} | {
AcceptFeeRejectRest: [SubstateDiff, RejectReason];
"AcceptFeeRejectRest": [SubstateDiff, RejectReason];
} | {
Reject: RejectReason;
"Reject": RejectReason;
};
6 changes: 3 additions & 3 deletions bindings/dist/types/Type.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export type Type = "Unit" | "Bool" | "I8" | "I16" | "I32" | "I64" | "I128" | "U8" | "U16" | "U32" | "U64" | "U128" | "String" | {
Vec: Type;
"Vec": Type;
} | {
Tuple: Array<Type>;
"Tuple": Array<Type>;
} | {
Other: {
"Other": {
name: string;
};
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Decision } from "../Decision";
import type { ExecuteResult } from "../ExecuteResult";
export type IndexerTransactionFinalizedResult = "Pending" | {
Finalized: {
"Finalized": {
final_decision: Decision;
execution_result: ExecuteResult | null;
execution_time: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ComponentAddress } from "../ComponentAddress";
export type ComponentAddressOrName = {
ComponentAddress: ComponentAddress;
"ComponentAddress": ComponentAddress;
} | {
Name: string;
"Name": string;
};
2 changes: 1 addition & 1 deletion bindings/src/types/AccessRule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { RestrictedAccessRule } from "./RestrictedAccessRule";

export type AccessRule = "AllowAll" | "DenyAll" | { Restricted: RestrictedAccessRule };
export type AccessRule = "AllowAll" | "DenyAll" | { "Restricted": RestrictedAccessRule };
2 changes: 1 addition & 1 deletion bindings/src/types/Amount.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type Amount = number;
export type Amount = number;
2 changes: 1 addition & 1 deletion bindings/src/types/Arg.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type Arg = { Workspace: Array<number> } | { Literal: Array<number> };
export type Arg = { "Workspace": Array<number> } | { "Literal": Array<number> };
5 changes: 1 addition & 4 deletions bindings/src/types/ArgDef.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Type } from "./Type";

export interface ArgDef {
name: string;
arg_type: Type;
}
export interface ArgDef { name: string, arg_type: Type, }
5 changes: 1 addition & 4 deletions bindings/src/types/AuthHook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ComponentAddress } from "./ComponentAddress";

export interface AuthHook {
component_address: ComponentAddress;
method: string;
}
export interface AuthHook { component_address: ComponentAddress, method: string, }
Loading
Loading