{
  "address": "dXgZyuguvD2m5G5385XkdokZBryUoSE6LbNJeWiFiN5",
  "metadata": {
    "name": "iswap",
    "version": "0.1.0",
    "spec": "0.1.0",
    "description": "Created with Anchor"
  },
  "instructions": [
    {
      "name": "close",
      "discriminator": [
        98,
        165,
        201,
        177,
        108,
        65,
        206,
        96
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "iswap",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "decrement",
      "discriminator": [
        106,
        227,
        168,
        59,
        248,
        27,
        150,
        101
      ],
      "accounts": [
        {
          "name": "iswap",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "etf_burn",
      "discriminator": [
        185,
        203,
        114,
        195,
        129,
        70,
        235,
        23
      ],
      "accounts": [
        {
          "name": "etf_token_info",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  116,
                  102,
                  95,
                  116,
                  111,
                  107,
                  101,
                  110,
                  95,
                  118,
                  51
                ]
              },
              {
                "kind": "account",
                "path": "etf_token_mint_account"
              }
            ]
          }
        },
        {
          "name": "etf_token_mint_account",
          "writable": true
        },
        {
          "name": "etf_token_ata",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "const",
                "value": [
                  6,
                  221,
                  246,
                  225,
                  215,
                  101,
                  161,
                  147,
                  217,
                  203,
                  225,
                  70,
                  206,
                  235,
                  121,
                  172,
                  28,
                  180,
                  133,
                  237,
                  95,
                  91,
                  55,
                  145,
                  58,
                  140,
                  245,
                  133,
                  126,
                  255,
                  0,
                  169
                ]
              },
              {
                "kind": "account",
                "path": "etf_token_mint_account"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140,
                151,
                37,
                143,
                78,
                36,
                137,
                241,
                187,
                61,
                16,
                41,
                20,
                142,
                13,
                131,
                11,
                90,
                19,
                153,
                218,
                255,
                16,
                132,
                4,
                142,
                123,
                216,
                219,
                233,
                248,
                89
              ]
            }
          }
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "lamports",
          "type": "f64"
        }
      ]
    },
    {
      "name": "etf_create",
      "discriminator": [
        0,
        81,
        62,
        85,
        242,
        37,
        4,
        245
      ],
      "accounts": [
        {
          "name": "etf_token_info",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  116,
                  102,
                  95,
                  116,
                  111,
                  107,
                  101,
                  110,
                  95,
                  118,
                  51
                ]
              },
              {
                "kind": "account",
                "path": "etf_token_mint_account"
              }
            ]
          }
        },
        {
          "name": "metadata_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  109,
                  101,
                  116,
                  97,
                  100,
                  97,
                  116,
                  97
                ]
              },
              {
                "kind": "account",
                "path": "token_metadata_program"
              },
              {
                "kind": "account",
                "path": "etf_token_mint_account"
              }
            ],
            "program": {
              "kind": "account",
              "path": "token_metadata_program"
            }
          }
        },
        {
          "name": "etf_token_mint_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  116,
                  102,
                  95,
                  116,
                  111,
                  107,
                  101,
                  110,
                  95,
                  118,
                  51
                ]
              },
              {
                "kind": "arg",
                "path": "args.symbol"
              }
            ]
          }
        },
        {
          "name": "rent",
          "address": "SysvarRent111111111111111111111111111111111"
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "token_metadata_program",
          "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
        },
        {
          "name": "token_program",
          "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "args",
          "type": {
            "defined": {
              "name": "EtfTokenArgs"
            }
          }
        }
      ]
    },
    {
      "name": "etf_mint",
      "discriminator": [
        253,
        102,
        37,
        173,
        154,
        46,
        245,
        224
      ],
      "accounts": [
        {
          "name": "etf_token_info",
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  101,
                  116,
                  102,
                  95,
                  116,
                  111,
                  107,
                  101,
                  110,
                  95,
                  118,
                  51
                ]
              },
              {
                "kind": "account",
                "path": "etf_token_mint_account"
              }
            ]
          }
        },
        {
          "name": "etf_token_mint_account",
          "writable": true
        },
        {
          "name": "etf_token_ata",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "account",
                "path": "authority"
              },
              {
                "kind": "const",
                "value": [
                  6,
                  221,
                  246,
                  225,
                  215,
                  101,
                  161,
                  147,
                  217,
                  203,
                  225,
                  70,
                  206,
                  235,
                  121,
                  172,
                  28,
                  180,
                  133,
                  237,
                  95,
                  91,
                  55,
                  145,
                  58,
                  140,
                  245,
                  133,
                  126,
                  255,
                  0,
                  169
                ]
              },
              {
                "kind": "account",
                "path": "etf_token_mint_account"
              }
            ],
            "program": {
              "kind": "const",
              "value": [
                140,
                151,
                37,
                143,
                78,
                36,
                137,
                241,
                187,
                61,
                16,
                41,
                20,
                142,
                13,
                131,
                11,
                90,
                19,
                153,
                218,
                255,
                16,
                132,
                4,
                142,
                123,
                216,
                219,
                233,
                248,
                89
              ]
            }
          }
        },
        {
          "name": "authority",
          "writable": true,
          "signer": true
        },
        {
          "name": "token_program"
        },
        {
          "name": "associated_token_program",
          "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "lamports",
          "type": "f64"
        }
      ]
    },
    {
      "name": "increment",
      "discriminator": [
        11,
        18,
        104,
        9,
        104,
        174,
        59,
        33
      ],
      "accounts": [
        {
          "name": "iswap",
          "writable": true
        }
      ],
      "args": []
    },
    {
      "name": "initialize",
      "discriminator": [
        175,
        175,
        109,
        31,
        13,
        152,
        155,
        237
      ],
      "accounts": [
        {
          "name": "payer",
          "writable": true,
          "signer": true
        },
        {
          "name": "iswap",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": []
    },
    {
      "name": "initialize_user",
      "discriminator": [
        111,
        17,
        185,
        250,
        60,
        122,
        38,
        254
      ],
      "accounts": [
        {
          "name": "user_account",
          "writable": true,
          "pda": {
            "seeds": [
              {
                "kind": "const",
                "value": [
                  117,
                  115,
                  101,
                  114,
                  65,
                  99,
                  99,
                  111,
                  117,
                  110,
                  116,
                  95,
                  118,
                  50
                ]
              },
              {
                "kind": "account",
                "path": "user"
              }
            ]
          }
        },
        {
          "name": "inviter_account",
          "optional": true
        },
        {
          "name": "user",
          "writable": true,
          "signer": true
        },
        {
          "name": "system_program",
          "address": "11111111111111111111111111111111"
        }
      ],
      "args": [
        {
          "name": "nickname",
          "type": "string"
        },
        {
          "name": "direct_inviter",
          "type": {
            "option": "pubkey"
          }
        },
        {
          "name": "avatar",
          "type": "string"
        }
      ]
    },
    {
      "name": "set",
      "discriminator": [
        198,
        51,
        53,
        241,
        116,
        29,
        126,
        194
      ],
      "accounts": [
        {
          "name": "iswap",
          "writable": true
        }
      ],
      "args": [
        {
          "name": "value",
          "type": "u8"
        }
      ]
    }
  ],
  "accounts": [
    {
      "name": "EtfToken",
      "discriminator": [
        187,
        90,
        26,
        73,
        137,
        112,
        105,
        60
      ]
    },
    {
      "name": "Iswap",
      "discriminator": [
        228,
        5,
        227,
        43,
        35,
        87,
        170,
        87
      ]
    },
    {
      "name": "UserAccount",
      "discriminator": [
        211,
        33,
        136,
        16,
        186,
        110,
        242,
        127
      ]
    }
  ],
  "events": [
    {
      "name": "EtfTokenBurnEvent",
      "discriminator": [
        86,
        32,
        4,
        35,
        170,
        93,
        29,
        251
      ]
    },
    {
      "name": "EtfTokenCreateEvent",
      "discriminator": [
        166,
        238,
        215,
        49,
        221,
        120,
        90,
        191
      ]
    },
    {
      "name": "EtfTokenMintEvent",
      "discriminator": [
        55,
        168,
        3,
        194,
        101,
        86,
        242,
        173
      ]
    },
    {
      "name": "UserInitialized",
      "discriminator": [
        66,
        195,
        5,
        223,
        42,
        84,
        135,
        60
      ]
    }
  ],
  "errors": [
    {
      "code": 6000,
      "name": "InvalidAccounts",
      "msg": "Lack of necessary accounts"
    },
    {
      "code": 6001,
      "name": "InsufficientBalance",
      "msg": "Insufficient balance"
    }
  ],
  "types": [
    {
      "name": "EtfAsset",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "token",
            "type": "pubkey"
          },
          {
            "name": "weight",
            "type": "u16"
          }
        ]
      }
    },
    {
      "name": "EtfToken",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "mint_account",
            "type": "pubkey"
          },
          {
            "name": "creator",
            "type": "pubkey"
          },
          {
            "name": "create_at",
            "type": "i64"
          },
          {
            "name": "description",
            "type": "string"
          },
          {
            "name": "assets",
            "type": {
              "vec": {
                "defined": {
                  "name": "EtfAsset"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "EtfTokenArgs",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "name",
            "type": "string"
          },
          {
            "name": "symbol",
            "type": "string"
          },
          {
            "name": "description",
            "type": "string"
          },
          {
            "name": "url",
            "type": "string"
          },
          {
            "name": "assets",
            "type": {
              "vec": {
                "defined": {
                  "name": "EtfAsset"
                }
              }
            }
          }
        ]
      }
    },
    {
      "name": "EtfTokenBurnEvent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "etf_token_mint",
            "type": "pubkey"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "lamports",
            "type": "f64"
          }
        ]
      }
    },
    {
      "name": "EtfTokenCreateEvent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "etf_token_mint",
            "type": "pubkey"
          },
          {
            "name": "creator",
            "type": "pubkey"
          }
        ]
      }
    },
    {
      "name": "EtfTokenMintEvent",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "etf_token_mint",
            "type": "pubkey"
          },
          {
            "name": "authority",
            "type": "pubkey"
          },
          {
            "name": "lamports",
            "type": "f64"
          }
        ]
      }
    },
    {
      "name": "Iswap",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "count",
            "type": "u8"
          }
        ]
      }
    },
    {
      "name": "UserAccount",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "owner",
            "type": "pubkey"
          },
          {
            "name": "is_frozen",
            "type": "bool"
          },
          {
            "name": "created_at",
            "type": "i64"
          },
          {
            "name": "inviter_code",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "direct_inviter",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "nickname",
            "type": "string"
          },
          {
            "name": "avatar",
            "type": "string"
          },
          {
            "name": "padding",
            "type": {
              "array": [
                "u64",
                10
              ]
            }
          }
        ]
      }
    },
    {
      "name": "UserInitialized",
      "type": {
        "kind": "struct",
        "fields": [
          {
            "name": "user",
            "type": "pubkey"
          },
          {
            "name": "inviter_code",
            "type": {
              "option": "pubkey"
            }
          },
          {
            "name": "nickname",
            "type": "string"
          },
          {
            "name": "created_at",
            "type": "i64"
          }
        ]
      }
    }
  ]
}