UNPKG

yamaswap-sdk

Version:
1 lines 1.97 MB
{"version":3,"sources":["../src/utils/getAddress.ts","../src/utils/error.ts","../src/utils/checks.ts","../src/abis/CryptoETFToken.json","../src/abis/CryptoETFOracle.json","../src/abis/CryptoETFRouter.json","../src/abis/CryptoETFTokenFactory.json","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/_version.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/properties.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/errors.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/data.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/maths.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/base58.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/base64-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/events.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/utf8.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/geturl-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/fetch.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/fixednumber.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/rlp-decode.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/rlp-encode.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/units.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/uuid.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/utils/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/abstract-coder.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/_assert.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/crypto.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/utils.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/hmac.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/pbkdf2.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/_sha2.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/sha256.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/_u64.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/sha512.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/crypto-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/hmac.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/sha3.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/keccak.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/ripemd160.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/ripemd160.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/pbkdf2.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/random.ts","../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/src/scrypt.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/scrypt.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/sha2.ts","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/src/abstract/utils.ts","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/src/abstract/modular.ts","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/src/abstract/curve.ts","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/src/abstract/weierstrass.ts","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/src/_shortw_utils.ts","../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/src/secp256k1.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/constants/addresses.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/constants/hashes.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/constants/numbers.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/constants/strings.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/constants/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/signature.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/signing-key.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/crypto/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/address/address.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/address/contract-address.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/address/checks.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/address/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/typed.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/address.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/anonymous.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/array.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/boolean.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/bytes.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/fixed-bytes.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/null.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/number.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/string.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/coders/tuple.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/hash/id.ts","../node_modules/.pnpm/@adraffy+ens-normalize@1.10.1/node_modules/@adraffy/ens-normalize/dist/index.mjs","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/hash/namehash.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/transaction/accesslist.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/transaction/address.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/transaction/transaction.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/transaction/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/hash/message.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/hash/solidity.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/hash/typed-data.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/hash/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/fragments.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/abi-coder.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/bytes32.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/interface.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/abi/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/contract/wrappers.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/contract/contract.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/contract/factory.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/contract/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/ens-resolver.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/format.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/plugins-network.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/network.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/subscriber-polling.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/abstract-provider.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/abstract-signer.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/community.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/subscriber-filterid.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-ankr.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-alchemy.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-chainstack.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-cloudflare.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-etherscan.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/ws-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-socket.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-websocket.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-infura.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-quicknode.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-fallback.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/default-provider.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/signer-noncemanager.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-pocket.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/provider-ipcsocket-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/providers/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/base-wallet.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/decode-owl.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/wordlist.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/wordlist-owl.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/lang-en.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/mnemonic.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/aes.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/mode.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/mode-cbc.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/mode-cfb.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/mode-ctr.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/mode-ecb.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/mode-ofb.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/padding.ts","../node_modules/.pnpm/aes-js@4.0.0-beta.5/node_modules/aes-js/src.ts/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/utils.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/json-keystore.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/hdwallet.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/json-crowdsale.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/wallet.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wallet/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/bit-reader.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/decode-owla.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/wordlist-owla.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/wordlists-browser.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/wordlists/index.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/ethers.ts","../node_modules/.pnpm/ethers@6.13.5_bufferutil@4.0.9_utf-8-validate@5.0.10/node_modules/ethers/src.ts/index.ts","../src/core_evm/clientevm.ts","../src/idl/iswap.json","../src/utils/queries.ts","../src/core/client.ts","../src/index.ts"],"sourcesContent":["import * as anchor from \"@coral-xyz/anchor\";\nimport { getMint, Mint } from \"@solana/spl-token\";\nimport { Connection, PublicKey } from \"@solana/web3.js\";\nimport { ETFNotExistsError } from \"./error\";\n\nexport function deriveEtfTokenMintAccount(program: anchor.Program, seeds: (string | PublicKey)[],): [anchor.web3.PublicKey, number] {\n const buffers = seeds.map(part => {\n if (typeof part === 'string') {\n return Buffer.from(part); // 字符串直接转换为 Buffer\n } else if (part instanceof PublicKey) {\n return part.toBuffer(); // PublicKey 转换为 Buffer\n } else {\n throw new Error(`Unsupported type in symbolParts: ${typeof part}`);\n }\n });\n\n\n return anchor.web3.PublicKey.findProgramAddressSync(\n [\n ...buffers\n ],\n program.programId,\n );\n}\n\n\n\n// export async function checkETFExists(etfAddress: PublicKey, connection: Connection): Promise<void> {\n// try {\n\n\n// const mintInfo: Mint = await getMint(connection, etfAddress);\n// console.log('ETF合约已存在:', mintInfo.address.toBase58());\n// return;\n// } catch (error) {\n// if (error instanceof Error && error.message.includes('Account does not exist')) {\n// throw new ETFNotExistsError(`ETF合约不存在: ${etfAddress}`);\n// } else {\n// throw new Error(`检查ETF合约时发生错误: ${error.message}`);\n// }\n// }\n// }0x9826eF6A1aFb97Bc7C2473B1D893A1067023bAF8\n\nexport function getSavedContractAddresses() {\n let json = {\n \"hardhat\": {\n \"TWAP\": \"0xDb731EaaFA0FFA7854A24C2379585a85D768Ed5C\",\n \"CETO\": \"0x335796f7A0F72368D1588839e38f163d90C92C80\",\n \"ETFROUTER\": \"0xa86582Ad5E80abc19F95f8A9Fb3905Cda0dAbd59\",\n \"ETFFACTORY\": \"0x97915c43511f8cB4Fbe7Ea03B96EEe940eC4AF12\",\n },\n \"localhost\": {\n \"TWAP\": \"0xDb731EaaFA0FFA7854A24C2379585a85D768Ed5C\",\n \"CETO\": \"0x335796f7A0F72368D1588839e38f163d90C92C80\",\n \"ETFROUTER\": \"0xa86582Ad5E80abc19F95f8A9Fb3905Cda0dAbd59\",\n \"ETFFACTORY\": \"0x97915c43511f8cB4Fbe7Ea03B96EEe940eC4AF12\",\n \"WETH\": \"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1\"\n },\n \"arbitrumSepolia\": {\n \"TWAP\": \"0x5571Af8f9277E5b00DDF5fdA7738eA01d9fc5dFe\",\n \"CETO\": \"0x197D6Fe658Eb2D9fa3eEE5d6F079ce1E1619Ad9b\",\n \"ETFROUTER\": \"0xE2B2efFC24c7e3Fe1ABb1c3eDD33481d9a7d9346\",\n \"ETFFACTORY\": \"0xD324c3B60B94b9Fe8aaA66F4A44a5b3a3Dbcb811\",\n \"WETH\": \"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1\"\n },\n \"sepolia\": {\n \"TWAP\": \"0x5617E6B8d33E4bE32c1c8eA140998bf6c1280E2D\",\n \"CETO\": \"0xC0Fc8583c7c308ea92471d3897cA04514615C84D\",\n \"ETFROUTER\": \"0x84E8120aC983b3125737DAebED2C579e9a9967F1\",\n \"ETFFACTORY\": \"0x21cFE67901E071fc178a1D766414Dfa20E285209\",\n \"WETH\": \"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14\"\n },\n }\n\n return json;\n}","\nexport class DexSDKError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'DexSDKError';\n Object.setPrototypeOf(this, DexSDKError.prototype);\n }\n}\n\n\nexport class ETFNotExistsError extends DexSDKError {\n constructor(message: string) {\n super(message);\n this.name = 'ETFNotExistsError';\n Object.setPrototypeOf(this, ETFNotExistsError.prototype);\n }\n}\n\nexport class ETFExistsError extends DexSDKError {\n constructor(message: string) {\n super(message);\n this.name = 'ETFExistsError';\n Object.setPrototypeOf(this, ETFExistsError.prototype);\n }\n}\n\nexport class ETFInsufficientBalanceError extends DexSDKError {\n constructor(message: string) {\n super(message);\n this.name = 'ETFInsufficientBalanceError';\n Object.setPrototypeOf(this, ETFInsufficientBalanceError.prototype);\n }\n}\n\nexport class ETFInvalidParamsError extends DexSDKError {\n constructor(message: string) {\n super(message);\n this.name = 'ETFInvalidParamsError';\n Object.setPrototypeOf(this, ETFInvalidParamsError.prototype);\n }\n}\n\n\nexport const isETFError = (error: unknown): error is ETFNotExistsError | ETFInsufficientBalanceError | ETFInvalidParamsError => {\n return error instanceof ETFNotExistsError ||\n error instanceof ETFInsufficientBalanceError ||\n error instanceof ETFInvalidParamsError;\n};\n","import { PublicKey } from '@solana/web3.js';\nimport { getAccount, getAssociatedTokenAddressSync, TokenAccountNotFoundError, Account } from '@solana/spl-token';\nimport { ETFInvalidParamsError, ETFInsufficientBalanceError, ETFNotExistsError } from './error';\nimport { DexClient } from '../core/client';\n// Start of Selection\nimport { ETFInfo } from './queries';\nimport { ETFCreateParams, MintETFTokenParams } from '../types/params';\n\nexport async function checkATAExists(client: DexClient, tokens: PublicKey[], owner: PublicKey, isContract: boolean = false): Promise<Account | undefined> {\n for (const token of tokens) {\n const tokenAccountAddress = getAssociatedTokenAddressSync(token, owner, isContract);\n try {\n return await getAccount(client.connection, tokenAccountAddress);\n } catch (e) {\n if (e instanceof TokenAccountNotFoundError) {\n throw new TokenAccountNotFoundError(`账户 ${tokenAccountAddress.toBase58()} 不存在`);\n }\n throw e;\n }\n }\n return undefined;\n}\n\nexport async function checkBalance(client: DexClient, etfAddress: PublicKey, owner: PublicKey, requiredAmount: number): Promise<void> {\n const balance = await client.queries.getETFBalance(etfAddress, owner);\n if (balance < requiredAmount) {\n throw new ETFInsufficientBalanceError(`用户代币账户余额不足,所需: ${requiredAmount}, 当前: ${balance}`);\n }\n}\n\nexport async function checkETFExists(client: DexClient, etfAddress: PublicKey): Promise<ETFInfo> {\n const etfInfo = await client.queries.getETFInfo(etfAddress);\n if (typeof etfInfo === 'string') {\n throw new ETFNotExistsError(etfInfo);\n }\n return etfInfo;\n}\n\nexport function validateETFCreateParams(params: ETFCreateParams): void {\n const { assets } = params;\n\n // check if the constituent is not empty\n if (!assets?.length) {\n throw new ETFInvalidParamsError('ETF组成部分不能为空');\n }\n\n const totalWeight = assets.reduce((sum, item) => sum + item.weight, 0);\n if (totalWeight !== 100) {\n throw new ETFInvalidParamsError(`ETF组成部分权重之和必须为100,当前为: ${totalWeight}`);\n }\n\n // check if the token address is valid\n const tokenSet = new Set<string>();\n for (const item of assets) {\n let tokenKey: PublicKey;\n try {\n tokenKey = new PublicKey(item.token);\n } catch (e) {\n throw new ETFInvalidParamsError(`无效的代币地址: ${item.token}`);\n }\n\n // check if there are duplicate tokens\n if (tokenSet.has(tokenKey.toBase58())) {\n throw new ETFInvalidParamsError(`存在重复的代币地址: ${item.token}`);\n }\n tokenSet.add(tokenKey.toBase58());\n if (item.weight <= 0) {\n throw new ETFInvalidParamsError(`代币权重必须大于0: ${item.token}`);\n }\n }\n}\n\nexport function validateMintETFParams(params: MintETFTokenParams): void {\n if (params.lamports <= 0) {\n throw new ETFInvalidParamsError('购买份额必须大于0');\n }\n // maximum limit 1000000 SOL\n if (params.lamports > 1e15) { // 1000000 * 1e9\n throw new ETFInvalidParamsError('购买份额超过最大限制(1000000 SOL)');\n }\n} ","{\n \"_format\": \"hh-sol-artifact-1\",\n \"contractName\": \"CryptoETFToken\",\n \"sourceName\": \"contracts/CryptoETFToken.sol\",\n \"abi\": [\n {\n \"inputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"name\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"symbol\",\n \"type\": \"string\"\n },\n {\n \"internalType\": \"string\",\n \"name\": \"_tokenUri\",\n \"type\": \"string\"\n },\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint24\",\n \"name\": \"distribution\",\n \"type\": \"uint24\"\n }\n ],\n \"internalType\": \"struct ICryptoETFToken.Constitunent[]\",\n \"name\": \"constitunents_\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"router_\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"rebalancer_\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"constructor\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"allowance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"needed\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ERC20InsufficientAllowance\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"balance\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"needed\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"ERC20InsufficientBalance\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"approver\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ERC20InvalidApprover\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"receiver\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ERC20InvalidReceiver\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"sender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ERC20InvalidSender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"ERC20InvalidSpender\",\n \"type\": \"error\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"token\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"SafeERC20FailedOperation\",\n \"type\": \"error\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Approval\",\n \"type\": \"event\"\n },\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"indexed\": true,\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"indexed\": false,\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"Transfer\",\n \"type\": \"event\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"owner\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"allowance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"spender\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"approve\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"account\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"balanceOf\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"etfAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"burn\",\n \"outputs\": [\n {\n \"internalType\": \"address[]\",\n \"name\": \"constitunentTokens\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"constitunentAmounts\",\n \"type\": \"uint256[]\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"constitunents\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint24\",\n \"name\": \"distribution\",\n \"type\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"constitunentsReserves\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"decimals\",\n \"outputs\": [\n {\n \"internalType\": \"uint8\",\n \"name\": \"\",\n \"type\": \"uint8\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"getConstitunents\",\n \"outputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint24\",\n \"name\": \"distribution\",\n \"type\": \"uint24\"\n }\n ],\n \"internalType\": \"struct ICryptoETFToken.Constitunent[]\",\n \"name\": \"\",\n \"type\": \"tuple[]\"\n },\n {\n \"internalType\": \"uint24\",\n \"name\": \"\",\n \"type\": \"uint24\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"hasMint\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"etfAmount\",\n \"type\": \"uint256\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address[]\",\n \"name\": \"tokens\",\n \"type\": \"address[]\"\n },\n {\n \"internalType\": \"uint256[]\",\n \"name\": \"amounts\",\n \"type\": \"uint256[]\"\n }\n ],\n \"name\": \"mint\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"components\": [\n {\n \"internalType\": \"address\",\n \"name\": \"tokenAddress\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint24\",\n \"name\": \"distribution\",\n \"type\": \"uint24\"\n }\n ],\n \"internalType\": \"struct ICryptoETFToken.Constitunent[]\",\n \"name\": \"constitunents_\",\n \"type\": \"tuple[]\"\n }\n ],\n \"name\": \"modifyConsitunent\",\n \"outputs\": [],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"name\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"rebalancer\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"router\",\n \"outputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"\",\n \"type\": \"address\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"symbol\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"tokenUri\",\n \"outputs\": [\n {\n \"internalType\": \"string\",\n \"name\": \"\",\n \"type\": \"string\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [],\n \"name\": \"totalSupply\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transfer\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"from\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"address\",\n \"name\": \"to\",\n \"type\": \"address\"\n },\n {\n \"internalType\": \"uint256\",\n \"name\": \"value\",\n \"type\": \"uint256\"\n }\n ],\n \"name\": \"transferFrom\",\n \"outputs\": [\n {\n \"internalType\": \"bool\",\n \"name\": \"\",\n \"type\": \"bool\"\n }\n ],\n \"stateMutability\": \"nonpayable\",\n \"type\": \"function\"\n }\n ],\n \"bytecode\": \"0x608060405234801561001057600080fd5b506040516138ca3803806138ca83398181016040528101906100329190610643565b858581600390816100439190610961565b5080600490816100539190610961565b50505083600590816100659190610961565b506100758361010260201b60201c565b81600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050505050610c69565b6000815111610146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013d90610a90565b60405180910390fd5b60005b815181101561031457600082828151811061016757610166610ab0565b5b60200260200101519050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036101e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101db90610b51565b60405180910390fd5b6000816020015162ffffff1611610230576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022790610be3565b60405180910390fd5b8060200151600a60008282829054906101000a900462ffffff166102549190610c32565b92506101000a81548162ffffff021916908362ffffff1602179055506006819080600181540180825580915050600190039060005260206000200160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548162ffffff021916908362ffffff1602179055505050508080600101915050610149565b5050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61037f82610336565b810181811067ffffffffffffffff8211171561039e5761039d610347565b5b80604052505050565b60006103b1610318565b90506103bd8282610376565b919050565b600067ffffffffffffffff8211156103dd576103dc610347565b5b6103e682610336565b9050602081019050919050565b60005b838110156104115780820151818401526020810190506103f6565b60008484015250505050565b600061043061042b846103c2565b6103a7565b90508281526020810184848401111561044c5761044b610331565b5b6104578482856103f3565b509392505050565b600082601f8301126104745761047361032c565b5b815161048484826020860161041d565b91505092915050565b600067ffffffffffffffff8211156104a8576104a7610347565b5b602082029050602081019050919050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006104ee826104c3565b9050919050565b6104fe816104e3565b811461050957600080fd5b50565b60008151905061051b816104f5565b92915050565b600062ffffff82169050919050565b61053981610521565b811461054457600080fd5b50565b60008151905061055681610530565b92915050565b600060408284031215610572576105716104be565b5b61057c60406103a7565b9050600061058c8482850161050c565b60008301525060206105a084828501610547565b60208301525092915050565b60006105bf6105ba8461048d565b6103a7565b905080838252602082019050604084028301858111156105e2576105e16104b9565b5b835b8181101561060b57806105f7888261055c565b8452602084019350506040810190506105e4565b5050509392505050565b600082601f83011261062a5761062961032c565b5b815161063a8482602086016105ac565b91505092915050565b60008060008060008060c087890312156106605761065f610322565b5b600087015167ffffffffffffffff81111561067e5761067d610327565b5b61068a89828a0161045f565b965050602087015167ffffffffffffffff8111156106ab576106aa610327565b5b6106b789828a0161045f565b955050604087015167ffffffffffffffff8111156106d8576106d7610327565b5b6106e489828a0161045f565b945050606087015167ffffffffffffffff81111561070557610704610327565b5b61071189828a01610615565b935050608061072289828a0161050c565b92505060a061073389828a0161050c565b9150509295509295509295565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061079257607f821691505b6020821081036107a5576107a461074b565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261080d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826107d0565b61081786836107d0565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600061085e6108596108548461082f565b610839565b61082f565b9050919050565b6000819050919050565b61087883610843565b61088c61088482610865565b8484546107dd565b825550505050565b600090565b6108a1610894565b6108ac81848461086f565b505050565b5b818110156108d0576108c5600082610899565b6001810190506108b2565b5050565b601f821115610915576108e6816107ab565b6108ef846107c0565b810160208510156108fe578190505b61091261090a856107c0565b8301826108b1565b50505b505050565b600082821c905092915050565b60006109386000198460080261091a565b1980831691505092915050565b60006109518383610927565b9150826002028217905092915050565b61096a82610740565b67ffffffffffffffff81111561098357610982610347565b5b61098d825461077a565b6109988282856108d4565b600060209050601f8311600181146109cb57600084156109b9578287015190505b6109c38582610945565b865550610a2b565b601f1984166109d9866107ab565b60005b82811015610a01578489015182556001820191506020850194506020810190506109dc565b86831015610a1e5784890151610a1a601f891682610927565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f636f6e73746974756e656e74732063616e206e6f7420626520656d7074790000600082015250565b6000610a7a601e83610a33565b9150610a8582610a44565b602082019050919050565b60006020820190508181036000830152610aa981610a6d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f636f6e73746974756e656e7420746f6b656e20616464726573732063616e206e60008201527f6f74206265207a65726f00000000000000000000000000000000000000000000602082015250565b6000610b3b602a83610a33565b9150610b4682610adf565b604082019050919050565b60006020820190508181036000830152610b6a81610b2e565b9050919050565b7f636f6e73746974756e656e7420746f6b656e20646973747269627574696f6e2060008201527f6d7573742067726561746572207468616e207a65726f00000000000000000000602082015250565b6000610bcd603683610a33565b9150610bd882610b71565b604082019050919050565b60006020820190508181036000830152610bfc81610bc0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610c3d82610521565b9150610c4883610521565b9250828201905062ffffff811115610c6357610c62610c03565b5b92915050565b612c5280610c786000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c80635b15f15e116100ad578063a9059cbb11610071578063a9059cbb14610321578063dd62ed3e14610351578063f7da711114610381578063f887ea40146103a0578063fcd3533c146103be57610121565b80635b15f15e14610254578063651b52c01461027257806370a08231146102a257806395d89b41146102d257806396522fd0146102f057610121565b806323b872dd116100f457806323b872dd146101b0578063313ce567146101e057806331feab29146101fe578063355e0c5d1461021a57806358cef0431461023857610121565b806301d22ccd1461012657806306fdde0314610144578063095ea7b31461016257806318160ddd14610192575b600080fd5b61012e6103ef565b60405161013b9190611af5565b60405180910390f35b61014c610415565b6040516101599190611ba0565b60405180910390f35b61017c60048036038101906101779190611c38565b6104a7565b6040516101899190611c93565b60405180910390f35b61019a6104ca565b6040516101a79190611cbd565b60405180910390f35b6101ca60048036038101906101c59190611cd8565b6104d4565b6040516101d79190611c93565b60405180910390f35b6101e8610503565b6040516101f59190611d47565b60405180910390f35b61021860048036038101906102139190611e1d565b61050c565b005b6102226107c1565b60405161022f9190611ba0565b60405180910390f35b610252600480360381019061024d9190611f1a565b61084f565b005b61025c610952565b6040516102699190611c93565b60405180910390f35b61028c60048036038101906102879190611f67565b610965565b6040516102999190611cbd565b60405180910390f35b6102bc60048036038101906102b79190611f67565b61097d565b6040516102c99190611cbd565b60405180910390f35b6102da6109c5565b6040516102e79190611ba0565b60405180910390f35b61030a60048036038101906103059190611f94565b610a57565b604051610318929190611fdf565b60405180910390f35b61033b60048036038101906103369190611c38565b610ab6565b6040516103489190611c93565b60405180910390f35b61036b60048036038101906103669190612008565b610ad9565b6040516103789190611cbd565b60405180910390f35b610389610b60565b604051610397929190612144565b60405180910390f35b6103a8610c4e565b6040516103b59190611af5565b60405180910390f35b6103d860048036038101906103d39190612174565b610c74565b6040516103e6929190612321565b60405180910390f35b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606003805461042490612387565b80601f016020809104026020016040519081016040528092919081815260200182805461045090612387565b801561049d5780601f106104725761010080835404028352916020019161049d565b820191906000526020600020905b81548152906001019060200180831161048057829003601f168201915b5050505050905090565b6000806104b26110da565b90506104bf8185856110e2565b600191505092915050565b6000600254905090565b6000806104df6110da565b90506104ec8582856110f4565b6104f7858585611189565b60019150509392505050565b60006012905090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461059c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059390612404565b60405180910390fd5b600086116105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d690612470565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361064e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610645906124dc565b60405180910390fd5b6006805490508484905014610698576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068f9061256e565b60405180910390fd5b60068054905082829050146106e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d990612600565b60405180910390fd5b60005b848490508110156107935782828281811061070357610702612620565b5b905060200201356009600087878581811061072157610720612620565b5b90506020020160208101906107369190611f67565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461077f919061267e565b9250508190555080806001019150506106e5565b5061079e858761127d565b6001600a60036101000a81548160ff021916908315150217905550505050505050565b600580546107ce90612387565b80601f01602080910402602001604051908101604052809291908181526020018280546107fa90612387565b80156108475780601f1061081c57610100808354040283529160200191610847565b820191906000526020600020905b81548152906001019060200180831161082a57829003601f168201915b505050505081565b60006108596104ca565b146108ef57600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108ee576040517f