Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Masquer les espaces
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Styles de texte
Modifier l’apparence
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
IDL diff
Créé
il y a 2 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
383 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
755 lignes
Copier tout
559 ajouts
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
900 lignes
Copier tout
{
{
Copier
Copié
Copier
Copié
"version": "0.1.0",
"address": "id11111111111111111111111111111111111111111",
"
name
": "
idl"
,
"metadata": {
"name": "idl",
"version": "0.1.0",
"
description
": "
Created with Anchor"
}
,
"docs": [
"docs": [
"IDL test program documentation."
"IDL test program documentation."
],
],
Copier
Copié
Copier
Copié
"
constants": [
"
instructions": [
{
Text moved to lines 895-897
"name": "U8",
"type": "u8",
"value": "6"
},
{
"name": "I128",
"type": "i128",
"value": "1_000_000"
},
{
{
Copier
Copié
Copier
Copié
Text moved to lines 885-887
"name": "
BYTE_STR
",
"name": "
cause_error
",
"
type": "u8",
"
discriminator": [
"
value
":
"116"
67,
104,
37,
17,
2,
155,
68,
17
],
"
accounts
":
[],
"args": []
},
},
{
{
Copier
Copié
Copier
Copié
Text moved with changes to lines 880-883 (97.7% similarity)
"name": "BYTES_STR",
"type": "bytes",
"value": "[116, 101, 115, 116]"
}
],
"instructions": [
{
"name": "initialize",
"name": "initialize",
Copier
Copié
Copier
Copié
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
"accounts": [
{
{
"name": "state",
"name": "state",
Copier
Copié
Copier
Copié
"isMut": true,
"isSigner": true,
"docs": [
"docs": [
"State account"
"State account"
Copier
Copié
Copier
Copié
]
]
,
"writable": true,
"signer": true
},
},
{
{
"name": "nested",
"name": "nested",
"accounts": [
"accounts": [
{
{
"name": "clock",
"name": "clock",
Copier
Copié
Copier
Copié
"isMut": false,
"isSigner": false,
"docs": [
"docs": [
"Sysvar clock"
"Sysvar clock"
Copier
Copié
Copier
Copié
]
]
,
"address": "SysvarC1ock11111111111111111111111111111111"
},
},
{
{
"name": "rent",
"name": "rent",
Copier
Copié
Copier
Copié
"
isMut": false,
"
address
":
"SysvarRent111111111111111111111111111111111"
"isSigner
":
false
}
}
]
]
},
},
{
{
Copier
Copié
Copier
Copié
"name": "zc
A
ccount"
,
"name": "zc
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "token
A
ccount"
,
"name": "token
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "mint
A
ccount"
,
"name": "mint
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "token
I
nterface
A
ccount"
,
"name": "token
_i
nterface
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "mint
I
nterface
A
ccount"
,
"name": "mint
_i
nterface
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
"name": "payer",
"name": "payer",
Copier
Copié
Copier
Copié
"
isMut
": true,
"
writable
": true,
"
isS
igner": true
"
s
igner": true
},
},
{
{
Copier
Copié
Copier
Copié
"name": "system
P
rogram",
"name": "system
_p
rogram",
"
isMut": false,
"
address
":
"11111111111111111111111111111111"
"isSigner
":
false
}
}
],
],
"args": []
"args": []
},
},
{
{
Copier
Copié
Copier
Copié
"name": "initialize
W
ith
V
alues",
"name": "initialize
_w
ith
_v
alues",
"docs": [
"docs": [
"Initializes an account with specified values"
"Initializes an account with specified values"
],
],
Copier
Copié
Copier
Copié
"discriminator": [
220,
73,
8,
213,
178,
69,
181,
141
],
"accounts": [
"accounts": [
{
{
"name": "state",
"name": "state",
Copier
Copié
Copier
Copié
"isMut": true,
"isSigner": true,
"docs": [
"docs": [
"State account"
"State account"
Copier
Copié
Copier
Copié
]
]
,
"writable": true,
"signer": true
},
},
{
{
"name": "nested",
"name": "nested",
"accounts": [
"accounts": [
{
{
"name": "clock",
"name": "clock",
Copier
Copié
Copier
Copié
"isMut": false,
"isSigner": false,
"docs": [
"docs": [
"Sysvar clock"
"Sysvar clock"
Copier
Copié
Copier
Copié
]
]
,
"address": "SysvarC1ock11111111111111111111111111111111"
},
},
{
{
"name": "rent",
"name": "rent",
Copier
Copié
Copier
Copié
"
isMut": false,
"
address
":
"SysvarRent111111111111111111111111111111111"
"isSigner
":
false
}
}
]
]
},
},
{
{
Copier
Copié
Copier
Copié
"name": "zc
A
ccount"
,
"name": "zc
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "token
A
ccount"
,
"name": "token
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "mint
A
ccount"
,
"name": "mint
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "token
I
nterface
A
ccount"
,
"name": "token
_i
nterface
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
Copier
Copié
Copier
Copié
"name": "mint
I
nterface
A
ccount"
,
"name": "mint
_i
nterface
_a
ccount"
"isMut": false,
"isSigner": false
},
},
{
{
"name": "payer",
"name": "payer",
Copier
Copié
Copier
Copié
"
isMut
": true,
"
writable
": true,
"
isS
igner": true
"
s
igner": true
},
},
{
{
Copier
Copié
Copier
Copié
"name": "system
P
rogram",
"name": "system
_p
rogram",
"
isMut": false,
"
address
":
"11111111111111111111111111111111"
"isSigner
":
false
}
}
],
],
"args": [
"args": [
{
{
Copier
Copié
Copier
Copié
"name": "bool
F
ield",
"name": "bool
_f
ield",
"type": "bool"
"type": "bool"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u8
F
ield",
"name": "u8
_f
ield",
"type": "u8"
"type": "u8"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i8
F
ield",
"name": "i8
_f
ield",
"type": "i8"
"type": "i8"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u16
F
ield",
"name": "u16
_f
ield",
"type": "u16"
"type": "u16"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i16
F
ield",
"name": "i16
_f
ield",
"type": "i16"
"type": "i16"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u32
F
ield",
"name": "u32
_f
ield",
"type": "u32"
"type": "u32"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i32
F
ield",
"name": "i32
_f
ield",
"type": "i32"
"type": "i32"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "f32
F
ield",
"name": "f32
_f
ield",
"type": "f32"
"type": "f32"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u64
F
ield",
"name": "u64
_f
ield",
"type": "u64"
"type": "u64"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i64
F
ield",
"name": "i64
_f
ield",
"type": "i64"
"type": "i64"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "f64
F
ield",
"name": "f64
_f
ield",
"type": "f64"
"type": "f64"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u128
F
ield",
"name": "u128
_f
ield",
"type": "u128"
"type": "u128"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i128
F
ield",
"name": "i128
_f
ield",
"type": "i128"
"type": "i128"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "bytes
F
ield",
"name": "bytes
_f
ield",
"type": "bytes"
"type": "bytes"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "string
F
ield",
"name": "string
_f
ield",
"type": "string"
"type": "string"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "pubkey
F
ield",
"name": "pubkey
_f
ield",
"type": "pub
licK
ey"
"type": "pub
k
ey"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "vec
F
ield",
"name": "vec
_f
ield",
"type": {
"type": {
"vec": "u64"
"vec": "u64"
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "vec
S
truct
F
ield",
"name": "vec
_s
truct
_f
ield",
"type": {
"type": {
"vec": {
"vec": {
Copier
Copié
Copier
Copié
"defined"
: "FooStruct"
"defined"
: {
"name"
: "FooStruct"
}
}
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "option
F
ield",
"name": "option
_f
ield",
"type": {
"type": {
"option": "bool"
"option": "bool"
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "option
S
truct
F
ield",
"name": "option
_s
truct
_f
ield",
"type": {
"type": {
"option": {
"option": {
Copier
Copié
Copier
Copié
"defined"
: "FooStruct"
"defined"
: {
"name"
: "FooStruct"
}
}
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "struct
F
ield",
"name": "struct
_f
ield",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooStruct"
"defined"
: {
"name"
: "FooStruct"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "array
F
ield",
"name": "array
_f
ield",
"type": {
"type": {
"array": [
"array": [
"bool",
"bool",
3
3
]
]
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
1",
"name": "enum
_f
ield
_
1",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
2",
"name": "enum
_f
ield
_
2",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
3",
"name": "enum
_f
ield
_
3",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
4",
"name": "enum
_f
ield
_
4",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
}
}
]
]
},
},
{
{
Copier
Copié
Copier
Copié
"name": "initialize
W
ith
V
alues2",
"name": "initialize
_w
ith
_v
alues2",
"docs": [
"docs": [
"a separate instruction due to initialize_with_values having too many arguments",
"a separate instruction due to initialize_with_values having too many arguments",
"https://github.com/solana-labs/solana/issues/23978"
"https://github.com/solana-labs/solana/issues/23978"
],
],
Copier
Copié
Copier
Copié
"discriminator": [
248,
190,
21,
97,
239,
148,
39,
181
],
"accounts": [
"accounts": [
{
{
"name": "state",
"name": "state",
Copier
Copié
Copier
Copié
"
isMut
": true,
"
writable
": true,
"
isS
igner": true
"
s
igner": true
},
},
{
{
"name": "payer",
"name": "payer",
Copier
Copié
Copier
Copié
"
isMut
": true,
"
writable
": true,
"
isS
igner": true
"
s
igner": true
},
},
{
{
Copier
Copié
Copier
Copié
"name": "system
P
rogram",
"name": "system
_p
rogram",
"
isMut": false,
"
address
":
"11111111111111111111111111111111"
"isSigner
":
false
}
}
],
],
"args": [
"args": [
{
{
Copier
Copié
Copier
Copié
"name": "vec
OfO
ption",
"name": "vec
_of_o
ption",
"type": {
"type": {
"vec": {
"vec": {
"option": "u64"
"option": "u64"
}
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "box
F
ield",
"name": "box
_f
ield",
"type": "bool"
"type": "bool"
}
}
],
],
"returns": {
"returns": {
Copier
Copié
Copier
Copié
"defined"
: "SomeRetStruct"
"defined"
: {
"name"
: "SomeRetStruct"
}
}
}
Copier
Copié
Copier
Copié
},
{
"name": "causeError",
"accounts": [],
"args": []
}
}
],
],
"accounts": [
"accounts": [
{
{
Copier
Copié
Copier
Copié
"name": "SomeZcAccount",
"discriminator": [
56,
72,
82,
194,
210,
35,
17,
191
]
},
{
"name": "State",
"discriminator": [
216,
146,
107,
94,
104,
75,
182,
177
]
},
{
"name": "State2",
"discriminator": [
106,
97,
255,
161,
250,
205,
185,
192
]
}
],
"events": [
{
"name": "SomeEvent",
"discriminator": [
39,
221,
150,
148,
91,
206,
29,
Text moved with changes from lines 735-739 (97.9% similarity)
93
]
}
],
"errors": [
{
Text moved from lines 741-743
"code": 6000,
"name": "SomeError",
"msg": "Example error."
},
{
Text moved from lines 746-748
"code": 6001,
"name": "OtherError",
"msg": "Another error."
},
{
"code": 6002,
"name": "ErrorWithoutMsg"
Text moved with changes from lines 525-529 (98.4% similarity)
}
],
"types": [
{
"name": "BarStruct",
"docs": [
"Bar struct type"
],
"type": {
"kind": "struct",
"fields": [
{
Text moved with changes from lines 549-556 (99.2% similarity)
"name": "some_field",
"docs": [
"Some field"
],
"type": "bool"
},
{
"name": "other_field",
"type": "u8"
}
]
}
Text moved with changes from lines 629-644 (99.0% similarity)
},
{
"name": "FooEnum",
"docs": [
"Enum type"
],
"type": {
"kind": "enum",
"variants": [
{
"name": "Unnamed",
"fields": [
"bool",
"u8",
{
"defined": {
"name": "BarStruct"
}
}
]
},
{
"name": "UnnamedSingle",
"fields": [
{
"defined": {
"name": "BarStruct"
}
}
]
},
{
"name": "Named",
Text moved with changes from lines 656-682 (78.9% similarity)
"fields": [
{
"name": "bool_field",
"docs": [
"A bool field inside a struct tuple kind"
],
"type": "bool"
},
{
"name": "u8_field",
"type": "u8"
},
{
"name": "nested",
"type": {
"defined": {
"name": "BarStruct"
}
}
}
]
},
{
"name": "Struct",
"fields": [
{
"defined": {
"name": "BarStruct"
}
}
]
},
{
"name": "OptionStruct",
"fields": [
{
Text moved with changes from lines 688-701 (90.6% similarity)
"option": {
"defined": {
"name": "BarStruct"
}
}
}
]
},
{
"name": "VecStruct",
"fields": [
{
"vec": {
"defined": {
"name": "BarStruct"
}
}
}
]
},
{
"name": "NoFields"
}
]
}
},
{
Text moved with changes from lines 563-578 (98.9% similarity)
"name": "FooStruct",
"type": {
"kind": "struct",
"fields": [
{
"name": "field1",
"type": "u8"
},
{
"name": "field2",
"type": "u16"
},
{
"name": "nested",
"type": {
"defined": {
"name": "BarStruct"
}
Text moved with changes from lines 579-585 (97.2% similarity)
}
},
{
"name": "vec_nested",
"type": {
"vec": {
"defined": {
"name": "BarStruct"
}
}
}
},
{
"name": "option_nested",
"type": {
"option": {
"defined": {
"name": "BarStruct"
}
}
}
},
{
"name": "enum_field",
"type": {
"defined": {
"name": "FooEnum"
}
Text moved with changes from lines 601-615 (96.2% similarity)
}
}
]
}
},
{
"name": "SomeEvent",
"type": {
"kind": "struct",
"fields": [
{
"name": "bool_field",
"type": "bool"
},
{
"name": "external_my_struct",
"type": {
"defined": {
"name": "external::MyStruct"
}
}
},
{
"name": "other_module_my_struct",
"type": {
"defined": {
"name": "idl::some_other_module::MyStruct"
}
}
}
]
}
},
{
"name": "SomeRetStruct",
"type": {
"kind": "struct",
"fields": [
{
"name": "some_field",
"type": "u8"
}
]
}
},
{
"name": "SomeZcAccount",
"serialization": "bytemuck",
"repr": {
"kind": "c"
},
Text moved with changes from lines 514-520 (97.7% similarity)
"type": {
"kind": "struct",
"fields": [
{
"name": "field",
"type": {
"defined": {
"name": "ZcStruct"
}
}
}
]
}
},
{
"name": "State",
"name": "State",
"docs": [
"docs": [
"An account containing various fields"
"An account containing various fields"
],
],
"type": {
"type": {
"kind": "struct",
"kind": "struct",
"fields": [
"fields": [
{
{
Copier
Copié
Copier
Copié
"name": "bool
F
ield",
"name": "bool
_f
ield",
"docs": [
"docs": [
"A boolean field"
"A boolean field"
],
],
"type": "bool"
"type": "bool"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u8
F
ield",
"name": "u8
_f
ield",
"type": "u8"
"type": "u8"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i8
F
ield",
"name": "i8
_f
ield",
"type": "i8"
"type": "i8"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u16
F
ield",
"name": "u16
_f
ield",
"type": "u16"
"type": "u16"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i16
F
ield",
"name": "i16
_f
ield",
"type": "i16"
"type": "i16"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u32
F
ield",
"name": "u32
_f
ield",
"type": "u32"
"type": "u32"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i32
F
ield",
"name": "i32
_f
ield",
"type": "i32"
"type": "i32"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "f32
F
ield",
"name": "f32
_f
ield",
"type": "f32"
"type": "f32"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u64
F
ield",
"name": "u64
_f
ield",
"type": "u64"
"type": "u64"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i64
F
ield",
"name": "i64
_f
ield",
"type": "i64"
"type": "i64"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "f64
F
ield",
"name": "f64
_f
ield",
"type": "f64"
"type": "f64"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "u128
F
ield",
"name": "u128
_f
ield",
"type": "u128"
"type": "u128"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "i128
F
ield",
"name": "i128
_f
ield",
"type": "i128"
"type": "i128"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "bytes
F
ield",
"name": "bytes
_f
ield",
"type": "bytes"
"type": "bytes"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "string
F
ield",
"name": "string
_f
ield",
"type": "string"
"type": "string"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "pubkey
F
ield",
"name": "pubkey
_f
ield",
"type": "pub
licK
ey"
"type": "pub
k
ey"
},
},
{
{
Copier
Copié
Copier
Copié
"name": "vec
F
ield",
"name": "vec
_f
ield",
"type": {
"type": {
"vec": "u64"
"vec": "u64"
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "vec
S
truct
F
ield",
"name": "vec
_s
truct
_f
ield",
"type": {
"type": {
"vec": {
"vec": {
Copier
Copié
Copier
Copié
"defined"
: "FooStruct"
"defined"
: {
"name"
: "FooStruct"
}
}
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "option
F
ield",
"name": "option
_f
ield",
"type": {
"type": {
"option": "bool"
"option": "bool"
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "option
S
truct
F
ield",
"name": "option
_s
truct
_f
ield",
"type": {
"type": {
"option": {
"option": {
Copier
Copié
Copier
Copié
"defined"
: "FooStruct"
"defined"
: {
"name"
: "FooStruct"
}
}
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "struct
F
ield",
"name": "struct
_f
ield",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooStruct"
"defined"
: {
"name"
: "FooStruct"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "array
F
ield",
"name": "array
_f
ield",
"type": {
"type": {
"array": [
"array": [
"bool",
"bool",
3
3
]
]
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
1",
"name": "enum
_f
ield
_
1",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
2",
"name": "enum
_f
ield
_
2",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
3",
"name": "enum
_f
ield
_
3",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "enum
F
ield
4",
"name": "enum
_f
ield
_
4",
"type": {
"type": {
Copier
Copié
Copier
Copié
"defined"
: "FooEnum"
"defined"
: {
"name"
: "FooEnum"
}
}
}
}
}
]
]
}
}
},
},
{
{
"name": "State2",
"name": "State2",
"type": {
"type": {
"kind": "struct",
"kind": "struct",
"fields": [
"fields": [
{
{
Copier
Copié
Copier
Copié
"name": "vec
OfO
ption",
"name": "vec
_of_o
ption",
"type": {
"type": {
"vec": {
"vec": {
"option": "u64"
"option": "u64"
}
}
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "box
F
ield",
"name": "box
_f
ield",
"type": "bool"
"type": "bool"
}
}
]
]
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "
SomeZcAccount
",
"name": "
ZcStruct
",
Text moved with changes to lines 644-650 (97.7% similarity)
"
type
": {
"
serialization": "bytemuck",
"kind": "
struct",
"repr
": {
"fields": [
"kind": "
c"
{
},
"name": "field",
"type": {
"defined": "ZcStruct"
}
}
]
}
Text moved with changes to lines 427-431 (98.4% similarity)
}
],
"types": [
{
"name": "MyStruct",
"type": {
"type": {
"kind": "struct",
"kind": "struct",
"fields": [
"fields": [
{
{
Copier
Copié
Copier
Copié
"name": "some
U8
",
"name": "some
_field
",
"type": "
u8
"
"type": "
u16
"
}
}
]
]
}
}
},
},
{
{
Copier
Copié
Copier
Copié
"name": "
BarStruct",
"name": "
external::MyStruct",
"docs": [
"Bar struct type"
],
"type": {
"type": {
"kind": "struct",
"kind": "struct",
"fields": [
"fields": [
{
{
Copier
Copié
Copier
Copié
Text moved with changes to lines 439-446 (99.2% similarity)
"name": "
someField",
"name": "
some_field",
"docs": [
"Some field"
],
"type": "bool"
},
{
"name": "otherField",
"type": "u8"
"type": "u8"
}
}
]
]
}
}
},
},
{
{
Copier
Copié
Copier
Copié
Text moved with changes to lines 547-562 (98.9% similarity)
"name": "
FooStruct",
"name": "
idl::some_other_module::MyStruct",
"type": {
"kind": "struct",
"fields": [
{
"name": "field1",
"type": "u8"
},
{
"name": "field2",
"type": "u16"
},
{
"name": "nested",
"type": {
"defined": "BarStruct"
Text moved with changes to lines 565-571 (97.2% similarity)
}
},
{
"name": "vecNested",
"type": {
"vec": {
"defined": "BarStruct"
}
}
},
{
"name": "optionNested",
"type": {
"option": {
"defined": "BarStruct"
}
}
},
{
"name": "enumField",
"type": {
"defined": "FooEnum"
Text moved with changes to lines 593-607 (96.2% similarity)
}
}
]
}
},
{
"name": "ZcStruct",
"type": {
"kind": "struct",
"fields": [
{
"name": "someField",
"type": "u16"
}
]
}
},
{
"name": "SomeRetStruct",
"type": {
"type": {
"kind": "struct",
"kind": "struct",
"fields": [
"fields": [
{
{
Copier
Copié
Copier
Copié
"name": "
someField
",
"name": "
some_u8
",
"type": "u8"
"type": "u8"
}
}
]
]
}
}
Copier
Copié
Copier
Copié
Text moved with changes to lines 451-466 (99.0% similarity)
},
{
"name": "FooEnum",
"docs": [
"Enum type"
],
"type": {
"kind": "enum",
"variants": [
{
"name": "Unnamed",
"fields": [
"bool",
"u8",
{
"defined": "BarStruct"
}
]
},
{
"name": "UnnamedSingle",
"fields": [
{
"defined": "BarStruct"
}
]
},
Text moved with changes to lines 484-510 (78.9% similarity)
{
"name": "Named",
"fields": [
{
"name": "boolField",
"docs": [
"A bool field inside a struct tuple kind"
],
"type": "bool"
},
{
"name": "u8Field",
"type": "u8"
},
{
"name": "nested",
"type": {
"defined": "BarStruct"
}
}
]
},
{
"name": "Struct",
"fields": [
{
"defined": "BarStruct"
}
]
},
{
"name": "OptionStruct",
Text moved with changes to lines 520-533 (90.6% similarity)
"fields": [
{
"option": {
"defined": "BarStruct"
}
}
]
},
{
"name": "VecStruct",
"fields": [
{
"vec": {
"defined": "BarStruct"
}
}
]
},
{
"name": "NoFields"
}
]
}
}
}
],
],
Copier
Copié
Copier
Copié
"
events
": [
"
constants
": [
{
{
Copier
Copié
Copier
Copié
Text moved with changes from lines 24-27 (97.7% similarity)
"name": "
SomeEvent
",
"name": "
BYTES_STR
",
"fields": [
"type": "bytes",
{
"value": "[116, 101, 115, 116]"
"name": "boolField",
},
"type": "bool",
"index": false
},
{
"name": "externalMyStruct",
"type": {
"defined": "external::MyStruct"
},
"index": false
},
{
"name": "otherModuleMyStruct",
"type": {
"defined": "some_other_module::MyStruct"
},
"index": false
Text moved with changes to lines 409-413 (97.9% similarity)
}
]
}
],
"errors": [
{
{
Copier
Copié
Copier
Copié
Text moved to lines 415-417
Text moved from lines 19-21
"code": 6000,
"name": "
BYTE_STR
",
"name": "
SomeError
",
"
type
": "
u8",
"
msg
": "
Example error.
"
"value": "116
"
},
},
{
{
Copier
Copié
Copier
Copié
Text moved to lines 420-422
"code": 6001,
"name": "
I128
",
"name": "
OtherError
",
"
type
": "
i128",
"
msg
": "
Another error.
"
"value": "1000000
"
},
},
{
{
Copier
Copié
Copier
Copié
Text moved from lines 9-11
"code": 6002,
"name": "
U8",
"name": "
ErrorWithoutMsg
"
"type": "u8",
"value": "6
"
}
}
]
]
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
{ "version": "0.1.0", "name": "idl", "docs": [ "IDL test program documentation." ], "constants": [ { "name": "U8", "type": "u8", "value": "6" }, { "name": "I128", "type": "i128", "value": "1_000_000" }, { "name": "BYTE_STR", "type": "u8", "value": "116" }, { "name": "BYTES_STR", "type": "bytes", "value": "[116, 101, 115, 116]" } ], "instructions": [ { "name": "initialize", "accounts": [ { "name": "state", "isMut": true, "isSigner": true, "docs": [ "State account" ] }, { "name": "nested", "accounts": [ { "name": "clock", "isMut": false, "isSigner": false, "docs": [ "Sysvar clock" ] }, { "name": "rent", "isMut": false, "isSigner": false } ] }, { "name": "zcAccount", "isMut": false, "isSigner": false }, { "name": "tokenAccount", "isMut": false, "isSigner": false }, { "name": "mintAccount", "isMut": false, "isSigner": false }, { "name": "tokenInterfaceAccount", "isMut": false, "isSigner": false }, { "name": "mintInterfaceAccount", "isMut": false, "isSigner": false }, { "name": "payer", "isMut": true, "isSigner": true }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [] }, { "name": "initializeWithValues", "docs": [ "Initializes an account with specified values" ], "accounts": [ { "name": "state", "isMut": true, "isSigner": true, "docs": [ "State account" ] }, { "name": "nested", "accounts": [ { "name": "clock", "isMut": false, "isSigner": false, "docs": [ "Sysvar clock" ] }, { "name": "rent", "isMut": false, "isSigner": false } ] }, { "name": "zcAccount", "isMut": false, "isSigner": false }, { "name": "tokenAccount", "isMut": false, "isSigner": false }, { "name": "mintAccount", "isMut": false, "isSigner": false }, { "name": "tokenInterfaceAccount", "isMut": false, "isSigner": false }, { "name": "mintInterfaceAccount", "isMut": false, "isSigner": false }, { "name": "payer", "isMut": true, "isSigner": true }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "boolField", "type": "bool" }, { "name": "u8Field", "type": "u8" }, { "name": "i8Field", "type": "i8" }, { "name": "u16Field", "type": "u16" }, { "name": "i16Field", "type": "i16" }, { "name": "u32Field", "type": "u32" }, { "name": "i32Field", "type": "i32" }, { "name": "f32Field", "type": "f32" }, { "name": "u64Field", "type": "u64" }, { "name": "i64Field", "type": "i64" }, { "name": "f64Field", "type": "f64" }, { "name": "u128Field", "type": "u128" }, { "name": "i128Field", "type": "i128" }, { "name": "bytesField", "type": "bytes" }, { "name": "stringField", "type": "string" }, { "name": "pubkeyField", "type": "publicKey" }, { "name": "vecField", "type": { "vec": "u64" } }, { "name": "vecStructField", "type": { "vec": { "defined": "FooStruct" } } }, { "name": "optionField", "type": { "option": "bool" } }, { "name": "optionStructField", "type": { "option": { "defined": "FooStruct" } } }, { "name": "structField", "type": { "defined": "FooStruct" } }, { "name": "arrayField", "type": { "array": [ "bool", 3 ] } }, { "name": "enumField1", "type": { "defined": "FooEnum" } }, { "name": "enumField2", "type": { "defined": "FooEnum" } }, { "name": "enumField3", "type": { "defined": "FooEnum" } }, { "name": "enumField4", "type": { "defined": "FooEnum" } } ] }, { "name": "initializeWithValues2", "docs": [ "a separate instruction due to initialize_with_values having too many arguments", "https://github.com/solana-labs/solana/issues/23978" ], "accounts": [ { "name": "state", "isMut": true, "isSigner": true }, { "name": "payer", "isMut": true, "isSigner": true }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "vecOfOption", "type": { "vec": { "option": "u64" } } }, { "name": "boxField", "type": "bool" } ], "returns": { "defined": "SomeRetStruct" } }, { "name": "causeError", "accounts": [], "args": [] } ], "accounts": [ { "name": "State", "docs": [ "An account containing various fields" ], "type": { "kind": "struct", "fields": [ { "name": "boolField", "docs": [ "A boolean field" ], "type": "bool" }, { "name": "u8Field", "type": "u8" }, { "name": "i8Field", "type": "i8" }, { "name": "u16Field", "type": "u16" }, { "name": "i16Field", "type": "i16" }, { "name": "u32Field", "type": "u32" }, { "name": "i32Field", "type": "i32" }, { "name": "f32Field", "type": "f32" }, { "name": "u64Field", "type": "u64" }, { "name": "i64Field", "type": "i64" }, { "name": "f64Field", "type": "f64" }, { "name": "u128Field", "type": "u128" }, { "name": "i128Field", "type": "i128" }, { "name": "bytesField", "type": "bytes" }, { "name": "stringField", "type": "string" }, { "name": "pubkeyField", "type": "publicKey" }, { "name": "vecField", "type": { "vec": "u64" } }, { "name": "vecStructField", "type": { "vec": { "defined": "FooStruct" } } }, { "name": "optionField", "type": { "option": "bool" } }, { "name": "optionStructField", "type": { "option": { "defined": "FooStruct" } } }, { "name": "structField", "type": { "defined": "FooStruct" } }, { "name": "arrayField", "type": { "array": [ "bool", 3 ] } }, { "name": "enumField1", "type": { "defined": "FooEnum" } }, { "name": "enumField2", "type": { "defined": "FooEnum" } }, { "name": "enumField3", "type": { "defined": "FooEnum" } }, { "name": "enumField4", "type": { "defined": "FooEnum" } } ] } }, { "name": "State2", "type": { "kind": "struct", "fields": [ { "name": "vecOfOption", "type": { "vec": { "option": "u64" } } }, { "name": "boxField", "type": "bool" } ] } }, { "name": "SomeZcAccount", "type": { "kind": "struct", "fields": [ { "name": "field", "type": { "defined": "ZcStruct" } } ] } } ], "types": [ { "name": "MyStruct", "type": { "kind": "struct", "fields": [ { "name": "someU8", "type": "u8" } ] } }, { "name": "BarStruct", "docs": [ "Bar struct type" ], "type": { "kind": "struct", "fields": [ { "name": "someField", "docs": [ "Some field" ], "type": "bool" }, { "name": "otherField", "type": "u8" } ] } }, { "name": "FooStruct", "type": { "kind": "struct", "fields": [ { "name": "field1", "type": "u8" }, { "name": "field2", "type": "u16" }, { "name": "nested", "type": { "defined": "BarStruct" } }, { "name": "vecNested", "type": { "vec": { "defined": "BarStruct" } } }, { "name": "optionNested", "type": { "option": { "defined": "BarStruct" } } }, { "name": "enumField", "type": { "defined": "FooEnum" } } ] } }, { "name": "ZcStruct", "type": { "kind": "struct", "fields": [ { "name": "someField", "type": "u16" } ] } }, { "name": "SomeRetStruct", "type": { "kind": "struct", "fields": [ { "name": "someField", "type": "u8" } ] } }, { "name": "FooEnum", "docs": [ "Enum type" ], "type": { "kind": "enum", "variants": [ { "name": "Unnamed", "fields": [ "bool", "u8", { "defined": "BarStruct" } ] }, { "name": "UnnamedSingle", "fields": [ { "defined": "BarStruct" } ] }, { "name": "Named", "fields": [ { "name": "boolField", "docs": [ "A bool field inside a struct tuple kind" ], "type": "bool" }, { "name": "u8Field", "type": "u8" }, { "name": "nested", "type": { "defined": "BarStruct" } } ] }, { "name": "Struct", "fields": [ { "defined": "BarStruct" } ] }, { "name": "OptionStruct", "fields": [ { "option": { "defined": "BarStruct" } } ] }, { "name": "VecStruct", "fields": [ { "vec": { "defined": "BarStruct" } } ] }, { "name": "NoFields" } ] } } ], "events": [ { "name": "SomeEvent", "fields": [ { "name": "boolField", "type": "bool", "index": false }, { "name": "externalMyStruct", "type": { "defined": "external::MyStruct" }, "index": false }, { "name": "otherModuleMyStruct", "type": { "defined": "some_other_module::MyStruct" }, "index": false } ] } ], "errors": [ { "code": 6000, "name": "SomeError", "msg": "Example error." }, { "code": 6001, "name": "OtherError", "msg": "Another error." }, { "code": 6002, "name": "ErrorWithoutMsg" } ] }
Texte modifié
Ouvrir un fichier
{ "address": "id11111111111111111111111111111111111111111", "metadata": { "name": "idl", "version": "0.1.0", "description": "Created with Anchor" }, "docs": [ "IDL test program documentation." ], "instructions": [ { "name": "cause_error", "discriminator": [ 67, 104, 37, 17, 2, 155, 68, 17 ], "accounts": [], "args": [] }, { "name": "initialize", "discriminator": [ 175, 175, 109, 31, 13, 152, 155, 237 ], "accounts": [ { "name": "state", "docs": [ "State account" ], "writable": true, "signer": true }, { "name": "nested", "accounts": [ { "name": "clock", "docs": [ "Sysvar clock" ], "address": "SysvarC1ock11111111111111111111111111111111" }, { "name": "rent", "address": "SysvarRent111111111111111111111111111111111" } ] }, { "name": "zc_account" }, { "name": "token_account" }, { "name": "mint_account" }, { "name": "token_interface_account" }, { "name": "mint_interface_account" }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [] }, { "name": "initialize_with_values", "docs": [ "Initializes an account with specified values" ], "discriminator": [ 220, 73, 8, 213, 178, 69, 181, 141 ], "accounts": [ { "name": "state", "docs": [ "State account" ], "writable": true, "signer": true }, { "name": "nested", "accounts": [ { "name": "clock", "docs": [ "Sysvar clock" ], "address": "SysvarC1ock11111111111111111111111111111111" }, { "name": "rent", "address": "SysvarRent111111111111111111111111111111111" } ] }, { "name": "zc_account" }, { "name": "token_account" }, { "name": "mint_account" }, { "name": "token_interface_account" }, { "name": "mint_interface_account" }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "bool_field", "type": "bool" }, { "name": "u8_field", "type": "u8" }, { "name": "i8_field", "type": "i8" }, { "name": "u16_field", "type": "u16" }, { "name": "i16_field", "type": "i16" }, { "name": "u32_field", "type": "u32" }, { "name": "i32_field", "type": "i32" }, { "name": "f32_field", "type": "f32" }, { "name": "u64_field", "type": "u64" }, { "name": "i64_field", "type": "i64" }, { "name": "f64_field", "type": "f64" }, { "name": "u128_field", "type": "u128" }, { "name": "i128_field", "type": "i128" }, { "name": "bytes_field", "type": "bytes" }, { "name": "string_field", "type": "string" }, { "name": "pubkey_field", "type": "pubkey" }, { "name": "vec_field", "type": { "vec": "u64" } }, { "name": "vec_struct_field", "type": { "vec": { "defined": { "name": "FooStruct" } } } }, { "name": "option_field", "type": { "option": "bool" } }, { "name": "option_struct_field", "type": { "option": { "defined": { "name": "FooStruct" } } } }, { "name": "struct_field", "type": { "defined": { "name": "FooStruct" } } }, { "name": "array_field", "type": { "array": [ "bool", 3 ] } }, { "name": "enum_field_1", "type": { "defined": { "name": "FooEnum" } } }, { "name": "enum_field_2", "type": { "defined": { "name": "FooEnum" } } }, { "name": "enum_field_3", "type": { "defined": { "name": "FooEnum" } } }, { "name": "enum_field_4", "type": { "defined": { "name": "FooEnum" } } } ] }, { "name": "initialize_with_values2", "docs": [ "a separate instruction due to initialize_with_values having too many arguments", "https://github.com/solana-labs/solana/issues/23978" ], "discriminator": [ 248, 190, 21, 97, 239, 148, 39, 181 ], "accounts": [ { "name": "state", "writable": true, "signer": true }, { "name": "payer", "writable": true, "signer": true }, { "name": "system_program", "address": "11111111111111111111111111111111" } ], "args": [ { "name": "vec_of_option", "type": { "vec": { "option": "u64" } } }, { "name": "box_field", "type": "bool" } ], "returns": { "defined": { "name": "SomeRetStruct" } } } ], "accounts": [ { "name": "SomeZcAccount", "discriminator": [ 56, 72, 82, 194, 210, 35, 17, 191 ] }, { "name": "State", "discriminator": [ 216, 146, 107, 94, 104, 75, 182, 177 ] }, { "name": "State2", "discriminator": [ 106, 97, 255, 161, 250, 205, 185, 192 ] } ], "events": [ { "name": "SomeEvent", "discriminator": [ 39, 221, 150, 148, 91, 206, 29, 93 ] } ], "errors": [ { "code": 6000, "name": "SomeError", "msg": "Example error." }, { "code": 6001, "name": "OtherError", "msg": "Another error." }, { "code": 6002, "name": "ErrorWithoutMsg" } ], "types": [ { "name": "BarStruct", "docs": [ "Bar struct type" ], "type": { "kind": "struct", "fields": [ { "name": "some_field", "docs": [ "Some field" ], "type": "bool" }, { "name": "other_field", "type": "u8" } ] } }, { "name": "FooEnum", "docs": [ "Enum type" ], "type": { "kind": "enum", "variants": [ { "name": "Unnamed", "fields": [ "bool", "u8", { "defined": { "name": "BarStruct" } } ] }, { "name": "UnnamedSingle", "fields": [ { "defined": { "name": "BarStruct" } } ] }, { "name": "Named", "fields": [ { "name": "bool_field", "docs": [ "A bool field inside a struct tuple kind" ], "type": "bool" }, { "name": "u8_field", "type": "u8" }, { "name": "nested", "type": { "defined": { "name": "BarStruct" } } } ] }, { "name": "Struct", "fields": [ { "defined": { "name": "BarStruct" } } ] }, { "name": "OptionStruct", "fields": [ { "option": { "defined": { "name": "BarStruct" } } } ] }, { "name": "VecStruct", "fields": [ { "vec": { "defined": { "name": "BarStruct" } } } ] }, { "name": "NoFields" } ] } }, { "name": "FooStruct", "type": { "kind": "struct", "fields": [ { "name": "field1", "type": "u8" }, { "name": "field2", "type": "u16" }, { "name": "nested", "type": { "defined": { "name": "BarStruct" } } }, { "name": "vec_nested", "type": { "vec": { "defined": { "name": "BarStruct" } } } }, { "name": "option_nested", "type": { "option": { "defined": { "name": "BarStruct" } } } }, { "name": "enum_field", "type": { "defined": { "name": "FooEnum" } } } ] } }, { "name": "SomeEvent", "type": { "kind": "struct", "fields": [ { "name": "bool_field", "type": "bool" }, { "name": "external_my_struct", "type": { "defined": { "name": "external::MyStruct" } } }, { "name": "other_module_my_struct", "type": { "defined": { "name": "idl::some_other_module::MyStruct" } } } ] } }, { "name": "SomeRetStruct", "type": { "kind": "struct", "fields": [ { "name": "some_field", "type": "u8" } ] } }, { "name": "SomeZcAccount", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [ { "name": "field", "type": { "defined": { "name": "ZcStruct" } } } ] } }, { "name": "State", "docs": [ "An account containing various fields" ], "type": { "kind": "struct", "fields": [ { "name": "bool_field", "docs": [ "A boolean field" ], "type": "bool" }, { "name": "u8_field", "type": "u8" }, { "name": "i8_field", "type": "i8" }, { "name": "u16_field", "type": "u16" }, { "name": "i16_field", "type": "i16" }, { "name": "u32_field", "type": "u32" }, { "name": "i32_field", "type": "i32" }, { "name": "f32_field", "type": "f32" }, { "name": "u64_field", "type": "u64" }, { "name": "i64_field", "type": "i64" }, { "name": "f64_field", "type": "f64" }, { "name": "u128_field", "type": "u128" }, { "name": "i128_field", "type": "i128" }, { "name": "bytes_field", "type": "bytes" }, { "name": "string_field", "type": "string" }, { "name": "pubkey_field", "type": "pubkey" }, { "name": "vec_field", "type": { "vec": "u64" } }, { "name": "vec_struct_field", "type": { "vec": { "defined": { "name": "FooStruct" } } } }, { "name": "option_field", "type": { "option": "bool" } }, { "name": "option_struct_field", "type": { "option": { "defined": { "name": "FooStruct" } } } }, { "name": "struct_field", "type": { "defined": { "name": "FooStruct" } } }, { "name": "array_field", "type": { "array": [ "bool", 3 ] } }, { "name": "enum_field_1", "type": { "defined": { "name": "FooEnum" } } }, { "name": "enum_field_2", "type": { "defined": { "name": "FooEnum" } } }, { "name": "enum_field_3", "type": { "defined": { "name": "FooEnum" } } }, { "name": "enum_field_4", "type": { "defined": { "name": "FooEnum" } } } ] } }, { "name": "State2", "type": { "kind": "struct", "fields": [ { "name": "vec_of_option", "type": { "vec": { "option": "u64" } } }, { "name": "box_field", "type": "bool" } ] } }, { "name": "ZcStruct", "serialization": "bytemuck", "repr": { "kind": "c" }, "type": { "kind": "struct", "fields": [ { "name": "some_field", "type": "u16" } ] } }, { "name": "external::MyStruct", "type": { "kind": "struct", "fields": [ { "name": "some_field", "type": "u8" } ] } }, { "name": "idl::some_other_module::MyStruct", "type": { "kind": "struct", "fields": [ { "name": "some_u8", "type": "u8" } ] } } ], "constants": [ { "name": "BYTES_STR", "type": "bytes", "value": "[116, 101, 115, 116]" }, { "name": "BYTE_STR", "type": "u8", "value": "116" }, { "name": "I128", "type": "i128", "value": "1000000" }, { "name": "U8", "type": "u8", "value": "6" } ] }
Trouver la différence