Browse Source

:white_check_mark: Adding accounts necessary for account undelegation in Anchor config (#184)

Danilo Guanabara 3 months ago
parent
commit
11370143bb

+ 12 - 0
Anchor.toml

@@ -65,3 +65,15 @@ filename = "tests/fixtures/commit_record.json"
 [[test.validator.account]]
 [[test.validator.account]]
 address = "7nQvHcfEqtFmY2q6hiQbidu8BCNdqegnEFfH7HkByFn5"
 address = "7nQvHcfEqtFmY2q6hiQbidu8BCNdqegnEFfH7HkByFn5"
 filename = "tests/fixtures/committed_state.json"
 filename = "tests/fixtures/committed_state.json"
+
+[[test.validator.account]]
+address = "mAGicPQYBMvcYveUZA5F5UNNwyHvfYh5xkLS2Fr1mev"
+filename = "tests/fixtures/magic_context.json"
+
+[[test.validator.account]]
+address = "EpJnX7ueXk7fKojBymqmVuCuwyhDQsYcLVL1XMsBbvDX"
+filename = "tests/fixtures/vault1.json"
+
+[[test.validator.account]]
+address = "7JrkjmZPprHwtuvtuGTXp9hwfGYFAQLnLeFM52kqAgXg"
+filename = "tests/fixtures/vault2.json"

BIN
tests/fixtures/delegation.so


+ 14 - 0
tests/fixtures/magic_context.json

@@ -0,0 +1,14 @@
+{
+  "pubkey": "mAGicPQYBMvcYveUZA5F5UNNwyHvfYh5xkLS2Fr1mev",
+  "account": {
+    "lamports": 99999800000,
+    "data": [
+      "",
+      "base64"
+    ],
+    "owner": "11111111111111111111111111111111",
+    "executable": false,
+    "rentEpoch": 18446744073709551615,
+    "space": 0
+  }
+}

+ 14 - 0
tests/fixtures/vault1.json

@@ -0,0 +1,14 @@
+{
+  "pubkey": "EpJnX7ueXk7fKojBymqmVuCuwyhDQsYcLVL1XMsBbvDX",
+  "account": {
+    "lamports": 110379438,
+    "data": [
+      "AAAAAAAAAAA=",
+      "base64"
+    ],
+    "owner": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh",
+    "executable": false,
+    "rentEpoch": 18446744073709551615,
+    "space": 8
+  }
+}

+ 14 - 0
tests/fixtures/vault2.json

@@ -0,0 +1,14 @@
+{
+  "pubkey": "7JrkjmZPprHwtuvtuGTXp9hwfGYFAQLnLeFM52kqAgXg",
+  "account": {
+    "lamports": 407749078,
+    "data": [
+      "AAAAAAAAAAA=",
+      "base64"
+    ],
+    "owner": "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh",
+    "executable": false,
+    "rentEpoch": 18446744073709551615,
+    "space": 8
+  }
+}