diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 00000000..7d9e6d50 --- /dev/null +++ b/test/Makefile @@ -0,0 +1,98 @@ +PWD = $(abspath ./) + +JAVASCORE_PATH = $(PWD)/../javascore +GRADLE = ./gradlew + +HARDHAT = npx hardhat +TS_NODE = npx ts-node +NETWORK = --network localhost +SOLIDITY_CONTRACTS = ./solidity/contracts + +.DEFAULT_GOAL := all +all: + @echo $(PWD) + +.PHONY: build clean deploy + +clean-java: + (cd $(JAVASCORE_PATH); $(GRADLE) clean) + +clean-solidity: + $(HARDHAT) clean + $(RM) -rf \ + $(SOLIDITY_CONTRACTS)/bmc \ + $(SOLIDITY_CONTRACTS)/bmv* \ + $(SOLIDITY_CONTRACTS)/xcall + +clean: clean-java clean-solidity + +copy-src: + @ echo ">>> Copy BMC/BMV/xCall solidity codes" ; \ + $(TS_NODE) scripts/setup/copy_src.ts + +compile: copy-src + @ echo ">>> Compile solidity codes" ; \ + $(HARDHAT) compile + +build-bmc-java: + @ echo ">>> Build BMC javascore" ; \ + cd $(JAVASCORE_PATH) ; \ + $(GRADLE) bmc:optimizedJar + +build-bmv-java: + @ echo ">>> Build BMV javascore" ; \ + cd $(JAVASCORE_PATH) ; \ + $(GRADLE) bmv:bridge:optimizedJar \ + bmv:btpblock:optimizedJar + +build-xcall-java: + @ echo ">>> Build xCall javascore" ; \ + cd $(JAVASCORE_PATH) ; \ + $(GRADLE) xcall:optimizedJar + +build-dapp-java: + @ echo ">>> Build DApp sample javascore" ; \ + cd $(JAVASCORE_PATH) ; \ + $(GRADLE) dapp-sample:optimizedJar + +build-all: compile build-bmc-java build-bmv-java build-xcall-java build-dapp-java + +deploy-bmc: + @ echo ">>> Deploy BMC contracts" ; \ + JAVASCORE_PATH=$(JAVASCORE_PATH) \ + $(HARDHAT) $(NETWORK) run scripts/setup/deploy_bmc.ts + +deploy-bmv: + @ echo ">>> Deploy BMV contracts" ; \ + JAVASCORE_PATH=$(JAVASCORE_PATH) \ + $(HARDHAT) $(NETWORK) run scripts/setup/deploy_bmv.ts + +deploy-xcall: + @ echo ">>> Deploy xCall contracts" ; \ + JAVASCORE_PATH=$(JAVASCORE_PATH) \ + $(HARDHAT) $(NETWORK) run scripts/setup/deploy_xcall.ts + +deploy-dapp: + @ echo ">>> Deploy DApp contracts" ; \ + JAVASCORE_PATH=$(JAVASCORE_PATH) \ + $(HARDHAT) $(NETWORK) run scripts/setup/deploy_dapp.ts + +deploy-all: deploy-bmc deploy-bmv deploy-xcall deploy-dapp + +start-nodes: + @ echo ">>> Start nodes" ; \ + cd docker; \ + docker compose up -d + +stop-nodes: + @ echo ">>> Stop nodes" ; \ + cd docker; \ + docker compose down + +setup-node: + @ echo ">>> Setup ICON node" ; \ + $(TS_NODE) scripts/setup/setup_node.ts + +run-demo: + @ echo ">>> Run demo_dapp.ts " ; \ + $(HARDHAT) $(NETWORK) run scripts/demo_dapp.ts diff --git a/test/README.md b/test/README.md new file mode 100644 index 00000000..937e823d --- /dev/null +++ b/test/README.md @@ -0,0 +1,19 @@ +# End-to-End Testing Demo + +This is a demo script from btp2 that demonstrates simple e2e testing scenarios. + +## Prerequisites + +To run the demo, the following software needs to be installed. + +* Node.js 18 (LTS) \[[download](https://nodejs.org/en/download/)\] +* Docker compose (V2) \[[download](https://docs.docker.com/compose/install/)\] +* OpenJDK 11 or above \[[download](https://adoptium.net/)\] +* jq \[[download](https://github.com/stedolan/jq)\] +* go \[[download](https://go.dev/doc/install)\] + +## Steps to run the script +* Step 1: Run the DIVE package that spins ups two chains for sending message using BTP +* Step 2: After you get the contract address from the output, update xCall and dApp address in deployment.json file +* Step 3: Update network and endpoint in the chain_config.json, deployments.json and hardhat.config.ts files +* Step 4: now run the command 'make run-demo' to execute all scenarios. \ No newline at end of file diff --git a/test/chain_config.json b/test/chain_config.json new file mode 100644 index 00000000..8a14259e --- /dev/null +++ b/test/chain_config.json @@ -0,0 +1,26 @@ +{ + "chains": { + "icon0": { + "network": "0x3.icon", + "endpoint": "http://localhost:9080/api/v3/icon_dex", + "keystore": "./docker/icon/config/keystore.json", + "keysecret": "./docker/icon/config/keysecret" + }, + "icon1": { + "network": "0x101.icon", + "endpoint": "http://localhost:9180/api/v3/icon_dex", + "keystore": "./docker/icon/config/keystore.json", + "keysecret": "./docker/icon/config/keysecret" + }, + "hardhat": { + "network": "0x539.hardhat", + "endpoint": "http://localhost:8545", + "keystore": "./docker/hardhat/keystore0.json", + "keypass": "hardhat" + } + }, + "link": { + "src": "icon0", + "dst": "hardhat" + } +} diff --git a/test/deployments.json b/test/deployments.json new file mode 100644 index 00000000..77dec90e --- /dev/null +++ b/test/deployments.json @@ -0,0 +1,27 @@ +{ + "icon0": { + "network": "0x3.icon", + "contracts": { + "bmc": "cxd4025033fff4ca78396336bcdd5d7db2472ccd93", + "bmv": "cxd3d50ecc9fc0c5ca772cadb8bdea065db9c2ef55", + "xcall": "cx1b316ad66f3e9fcfdb9e059eba083403cc85e50f", + "dapp": "cx6d462648fda7016e179330e686555cd14900f0cd" + }, + "networkTypeId": "0x1", + "networkId": "0x1", + "blockNum": 1725 + }, + "hardhat": { + "network": "0x301824.eth", + "contracts": { + "bmcm": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318", + "bmcs": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "bmc": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82", + "bmv": "0x68B1D87F95878fE05B998F19b66F4baba5De1aed", + "xcall": "0x5911A6541729C227fAda7D5187ee7518B47fB237", + "dapp": "0x9bE03fF3E1888A216f9e48c68B587A89c5b94CD6" + }, + "blockNum": 890 + }, + "link": { "src": "icon0", "dst": "hardhat" } +} diff --git a/test/docker/docker-compose.yml b/test/docker/docker-compose.yml new file mode 100644 index 00000000..6200c281 --- /dev/null +++ b/test/docker/docker-compose.yml @@ -0,0 +1,27 @@ +version: "3" +services: + hardhat: + build: ./hardhat + ports: + - 8545:8545 + volumes: + - ./hardhat/logs:/app/logs + command: /bin/sh -c "/app/node_modules/.bin/hardhat --config hardhat.config.js node 2>&1 | tee /app/logs/hardhat.log" + icon-node: + image: iconloop/goloop-icon:v1.3.7 + container_name: "icon-node" + environment: + GOLOOP_LOG_LEVEL: "trace" + GOLOOP_RPC_ADDR: ":9080" + GOLOOP_P2P_LISTEN: ":7080" + ICON_CONFIG: "/goloop/config/icon_config.json" + cap_add: + - SYS_TIME + ports: + - 9080:9080 + - 7080:7080 + volumes: + - ./icon/config:/goloop/config + - ./icon/data:/goloop/data + - ./icon/logs:/goloop/logs + command: /bin/sh -c /goloop/config/start.sh diff --git a/test/docker/hardhat/Dockerfile b/test/docker/hardhat/Dockerfile new file mode 100644 index 00000000..5e2749b4 --- /dev/null +++ b/test/docker/hardhat/Dockerfile @@ -0,0 +1,7 @@ +FROM node:lts-alpine + +RUN mkdir -p /app +WORKDIR /app + +RUN npm install --save-dev hardhat +ADD hardhat.config.js /app diff --git a/test/docker/hardhat/hardhat.config.js b/test/docker/hardhat/hardhat.config.js new file mode 100644 index 00000000..a4da2755 --- /dev/null +++ b/test/docker/hardhat/hardhat.config.js @@ -0,0 +1,12 @@ +/** @type import('hardhat/config').HardhatUserConfig */ +module.exports = { + solidity: "0.8.17", + networks: { + hardhat: { + mining: { + auto: false, + interval: 2000 + } + } + } +}; diff --git a/test/docker/hardhat/keystore0.json b/test/docker/hardhat/keystore0.json new file mode 100644 index 00000000..c513f7f5 --- /dev/null +++ b/test/docker/hardhat/keystore0.json @@ -0,0 +1 @@ +{"address":"f39fd6e51aad88f6f4ce6ab8827279cfffb92266","id":"5e20b25c-a655-49b6-a604-567cfc71d92e","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"248d6c71c1b9f41f82c4a9cc68c513a3"},"ciphertext":"648ec06559a1b889778ea82c3b540373b1bf2d033090f81344c66b9e4b5a2d3c","kdf":"scrypt","kdfparams":{"salt":"02f971a5957e9d403770c9409eb273c2dd094cfae8848cc95e6daf529af8599e","n":131072,"dklen":32,"p":1,"r":8},"mac":"4f6b419340042835dd8c0b44ebf68a9f6c4de0cacd7f89b86d8198c3f84e4198"}} diff --git a/test/docker/hardhat/logs/hardhat.log b/test/docker/hardhat/logs/hardhat.log new file mode 100644 index 00000000..0e5e2f15 --- /dev/null +++ b/test/docker/hardhat/logs/hardhat.log @@ -0,0 +1,1240 @@ +Started HTTP and WebSocket JSON-RPC server at http://0.0.0.0:8545/ + +Accounts +======== + +WARNING: These accounts, and their private keys, are publicly known. +Any funds sent to them on Mainnet or any other live network WILL BE LOST. + +Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH) +Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + +Account #1: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000 ETH) +Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d + +Account #2: 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (10000 ETH) +Private Key: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + +Account #3: 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000 ETH) +Private Key: 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 + +Account #4: 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (10000 ETH) +Private Key: 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a + +Account #5: 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (10000 ETH) +Private Key: 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba + +Account #6: 0x976EA74026E726554dB657fA54763abd0C3a0aa9 (10000 ETH) +Private Key: 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e + +Account #7: 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 (10000 ETH) +Private Key: 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 + +Account #8: 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f (10000 ETH) +Private Key: 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 + +Account #9: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 (10000 ETH) +Private Key: 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 + +Account #10: 0xBcd4042DE499D14e55001CcbB24a551F3b954096 (10000 ETH) +Private Key: 0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897 + +Account #11: 0x71bE63f3384f5fb98995898A86B02Fb2426c5788 (10000 ETH) +Private Key: 0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82 + +Account #12: 0xFABB0ac9d68B0B445fB7357272Ff202C5651694a (10000 ETH) +Private Key: 0xa267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1 + +Account #13: 0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec (10000 ETH) +Private Key: 0x47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd + +Account #14: 0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097 (10000 ETH) +Private Key: 0xc526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa + +Account #15: 0xcd3B766CCDd6AE721141F452C550Ca635964ce71 (10000 ETH) +Private Key: 0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61 + +Account #16: 0x2546BcD3c84621e976D8185a91A922aE77ECEc30 (10000 ETH) +Private Key: 0xea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0 + +Account #17: 0xbDA5747bFD65F08deb54cb465eB87D40e51B197E (10000 ETH) +Private Key: 0x689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd + +Account #18: 0xdD2FD4581271e230360230F9337D5c0430Bf44C0 (10000 ETH) +Private Key: 0xde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0 + +Account #19: 0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199 (10000 ETH) +Private Key: 0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e + +WARNING: These accounts, and their private keys, are publicly known. +Any funds sent to them on Mainnet or any other live network WILL BE LOST. + +Mined empty block #1 with base fee 875000000 +Mined empty block range #1 to #2 +Mined empty block range #1 to #3 +Mined empty block range #1 to #4 +Mined empty block range #1 to #5 +Mined empty block range #1 to #6 +Mined empty block range #1 to #7 +Mined empty block range #1 to #8 +Mined empty block range #1 to #9 +Mined empty block range #1 to #10 +Mined empty block range #1 to #11 +Mined empty block range #1 to #12 +Mined empty block range #1 to #13 +Mined empty block range #1 to #14 +Mined empty block range #1 to #15 +Mined empty block range #1 to #16 +Mined empty block range #1 to #17 +Mined empty block range #1 to #18 +Mined empty block range #1 to #19 +Mined empty block range #1 to #20 +Mined empty block range #1 to #21 +Mined empty block range #1 to #22 +Mined empty block range #1 to #23 +Mined empty block range #1 to #24 +Mined empty block range #1 to #25 +Mined empty block range #1 to #26 +Mined empty block range #1 to #27 +Mined empty block range #1 to #28 +Mined empty block range #1 to #29 +Mined empty block range #1 to #30 +Mined empty block range #1 to #31 +Mined empty block range #1 to #32 +Mined empty block range #1 to #33 +Mined empty block range #1 to #34 +Mined empty block range #1 to #35 +Mined empty block range #1 to #36 +Mined empty block range #1 to #37 +Mined empty block range #1 to #38 +Mined empty block range #1 to #39 +Mined empty block range #1 to #40 +Mined empty block range #1 to #41 +Mined empty block range #1 to #42 +Mined empty block range #1 to #43 +Mined empty block range #1 to #44 +Mined empty block range #1 to #45 +Mined empty block range #1 to #46 +Mined empty block range #1 to #47 +Mined empty block range #1 to #48 +Mined empty block range #1 to #49 +Mined empty block range #1 to #50 +Mined empty block range #1 to #51 +Mined empty block range #1 to #52 +Mined empty block range #1 to #53 +Mined empty block range #1 to #54 +Mined empty block range #1 to #55 +Mined empty block range #1 to #56 +Mined empty block range #1 to #57 +Mined empty block range #1 to #58 +Mined empty block range #1 to #59 +Mined empty block range #1 to #60 +Mined empty block range #1 to #61 +Mined empty block range #1 to #62 +Mined empty block range #1 to #63 +Mined empty block range #1 to #64 +Mined empty block range #1 to #65 +Mined empty block range #1 to #66 +eth_chainId +eth_accounts +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_estimateGas +eth_getBlockByNumber +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #67 + Block: 0x5af585c05ed6ad9a0e5c2deab79531afd7b16f3b1ab60383bb53a7b1a25e0a47 + Base fee: 130181 + Transaction: 0x41b6e5298927c7bef4f615666f4dae1de48ce3ed293655f86411f1f6ee6a04c6 + Contract deployment: + Contract address: 0x5fbdb2315678afecb367f032d93f642f64180aa3 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 4570456 of 4570456 + +Mined empty block #68 with base fee 118867 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_accounts +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #69 + Block: 0xee90144e7d5f85c5f6bdb9e27157230ef89f0c74a0fdb2e18d9dccc40e26627f + Base fee: 104009 + Transaction: 0x541f73972727185797a94bb190c57e1bbfcee2ae320a7e6292be40515203bd24 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x5fbdb2315678afecb367f032d93f642f64180aa3 + Value: 0 ETH + Gas used: 90069 of 91476 + + Transaction: 0x77b2437b67fdc35e899a44044fb4b35ca8095e6796be2218f49711a301b26f30 + Contract deployment: + Contract address: 0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 3251727 of 3251727 + +Mined empty block #70 with base fee 93905 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_accounts +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #71 + Block: 0xdc32a0525123b6ca49c5ee27a805bb14f4af8115d3af2c54dc09e6418e71498b + Base fee: 82167 + Transaction: 0x996e019c433397278970c647900d1403110302ab971b0097df1caac7a9f21f1a + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0 + Value: 0 ETH + Gas used: 68079 of 69408 + + Transaction: 0x945929760201e2de637bb8c1ad0fe3cc247d3258a2408deec61584999042667c + Contract deployment: + Contract address: 0xdc64a140aa3e981100a9beca4e685f962f0cf6c9 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 4805661 of 4805661 + +Mined empty block #72 with base fee 75234 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_estimateGas +eth_chainId +eth_getTransactionCount +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #73 + Block: 0xb34c5113e84d0334a74b8644b9d0c42a4a7ab87be619aef8bef619476bd80b49 + Base fee: 65830 + Transaction: 0x9da6e84eb02d4b9d3cc5c80f76605c42873b51e0ac28d7e3b6816d0cb5a14be0 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0xdc64a140aa3e981100a9beca4e685f962f0cf6c9 + Value: 0 ETH + Gas used: 282529 of 284184 + + Transaction: 0xccb17e6b543bd1dd975c49f6541860e4e3971b026ddeb816ac3ae7bb591e9da6 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x5fbdb2315678afecb367f032d93f642f64180aa3 + Value: 0 ETH + Gas used: 46990 of 46990 + +Mined empty block #74 with base fee 57783 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #75 + Block: 0xa52eb4871a5546e2e9934c236ce2a2abff2d3f6cdc18283ef80ec6e72d70e9ee + Base fee: 50561 + Transaction: 0xe983f4fd3bd1d1db2f7229d557d97216f7b5793ad4850c563a94e5fc8b5f3115 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x5fbdb2315678afecb367f032d93f642f64180aa3 + Value: 0 ETH + Gas used: 46496 of 46496 + +eth_chainId +eth_getTransactionCount +Mined empty block #76 with base fee 44261 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #77 + Block: 0xfc48f4c6ba953a792e75ec6c13ea62cadd8ea8a702c16821df3c9a5884afd925 + Base fee: 38729 + Transaction: 0x36e39c27a994839e89ba18d5f676b54523b971dbab7904ecae7a38c016494f2f + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0 + Value: 0 ETH + Gas used: 64310 of 64310 + +eth_chainId +eth_getTransactionCount +Mined empty block #78 with base fee 33909 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +Mined empty block #79 with base fee 29671 +eth_chainId +eth_getTransactionCount +Mined empty block #80 with base fee 25963 +Mined empty block range #80 to #81 +Mined empty block range #80 to #82 +Mined empty block range #80 to #83 +Mined empty block range #80 to #84 +Mined empty block range #80 to #85 +Mined empty block range #80 to #86 +Mined empty block range #80 to #87 +Mined empty block range #80 to #88 +Mined empty block range #80 to #89 +Mined empty block range #80 to #90 +Mined empty block range #80 to #91 +Mined empty block range #80 to #92 +Mined empty block range #80 to #93 +Mined empty block range #80 to #94 +Mined empty block range #80 to #95 +Mined empty block range #80 to #96 +Mined empty block range #80 to #97 +Mined empty block range #80 to #98 +Mined empty block range #80 to #99 +Mined empty block range #80 to #100 +Mined empty block range #80 to #101 +Mined empty block range #80 to #102 +Mined empty block range #80 to #103 +Mined empty block range #80 to #104 +Mined empty block range #80 to #105 +Mined empty block range #80 to #106 +Mined empty block range #80 to #107 +Mined empty block range #80 to #108 +Mined empty block range #80 to #109 +Mined empty block range #80 to #110 +Mined empty block range #80 to #111 +Mined empty block range #80 to #112 +Mined empty block range #80 to #113 +Mined empty block range #80 to #114 +Mined empty block range #80 to #115 +Mined empty block range #80 to #116 +Mined empty block range #80 to #117 +Mined empty block range #80 to #118 +Mined empty block range #80 to #119 +Mined empty block range #80 to #120 +Mined empty block range #80 to #121 +Mined empty block range #80 to #122 +Mined empty block range #80 to #123 +Mined empty block range #80 to #124 +Mined empty block range #80 to #125 +Mined empty block range #80 to #126 +Mined empty block range #80 to #127 +eth_chainId +eth_accounts +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_estimateGas +eth_getBlockByNumber +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionReceipt +Mined block #128 + Block: 0x9c4586ccb69922a942f4fce7f7d2e2195eaef4b56249c7a63415b426f7fdbd2d + Base fee: 46 + Transaction: 0x27e7fbefc4b32af4ccaa80dd568dc08399e56069b5c6394e36ed8253bd224b39 + Contract deployment: + Contract address: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 4570456 of 4570456 + +eth_chainId +eth_getTransactionCount +eth_chainId +eth_getTransactionByHash +Mined empty block #129 with base fee 43 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +Mined empty block #130 with base fee 38 +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_accounts +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #131 + Block: 0x4acbb55ce763d6944cff42ae979c385c4af27425760ea823ed87d059f2e78fc6 + Base fee: 34 + Transaction: 0x01c775ef3721cb5dc6278cbd4ecaed8ebe0a266864c0f8187677c4e76f2dd64a + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 90069 of 91476 + + Transaction: 0x307011d08ac7b61702b323f4f8d850ddb0a29437a5e46d890d0a5e4bb9fc76bc + Contract deployment: + Contract address: 0xb7f8bc63bbcad18155201308c8f3540b07f84f5e + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 3251727 of 3251727 + +Mined empty block #132 with base fee 31 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_accounts +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #133 + Block: 0x776d28cdd4d0bf106dd26e6719cd8472ca229458281e287a9c537aa404e3eccb + Base fee: 28 + Transaction: 0x5e7ecc6a7a1eaa9a8d431b327f064ff5413bede08868993ae246b1b430378aae + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0xb7f8bc63bbcad18155201308c8f3540b07f84f5e + Value: 0 ETH + Gas used: 68079 of 69408 + + Transaction: 0x851abfd73146580481476fef9a13b4e150181de44258cc3142d8a5dbcf6efe74 + Contract deployment: + Contract address: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 4805661 of 4805661 + +Mined empty block #134 with base fee 26 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_estimateGas +eth_chainId +eth_getTransactionCount +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #135 + Block: 0x800091fb2e3be6ba63438660b32b6b223634ea4182e3c94e0cc6340c2a249be9 + Base fee: 23 + Transaction: 0x32f4e7188e53565596ee7edbce163844105ceb3f9654db9fb436cb6cef4be206 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 + Value: 0 ETH + Gas used: 282598 of 284253 + + Transaction: 0x18b4f980e93ee395985bc33639d653d7858da4817b2c27f7285a0564f6e152aa + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 47002 of 47002 + +Mined empty block #136 with base fee 21 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #137 + Block: 0x19ba41c60adb720042c0075946b443e7dc9a04f9d339d24415116f4bc932ce3b + Base fee: 19 + Transaction: 0x5a7a5773db2c6bd1278bf68df53cbc34682d6367598b26652e575b7629ca2f58 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 46496 of 46496 + +eth_chainId +eth_getTransactionCount +Mined empty block #138 with base fee 17 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #139 + Block: 0xa8e002e85684c631df54af5cc68db4f55b27b2fc174c2263ce68d59aa50aa18f + Base fee: 15 + Transaction: 0x2f94c9dff548e29e3dcae82b0dd2c1f7d4eecabd8506d01ec21ace2b31b818f7 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0xb7f8bc63bbcad18155201308c8f3540b07f84f5e + Value: 0 ETH + Gas used: 64322 of 64322 + +eth_chainId +eth_getTransactionCount +Mined empty block #140 with base fee 14 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +Mined empty block #141 with base fee 13 +eth_chainId +eth_getTransactionCount +Mined empty block #142 with base fee 12 +Mined empty block range #142 to #143 +Mined empty block range #142 to #144 +eth_chainId +eth_blockNumber +eth_chainId +Mined empty block #145 with base fee 9 +Mined empty block range #145 to #146 +eth_accounts +eth_chainId +eth_estimateGas +eth_getBlockByNumber +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #147 + Block: 0x1f9b2840c87547bda110d1d1bd56e7db5da1de4bc4dad1a694473faa20ceaa5b + Base fee: 7 + Transaction: 0x7b4e7c021f57d6e76e3bcf01aa4f2271309a5b159afcbf575e92c87dd256895b + Contract deployment: + Contract address: 0x68b1d87f95878fe05b998f19b66f4baba5de1aed + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 3557786 of 3557786 + +Mined empty block #148 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined empty block #149 with base fee 7 +Mined empty block range #149 to #150 +Mined empty block range #149 to #151 +Mined empty block range #149 to #152 +Mined empty block range #149 to #153 +Mined empty block range #149 to #154 +eth_accounts +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #155 + Block: 0x10c604301567e369658ea58e00ab7eaca42cbbd51bc3b15e154a9bd52e361755 + Base fee: 7 + Transaction: 0xff6aee90a1d81c30acfce402bf97dc9f57bc7a2445dc9d19c0475f36f0e34430 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 93264 of 93264 + +Mined empty block #156 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #157 + Block: 0xbc004cd5e6d30f69203ea22a5b3d3325acf9decbec3af6a4b4f3bf5eab8e5faf + Base fee: 7 + Transaction: 0xee1199328496e64a1120f6826023258c0d016756f01b7f9292f786487712b436 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 463493 of 465303 + +Mined empty block #158 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_accounts +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #159 + Block: 0x1b2460f8e4052241ad890ed56c2a10cfe5acd2b229767a67a4024f19194a359d + Base fee: 7 + Transaction: 0xcdd7c81e0dccd98d0648c4545615047dbcc97079016e51b8236766a4fe5bbaca + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 74318 of 74318 + +eth_chainId +eth_getTransactionCount +Mined empty block #160 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +Mined empty block #161 with base fee 7 +eth_chainId +eth_getTransactionCount +Mined empty block #162 with base fee 7 +Mined empty block range #162 to #163 +Mined empty block range #162 to #164 +Mined empty block range #162 to #165 +Mined empty block range #162 to #166 +eth_chainId +eth_accounts +eth_chainId +eth_blockNumber +eth_chainId +eth_estimateGas +eth_getBlockByNumber +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #167 + Block: 0x7d00b30191668704f3c355d645dc6a21cf024a23cf5751cf452224a69112b792 + Base fee: 7 + Transaction: 0x5ad95aaa2eb7b55a59542033d450bf6dcb736fc664779fa89d86a3babe1cebd2 + Contract deployment: + Contract address: 0x4ed7c70f96b99c776995fb64377f0d4ab3b0e1c1 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 3851059 of 3851059 + +Mined empty block #168 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_accounts +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionCount +Mined block #169 + Block: 0xd3f68ca928198fc5fc2c73392c76bcd29a83478f77189bce20b66f3f86512a23 + Base fee: 7 + Transaction: 0xddd1dedcb374963f188bbcaabfc694b332991a72ee919096ea1710b4a36b7e34 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x4ed7c70f96b99c776995fb64377f0d4ab3b0e1c1 + Value: 0 ETH + Gas used: 243853 of 245758 + + Transaction: 0x280643927d2986005667e51dbe11a38db66ccce80f3d2a5b7a131e84abafb836 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x8a791620dd6260079bf849dc5567adc3f2fdc318 + Value: 0 ETH + Gas used: 93096 of 93096 + +Mined empty block #170 with base fee 7 +Mined empty block range #170 to #171 +eth_chainId +eth_accounts +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_estimateGas +eth_getBlockByNumber +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionReceipt +Mined block #172 + Block: 0x1851dacf661590c60852b00af0a0ba0d906b36d9882fb7fb45ef09d10e24850e + Base fee: 7 + Transaction: 0x7d226267462d188e9fec5a684410a40449da7997e2b3cd20da61c192d4f226b7 + Contract deployment: + Contract address: 0x4a679253410272dd5232b3ff7cf5dbb88f295319 + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + Value: 0 ETH + Gas used: 845982 of 845982 + +eth_chainId +eth_getTransactionCount +eth_chainId +eth_getTransactionByHash +Mined empty block #173 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_chainId +eth_estimateGas +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +Mined block #174 + Block: 0xdf531633f0212a629d333b5d93afc3fc6e0e4e3de714ab330d1e928131620233 + Base fee: 7 + Transaction: 0xf4d7cca7c659e82bd54c31a5fcd3b0a1910a293dd74c091d2e972c26ecbea7c9 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x4a679253410272dd5232b3ff7cf5dbb88f295319 + Value: 0 ETH + Gas used: 123966 of 125902 + +Mined empty block #175 with base fee 7 +Mined empty block range #175 to #176 +Mined empty block range #175 to #177 +Mined empty block range #175 to #178 +Mined empty block range #175 to #179 +Mined empty block range #175 to #180 +Mined empty block range #175 to #181 +Mined empty block range #175 to #182 +Mined empty block range #175 to #183 +Mined empty block range #175 to #184 +Mined empty block range #175 to #185 +Mined empty block range #175 to #186 +Mined empty block range #175 to #187 +Mined empty block range #175 to #188 +Mined empty block range #175 to #189 +Mined empty block range #175 to #190 +Mined empty block range #175 to #191 +Mined empty block range #175 to #192 +Mined empty block range #175 to #193 +Mined empty block range #175 to #194 +Mined empty block range #175 to #195 +Mined empty block range #175 to #196 +Mined empty block range #175 to #197 +Mined empty block range #175 to #198 +Mined empty block range #175 to #199 +Mined empty block range #175 to #200 +Mined empty block range #175 to #201 +Mined empty block range #175 to #202 +Mined empty block range #175 to #203 +Mined empty block range #175 to #204 +Mined empty block range #175 to #205 +Mined empty block range #175 to #206 +Mined empty block range #175 to #207 +Mined empty block range #175 to #208 +Mined empty block range #175 to #209 +Mined empty block range #175 to #210 +Mined empty block range #175 to #211 +Mined empty block range #175 to #212 +Mined empty block range #175 to #213 +Mined empty block range #175 to #214 +Mined empty block range #175 to #215 +Mined empty block range #175 to #216 +Mined empty block range #175 to #217 +Mined empty block range #175 to #218 +Mined empty block range #175 to #219 +Mined empty block range #175 to #220 +Mined empty block range #175 to #221 +Mined empty block range #175 to #222 +Mined empty block range #175 to #223 +Mined empty block range #175 to #224 +Mined empty block range #175 to #225 +Mined empty block range #175 to #226 +eth_chainId +eth_chainId (2) +eth_call + Contract call: + From: 0x0000000000000000000000000000000000000000 + To: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 + +eth_blockNumber +eth_getBlockByNumber +eth_getBlockByNumber (2) +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_gasPrice +eth_getLogs +eth_getTransactionCount +eth_getBlockByNumber +eth_sendRawTransaction +eth_getLogs +eth_getTransactionByHash +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getLogs (2) +eth_getBlockByNumber +Mined block #227 + Block: 0xdd036607e5898b1eb5e003a7be101b08d2c23bbe4bbd39c7233d01dc04e21a0e + Base fee: 7 + Transaction: 0x7762ee972106f1b9e081eee026a2b54e39cadacd6a23d8aaa3841b371f29ae14 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 + Value: 0 ETH + Gas used: 430842 of 8000000 + +eth_getTransactionByHash +eth_getTransactionReceipt +Mined empty block #228 with base fee 7 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #229 with base fee 7 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #230 with base fee 7 +Mined empty block range #230 to #231 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #232 with base fee 7 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #233 with base fee 7 +Mined empty block range #233 to #234 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #235 with base fee 7 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #236 with base fee 7 +eth_gasPrice +eth_getTransactionCount +eth_sendRawTransaction +eth_getTransactionByHash +eth_chainId +eth_accounts +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getLogs +eth_getTransactionByHash +Mined block #237 + Block: 0xcfea5f60628f94967164f14836763aaa140e87cac306465e993421cd93076eca + Base fee: 7 + Transaction: 0x2e7f0ed74fe98af4db70a35335282a957a50640ce9e1956686eaa09db71d8033 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 + Value: 0 ETH + Gas used: 621265 of 8000000 + +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getLogs +eth_accounts +eth_getBlockByNumber +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +eth_chainId +eth_getTransactionReceipt +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getTransactionByHash +eth_getTransactionReceipt +eth_chainId +eth_getTransactionCount +Mined block #238 + Block: 0x9c44aae7e0532f224fc0d792cf7e094b98a5ef2c8c9ae0ce993fc6dd523844ef + Base fee: 7 + Transaction: 0xdc75f6a30032943e40236bd6863b9eb01590c0ccc6c61a26c16606fb82aa3a41 + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x4ed7c70f96b99c776995fb64377f0d4ab3b0e1c1 + Value: 0 ETH + Gas used: 109272 of 300000 + +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #239 with base fee 7 +eth_blockNumber +eth_chainId +eth_chainId (2) +eth_getTransactionReceipt +eth_accounts +eth_accounts (2) +eth_accounts (3) +eth_chainId +eth_call + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x4ed7c70f96b99c776995fb64377f0d4ab3b0e1c1 + +eth_accounts +eth_chainId +eth_estimateGas +eth_chainId +eth_getTransactionCount +eth_feeHistory +eth_sendTransaction +eth_chainId +eth_getTransactionByHash +eth_chainId +eth_getTransactionReceipt +Mined block #240 + Block: 0x32efbb0cbf981d45caa39f820c461e6932c96145acec1ceed3592e7b5cf36314 + Base fee: 7 + Transaction: 0xc2465df15885c8bd8c3e80c1b85c5c5355220ec4bc065162afbba2933e9a20da + Contract call: + From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 + To: 0x4a679253410272dd5232b3ff7cf5dbb88f295319 + Value: 0 ETH + Gas used: 287153 of 291078 + +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #241 with base fee 7 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #242 with base fee 7 +Mined empty block range #242 to #243 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #244 with base fee 7 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #245 with base fee 7 +Mined empty block range #245 to #246 +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +eth_getLogs +eth_getBlockByNumber +Mined empty block #247 with base fee 7 +Mined empty block range #247 to #248 +Mined empty block range #247 to #249 +Mined empty block range #247 to #250 +Mined empty block range #247 to #251 diff --git a/test/docker/icon/config/genesis.zip b/test/docker/icon/config/genesis.zip new file mode 100644 index 00000000..d1af4088 Binary files /dev/null and b/test/docker/icon/config/genesis.zip differ diff --git a/test/docker/icon/config/icon_config.json b/test/docker/icon/config/icon_config.json new file mode 100644 index 00000000..ea3f6064 --- /dev/null +++ b/test/docker/icon/config/icon_config.json @@ -0,0 +1,6 @@ +{ + "termPeriod": 100, + "mainPRepCount": 1, + "extraMainPRepCount": 0, + "subPRepCount": 4 +} diff --git a/test/docker/icon/config/keysecret b/test/docker/icon/config/keysecret new file mode 100644 index 00000000..2fc16e85 --- /dev/null +++ b/test/docker/icon/config/keysecret @@ -0,0 +1 @@ +gochain \ No newline at end of file diff --git a/test/docker/icon/config/keystore.json b/test/docker/icon/config/keystore.json new file mode 100644 index 00000000..978fea42 --- /dev/null +++ b/test/docker/icon/config/keystore.json @@ -0,0 +1,22 @@ +{ + "address": "hxb6b5791be0b5ef67063b3c10b840fb81514db2fd", + "id": "87323a66-289a-4ce2-88e4-00278deb5b84", + "version": 3, + "coinType": "icx", + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "069e46aaefae8f1c1f840d6b09144999" + }, + "ciphertext": "f35ff7cf4f5759cb0878088d0887574a896f7f0fc2a73898d88be1fe52977dbd", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 65536, + "r": 8, + "p": 1, + "salt": "0fc9c3b24cdb8175" + }, + "mac": "1ef4ff51fdee8d4de9cf59e160da049eb0099eb691510994f5eca492f56c817a" + } +} \ No newline at end of file diff --git a/test/docker/icon/config/server.json b/test/docker/icon/config/server.json new file mode 100644 index 00000000..0d04cae4 --- /dev/null +++ b/test/docker/icon/config/server.json @@ -0,0 +1,43 @@ +{ + "node_sock": "", + "p2p": "127.0.0.1:8080", + "p2p_listen": ":7080", + "rpc_addr": ":9080", + "rpc_dump": false, + "ee_socket": "", + "engines": "python,java", + "backup_dir": "", + "node_dir": "../data", + "key_store": { + "address": "hxb6b5791be0b5ef67063b3c10b840fb81514db2fd", + "id": "87323a66-289a-4ce2-88e4-00278deb5b84", + "version": 3, + "coinType": "icx", + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "069e46aaefae8f1c1f840d6b09144999" + }, + "ciphertext": "f35ff7cf4f5759cb0878088d0887574a896f7f0fc2a73898d88be1fe52977dbd", + "kdf": "scrypt", + "kdfparams": { + "dklen": 32, + "n": 65536, + "r": 8, + "p": 1, + "salt": "0fc9c3b24cdb8175" + }, + "mac": "1ef4ff51fdee8d4de9cf59e160da049eb0099eb691510994f5eca492f56c817a" + } + }, + "log_level": "debug", + "console_level": "trace", + "log_writer": { + "filename": "../logs/goloop.log", + "maxsize": 1000, + "maxage": 0, + "maxbackups": 0, + "localtime": false, + "compress": false + } +} diff --git a/test/docker/icon/config/start.sh b/test/docker/icon/config/start.sh new file mode 100755 index 00000000..dc92c8a0 --- /dev/null +++ b/test/docker/icon/config/start.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +start_chain() { + while true; do + RES=$(goloop system info 2>&1) + if [ "$?" == "0" ]; then + break + fi + sleep 1 + done + echo $RES + + CID=acbc4e + if [ ! -e ${GOLOOP_NODE_DIR}/${CID} ]; then + # join chain + GENESIS=/goloop/config/genesis.zip + goloop chain join \ + --platform icon \ + --channel icon_dex \ + --genesis ${GENESIS} \ + --tx_timeout 10000 \ + --node_cache small \ + --normal_tx_pool 1000 \ + --db_type rocksdb \ + --role 3 + goloop system config rpcIncludeDebug true + fi + goloop chain start 0x${CID} +} + +# start chain in backgound +start_chain & + +# start goloop server +exec goloop server start diff --git a/test/hardhat.config.ts b/test/hardhat.config.ts new file mode 100644 index 00000000..ab9c2ca0 --- /dev/null +++ b/test/hardhat.config.ts @@ -0,0 +1,22 @@ +import { HardhatUserConfig } from "hardhat/config"; +import "@nomicfoundation/hardhat-toolbox"; + +const config: HardhatUserConfig = { + paths: { + sources: "./solidity/contracts", + tests: "./solidity/test", + cache: "./solidity/build/cache", + artifacts: "./solidity/build/artifacts" + }, + solidity: { + version: "0.8.12", + settings: { + optimizer: { + enabled: true, + runs: 10, + }, + }, + }, +}; + +export default config; diff --git a/test/scripts/demo_dapp.ts b/test/scripts/demo_dapp.ts new file mode 100644 index 00000000..088d9d4a --- /dev/null +++ b/test/scripts/demo_dapp.ts @@ -0,0 +1,549 @@ +import IconService from 'icon-sdk-js'; +import {ethers} from 'hardhat'; +import {IconNetwork, getBtpAddress} from "./icon"; +import {XCall, DAppProxy} from "./icon"; +import {BaseContract, BigNumber, ContractReceipt} from "ethers"; +import {Deployments} from "./setup/config"; +import {TypedEvent, TypedEventFilter} from "../typechain-types/common"; + +const {IconConverter} = IconService; +const deployments = Deployments.getDefault(); + +function sleep(millis: number) { + return new Promise(resolve => setTimeout(resolve, millis)); +} + +async function waitEvent( + ctr : BaseContract, + filter: TypedEventFilter, + fromBlock?: number +): Promise> { + let height = await ctr.provider.getBlockNumber(); + let next = height + 1; + if (fromBlock && fromBlock < height) { + height = fromBlock; + } + while (true) { + for (;height < next;height++){ + const events = await ctr.queryFilter(filter, height); + if (events.length > 0) { + return events as Array; + } + } + await sleep(1000); + next = await ctr.provider.getBlockNumber() + 1; + } +} + +function filterEvent( + ctr : BaseContract, + filter: TypedEventFilter, + receipt: ContractReceipt) : Array { + const inf = ctr.interface; + const address = ctr.address; + const topics = filter.topics || []; + if (receipt.events && typeof topics[0] === "string") { + const fragment = inf.getEvent(topics[0]); + return receipt.events + .filter((evt) => { + if (evt.address == address) { + return topics.every((v, i) => { + if (!v) { + return true + } else if (typeof v === "string") { + return v == evt.topics[i] + } else { + return v.includes(evt.topics[i]) + } + }) + } + return false + }) + .map((evt) => { + return { args : inf.decodeEventLog(fragment, evt.data, evt.topics) } as TEvent + }); + } + return []; +} + +function hexToString(data: string) { + const hexArray = ethers.utils.arrayify(data); + let msg = ''; + for (let i = 0; i < hexArray.length; i++) { + msg += String.fromCharCode(hexArray[i]); + } + return msg; +} + +function isIconChain(chain: any) { + return chain.network.includes('icon'); +} + +function isEVMChain(chain: any) { + return chain.network.includes('hardhat') || chain.network.includes('eth2'); +} + +async function sendMessageFromDApp(src: string, srcChain: any, dstChain: any, msg: string, + rollback?: string) { + const isRollback = rollback ? true : false; + if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const xcallSrc = new XCall(iconNetwork, srcChain.contracts.xcall); + const fee = await xcallSrc.getFee(dstChain.network, isRollback); + console.log('fee=' + fee); + + const dappSrc = new DAppProxy(iconNetwork, srcChain.contracts.dapp); + const to = getBtpAddress(dstChain.network, dstChain.contracts.dapp); + const data = IconConverter.toHex(msg); + const rbData = rollback ? IconConverter.toHex(rollback) : undefined; + + return await dappSrc.sendMessage(to, data, rbData, fee) + .then((txHash) => dappSrc.getTxResult(txHash)) + .then((receipt) => { + if (receipt.status != 1) { + throw new Error(`DApp: failed to sendMessage: ${receipt.txHash}`); + } + return receipt; + }); + } else if (isEVMChain(srcChain)) { + const xcallSrc = await ethers.getContractAt('CallService', srcChain.contracts.xcall); + const fee = await xcallSrc.getFee(dstChain.network, isRollback); + console.log('fee=' + fee); + + const dappSrc = await ethers.getContractAt('DAppProxySample', srcChain.contracts.dapp); + const to = getBtpAddress(dstChain.network, dstChain.contracts.dapp); + const data = IconConverter.toHex(msg); + const rbData = rollback ? IconConverter.toHex(rollback) : "0x"; + + return await dappSrc.sendMessage(to, data, rbData, {value: fee}) + .then((tx) => tx.wait(1)) + .then((receipt) => { + if (receipt.status != 1) { + throw new Error(`DApp: failed to sendMessage: ${receipt.transactionHash}`); + } + return receipt; + }) + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } +} + +async function verifyCallMessageSent(src: string, srcChain: any, receipt: any) { + let event; + if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const xcallSrc = new XCall(iconNetwork, srcChain.contracts.xcall); + const logs = xcallSrc.filterEvent(receipt.eventLogs, + 'CallMessageSent(Address,str,int,int)', xcallSrc.address); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "CallMessageSent"`); + } + console.log(logs); + const indexed = logs[0].indexed || []; + const data = logs[0].data || []; + event = { + _from: indexed[1], + _to: indexed[2], + _sn: BigNumber.from(indexed[3]), + _nsn: BigNumber.from(data[0]) + }; + } else if (isEVMChain(srcChain)) { + const xcallSrc = await ethers.getContractAt('CallService', srcChain.contracts.xcall); + const logs = filterEvent(xcallSrc, xcallSrc.filters.CallMessageSent(), receipt); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "CallMessageSent"`); + } + console.log(logs); + event = logs[0].args; + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } + console.log(`serialNum=${event._sn}`); + return event._sn; +} + +async function checkCallMessage(dst: string, srcChain: any, dstChain: any, sn: BigNumber, msg: string) { + if (isEVMChain(dstChain)) { + const xcallDst = await ethers.getContractAt('CallService', dstChain.contracts.xcall); + const filterCM = xcallDst.filters.CallMessage( + getBtpAddress(srcChain.network, srcChain.contracts.dapp), + dstChain.contracts.dapp, + sn + ) + const logs = await waitEvent(xcallDst, filterCM); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "CallMessage"`); + } + console.log(logs[0]); + const calldata = hexToString(logs[0].args._data) + if (msg !== calldata) { + throw new Error(`DApp: the calldata is different from the sent message`); + } + return { + _reqId: logs[0].args._reqId, + _data: logs[0].args._data + }; + } else if (isIconChain(dstChain)) { + const iconNetwork = IconNetwork.getNetwork(dst); + const xcallDst = new XCall(iconNetwork, dstChain.contracts.xcall); + const {block, events} = await xcallDst.waitEvent("CallMessage(str,str,int,int,bytes)"); + if (events.length == 0) { + throw new Error(`DApp: could not find event: "CallMessage"`); + } + console.log(events[0]); + const indexed = events[0].indexed || []; + const data = events[0].data || []; + const event = { + _from: indexed[1], + _to: indexed[2], + _sn: BigNumber.from(indexed[3]), + _reqId: BigNumber.from(data[0]), + _data: data[1] + }; + if (!sn.eq(event._sn)) { + throw new Error(`DApp: serial number mismatch (${sn} != ${event._sn})`); + } + const calldata = hexToString(event._data) + if (msg !== calldata) { + throw new Error(`DApp: the calldata is different from the sent message`); + } + return { + _reqId: event._reqId, + _data: event._data + }; + } else { + throw new Error(`DApp: unknown destination chain: ${dstChain}`); + } +} + +async function invokeExecuteCall(dst: string, dstChain: any, reqId: BigNumber, data: string) { + if (isEVMChain(dstChain)) { + const xcallDst = await ethers.getContractAt('CallService', dstChain.contracts.xcall); + return await xcallDst.executeCall(reqId, data, {gasLimit: 300000}) + .then((tx) => tx.wait(1)) + .then((receipt) => { + if (receipt.status != 1) { + throw new Error(`DApp: failed to executeCall: ${receipt.transactionHash}`); + } + return receipt; + }) + } else if (isIconChain(dstChain)) { + const iconNetwork = IconNetwork.getNetwork(dst); + const xcallDst = new XCall(iconNetwork, dstChain.contracts.xcall); + return await xcallDst.executeCall(reqId.toHexString(), data) + .then((txHash) => xcallDst.getTxResult(txHash)) + .then((receipt) => { + if (receipt.status != 1) { + throw new Error(`DApp: failed to executeCall: ${receipt.txHash}`); + } + return receipt; + }); + } else { + throw new Error(`DApp: unknown destination chain: ${dstChain}`); + } +} + +async function verifyReceivedMessage(dst: string, dstChain: any, receipt: any, msg: string) { + let event; + if (isEVMChain(dstChain)) { + const dappDst = await ethers.getContractAt('DAppProxySample', dstChain.contracts.dapp); + const logs = filterEvent(dappDst, dappDst.filters.MessageReceived(), receipt); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "MessageReceived"`); + } + console.log(logs); + event = logs[0].args; + } else if (isIconChain(dstChain)) { + const iconNetwork = IconNetwork.getNetwork(dst); + const dappDst = new DAppProxy(iconNetwork, dstChain.contracts.dapp); + const logs = dappDst.filterEvent(receipt.eventLogs,'MessageReceived(str,bytes)', dappDst.address); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "MessageReceived"`); + } + console.log(logs); + const data = logs[0].data || []; + event = {_from: data[0], _data: data[1]} + } else { + throw new Error(`DApp: unknown destination chain: ${dstChain}`); + } + + const receivedMsg = hexToString(event._data) + console.log(`From: ${event._from}`); + console.log(`Data: ${event._data}`); + console.log(`Msg: ${receivedMsg}`); + if (msg !== receivedMsg) { + throw new Error(`DApp: received message is different from the sent message`); + } +} + +async function checkCallExecuted(dst: string, dstChain: any, receipt: any, reqId: BigNumber, expectRevert: boolean) { + let event; + if (isEVMChain(dstChain)) { + const xcallDst = await ethers.getContractAt('CallService', dstChain.contracts.xcall); + const logs = filterEvent(xcallDst, xcallDst.filters.CallExecuted(), receipt); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "CallExecuted"`); + } + console.log(logs); + event = logs[0].args; + } else if (isIconChain(dstChain)) { + const iconNetwork = IconNetwork.getNetwork(dst); + const xcallDst = new XCall(iconNetwork, dstChain.contracts.xcall); + const logs = xcallDst.filterEvent(receipt.eventLogs,'CallExecuted(int,int,str)', xcallDst.address); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "CallExecuted"`); + } + console.log(logs); + const indexed = logs[0].indexed || []; + const data = logs[0].data || []; + event = { + _reqId: BigNumber.from(indexed[1]), + _code: BigNumber.from(data[0]), + _msg: data[1] + } + } else { + throw new Error(`DApp: unknown destination chain: ${dstChain}`); + } + if (!reqId.eq(event._reqId) || + (expectRevert && event._code.isZero()) || (!expectRevert && !event._code.isZero())) { + throw new Error(`DApp: not the expected execution result`); + } +} + +async function checkResponseMessage(src: string, srcChain: any, sn: BigNumber, expectRevert: boolean) { + let event, blockNum; + if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const xcallSrc = new XCall(iconNetwork, srcChain.contracts.xcall); + const {block, events} = await xcallSrc.waitEvent("ResponseMessage(int,int,str)"); + if (events.length == 0) { + throw new Error(`DApp: could not find event: "ResponseMessage"`); + } + console.log(events); + const indexed = events[0].indexed || []; + const data = events[0].data || []; + event = { + _sn: BigNumber.from(indexed[1]), + _code: BigNumber.from(data[0]), + _msg: data[1] + } + blockNum = block.height; + } else if (isEVMChain(srcChain)) { + const xcallSrc = await ethers.getContractAt('CallService', srcChain.contracts.xcall); + const events = await waitEvent(xcallSrc, xcallSrc.filters.ResponseMessage()); + if (events.length == 0) { + throw new Error(`DApp: could not find event: "ResponseMessage"`); + } + console.log(events) + event = events[0].args; + blockNum = (await events[0].getBlock()).number; + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } + if (!sn.eq(event._sn)) { + throw new Error(`DApp: received serial number (${event._sn}) is different from the sent one (${sn})`); + } + if ((expectRevert && event._code.isZero()) || (!expectRevert && !event._code.isZero())) { + throw new Error(`DApp: not the expected response message`); + } + return blockNum; +} + +async function checkRollbackMessage(src: string, srcChain: any, blockNum: number) { + if (isEVMChain(srcChain)) { + const xcallSrc = await ethers.getContractAt('CallService', srcChain.contracts.xcall); + const logs = await waitEvent(xcallSrc, xcallSrc.filters.RollbackMessage(), blockNum); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "RollbackMessage"`); + } + console.log(logs[0]); + return logs[0].args._sn; + } else if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const xcallSrc = new XCall(iconNetwork, srcChain.contracts.xcall); + const {block, events} = await xcallSrc.waitEvent("RollbackMessage(int)", blockNum); + if (events.length == 0) { + throw new Error(`DApp: could not find event: "RollbackMessage"`); + } + console.log(events[0]); + const indexed = events[0].indexed || []; + return BigNumber.from(indexed[1]); + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } +} + +async function invokeExecuteRollback(src: string, srcChain: any, sn: BigNumber) { + if (isEVMChain(srcChain)) { + const xcallSrc = await ethers.getContractAt('CallService', srcChain.contracts.xcall); + return await xcallSrc.executeRollback(sn, {gasLimit: 300000}) + .then((tx) => tx.wait(1)) + .then((receipt) => { + if (receipt.status != 1) { + throw new Error(`DApp: failed to executeRollback: ${receipt.transactionHash}`); + } + return receipt; + }); + } else if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const xcallSrc = new XCall(iconNetwork, srcChain.contracts.xcall); + return await xcallSrc.executeRollback(sn.toHexString()) + .then((txHash) => xcallSrc.getTxResult(txHash)) + .then((receipt) => { + if (receipt.status != 1) { + throw new Error(`DApp: failed to executeRollback: ${receipt.txHash}`); + } + return receipt; + }); + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } +} + +async function verifyRollbackDataReceivedMessage(src: string, srcChain: any, receipt: any, rollback: string | undefined) { + let event; + if (isEVMChain(srcChain)) { + const dappSrc = await ethers.getContractAt('DAppProxySample', srcChain.contracts.dapp); + const logs = filterEvent(dappSrc, dappSrc.filters.RollbackDataReceived(), receipt); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "RollbackDataReceived"`); + } + console.log(logs) + event = logs[0].args; + } else if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const dappSrc = new DAppProxy(iconNetwork, srcChain.contracts.dapp); + const logs = dappSrc.filterEvent(receipt.eventLogs,"RollbackDataReceived(str,int,bytes)", dappSrc.address); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "RollbackDataReceived"`); + } + console.log(logs) + const data = logs[0].data || []; + event = {_from: data[0], _ssn: data[1], _rollback: data[2]} + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } + + const receivedRollback = hexToString(event._rollback) + console.log(`From: ${event._from}`); + console.log(`Ssn: ${event._ssn}`); + console.log(`Data: ${event._rollback}`); + console.log(`Rollback: ${receivedRollback}`); + if (rollback !== receivedRollback) { + throw new Error(`DApp: received rollback is different from the sent data`); + } +} + +async function checkRollbackExecuted(src: string, srcChain: any, receipt: any, sn: BigNumber) { + let event; + if (isIconChain(srcChain)) { + const iconNetwork = IconNetwork.getNetwork(src); + const xcallSrc = new XCall(iconNetwork, srcChain.contracts.xcall); + const logs = xcallSrc.filterEvent(receipt.eventLogs, "RollbackExecuted(int,int,str)", xcallSrc.address); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "RollbackExecuted"`); + } + console.log(logs); + const indexed = logs[0].indexed || []; + const data = logs[0].data || []; + event = { + _sn: BigNumber.from(indexed[1]), + _code: BigNumber.from(data[0]), + _msg: data[1] + } + } else if (isEVMChain(srcChain)) { + const xcallSrc = await ethers.getContractAt('CallService', srcChain.contracts.xcall); + const logs = filterEvent(xcallSrc, xcallSrc.filters.RollbackExecuted(), receipt); + if (logs.length == 0) { + throw new Error(`DApp: could not find event: "RollbackExecuted"`); + } + console.log(logs) + event = logs[0].args; + } else { + throw new Error(`DApp: unknown source chain: ${srcChain}`); + } + if (!sn.eq(event._sn)) { + throw new Error(`DApp: received serial number (${event._sn}) is different from the sent one (${sn})`); + } + if (!event._code.isZero()) { + throw new Error(`DApp: not the expected execution result`); + } +} + +async function sendCallMessage(src: string, dst: string, msgData?: string, needRollback?: boolean) { + const srcChain = deployments.get(src); + const dstChain = deployments.get(dst); + + const testName = sendCallMessage.name + (needRollback ? "WithRollback" : ""); + console.log(`\n### ${testName}: ${src} => ${dst}`); + if (!msgData) { + msgData = `${testName}_${src}_${dst}`; + } + const rollbackData = needRollback ? `ThisIsRollbackMessage_${src}_${dst}` : undefined; + const expectRevert = (msgData === "revertMessage"); + let step = 1; + + console.log(`[${step++}] send message from DApp`); + const sendMessageReceipt = await sendMessageFromDApp(src, srcChain, dstChain, msgData, rollbackData); + const sn = await verifyCallMessageSent(src, srcChain, sendMessageReceipt); + + console.log(`[${step++}] check CallMessage event on ${dst} chain`); + const callMsgEvent = await checkCallMessage(dst, srcChain, dstChain, sn, msgData); + const reqId = callMsgEvent._reqId; + const callData = callMsgEvent._data; + + console.log(`[${step++}] invoke executeCall with reqId=${reqId}`); + const executeCallReceipt = await invokeExecuteCall(dst, dstChain, reqId, callData); + + if (!expectRevert) { + console.log(`[${step++}] verify the received message`); + await verifyReceivedMessage(dst, dstChain, executeCallReceipt, msgData); + } + console.log(`[${step++}] check CallExecuted event on ${dst} chain`); + await checkCallExecuted(dst, dstChain, executeCallReceipt, reqId, expectRevert); + + if (needRollback) { + console.log(`[${step++}] check ResponseMessage event on ${src} chain`); + const responseHeight = await checkResponseMessage(src, srcChain, sn, expectRevert); + + if (expectRevert) { + console.log(`[${step++}] check RollbackMessage event on ${src} chain`); + const sn = await checkRollbackMessage(src, srcChain, responseHeight); + + console.log(`[${step++}] invoke executeRollback with sn=${sn}`); + const executeRollbackReceipt = await invokeExecuteRollback(src, srcChain, sn); + + console.log(`[${step++}] verify rollback data received message`); + await verifyRollbackDataReceivedMessage(src, srcChain, executeRollbackReceipt, rollbackData); + + console.log(`[${step++}] check RollbackExecuted event on ${src} chain`); + await checkRollbackExecuted(src, srcChain, executeRollbackReceipt, sn); + } + } +} + +async function show_banner() { + const banner = ` + ___ __ + ___ |__ \\___ ____/ /__ ____ ___ ____ + / _ \\__/ / _ \\/ __ / _ \\/ __ \`__ \\/ __ \\ +/ __/ __/ __/ /_/ / __/ / / / / / /_/ / +\\___/____\\___/\\__,_/\\___/_/ /_/ /_/\\____/ +`; + console.log(banner); +} + +const SRC = deployments.getSrc(); +const DST = deployments.getDst(); + +show_banner() + .then(() => sendCallMessage(SRC, DST)) + .then(() => sendCallMessage(DST, SRC)) + .then(() => sendCallMessage(SRC, DST, "checkSuccessResponse", true)) + .then(() => sendCallMessage(DST, SRC, "checkSuccessResponse", true)) + .then(() => sendCallMessage(SRC, DST, "revertMessage", true)) + .then(() => sendCallMessage(DST, SRC, "revertMessage", true)) + .catch((error) => { + console.error(error); + process.exitCode = 1; + }); diff --git a/test/scripts/icon/btp.ts b/test/scripts/icon/btp.ts new file mode 100644 index 00000000..188cbf0a --- /dev/null +++ b/test/scripts/icon/btp.ts @@ -0,0 +1,73 @@ +import {Contract} from "./contract"; +import {IconNetwork} from "./network"; + +export class BMC extends Contract { + constructor(_iconNetwork: IconNetwork, _address: string) { + super(_iconNetwork, _address) + } + + getBtpAddress() { + return this.call({ + method: 'getBtpAddress' + }) + } + + addVerifier(network: string, address: string) { + return this.invoke({ + method: 'addVerifier', + params: { + _net: network, + _addr: address + } + }) + } + + addLink(link: string) { + return this.invoke({ + method: 'addLink', + params: { + _link: link + } + }) + } + + addBTPLink(link: string, netId: string) { + return this.invoke({ + method: 'addBTPLink', + params: { + _link: link, + _networkId: netId + } + }) + } + + addRelay(link: string, address: string) { + return this.invoke({ + method: 'addRelay', + params: { + _link: link, + _addr: address + } + }) + } + + addService(service: string, address: string) { + return this.invoke({ + method: 'addService', + params: { + _svc: service, + _addr: address + } + }) + } +} + +export class BMV extends Contract { + constructor(_iconNetwork: IconNetwork, _address: string) { + super(_iconNetwork, _address) + } +} + +export function getBtpAddress(network: string, dapp: string) { + return `btp://${network}/${dapp}`; +} diff --git a/test/scripts/icon/contract.ts b/test/scripts/icon/contract.ts new file mode 100644 index 00000000..144a5379 --- /dev/null +++ b/test/scripts/icon/contract.ts @@ -0,0 +1,211 @@ +import { + IconService, Block, BigNumber, Wallet, + SignedTransaction, ConfirmedTransaction, TransactionResult, +} from 'icon-sdk-js'; +import {IconNetwork} from "./network"; + +const {IconBuilder, IconConverter} = IconService; + +export class EventLog { + scoreAddress: string | undefined + indexed: string[] | undefined + data: string[] | undefined +} + +export class Contract { + protected iconService: IconService; + protected nid: number; + protected wallet: Wallet; + public address: string = ''; + + constructor(iconNetwork: IconNetwork, _address?: string) { + this.iconService = iconNetwork.iconService; + this.nid = iconNetwork.nid; + this.wallet = iconNetwork.wallet; + this.address = _address || ''; + } + + call({method, params}: { + method: string; + params?: { + [key: string]: any; + }; + }) { + const payload = new IconBuilder.CallBuilder() + .to(this.address) + .method(method) + .params(params) + .build(); + return this.iconService.call(payload).execute(); + } + + invoke({method, params, value = '0'}: { + method: string; + value?: string; + params?: { + [key: string]: any; + }; + }) { + const payload = new IconBuilder.CallTransactionBuilder() + .method(method) + .params(params) + .from(this.wallet.getAddress()) + .to(this.address) + .nid(this.nid) + .version(3) + .timestamp(new Date().getTime() * 1000) + .stepLimit(IconConverter.toBigNumber(80000000)) + .value(value) + .build(); + + const signedTx = new SignedTransaction(payload, this.wallet); + return this.iconService.sendTransaction(signedTx).execute(); + } + + deploy({content, params}: { + content: string; + params?: { + [key: string]: any; + }; + }) { + const payload = new IconBuilder.DeployTransactionBuilder() + .contentType('application/java') + .content(`0x${content}`) + .params(params) + .from(this.wallet.getAddress()) + .to('cx0000000000000000000000000000000000000000') + .nid(this.nid) + .version(3) + .timestamp((new Date()).getTime() * 1000) + .stepLimit(IconConverter.toBigNumber(2500000000)) + .build(); + + const signedTx = new SignedTransaction(payload, this.wallet); + return this.iconService.sendTransaction(signedTx).execute(); + } + + async getTxResult(txHash: string) { + function sleep(millis: number) { + return new Promise(resolve => setTimeout(resolve, millis)); + } + for (let i = 0; i < 5; i++) { + const result = await this.iconService.getTransactionResult(txHash).execute() + .then((res) => { + if (res.status == 1 && res.scoreAddress) { + this.address = res.scoreAddress; + } + return res; + }) + .catch((error) => { + if (error.includes("Pending")) { + console.log("... pending"); + } else if (error.includes("Executing")) { + console.log("... executing"); + } else { + console.log(error); + } + }); + if (result) return result + await sleep(2000); + } + throw new Error("Failed to get tx result"); + } + + filterEvent(eventLogs: any, sig: string, address?: string) : Array { + return (>eventLogs).filter((eventLog) => + eventLog.indexed && eventLog.indexed[0] === sig && + (!address || address === eventLog.scoreAddress) + ) + } + + async getBlock( + param: string | number | BigNumber | undefined + ) : Promise { + if (param === undefined || param === "latest") { + return this.iconService.getLastBlock().execute(); + } else if (typeof param === "string") { + return this.iconService.getBlockByHash(param).execute(); + } else { + const height = BigNumber.isBigNumber(param) ? param : new BigNumber(param as number); + // @ts-ignore + return this.iconService.getBlockByHeight(height).execute(); + } + } + + async filterEventFromBlock( + block: Block, + sig: string, + address?: string | undefined + ) : Promise { + return Promise.all( + block.getTransactions() + .map((tx : ConfirmedTransaction) => + this.iconService.getTransactionResult(tx.txHash).execute() + ) + ).then((results) => { + return results.map((result: TransactionResult) => + this.filterEvent(result.eventLogs as Array, sig, address) + ).flat(); + }) + } + + async queryFilter( + sig: string, + fromBlockOrBlockhash?: string | number | BigNumber | undefined, + toBlock?: string | number | BigNumber | undefined + ): Promise> { + if (fromBlockOrBlockhash === toBlock || !toBlock) { + const block = await this.getBlock(fromBlockOrBlockhash); + return this.filterEventFromBlock(block, sig, this.address); + } else { + let from: Block; + const to = await this.getBlock(toBlock); + if (typeof fromBlockOrBlockhash === "number" && fromBlockOrBlockhash < 0) { + from = await this.getBlock(to.height + fromBlockOrBlockhash); + } else if (BigNumber.isBigNumber(fromBlockOrBlockhash) && fromBlockOrBlockhash.toNumber() < 0) { + from = await this.getBlock(to.height + fromBlockOrBlockhash.toNumber()); + } else { + from = await this.getBlock(fromBlockOrBlockhash); + } + + let ret = await this.filterEventFromBlock(from, sig, this.address); + for (let height = from.height + 1; height < to.height; height++) { + const block = await this.getBlock(height); + const eventLogs = await this.filterEventFromBlock(block, sig, this.address); + ret = ret.concat(eventLogs); + } + ret = ret.concat(await this.filterEventFromBlock(to, sig, this.address)); + return new Promise((resolve, reject) => { + resolve(ret); + }); + } + } + + async waitEvent( + sig: string, + fromBlock?: number, + ) { + let latest = await this.getBlock("latest"); + let height = latest.height - 1; + if (fromBlock && fromBlock < height) { + height = fromBlock; + } + let block = await this.getBlock(height); + while (true) { + while (height < latest.height) { + const events = await this.filterEventFromBlock(block, sig, this.address); + if (events.length > 0) { + return { block, events }; + } + height++; + if (height == latest.height) { + block = latest; + } else { + block = await this.getBlock(height); + } + } + await new Promise((resolve) => setTimeout(resolve, 1000)); + latest = await this.getBlock("latest"); + } + } +} diff --git a/test/scripts/icon/dapp_proxy.ts b/test/scripts/icon/dapp_proxy.ts new file mode 100644 index 00000000..dc22386a --- /dev/null +++ b/test/scripts/icon/dapp_proxy.ts @@ -0,0 +1,19 @@ +import {Contract} from "./contract"; +import {IconNetwork} from "./network"; + +export class DAppProxy extends Contract { + constructor(iconNetwork: IconNetwork, address: string) { + super(iconNetwork, address) + } + + sendMessage(to: string, data: string, rollback?: string, value?: string) { + const _params = rollback + ? {_to: to, _data: data, _rollback: rollback} + : {_to: to, _data: data} + return this.invoke({ + method: 'sendMessage', + value: value ? value : '0x0', + params: _params + }) + } +} diff --git a/test/scripts/icon/index.ts b/test/scripts/icon/index.ts new file mode 100644 index 00000000..1689fdc8 --- /dev/null +++ b/test/scripts/icon/index.ts @@ -0,0 +1,14 @@ +import {Contract} from "./contract"; +import {IconNetwork} from "./network"; +import {Jar} from "./jar"; +import {Chain, Gov} from "./system"; +import {BMC, BMV, getBtpAddress} from "./btp"; +import {XCall} from "./xcall"; +import {DAppProxy} from "./dapp_proxy"; + +export { + Contract, IconNetwork, Jar, + Chain, Gov, + BMC, BMV, getBtpAddress, + XCall, DAppProxy, +} diff --git a/test/scripts/icon/jar.ts b/test/scripts/icon/jar.ts new file mode 100644 index 00000000..34fc0838 --- /dev/null +++ b/test/scripts/icon/jar.ts @@ -0,0 +1,15 @@ +import fs from 'fs'; +import path from 'path'; + +export class Jar { + public static readFromFile(base: string | undefined, project: string, version: string = '0.1.0') { + if (!base) { + base = "../javascore"; + } + const build = "build/libs"; + const name = project.replace("/", "-"); + const optJar = `${name}-${version}-optimized.jar`; + const fullPath = path.join(base, project, build, optJar); + return fs.readFileSync(fullPath).toString('hex') + } +} diff --git a/test/scripts/icon/network.ts b/test/scripts/icon/network.ts new file mode 100644 index 00000000..5426e4ad --- /dev/null +++ b/test/scripts/icon/network.ts @@ -0,0 +1,61 @@ +import fs from 'fs'; +import {IconService, Wallet} from 'icon-sdk-js'; +import {ChainConfig} from "../setup/config"; + +const {IconWallet, HttpProvider} = IconService; + +export class IconNetwork { + iconService: IconService; + nid: number; + wallet: Wallet; + private static instances: Map = new Map(); + + constructor(_iconService: IconService, _nid: number, _wallet: Wallet) { + this.iconService = _iconService; + this.nid = _nid; + this.wallet = _wallet; + } + + public static getDefault() { + return this.getNetwork('icon0'); + } + + public static getNetwork(target: string) { + const entry = this.instances.get(target); + if (entry) { + return entry; + } + const config: any = ChainConfig.getChain(target); + const httpProvider = new HttpProvider(config.endpoint); + const iconService = new IconService(httpProvider); + const keystore = this.readFile(config.keystore); + const keypass = config.keysecret + ? this.readFile(config.keysecret) + : config.keypass; + const wallet = IconWallet.loadKeystore(keystore, keypass, false); + const nid = parseInt(config.network.split(".")[0], 16); + const network = new this(iconService, nid, wallet); + this.instances.set(target, network); + return network; + } + + private static readFile(path: string) { + return fs.readFileSync(path).toString(); + } + + async getTotalSupply() { + return this.iconService.getTotalSupply().execute(); + } + + async getLastBlock() { + return this.iconService.getLastBlock().execute(); + } + + async getBTPNetworkInfo(nid: string) { + return this.iconService.getBTPNetworkInfo(nid).execute(); + } + + async getBTPHeader(nid: string, height: string) { + return this.iconService.getBTPHeader(nid, height).execute(); + } +} diff --git a/test/scripts/icon/system.ts b/test/scripts/icon/system.ts new file mode 100644 index 00000000..da9f1888 --- /dev/null +++ b/test/scripts/icon/system.ts @@ -0,0 +1,135 @@ +import IconService from 'icon-sdk-js'; +import {Contract} from "./contract"; +import {IconNetwork} from "./network"; + +const {IconAmount} = IconService; + +export class Chain extends Contract { + constructor(iconNetwork: IconNetwork) { + super(iconNetwork, 'cx0000000000000000000000000000000000000000') + } + + getRevision() { + return this.call({ + method: 'getRevision' + }) + } + + getMainPReps() { + return this.call({ + method: 'getMainPReps' + }) + } + + getPRep(address: string) { + return this.call({ + method: 'getPRep', + params: { + address: address + } + }) + } + + getPRepNodePublicKey(address: string) { + return this.call({ + method: 'getPRepNodePublicKey', + params: { + address: address + } + }) + } + + registerPRep(name: string) { + return this.invoke({ + method: 'registerPRep', + value: '0x' + IconAmount.of(2000, IconAmount.Unit.ICX).toLoop().toString(16), + params: { + name: name, + country: "KOR", + city: "Seoul", + email: "test@example.com", + website: "https://test.example.com", + details: "https://test.example.com/details", + p2pEndpoint: "test.example.com:7100" + } + }) + } + + setStake(amount: any) { + return this.invoke({ + method: 'setStake', + params: { + value: '0x' + amount.toString(16) + } + }) + } + + setDelegation(address: string, amount: any) { + return this.invoke({ + method: 'setDelegation', + params: { + delegations: [{ + address: address, + value: '0x' + amount.toString(16) + }] + } + }) + } + + setBonderList(address: string) { + return this.invoke({ + method: 'setBonderList', + params: { + bonderList: [address] + } + }) + } + + setBond(address: string, amount: any) { + return this.invoke({ + method: 'setBond', + params: { + bonds: [{ + address: address, + value: '0x' + amount.toString(16) + }] + } + }) + } + + registerPRepNodePublicKey(address: string, pubkey: string) { + return this.invoke({ + method: 'registerPRepNodePublicKey', + params: { + address: address, + pubKey: pubkey + } + }) + } +} + +export class Gov extends Contract { + constructor(iconNetwork: IconNetwork) { + super(iconNetwork, 'cx0000000000000000000000000000000000000001') + } + + setRevision(code: number) { + return this.invoke({ + method: 'setRevision', + params: { + code: '0x' + Number(code).toString(16) + } + }) + } + + openBTPNetwork(name: string, owner: string) { + return this.invoke({ + method: 'openBTPNetwork', + params: { + networkTypeName: 'eth', + name: name, + owner: owner + } + }) + } +} diff --git a/test/scripts/icon/xcall.ts b/test/scripts/icon/xcall.ts new file mode 100644 index 00000000..24c71ac0 --- /dev/null +++ b/test/scripts/icon/xcall.ts @@ -0,0 +1,37 @@ +import {Contract} from "./contract"; +import {IconNetwork} from "./network"; + +export class XCall extends Contract { + constructor(iconNetwork: IconNetwork, address: string) { + super(iconNetwork, address) + } + + getFee(network: string, rollback: boolean) { + return this.call({ + method: 'getFee', + params: { + _net: network, + _rollback: rollback ? '0x1' : '0x0' + } + }) + } + + executeCall(reqId: string, data: string) { + return this.invoke({ + method: 'executeCall', + params: { + _reqId: reqId, + _data: data + } + }) + } + + executeRollback(sn: string) { + return this.invoke({ + method: 'executeRollback', + params: { + _sn: sn + } + }) + } +} diff --git a/test/scripts/setup/config.ts b/test/scripts/setup/config.ts new file mode 100644 index 00000000..a92cf6bc --- /dev/null +++ b/test/scripts/setup/config.ts @@ -0,0 +1,70 @@ +import fs from 'fs'; +const {PWD} = process.env +const DEPLOYMENTS_PATH = `${PWD}/deployments.json` +const CHAIN_CONFIG_PATH = `${PWD}/chain_config.json` + +export class Deployments { + map: Map; + private static instance: Deployments; + + constructor(map: any) { + this.map = map; + } + + public get(target: string) { + return this.map.get(target); + } + + public set(target: string, data: any) { + this.map.set(target, data); + } + + public getSrc() { + return this.map.get('link').src; + } + + public getDst() { + return this.map.get('link').dst; + } + + public static getDefault() { + if (!this.instance) { + const data = fs.readFileSync(DEPLOYMENTS_PATH); + const json = JSON.parse(data.toString()); + const map = new Map(Object.entries(json)); + this.instance = new this(map); + } + return this.instance; + } + + public save() { + fs.writeFileSync(DEPLOYMENTS_PATH, JSON.stringify(Object.fromEntries(this.map)), 'utf-8') + } +} + +export class ChainConfig { + private static map: Map; + + public static getProp(key: string) { + if (!this.map) { + const data = fs.readFileSync(CHAIN_CONFIG_PATH); + const json = JSON.parse(data.toString()); + this.map = new Map(Object.entries(json)); + } + return this.map.get(key); + } + + public static getChain(target: string) { + const chains = this.getProp('chains'); + const config = new Map(Object.entries(chains)); + return config.get(target); + } + + public static getLink() { + return this.getProp('link'); + } +} + +export function chainType(chain: any) { + return chain.network.split(".")[1]; +} diff --git a/test/scripts/setup/copy_src.ts b/test/scripts/setup/copy_src.ts new file mode 100644 index 00000000..6f7ffa1a --- /dev/null +++ b/test/scripts/setup/copy_src.ts @@ -0,0 +1,34 @@ +import fs from 'fs'; +import path from 'path'; + +function copyFolderSync(from: string, to: string) { + if (!fs.existsSync(to)) { + fs.mkdirSync(to); + fs.readdirSync(from).forEach(elem => { + if (fs.lstatSync(path.join(from, elem)).isFile()) { + fs.copyFileSync(path.join(from, elem), path.join(to, elem)); + } else { + if (elem != 'test') { + copyFolderSync(path.join(from, elem), path.join(to, elem)); + } + } + }) + } +} + +async function main() { + const mods = ['bmc', 'bmv', 'bmv-bridge', 'xcall'] + mods.forEach((m) => { + const src = `../solidity/${m}/contracts` + const dst = `./solidity/contracts/${m}` + if (!fs.existsSync(dst)) { + console.log(`copy: ${src} => ${dst}`); + copyFolderSync(src, dst); + } + }) +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/scripts/setup/deploy_bmc.ts b/test/scripts/setup/deploy_bmc.ts new file mode 100644 index 00000000..d347dc17 --- /dev/null +++ b/test/scripts/setup/deploy_bmc.ts @@ -0,0 +1,114 @@ +import {ethers} from 'hardhat'; +import {Contract, IconNetwork, Jar} from "../icon"; +import {Deployments, ChainConfig, chainType} from "./config"; + +const {JAVASCORE_PATH} = process.env +const deployments = new Deployments(new Map()); + +async function deploy_java(target: string, chain: any) { + const iconNetwork = IconNetwork.getNetwork(target); + console.log(`${target}: deploy BMC for ${chain.network}`) + + const content = Jar.readFromFile(JAVASCORE_PATH, "bmc"); + const bmc = new Contract(iconNetwork) + const deployTxHash = await bmc.deploy({ + content: content, + params: { + _net: chain.network + } + }) + const result = await bmc.getTxResult(deployTxHash) + if (result.status != 1) { + throw new Error(`BMC deployment failed: ${result.txHash}`); + } + console.log(`${target}: BMC deployed to ${bmc.address}`); + + deployments.set(target, { + 'network': chain.network, + 'contracts': { + 'bmc': bmc.address + } + }) +} + +async function deploy_solidity(target: string, chain: any) { + console.log(`${target}: deploy BMC modules for ${chain.network}`) + + const BMCManagement = await ethers.getContractFactory("BMCManagement"); + const bmcm = await BMCManagement.deploy(); + await bmcm.deployed(); + await bmcm.initialize() + console.log(`BMCManagement: deployed to ${bmcm.address}`); + + const BMCService = await ethers.getContractFactory("BMCService"); + const bmcs = await BMCService.deploy(); + await bmcs.deployed(); + await bmcs.initialize(bmcm.address) + console.log(`BMCService: deployed to ${bmcs.address}`); + + const BMCPeriphery = await ethers.getContractFactory("BMCPeriphery"); + const bmcp = await BMCPeriphery.deploy(); + await bmcp.deployed(); + await bmcp.initialize(chain.network, bmcm.address, bmcs.address); + console.log(`BMCPeriphery: deployed to ${bmcp.address}`); + + console.log(`${target}: management.setBMCPeriphery`); + await bmcm.setBMCPeriphery(bmcp.address) + .then((tx) => { + return tx.wait(1) + }); + console.log(`${target}: management.setBMCService`); + await bmcm.setBMCService(bmcs.address) + .then((tx) => { + return tx.wait(1) + }); + console.log(`${target}: service.setBMCPeriphery`); + await bmcs.setBMCPeriphery(bmcp.address) + .then((tx) => { + return tx.wait(1) + }); + + deployments.set(target, { + 'network': chain.network, + 'contracts': { + 'bmcm': bmcm.address, + 'bmcs': bmcs.address, + 'bmc': bmcp.address, + } + }) +} + +async function main() { + const link = ChainConfig.getLink(); + const srcChain: any = ChainConfig.getChain(link.src); + const dstChain: any = ChainConfig.getChain(link.dst); + + switch (chainType(srcChain)) { + case 'icon': + await deploy_java(link.src, srcChain); + break; + default: + throw new Error(`Link src (${link.src}) should be an ICON-compatible chain`); + } + switch (chainType(dstChain)) { + case 'icon': + await deploy_java(link.dst, dstChain); + break; + case 'hardhat': + await deploy_solidity(link.dst, dstChain); + break; + default: + throw new Error(`Unknown chain type: ${chainType(dstChain)}`); + } + + deployments.set('link', { + 'src': link.src, + 'dst': link.dst + }) + deployments.save(); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/scripts/setup/deploy_bmv.ts b/test/scripts/setup/deploy_bmv.ts new file mode 100644 index 00000000..cb23d726 --- /dev/null +++ b/test/scripts/setup/deploy_bmv.ts @@ -0,0 +1,245 @@ +import {ethers} from 'hardhat'; +import IconService from "icon-sdk-js"; +import {Contract, IconNetwork, Jar} from "../icon"; +import {Gov, BMC, BMV, getBtpAddress} from "../icon"; +import {Deployments, chainType} from "./config"; +const {IconConverter} = IconService; +const {JAVASCORE_PATH, BMV_BRIDGE} = process.env + +const bridgeMode = BMV_BRIDGE == "true"; +const deployments = Deployments.getDefault(); + +async function open_btp_network(src: string, dst: string, icon: any) { + // open BTP network first before deploying BMV + const iconNetwork = IconNetwork.getNetwork(src); + const lastBlock = await iconNetwork.getLastBlock(); + const netName = `${dst}-${lastBlock.height}` + console.log(`${src}: open BTP network for ${netName}`) + const gov = new Gov(iconNetwork); + await gov.openBTPNetwork(netName, icon.contracts.bmc) + .then((txHash) => gov.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to openBTPNetwork: ${result.txHash}`); + } + return gov.filterEvent(result.eventLogs, + 'BTPNetworkOpened(int,int)', 'cx0000000000000000000000000000000000000000') + }) + .then((events) => { + console.log(events); + if (events.length == 0) { + throw new Error(`ICON: failed to find networkId`); + } + const indexed = events[0].indexed || []; + const netTypeId = indexed[1]; + const netId = indexed[2]; + console.log(`${src}: networkTypeId=${netTypeId}`); + console.log(`${src}: networkId=${netId}`); + icon.networkTypeId = netTypeId; + icon.networkId = netId; + }) +} + +async function get_first_btpblock_header(network: IconNetwork, chain: any) { + // get firstBlockHeader via btp2 API + const networkInfo = await network.getBTPNetworkInfo(chain.networkId); + console.log('networkInfo:', networkInfo); + console.log('startHeight:', '0x' + networkInfo.startHeight.toString(16)); + const receiptHeight = '0x' + networkInfo.startHeight.plus(1).toString(16); + console.log('receiptHeight:', receiptHeight); + const header = await network.getBTPHeader(chain.networkId, receiptHeight); + const firstBlockHeader = '0x' + Buffer.from(header, 'base64').toString('hex'); + console.log('firstBlockHeader:', firstBlockHeader); + return firstBlockHeader; +} + +async function deploy_bmv_btpblock_java(srcNetwork: IconNetwork, dstNetwork: IconNetwork, + srcChain: any, dstChain: any) { + const firstBlockHeader = await get_first_btpblock_header(dstNetwork, dstChain); + const content = Jar.readFromFile(JAVASCORE_PATH, "bmv/btpblock"); + const bmv = new Contract(srcNetwork) + const deployTxHash = await bmv.deploy({ + content: content, + params: { + bmc: srcChain.contracts.bmc, + srcNetworkID: dstChain.network, + networkTypeID: dstChain.networkTypeId, + blockHeader: firstBlockHeader, + seqOffset: '0x0' + } + }) + const result = await bmv.getTxResult(deployTxHash); + if (result.status != 1) { + throw new Error(`BMV deployment failed: ${result.txHash}`); + } + srcChain.contracts.bmv = bmv.address; + console.log(`${srcChain.network}: BMV-BTPBlock: deployed to ${bmv.address}`); +} + +async function deploy_bmv_bridge_java(srcNetwork: IconNetwork, srcChain: any, dstChain: any) { + const content = Jar.readFromFile(JAVASCORE_PATH, "bmv/bridge"); + const bmv = new Contract(srcNetwork) + const deployTxHash = await bmv.deploy({ + content: content, + params: { + _bmc: srcChain.contracts.bmc, + _net: dstChain.network, + _offset: IconConverter.toHex(dstChain.blockNum) + } + }) + const result = await bmv.getTxResult(deployTxHash) + if (result.status != 1) { + throw new Error(`BMV deployment failed: ${result.txHash}`); + } + srcChain.contracts.bmv = bmv.address + console.log(`${srcChain.network}: BMV-Bridge: deployed to ${bmv.address}`); +} + +async function deploy_bmv(src: string, dst: string, srcChain: any, dstChain: any) { + const srcNetwork = IconNetwork.getNetwork(src); + const dstChainType = chainType(dstChain); + switch (dstChainType) { + case 'icon': + const dstNetwork = IconNetwork.getNetwork(dst); + // deploy BMV-BTPBlock for src network + await deploy_bmv_btpblock_java(srcNetwork, dstNetwork, srcChain, dstChain); + // deploy BMV-BTPBlock for dst network + await deploy_bmv_btpblock_java(dstNetwork, srcNetwork, dstChain, srcChain); + break; + + case 'hardhat': + const lastBlock = await srcNetwork.getLastBlock(); + srcChain.blockNum = lastBlock.height + console.log(`${src}: block number (${srcChain.network}): ${srcChain.blockNum}`); + + const blockNum = await ethers.provider.getBlockNumber(); + dstChain.blockNum = blockNum + console.log(`${dst}: block number (${dstChain.network}): ${dstChain.blockNum}`); + + // deploy BMV-Bridge java for src network + await deploy_bmv_bridge_java(srcNetwork, srcChain, dstChain); + + if (bridgeMode) { + // deploy BMV-Bridge solidity for dst network + const BMVBridge = await ethers.getContractFactory("BMV") + const bmvb = await BMVBridge.deploy(dstChain.contracts.bmc, srcChain.network, srcChain.blockNum) + await bmvb.deployed() + dstChain.contracts.bmvb = bmvb.address + console.log(`${dst}: BMV-Bridge: deployed to ${bmvb.address}`); + } else { + // deploy BMV-BTPBlock solidity for dst network + const firstBlockHeader = await get_first_btpblock_header(srcNetwork, srcChain); + const BMVBtp = await ethers.getContractFactory("BtpMessageVerifier"); + const bmvBtp = await BMVBtp.deploy(dstChain.contracts.bmc, srcChain.network, srcChain.networkTypeId, firstBlockHeader, '0x0'); + await bmvBtp.deployed() + dstChain.contracts.bmv = bmvBtp.address + console.log(`${dst}: BMV: deployed to ${bmvBtp.address}`); + } + break; + + default: + throw new Error(`Unknown chain type: ${dstChainType}`); + } + + // update deployments + deployments.set(src, srcChain); + deployments.set(dst, dstChain); + deployments.save(); +} + +async function setup_link_icon(src: string, srcChain: any, dstChain: any) { + const srcNetwork = IconNetwork.getNetwork(src); + const bmc = new BMC(srcNetwork, srcChain.contracts.bmc); + const dstBmcAddr = getBtpAddress(dstChain.network, dstChain.contracts.bmc); + + console.log(`${src}: addVerifier for ${dstChain.network}`) + await bmc.addVerifier(dstChain.network, srcChain.contracts.bmv) + .then((txHash) => bmc.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to register BMV to BMC: ${result.txHash}`); + } + }) + console.log(`${src}: addBTPLink for ${dstBmcAddr}`) + await bmc.addBTPLink(dstBmcAddr, srcChain.networkId) + .then((txHash) => bmc.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to addBTPLink: ${result.txHash}`); + } + }) + console.log(`${src}: addRelay`) + await bmc.addRelay(dstBmcAddr, srcNetwork.wallet.getAddress()) + .then((txHash) => bmc.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to addRelay: ${result.txHash}`); + } + }) +} + +async function setup_link_solidity(src: string, srcChain: any, dstChain: any) { + const bmcm = await ethers.getContractAt('BMCManagement', srcChain.contracts.bmcm) + const dstBmcAddr = getBtpAddress(dstChain.network, dstChain.contracts.bmc); + + console.log(`${src}: addVerifier for ${dstChain.network}`) + let bmvAddress; + if (bridgeMode) { + bmvAddress = srcChain.contracts.bmvb; + } else { + bmvAddress = srcChain.contracts.bmv; + } + await bmcm.addVerifier(dstChain.network, bmvAddress) + .then((tx) => { + return tx.wait(1) + }); + console.log(`${src}: addLink: ${dstBmcAddr}`) + await bmcm.addLink(dstBmcAddr) + .then((tx) => { + return tx.wait(1) + }); + console.log(`${src}: addRelay`) + const signers = await ethers.getSigners() + await bmcm.addRelay(dstBmcAddr, signers[0].getAddress()) + .then((tx) => { + return tx.wait(1) + }); +} + +async function setup_link(src: string, dst: string, srcChain: any, dstChain: any) { + // setup src network + await setup_link_icon(src, srcChain, dstChain); + + // setup dst network + switch (chainType(dstChain)) { + case 'icon': + await setup_link_icon(dst, dstChain, srcChain); + break; + case 'hardhat': + await setup_link_solidity(dst, dstChain, srcChain); + break; + default: + throw new Error(`Unknown chain type: ${chainType(dstChain)}`); + } +} + +async function main() { + const src = deployments.getSrc(); + const dst = deployments.getDst(); + const srcChain = deployments.get(src); + const dstChain = deployments.get(dst); + + if (chainType(srcChain) === 'icon') { + await open_btp_network(src, dst, srcChain); + } + if (chainType(dstChain) === 'icon') { + await open_btp_network(dst, src, dstChain); + } + await deploy_bmv(src, dst, srcChain, dstChain); + await setup_link(src, dst, srcChain, dstChain); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/scripts/setup/deploy_dapp.ts b/test/scripts/setup/deploy_dapp.ts new file mode 100644 index 00000000..d54b1e95 --- /dev/null +++ b/test/scripts/setup/deploy_dapp.ts @@ -0,0 +1,65 @@ +import {ethers} from 'hardhat'; +import {Contract, IconNetwork, Jar} from "../icon"; +import {chainType, Deployments} from "./config"; + +const {JAVASCORE_PATH} = process.env +const deployments = Deployments.getDefault(); + +async function deploy_dapp_java(target: string, chain: any) { + const iconNetwork = IconNetwork.getNetwork(target); + const content = Jar.readFromFile(JAVASCORE_PATH, "dapp-sample"); + const dapp = new Contract(iconNetwork) + const deployTxHash = await dapp.deploy({ + content: content, + params: { + _callService: chain.contracts.xcall, + } + }) + const result = await dapp.getTxResult(deployTxHash) + if (result.status != 1) { + throw new Error(`DApp deployment failed: ${result.txHash}`); + } + chain.contracts.dapp = dapp.address + console.log(`${target} DApp: deployed to ${dapp.address}`); +} + +async function deploy_dapp_solidity(target: string, chain: any) { + const DAppSample = await ethers.getContractFactory("DAppProxySample") + const dappSol = await DAppSample.deploy() + await dappSol.deployed() + await dappSol.initialize(chain.contracts.xcall) + chain.contracts.dapp = dappSol.address + console.log(`${target} DApp: deployed to ${dappSol.address}`); +} + +async function main() { + const src = deployments.getSrc(); + const dst = deployments.getDst(); + const srcChain = deployments.get(src); + const dstChain = deployments.get(dst); + + // deploy to src network first + await deploy_dapp_java(src, srcChain); + + // deploy to dst network + switch (chainType(dstChain)) { + case 'icon': + await deploy_dapp_java(dst, dstChain); + break; + case 'hardhat': + await deploy_dapp_solidity(dst, dstChain); + break; + default: + throw new Error(`Unknown chain type: ${chainType(dstChain)}`); + } + + // update deployments + deployments.set(src, srcChain); + deployments.set(dst, dstChain); + deployments.save(); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/scripts/setup/deploy_xcall.ts b/test/scripts/setup/deploy_xcall.ts new file mode 100644 index 00000000..24cc0c14 --- /dev/null +++ b/test/scripts/setup/deploy_xcall.ts @@ -0,0 +1,79 @@ +import {ethers} from 'hardhat'; +import {Contract, IconNetwork, Jar, BMC} from "../icon"; +import {Deployments, chainType} from "./config"; + +const {JAVASCORE_PATH} = process.env +const deployments = Deployments.getDefault(); + +async function deploy_xcall_java(target: string, chain: any) { + const iconNetwork = IconNetwork.getNetwork(target); + const content = Jar.readFromFile(JAVASCORE_PATH, "xcall", "0.6.2"); + const xcall = new Contract(iconNetwork) + const deployTxHash = await xcall.deploy({ + content: content, + params: { + _bmc: chain.contracts.bmc, + } + }) + const result = await xcall.getTxResult(deployTxHash); + if (result.status != 1) { + throw new Error(`xCall deployment failed: ${result.txHash}`); + } + chain.contracts.xcall = xcall.address; + console.log(`${target}: xCall: deployed to ${xcall.address}`); + + console.log(`${target}: register xCall to BMC`); + const bmc = new BMC(iconNetwork, chain.contracts.bmc) + await bmc.addService('xcall', chain.contracts.xcall) + .then((txHash) => bmc.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`${target}: failed to register xCall to BMC: ${result.txHash}`); + } + }) +} + +async function deploy_xcall_solidity(target: string, chain: any) { + const CallSvc = await ethers.getContractFactory("CallService") + const xcallSol = await CallSvc.deploy() + await xcallSol.deployed() + await xcallSol.initialize(chain.contracts.bmc) + chain.contracts.xcall = xcallSol.address + console.log(`${target}: xCall: deployed to ${xcallSol.address}`); + + console.log(`${target}: register xCall to BMC`); + const bmcm = await ethers.getContractAt('BMCManagement', chain.contracts.bmcm) + await bmcm.addService('xcall', chain.contracts.xcall); +} + +async function main() { + const src = deployments.getSrc(); + const dst = deployments.getDst(); + const srcChain = deployments.get(src); + const dstChain = deployments.get(dst); + + // deploy to src network first + await deploy_xcall_java(src, srcChain); + + // deploy to dst network + switch (chainType(dstChain)) { + case 'icon': + await deploy_xcall_java(dst, dstChain); + break; + case 'hardhat': + await deploy_xcall_solidity(dst, dstChain); + break; + default: + throw new Error(`Unknown chain type: ${chainType(dstChain)}`); + } + + // update deployments + deployments.set(src, srcChain); + deployments.set(dst, dstChain); + deployments.save(); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/scripts/setup/setup_node.ts b/test/scripts/setup/setup_node.ts new file mode 100644 index 00000000..f13e0f51 --- /dev/null +++ b/test/scripts/setup/setup_node.ts @@ -0,0 +1,144 @@ +import IconService from "icon-sdk-js"; +import {IconNetwork, Chain, Gov} from "../icon"; + +const {CI_WORKFLOW} = process.env +const {IconAmount} = IconService; +const iconNetwork = IconNetwork.getDefault(); +const chain = new Chain(iconNetwork); +const gov = new Gov(iconNetwork); +const prepAddress = iconNetwork.wallet.getAddress() + +async function ensure_decentralization() { + const mainPReps = await chain.getMainPReps(); + console.log(mainPReps) + const prep = await chain.getPRep(prepAddress) + .catch((error) => { + console.log('Need to register PRep and get power first') + }); + if (mainPReps.preps.length == 0 && prep == undefined) { + const totalSupply = await iconNetwork.getTotalSupply() + const minDelegated = totalSupply.div(500) + const bondAmount = IconAmount.of(100_000, IconAmount.Unit.ICX).toLoop() + + console.log(`ICON: registerPRep`) + const name = `node_${prepAddress}` + await chain.registerPRep(name) + .then((txHash) => chain.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to registerPrep: ${result.txHash}`); + } + }) + + console.log(`ICON: setStake`) + await chain.setStake(minDelegated.plus(bondAmount)) + .then((txHash) => chain.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to setStake: ${result.txHash}`); + } + }) + + console.log(`ICON: setDelegation`) + await chain.setDelegation(prepAddress, minDelegated) + .then((txHash) => chain.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to setDelegation: ${result.txHash}`); + } + }) + + console.log(`ICON: setBonderList`) + await chain.setBonderList(prepAddress) + .then((txHash) => chain.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to setBonderList: ${result.txHash}`); + } + }) + + console.log(`ICON: setBond`) + await chain.setBond(prepAddress, bondAmount) + .then((txHash) => chain.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to setBond: ${result.txHash}`); + } + }) + } + + if (mainPReps.preps.length == 0) { + throw new Error(`ICON: need to wait until the next term for decentralization`); + } +} + +async function setup_node() { + // ensure BTP revision + const BTP_REVISION = 21 + const rev = parseInt(await chain.getRevision(), 16); + console.log(`ICON: revision: ${rev}`) + if (rev < BTP_REVISION) { + console.log(`ICON: Set revision to ${BTP_REVISION}`) + await gov.setRevision(BTP_REVISION) + .then((txHash) => gov.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to set revision: ${result.txHash}`); + } + }) + } + + // ensure public key registration + const pubkey = await chain.getPRepNodePublicKey(prepAddress) + .catch((error) => { + console.log(`error: ${error}`) + }) + console.log(`ICON: pubkey: ${pubkey}`) + if (pubkey == undefined) { + console.log('ICON: register PRep node publicKey') + // register node publicKey in compressed form + const pkey = iconNetwork.wallet.getPublicKey(true); + await chain.registerPRepNodePublicKey(prepAddress, pkey) + .then((txHash) => chain.getTxResult(txHash)) + .then((result) => { + if (result.status != 1) { + throw new Error(`ICON: failed to registerPRepNodePublicKey: ${result.txHash}`); + } + }) + } +} + +function sleep(millis: number) { + return new Promise(resolve => setTimeout(resolve, millis)); +} + +async function main() { + let success = false; + for (let i = 0; i < 21; i++) { + success = await ensure_decentralization() + .then(() => { + return true; + }) + .catch((error) => { + if (CI_WORKFLOW == "true") { + console.log(error); + return false; + } + throw error; + }); + if (success) { + await setup_node() + .then(() => { + console.log('ICON: node setup completed') + }); + break; + } + console.log(`... wait 10 seconds (${i})`) + await sleep(10000); + } +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 00000000..e5f1a640 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +} diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/index.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/index.ts new file mode 100644 index 00000000..b466e83b --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; +import type * as utils from "./utils"; +export type { utils }; diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC.ts new file mode 100644 index 00000000..b9b28a19 --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC.ts @@ -0,0 +1,226 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IBMCInterface extends utils.Interface { + functions: { + "getBtpAddress()": FunctionFragment; + "getFee(string,bool)": FunctionFragment; + "getNetworkAddress()": FunctionFragment; + "getNetworkSn()": FunctionFragment; + "sendMessage(string,string,int256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getBtpAddress" + | "getFee" + | "getNetworkAddress" + | "getNetworkSn" + | "sendMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getBtpAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getNetworkAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkSn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "sendMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "getBtpAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getNetworkAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkSn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IBMC extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IBMCInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getBtpAddress(overrides?: CallOverrides): Promise<[string]>; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { _fee: BigNumber }>; + + getNetworkAddress(overrides?: CallOverrides): Promise<[string]>; + + getNetworkSn(overrides?: CallOverrides): Promise<[BigNumber]>; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV.ts new file mode 100644 index 00000000..b228c01c --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV.ts @@ -0,0 +1,159 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IBMV { + export type VerifierStatusStruct = { + height: PromiseOrValue; + extra: PromiseOrValue; + }; + + export type VerifierStatusStructOutput = [BigNumber, string] & { + height: BigNumber; + extra: string; + }; +} + +export interface IBMVInterface extends utils.Interface { + functions: { + "getStatus()": FunctionFragment; + "handleRelayMessage(string,string,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "getStatus" | "handleRelayMessage" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "getStatus", values?: undefined): string; + encodeFunctionData( + functionFragment: "handleRelayMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "getStatus", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "handleRelayMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IBMV extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IBMVInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getStatus( + overrides?: CallOverrides + ): Promise<[IBMV.VerifierStatusStructOutput]>; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + getStatus( + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + getStatus( + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getStatus(overrides?: CallOverrides): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + getStatus(overrides?: CallOverrides): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH.ts new file mode 100644 index 00000000..9f89d449 --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH.ts @@ -0,0 +1,188 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IBSHInterface extends utils.Interface { + functions: { + "handleBTPError(string,string,uint256,uint256,string)": FunctionFragment; + "handleBTPMessage(string,string,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "handleBTPError" | "handleBTPMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "handleBTPError", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "handleBTPMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "handleBTPError", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleBTPMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IBSH extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IBSHInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/index.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/index.ts new file mode 100644 index 00000000..4d33e357 --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/interfaces/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IBMC } from "./IBMC"; +export type { IBMV } from "./IBMV"; +export type { IBSH } from "./IBSH"; diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/utils/Integers.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/utils/Integers.ts new file mode 100644 index 00000000..5843e932 --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/utils/Integers.ts @@ -0,0 +1,100 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IntegersInterface extends utils.Interface { + functions: { + "parseInt(string)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "parseInt"): FunctionFragment; + + encodeFunctionData( + functionFragment: "parseInt", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "parseInt", data: BytesLike): Result; + + events: {}; +} + +export interface Integers extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IntegersInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + parseInt( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { _ret: BigNumber }>; + }; + + parseInt( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + parseInt( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + parseInt( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + parseInt( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/utils/index.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/utils/index.ts new file mode 100644 index 00000000..d492b30d --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/contracts/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Integers } from "./Integers"; diff --git a/test/typechain-types/@iconfoundation/btp2-solidity-library/index.ts b/test/typechain-types/@iconfoundation/btp2-solidity-library/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/test/typechain-types/@iconfoundation/btp2-solidity-library/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts }; diff --git a/test/typechain-types/@iconfoundation/index.ts b/test/typechain-types/@iconfoundation/index.ts new file mode 100644 index 00000000..00efa5ea --- /dev/null +++ b/test/typechain-types/@iconfoundation/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as btp2SolidityLibrary from "./btp2-solidity-library"; +export type { btp2SolidityLibrary }; diff --git a/test/typechain-types/@openzeppelin/contracts-upgradeable/index.ts b/test/typechain-types/@openzeppelin/contracts-upgradeable/index.ts new file mode 100644 index 00000000..535f526f --- /dev/null +++ b/test/typechain-types/@openzeppelin/contracts-upgradeable/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as proxy from "./proxy"; +export type { proxy }; diff --git a/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.ts b/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.ts new file mode 100644 index 00000000..74cdc5fa --- /dev/null +++ b/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as utils from "./utils"; +export type { utils }; diff --git a/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.ts b/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.ts new file mode 100644 index 00000000..4ec351d3 --- /dev/null +++ b/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.ts @@ -0,0 +1,69 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, Signer, utils } from "ethers"; +import type { EventFragment } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../../common"; + +export interface InitializableInterface extends utils.Interface { + functions: {}; + + events: { + "Initialized(uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface Initializable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: InitializableInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: { + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts b/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts new file mode 100644 index 00000000..5da73d03 --- /dev/null +++ b/test/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Initializable } from "./Initializable"; diff --git a/test/typechain-types/@openzeppelin/index.ts b/test/typechain-types/@openzeppelin/index.ts new file mode 100644 index 00000000..138240b4 --- /dev/null +++ b/test/typechain-types/@openzeppelin/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contractsUpgradeable from "./contracts-upgradeable"; +export type { contractsUpgradeable }; diff --git a/test/typechain-types/common.ts b/test/typechain-types/common.ts new file mode 100644 index 00000000..4c90b08b --- /dev/null +++ b/test/typechain-types/common.ts @@ -0,0 +1,46 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; + +export interface TypedEvent< + TArgsArray extends Array = any, + TArgsObject = any +> extends Event { + args: TArgsArray & TArgsObject; +} + +export interface TypedEventFilter<_TEvent extends TypedEvent> + extends EventFilter {} + +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} + +type __TypechainArgsArray = T extends TypedEvent ? U : never; + +export interface OnEvent { + ( + eventFilter: TypedEventFilter, + listener: TypedListener + ): TRes; + (eventName: string, listener: Listener): TRes; +} + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; + +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type PromiseOrValue = T | Promise; diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/index.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/index.ts new file mode 100644 index 00000000..16a6b264 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; +export * as utils from "./utils"; diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC__factory.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC__factory.ts new file mode 100644 index 00000000..370801b9 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC__factory.ts @@ -0,0 +1,120 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IBMC, + IBMCInterface, +} from "../../../../../@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC"; + +const _abi = [ + { + inputs: [], + name: "getBtpAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bool", + name: "_response", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "_fee", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkSn", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "sendMessage", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "payable", + type: "function", + }, +] as const; + +export class IBMC__factory { + static readonly abi = _abi; + static createInterface(): IBMCInterface { + return new utils.Interface(_abi) as IBMCInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): IBMC { + return new Contract(address, _abi, signerOrProvider) as IBMC; + } +} diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV__factory.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV__factory.ts new file mode 100644 index 00000000..0ce04211 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV__factory.ts @@ -0,0 +1,82 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IBMV, + IBMVInterface, +} from "../../../../../@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV"; + +const _abi = [ + { + inputs: [], + name: "getStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + internalType: "bytes", + name: "extra", + type: "bytes", + }, + ], + internalType: "struct IBMV.VerifierStatus", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_bmc", + type: "string", + }, + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleRelayMessage", + outputs: [ + { + internalType: "bytes[]", + name: "", + type: "bytes[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IBMV__factory { + static readonly abi = _abi; + static createInterface(): IBMVInterface { + return new utils.Interface(_abi) as IBMVInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): IBMV { + return new Contract(address, _abi, signerOrProvider) as IBMV; + } +} diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH__factory.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH__factory.ts new file mode 100644 index 00000000..c7340198 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH__factory.ts @@ -0,0 +1,84 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IBSH, + IBSHInterface, +} from "../../../../../@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "uint256", + name: "_code", + type: "uint256", + }, + { + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "handleBTPError", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleBTPMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IBSH__factory { + static readonly abi = _abi; + static createInterface(): IBSHInterface { + return new utils.Interface(_abi) as IBSHInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): IBSH { + return new Contract(address, _abi, signerOrProvider) as IBSH; + } +} diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/index.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/index.ts new file mode 100644 index 00000000..432e05ba --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IBMC__factory } from "./IBMC__factory"; +export { IBMV__factory } from "./IBMV__factory"; +export { IBSH__factory } from "./IBSH__factory"; diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/utils/Integers__factory.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/utils/Integers__factory.ts new file mode 100644 index 00000000..38f33421 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/utils/Integers__factory.ts @@ -0,0 +1,82 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../../common"; +import type { + Integers, + IntegersInterface, +} from "../../../../../@iconfoundation/btp2-solidity-library/contracts/utils/Integers"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_value", + type: "string", + }, + ], + name: "parseInt", + outputs: [ + { + internalType: "uint256", + name: "_ret", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, +] as const; + +const _bytecode = + "0x6102ff61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c806342346c5e1461003a575b600080fd5b61004d61004836600461014f565b61005f565b60405190815260200160405180910390f35b805160009082906001908390610076908390610215565b90505b82518110156101315760308382815181106100965761009661022c565b016020015160f81c108015906100c6575060398382815181106100bb576100bb61022c565b016020015160f81c11155b6100d2576100d2610242565b8160308483815181106100e7576100e761022c565b01602001516100f9919060f81c610258565b60ff16610106919061027b565b610110908561029a565b935061011d600a8361027b565b915080610129816102b2565b915050610079565b505050919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561016157600080fd5b81356001600160401b038082111561017857600080fd5b818401915084601f83011261018c57600080fd5b81358181111561019e5761019e610139565b604051601f8201601f19908116603f011681019083821181831017156101c6576101c6610139565b816040528281528760208487010111156101df57600080fd5b826020860160208301376000928101602001929092525095945050505050565b634e487b7160e01b600052601160045260246000fd5b600082821015610227576102276101ff565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052600160045260246000fd5b600060ff821660ff841680821015610272576102726101ff565b90039392505050565b6000816000190483118215151615610295576102956101ff565b500290565b600082198211156102ad576102ad6101ff565b500190565b6000816102c1576102c16101ff565b50600019019056fea26469706673582212209da96e092fb5280cdf3775402e1bad51615e258d8280940a1a7f2d537e476ccb64736f6c634300080c0033"; + +type IntegersConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: IntegersConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Integers__factory extends ContractFactory { + constructor(...args: IntegersConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): Integers { + return super.attach(address) as Integers; + } + override connect(signer: Signer): Integers__factory { + return super.connect(signer) as Integers__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): IntegersInterface { + return new utils.Interface(_abi) as IntegersInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Integers { + return new Contract(address, _abi, signerOrProvider) as Integers; + } +} diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/utils/index.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/utils/index.ts new file mode 100644 index 00000000..2a52ad26 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/contracts/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Integers__factory } from "./Integers__factory"; diff --git a/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/index.ts b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/btp2-solidity-library/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/test/typechain-types/factories/@iconfoundation/index.ts b/test/typechain-types/factories/@iconfoundation/index.ts new file mode 100644 index 00000000..9d02287b --- /dev/null +++ b/test/typechain-types/factories/@iconfoundation/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as btp2SolidityLibrary from "./btp2-solidity-library"; diff --git a/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.ts b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.ts new file mode 100644 index 00000000..9306542e --- /dev/null +++ b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as proxy from "./proxy"; diff --git a/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.ts b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.ts new file mode 100644 index 00000000..56778f88 --- /dev/null +++ b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as utils from "./utils"; diff --git a/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.ts b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.ts new file mode 100644 index 00000000..2f225279 --- /dev/null +++ b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + Initializable, + InitializableInterface, +} from "../../../../../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, +] as const; + +export class Initializable__factory { + static readonly abi = _abi; + static createInterface(): InitializableInterface { + return new utils.Interface(_abi) as InitializableInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Initializable { + return new Contract(address, _abi, signerOrProvider) as Initializable; + } +} diff --git a/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts new file mode 100644 index 00000000..4baae4a2 --- /dev/null +++ b/test/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Initializable__factory } from "./Initializable__factory"; diff --git a/test/typechain-types/factories/@openzeppelin/index.ts b/test/typechain-types/factories/@openzeppelin/index.ts new file mode 100644 index 00000000..7d3f680c --- /dev/null +++ b/test/typechain-types/factories/@openzeppelin/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contractsUpgradeable from "./contracts-upgradeable"; diff --git a/test/typechain-types/factories/index.ts b/test/typechain-types/factories/index.ts new file mode 100644 index 00000000..b777ab2b --- /dev/null +++ b/test/typechain-types/factories/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as iconfoundation from "./@iconfoundation"; +export * as openzeppelin from "./@openzeppelin"; +export * as solidity from "./solidity"; diff --git a/test/typechain-types/factories/solidity/contracts/bmc/BMCManagement__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/BMCManagement__factory.ts new file mode 100644 index 00000000..f0d85161 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/BMCManagement__factory.ts @@ -0,0 +1,713 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + BMCManagement, + BMCManagementInterface, +} from "../../../../solidity/contracts/bmc/BMCManagement"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "addLink", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "addOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_reachable", + type: "string", + }, + ], + name: "addReachable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "addRelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "addRoute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "addService", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "addVerifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + internalType: "string", + name: "_feeNetwork", + type: "string", + }, + { + internalType: "uint256[]", + name: "_feeValues", + type: "uint256[]", + }, + ], + name: "dropMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getBMCPeriphery", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBMCService", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bool", + name: "_response", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFeeHandler", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "_dst", + type: "string[]", + }, + ], + name: "getFeeTable", + outputs: [ + { + internalType: "uint256[][]", + name: "_feeTable", + type: "uint256[][]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + ], + name: "getHop", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLinks", + outputs: [ + { + internalType: "string[]", + name: "", + type: "string[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "getRelays", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRoutes", + outputs: [ + { + components: [ + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "next", + type: "string", + }, + ], + internalType: "struct Types.Route[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_svc", + type: "string", + }, + ], + name: "getService", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getServices", + outputs: [ + { + components: [ + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + internalType: "struct Types.Service[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + ], + name: "getVerifier", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVerifiers", + outputs: [ + { + components: [ + { + internalType: "string", + name: "net", + type: "string", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + internalType: "struct Types.Verifier[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "isLinkRelay", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "removeLink", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "removeOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_reachable", + type: "string", + }, + ], + name: "removeReachable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "removeRelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + ], + name: "removeRoute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_svc", + type: "string", + }, + ], + name: "removeService", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + ], + name: "removeVerifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + ], + name: "resolveNext", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setBMCPeriphery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setBMCService", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setFeeHandler", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "_dst", + type: "string[]", + }, + { + internalType: "uint256[][]", + name: "_value", + type: "uint256[][]", + }, + ], + name: "setFeeTable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b506151ac806100206000396000f3fe608060405234801561001057600080fd5b50600436106101ac5760003560e01c80630207118c146101b1578063065a9e9b146101da578063173825d9146101ef57806322a618fa146102025780632f54bf6e1461021557806334b05bc0146102515780633de9554414610272578063409267341461029d578063458b3372146102bd5780634a7e83be146102d057806365b3c054146102e35780636d8c73d7146102f65780636e4060d7146103095780637065cb481461031c578063733140771461032f5780637541785114610342578063766639ce1461035757806376b503c31461036a57806376bf87671461037d57806378ad5a7d1461038e578063794758be146103ae5780637bf3f72e146103c15780637d4c4f4a146103d45780637e928072146103f55780638129fc1c1461040a578063a935e76614610412578063acc3a7a514610427578063bd0a0bb31461043a578063be81db471461044d578063bef47adf1461045e578063c265ab851461046f578063c620234c14610482578063d740945f14610495578063def59f5e146104a8578063f51acaea146104bb578063f66ddcbb146104ce575b600080fd5b6101c46101bf366004614201565b6104e3565b6040516101d191906142b0565b60405180910390f35b6101ed6101e83660046143fd565b6106b3565b005b6101ed6101fd36600461447c565b610895565b6101ed6102103660046144df565b610986565b61024161022336600461447c565b6001600160a01b031660009081526001602052604090205460ff1690565b60405190151581526020016101d1565b61026461025f366004614520565b610d3f565b6040519081526020016101d1565b610285610280366004614520565b610d6d565b6040516001600160a01b0390911681526020016101d1565b6102b06102ab366004614520565b610da7565b6040516101d19190614554565b6101ed6102cb36600461447c565b610e2a565b6101ed6102de366004614595565b610e5d565b6101ed6102f13660046146ea565b610f98565b6101ed610304366004614595565b6112a0565b6101ed6103173660046144df565b611389565b6101ed61032a36600461447c565b6118bd565b6101ed61033d36600461447c565b61196c565b61034a611996565b6040516101d1919061483d565b6101ed6103653660046143fd565b611b41565b6101ed610378366004614595565b611c9d565b600e546001600160a01b0316610285565b6103a161039c366004614520565b611d86565b6040516101d19190614892565b6102856103bc366004614520565b611d91565b6101ed6103cf3660046148a5565b611dac565b6103e76103e236600461497e565b612049565b6040516101d19291906149d9565b6103fd612180565b6040516101d191906149f2565b6101ed612329565b61041a612461565b6040516101d19190614a77565b6101ed6104353660046143fd565b612606565b6101ed610448366004614520565b61277e565b600f546001600160a01b0316610285565b600d546001600160a01b0316610285565b61024161047d366004614acc565b61280f565b6101ed61049036600461447c565b61286e565b6101ed6104a3366004614520565b6128a1565b6101ed6104b6366004614595565b6128ea565b6101ed6104c9366004614520565b61297f565b6104d66129c8565b6040516101d19190614b1f565b60606000826001600160401b038111156104ff576104ff614312565b60405190808252806020026020018201604052801561053257816020015b606081526020019060019003908161051d5790505b50905060005b838110156106a9576105a185858381811061055557610555614b74565b90506020028101906105679190614b8a565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612aa192505050565b50600060088686848181106105b8576105b8614b74565b90506020028101906105ca9190614b8a565b6040516105d8929190614bd0565b90815260405190819003602001902054111561069757600885858381811061060257610602614b74565b90506020028101906106149190614b8a565b604051610622929190614bd0565b908152604080519182900360209081018320805480830285018301909352828452919083018282801561067457602002820191906000526020600020905b815481526020019060010190808311610660575b505050505082828151811061068b5761068b614b74565b60200260200101819052505b806106a181614bf6565b915050610538565b5090505b92915050565b6106bb612baf565b6106c58282612c0c565b15604051806040016040528060128152602001710c4c0e925b9d985b1a59105c99dd5b595b9d60721b815250906107185760405162461bcd60e51b815260040161070f9190614892565b60405180910390fd5b50600360078360405161072b9190614c11565b90815260200160405180910390206003015414156040518060400160405280601481526020017331303a416c72656164794578697374526f75746560601b8152509061078a5760405162461bcd60e51b815260040161070f9190614892565b5061079481612c73565b6040518060400160405280601081526020016f31383a4e6f744578697374734c696e6b60801b815250906107db5760405162461bcd60e51b815260040161070f9190614892565b50610891826007836040516107f09190614c11565b9081526020016040518091039020600101805461080c90614c2d565b80601f016020809104026020016040519081016040528092919081815260200182805461083890614c2d565b80156108855780601f1061085a57610100808354040283529160200191610885565b820191906000526020600020905b81548152906001019060200180831161086857829003601f168201915b50505050506003612ca1565b5050565b61089d612baf565b6001600160a01b038116600090815260016020818152604092839020548351808501909452601184527018981d2737ba22bc34b9ba39a7bbb732b960791b9184019190915260ff161515146109055760405162461bcd60e51b815260040161070f9190614892565b506001600254116040518060400160405280600c81526020016b18981d2630b9ba27bbb732b960a11b8152509061094f5760405162461bcd60e51b815260040161070f9190614892565b506001600160a01b0381166000908152600160205260408120805460ff19169055600280549161097e83614c62565b919050555050565b61098e612baf565b60006109cf83838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612e4492505050565b90506109da81612c73565b156040518060400160405280601481526020017331373a416c72656164794578697374734c696e6b60601b81525090610a265760405162461bcd60e51b815260040161070f9190614892565b50610a3081612e5a565b610aae610aa96040518060400160405280604051806040016040528060048152602001634c696e6b60e01b8152508152602001610aa287878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ea992505050565b9052612ebc565b612f0c565b60408051608081018252600481830190815263125b9a5d60e21b60608301528152600b80548351602082810282018101909552818152600094610baf949381850193610aa29392889084015b82821015610ba6578382906000526020600020018054610b1990614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b4590614c2d565b8015610b925780601f10610b6757610100808354040283529160200191610b92565b820191906000526020600020905b815481529060010190602001808311610b7557829003601f168201915b505050505081526020019060010190610afa565b50505050612fda565b6040805160606020601f880181900402820181018352918101868152929350918291879087908190850183828082843760009201829052509385525050604080518381526020818101909252930192919050610c1b565b6060815260200190600190039081610c065790505b5081525060058585604051610c31929190614bd0565b90815260200160405180910390206000820151816000019080519060200190610c5b929190613f53565b506020828101518051610c749260018501920190613fd7565b5050600b8054600181018255600091909152610cb491507f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9018585614030565b50610cf88285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250612ca1915050565b610d3984848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250859250613098915050565b50505050565b60006002600883604051610d539190614c11565b908152604051908190036020019020546106ad9190614c8f565b6000610d7882612e5a565b600382604051610d889190614c11565b908152604051908190036020019020546001600160a01b031692915050565b6060610db282613100565b600682604051610dc29190614c11565b9081526040805191829003602090810183208054808302850183019093528284529190830182828015610e1e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610e00575b50505050509050919050565b610e32612baf565b610e3b81613176565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b610e65612baf565b610e6e81613176565b610e7782613100565b610efa81600684604051610e8b9190614c11565b9081526040805191829003602090810183208054808302850183019093528284529190830182828015610ee757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ec9575b50505050506131c690919063ffffffff16565b1560405180604001604052806013815260200172189c9d20b63932b0b23ca2bc34b9ba39a126a960691b81525090610f455760405162461bcd60e51b815260040161070f9190614892565b50600682604051610f569190614c11565b90815260405160209181900382019020805460018101825560009182529190200180546001600160a01b0319166001600160a01b039290921691909117905550565b610fa0612baf565b8051825114604051806040016040528060128152602001710c4c0e925b9d985b1a59105c99dd5b595b9d60721b81525090610fee5760405162461bcd60e51b815260040161070f9190614892565b5060005b825181101561129b57600082828151811061100f5761100f614b74565b602002602001015151111561126757600282828151811061103257611032614b74565b6020026020010151516110459190614ca3565b60408051808201909152601381527218981d2632b733ba3426bab9ba2132a2bb32b760691b6020820152901561108e5760405162461bcd60e51b815260040161070f9190614892565b5060005b8282815181106110a4576110a4614b74565b6020026020010151518110156111465760008383815181106110c8576110c8614b74565b602002602001015182815181106110e1576110e1614b74565b602002602001015110156040518060400160405280601181526020017031303a4d7573744265506f73697469766560781b815250906111335760405162461bcd60e51b815260040161070f9190614892565b508061113e81614bf6565b915050611092565b5081818151811061115957611159614b74565b602002602001015151600214156111d95761118c83828151811061117f5761117f614b74565b6020026020010151612c73565b6040518060400160405280601081526020016f31383a4e6f744578697374734c696e6b60801b815250906111d35760405162461bcd60e51b815260040161070f9190614892565b506111fd565b6111fb8382815181106111ee576111ee614b74565b6020026020010151612aa1565b505b81818151811061120f5761120f614b74565b6020026020010151600884838151811061122b5761122b614b74565b60200260200101516040516112409190614c11565b908152602001604051809103902090805190602001906112619291906140a4565b50611289565b61128983828151811061127c5761127c614b74565b602002602001015161322c565b8061129381614bf6565b915050610ff2565b505050565b6112a8612baf565b6112b181613176565b6112ba8261327e565b15604051806040016040528060138152602001720626a7482d8e4cac2c8f28af0d2e6e8e684a69606b1b815250906113055760405162461bcd60e51b815260040161070f9190614892565b50806004836040516113179190614c11565b9081526040516020918190038201902080546001600160a01b0319166001600160a01b039390931692909217909155600a8054600181018255600091909152835161129b927fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a890920191850190613f53565b611391612baf565b6113d082828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061310092505050565b60005b600c5481101561158d5760036007600c83815481106113f4576113f4614b74565b9060005260206000200160405161140b9190614cb7565b908152602001604051809103902060030154148015611536575061153683838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050600c8054600793509091508590811061147757611477614b74565b9060005260206000200160405161148e9190614cb7565b908152602001604051809103902060010180546114aa90614c2d565b80601f01602080910402602001604051908101604052809291908181526020018280546114d690614c2d565b80156115235780601f106114f857610100808354040283529160200191611523565b820191906000526020600020905b81548152906001019060200180831161150657829003601f168201915b5050505050612c0c90919063ffffffff16565b1561157b57604080518082018252601281527131303a52656665727265644279526f75746560701b6020820152905162461bcd60e51b815261070f9190600401614892565b8061158581614bf6565b9150506113d3565b506115e76115d083838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612e4492505050565b6000604051806020016040528060008152506132bb565b61162a82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250600b9392505061340e9050565b5060005b60058383604051611640929190614bd0565b9081526040519081900360200190206001015481101561177c5761176a61172c60058585604051611672929190614bd0565b9081526020016040518091039020600101838154811061169457611694614b74565b9060005260206000200180546116a990614c2d565b80601f01602080910402602001604051908101604052809291908181526020018280546116d590614c2d565b80156117225780601f106116f757610100808354040283529160200191611722565b820191906000526020600020905b81548152906001019060200180831161170557829003601f168201915b5050505050612e44565b600185858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506132bb92505050565b8061177481614bf6565b91505061162e565b506005828260405161178f929190614bd0565b90815260405190819003602001902060006117aa82826140de565b6117b8600183016000614118565b5050600e54604051620ce92160e51b81526001600160a01b039091169063019d2420906117eb9085908590600401614d7c565b600060405180830381600087803b15801561180557600080fd5b505af1158015611819573d6000803e3d6000fd5b505050506006828260405161182f929190614bd0565b908152602001604051809103902060006118499190614136565b610891610aa9604051806040016040528060405180604001604052806006815260200165556e6c696e6b60d01b8152508152602001610aa286868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ea992505050565b6118c5612baf565b6118ce81613176565b6001600160a01b038116600090815260016020908152604091829020548251808401909352601583527418981d20b63932b0b23ca2bc34b9ba39a7bbb732b960591b9183019190915260ff16156119385760405162461bcd60e51b815260040161070f9190614892565b506001600160a01b03811660009081526001602081905260408220805460ff19169091179055600280549161097e83614bf6565b611974612baf565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b600a546060906000906001600160401b038111156119b6576119b6614312565b6040519080825280602002602001820160405280156119fc57816020015b6040805180820190915260608152600060208201528152602001906001900390816119d45790505b50905060005b600a54811015611b3b576040518060400160405280600a8381548110611a2a57611a2a614b74565b906000526020600020018054611a3f90614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054611a6b90614c2d565b8015611ab85780601f10611a8d57610100808354040283529160200191611ab8565b820191906000526020600020905b815481529060010190602001808311611a9b57829003601f168201915b505050505081526020016004600a8481548110611ad757611ad7614b74565b90600052602060002001604051611aee9190614cb7565b908152604051908190036020019020546001600160a01b031690528251839083908110611b1d57611b1d614b74565b60200260200101819052508080611b3390614bf6565b915050611a02565b50919050565b600f8054604080518082019091529182526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b60208301526001600160a01b03163314611b925760405162461bcd60e51b815260040161070f9190614892565b50611bdf816005600785604051611ba99190614c11565b9081526020016040518091039020600101604051611bc79190614cb7565b9081526040519081900360200190206001019061340e565b50610891611bec82612e44565b6001600785604051611bfe9190614c11565b90815260200160405180910390206001018054611c1a90614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054611c4690614c2d565b8015611c935780601f10611c6857610100808354040283529160200191611c93565b820191906000526020600020905b815481529060010190602001808311611c7657829003601f168201915b50505050506132bb565b611ca5612baf565b611cae81613176565b611cb78261350c565b156040518060400160405280601381526020017218999d20b63932b0b23ca2bc34b9ba39a126ab60691b81525090611d025760405162461bcd60e51b815260040161070f9190614892565b5080600383604051611d149190614c11565b9081526040516020918190038201902080546001600160a01b0319166001600160a01b03939093169290921790915560098054600181018255600091909152835161129b927f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af90920191850190613f53565b60606106ad82612aa1565b6000611d9c82613528565b600482604051610d889190614c11565b611db4612baf565b6000611df58b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612aa192505050565b9050611e3688888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061352892505050565b841580611e4e5750600085138015611e4e5750600086125b80611e645750600085128015611e645750600086135b156040518060400160405280600c81526020016b18991d24b73b30b634b229b760a11b81525090611ea85760405162461bcd60e51b815260040161070f9190614892565b50604080516101006020601f8e01819004028201810190925260e081018c81526000928291908f908f9081908501838280828437600092018290525093855250506040805160208181018352938152838501528051601f8e0184900484028101840182528d8152930192918d91508c9081908401838280828437600092018290525093855250505060208083018b9052604080518381529182018152909201919050815260208101889052600f546040805163672e77ad60e11b81529201916001600160a01b039091169063ce5cef5a90611f8b908a908a908a90600401614d90565b6000604051808303816000875af1158015611faa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fd29190810190614e1b565b9052600e546040516339ff9dc160e01b81529192506001600160a01b0316906339ff9dc1906120099085908e908690600401614ee4565b600060405180830381600087803b15801561202357600080fd5b505af1158015612037573d6000803e3d6000fd5b50505050505050505050505050505050565b60006060600060088686604051612061929190614bd0565b9081526040519081900360200190205490508361208657612083600282614c8f565b90505b600080826001600160401b038111156120a1576120a1614312565b6040519080825280602002602001820160405280156120ca578160200160208202803683370190505b50905082156121735760005b8381101561217157600889896040516120f0929190614bd0565b9081526020016040518091039020818154811061210f5761210f614b74565b906000526020600020015482828151811061212c5761212c614b74565b60200260200101818152505081818151811061214a5761214a614b74565b60200260200101518361215d9190614fc5565b92508061216981614bf6565b9150506120d6565b505b9097909650945050505050565b600c546060906000906001600160401b038111156121a0576121a0614312565b6040519080825280602002602001820160405280156121e557816020015b60408051808201909152606080825260208201528152602001906001900390816121be5790505b50905060005b600c54811015611b3b576040518060400160405280600c838154811061221357612213614b74565b90600052602060002001805461222890614c2d565b80601f016020809104026020016040519081016040528092919081815260200182805461225490614c2d565b80156122a15780601f10612276576101008083540402835291602001916122a1565b820191906000526020600020905b81548152906001019060200180831161228457829003601f168201915b505050505081526020016122f66007600c85815481106122c3576122c3614b74565b906000526020600020016040516122da9190614cb7565b908152602001604051809103902060010180546116a990614c2d565b81525082828151811061230b5761230b614b74565b6020026020010181905250808061232190614bf6565b9150506121eb565b600054610100900460ff16158080156123495750600054600160ff909116105b806123635750303b158015612363575060005460ff166001145b6123c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161070f565b6000805460ff1916600117905580156123e9576000805461ff0019166101001790555b3360009081526001602081905260408220805460ff19169091179055600280549161241383614bf6565b9190505550801561245e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50565b6009546060906000906001600160401b0381111561248157612481614312565b6040519080825280602002602001820160405280156124c757816020015b60408051808201909152606081526000602082015281526020019060019003908161249f5790505b50905060005b600954811015611b3b576040518060400160405280600983815481106124f5576124f5614b74565b90600052602060002001805461250a90614c2d565b80601f016020809104026020016040519081016040528092919081815260200182805461253690614c2d565b80156125835780601f1061255857610100808354040283529160200191612583565b820191906000526020600020905b81548152906001019060200180831161256657829003601f168201915b505050505081526020016003600984815481106125a2576125a2614b74565b906000526020600020016040516125b99190614cb7565b908152604051908190036020019020546001600160a01b0316905282518390839081106125e8576125e8614b74565b602002602001018190525080806125fe90614bf6565b9150506124cd565b600f8054604080518082019091529182526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b60208301526001600160a01b031633146126575760405162461bcd60e51b815260040161070f9190614892565b50600560078360405161266a9190614c11565b90815260200160405180910390206001016040516126889190614cb7565b90815260405160209181900382019020600190810180549182018155600090815282902083516126c093919092019190840190613f53565b506108916126cd82612e44565b6007846040516126dd9190614c11565b908152602001604051809103902060010180546126f990614c2d565b80601f016020809104026020016040519081016040528092919081815260200182805461272590614c2d565b80156127725780601f1061274757610100808354040283529160200191612772565b820191906000526020600020905b81548152906001019060200180831161275557829003601f168201915b50505050506002612ca1565b612786612baf565b60036007826040516127989190614c11565b908152602001604051809103902060030154146040518060400160405280601181526020017031303a4e6f74457869737473526f75746560781b815250906127f35760405162461bcd60e51b815260040161070f9190614892565b5061245e816000604051806020016040528060008152506132bb565b600061285084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061310092505050565b6128668260068686604051610e8b929190614bd0565b949350505050565b612876612baf565b61287f81613176565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6128a9612baf565b6128b281612e5a565b6003816040516128c29190614c11565b90815260405190819003602001902080546001600160a01b031916905561089160098261340e565b6128f2612baf565b6128fb82613100565b61290f81600684604051610e8b9190614c11565b6040518060400160405280600f81526020016e19181d2737ba22bc34b9ba39a126a960891b815250906129555760405162461bcd60e51b815260040161070f9190614892565b506108918160068460405161296a9190614c11565b90815260405190819003602001902090613577565b612987612baf565b61299081613528565b6004816040516129a09190614c11565b90815260405190819003602001902080546001600160a01b0319169055610891600a8261340e565b6060600b805480602002602001604051908101604052809291908181526020016000905b82821015612a98578382906000526020600020018054612a0b90614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054612a3790614c2d565b8015612a845780601f10612a5957610100808354040283529160200191612a84565b820191906000526020600020905b815481529060010190602001808311612a6757829003601f168201915b5050505050815260200190600101906129ec565b50505050905090565b60606000600783604051612ab59190614c11565b90815260200160405180910390206003015414612b7357600782604051612adc9190614c11565b90815260200160405180910390206001018054612af890614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054612b2490614c2d565b8015610e1e5780601f10612b4657610100808354040283529160200191610e1e565b820191906000526020600020905b815481529060010190602001808311612b545750939695505050505050565b604080518082018252600e81526d32313a556e726561636861626c6560901b6020820152905162461bcd60e51b815261070f9190600401614892565b33600090815260016020818152604092839020548351808501909452600f84526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b9184019190915260ff1615151461245e5760405162461bcd60e51b815260040161070f9190614892565b600081604051602001612c1f9190614c11565b6040516020818303038152906040528051906020012083604051602001612c469190614c11565b604051602081830303815290604052805190602001201415612c6a575060016106ad565b50600092915050565b60006001600783604051612c879190614c11565b908152602001604051809103902060030154149050919050565b6000600784604051612cb39190614c11565b9081526020016040518091039020600301541415612d9c5760405180608001604052808481526020018381526020016000815260200182815250600784604051612cfd9190614c11565b90815260200160405180910390206000820151816000019080519060200190612d27929190613f53565b506020828101518051612d409260018501920190613f53565b5060408201516002820155606090910151600390910155600c80546001810182556000919091528351612d9a917fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701906020860190613f53565b505b6002811415612ddf57600783604051612db59190614c11565b9081526040519081900360200190206002018054906000612dd583614bf6565b9190505550505050565b600381141561129b576003600784604051612dfa9190614c11565b90815260200160405180910390206003018190555081600784604051612e209190614c11565b90815260200160405180910390206001019080519060200190610d39929190613f53565b60606106ad826006612e558561368d565b613861565b612e638161350c565b6040518060400160405280600f81526020016e189a1d2737ba22bc34b9ba39a126ab60891b815250906108915760405162461bcd60e51b815260040161070f9190614892565b60606106ad612eb783613930565b61393b565b60606000612ecd8360000151613930565b612eda8460200151613971565b604051602001612eeb929190614fdd565b6040516020818303038152906040529050612f058161393b565b9392505050565b60005b600b5481101561089157612fc8600b8281548110612f2f57612f2f614b74565b906000526020600020018054612f4490614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054612f7090614c2d565b8015612fbd5780601f10612f9257610100808354040283529160200191612fbd565b820191906000526020600020905b815481529060010190602001808311612fa057829003601f168201915b505050505083613098565b80612fd281614bf6565b915050612f0f565b6060600082516001600160401b03811115612ff757612ff7614312565b60405190808252806020026020018201604052801561302a57816020015b60608152602001906001900390816130155790505b50905060005b835181101561308b5761305b84828151811061304e5761304e614b74565b6020026020010151613930565b82828151811061306d5761306d614b74565b6020026020010181905250808061308390614bf6565b915050613030565b50612f05612eb7826139e0565b600e54604051630df9ccb160e41b81526001600160a01b039091169063df9ccb10906130ca908590859060040161500c565b600060405180830381600087803b1580156130e457600080fd5b505af11580156130f8573d6000803e3d6000fd5b505050505050565b60006005826040516131129190614c11565b908152604051908190036020019020805461312c90614c2d565b9050116040518060400160405280601081526020016f31383a4e6f744578697374734c696e6b60801b815250906108915760405162461bcd60e51b815260040161070f9190614892565b6040805180820190915260128152710c4c0e925b9d985b1a59105c99dd5b595b9d60721b60208201526001600160a01b0382166108915760405162461bcd60e51b815260040161070f9190614892565b6000805b835181101561322257826001600160a01b03168482815181106131ef576131ef614b74565b60200260200101516001600160a01b031614156132105760019150506106ad565b8061321a81614bf6565b9150506131ca565b5060009392505050565b600060088260405161323e9190614c11565b90815260405190819003602001902054111561245e576008816040516132649190614c11565b9081526020016040518091039020600061245e9190614136565b6000806001600160a01b031660048360405161329a9190614c11565b908152604051908190036020019020546001600160a01b0316141592915050565b81156132f7576007836040516132d19190614c11565b90815260405190819003602001902060020180549060006132f183614c62565b91905055505b60006007846040516133099190614c11565b90815260200160405180910390206002015411156133b05781158061333d575061333d8160078560405161148e9190614c11565b156133815761334b83613a24565b60078460405161335b9190614c11565b9081526020016040518091039020600101908051906020019061337f929190613f53565b505b8161129b5760026007846040516133989190614c11565b90815260405190819003602001902060030155505050565b6133bb600c8461340e565b506007836040516133cc9190614c11565b90815260405190819003602001902060006133e782826140de565b6133f56001830160006140de565b5060006002820181905560039091015561129b8361322c565b815460009081906134219060019061503a565b905060005b818111613501576134588486838154811061344357613443614b74565b9060005260206000200180546114aa90614c2d565b156134ef57818110156134b65784828154811061347757613477614b74565b9060005260206000200185828154811061349357613493614b74565b906000526020600020019080546134a990614c2d565b6134b4929190614154565b505b848054806134c6576134c6615051565b6001900381819060005260206000200160006134e291906140de565b90556001925050506106ad565b806134f981614bf6565b915050613426565b506000949350505050565b6000806001600160a01b031660038360405161329a9190614c11565b6135318161327e565b6040518060400160405280600f81526020016e0626c749cdee88af0d2e6e8e684a69608b1b815250906108915760405162461bcd60e51b815260040161070f9190614892565b81546000906135889060019061503a565b905060005b818111610d3957826001600160a01b03168482815481106135b0576135b0614b74565b6000918252602090912001546001600160a01b0316141561367b5781811015613644578382815481106135e5576135e5614b74565b9060005260206000200160009054906101000a90046001600160a01b031684828154811061361557613615614b74565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b8380548061365457613654615051565b600082815260209020810160001990810180546001600160a01b0319169055019055610d39565b8061368581614bf6565b91505061358d565b600081815b600681101561375757604051806040016040528060068152602001656274703a2f2f60d01b81525081815181106136cb576136cb614b74565b602001015160f81c60f81b6001600160f81b0319168282815181106136f2576136f2614b74565b01602001516001600160f81b03191614613745576040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b815261070f9190600401614892565b8061374f81614bf6565b915050613692565b8151811015613822576040805180820190915260018152602f60f81b6020909101819052825183908390811061378f5761378f614b74565b01602001516001600160f81b0319161415613810576006811180156137c05750600182516137bd919061503a565b81105b60405180604001604052806011815260200170696e76616c69644254504164647265737360781b815250906138085760405162461bcd60e51b815260040161070f9190614892565b509392505050565b8061381a81614bf6565b915050613757565b6040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b815261070f9190600401614892565b6060836000613870858561503a565b6001600160401b0381111561388757613887614312565b6040519080825280601f01601f1916602001820160405280156138b1576020820181803683370190505b5090508460005b82518110156139245783826138cc81614bf6565b9350815181106138de576138de614b74565b602001015160f81c60f81b8382815181106138fb576138fb614b74565b60200101906001600160f81b031916908160001a9053508061391c81614bf6565b9150506138b8565b50909695505050505050565b60606106ad82613971565b6060613949825160c0613bed565b8260405160200161395b929190614fdd565b6040516020818303038152906040529050919050565b6060808251600114801561399f575060808360008151811061399557613995614b74565b016020015160f81c105b156139ab5750816106ad565b6139b783516080613bed565b836040516020016139c9929190614fdd565b604051602081830303815290604052905092915050565b606060006139ed83613da3565b90506139fb815160c0613bed565b81604051602001613a0d929190614fdd565b604051602081830303815290604052915050919050565b606060005b600b54811015613bb05760005b6005600b8381548110613a4b57613a4b614b74565b90600052602060002001604051613a629190614cb7565b90815260405190819003602001902060010154811015613b9d57613ad784613ad16005600b8681548110613a9857613a98614b74565b90600052602060002001604051613aaf9190614cb7565b9081526020016040518091039020600101848154811061169457611694614b74565b90612c0c565b15613b8b57600b8281548110613aef57613aef614b74565b906000526020600020018054613b0490614c2d565b80601f0160208091040260200160405190810160405280929190818152602001828054613b3090614c2d565b8015613b7d5780601f10613b5257610100808354040283529160200191613b7d565b820191906000526020600020905b815481529060010190602001808311613b6057829003601f168201915b505050505092505050919050565b80613b9581614bf6565b915050613a36565b5080613ba881614bf6565b915050613a29565b50604080518082018252600e81526d32313a556e726561636861626c6560901b6020820152905162461bcd60e51b815261070f9190600401614892565b6060806038841015613c575760408051600180825281830190925290602082018180368337019050509050613c228385614fc5565b601f1a60f81b81600081518110613c3b57613c3b614b74565b60200101906001600160f81b031916908160001a905350612f05565b600060015b613c668187614c8f565b15613c8c5781613c7581614bf6565b9250613c85905061010082615067565b9050613c5c565b613c97826001614fc5565b6001600160401b03811115613cae57613cae614312565b6040519080825280601f01601f191660200182016040528015613cd8576020820181803683370190505b509250613ce58583614fc5565b613cf0906037614fc5565b601f1a60f81b83600081518110613d0957613d09614b74565b60200101906001600160f81b031916908160001a905350600190505b818111613d9a57610100613d39828461503a565b613d459061010061516a565b613d4f9088614c8f565b613d599190614ca3565b601f1a60f81b838281518110613d7157613d71614b74565b60200101906001600160f81b031916908160001a90535080613d9281614bf6565b915050613d25565b50509392505050565b6060815160001415613dc357505060408051600081526020810190915290565b6000805b8351811015613e0a57838181518110613de257613de2614b74565b60200260200101515182613df69190614fc5565b915080613e0281614bf6565b915050613dc7565b6000826001600160401b03811115613e2457613e24614312565b6040519080825280601f01601f191660200182016040528015613e4e576020820181803683370190505b50600092509050602081015b8551831015613ed2576000868481518110613e7757613e77614b74565b602002602001015190506000602082019050613e9583828451613edb565b878581518110613ea757613ea7614b74565b60200260200101515183613ebb9190614fc5565b925050508280613eca90614bf6565b935050613e5a565b50949350505050565b60208110613f135781518352613ef2602084614fc5565b9250613eff602083614fc5565b9150613f0c60208261503a565b9050613edb565b6000198115610d39576001613f2983602061503a565b613f359061010061516a565b613f3f919061503a565b925184518416931916929092179092525050565b828054613f5f90614c2d565b90600052602060002090601f016020900481019282613f815760008555613fc7565b82601f10613f9a57805160ff1916838001178555613fc7565b82800160010185558215613fc7579182015b82811115613fc7578251825591602001919060010190613fac565b50613fd39291506141cf565b5090565b828054828255906000526020600020908101928215614024579160200282015b828111156140245782518051614014918491602090910190613f53565b5091602001919060010190613ff7565b50613fd39291506141e4565b82805461403c90614c2d565b90600052602060002090601f01602090048101928261405e5760008555613fc7565b82601f106140775782800160ff19823516178555613fc7565b82800160010185558215613fc7579182015b82811115613fc7578235825591602001919060010190614089565b828054828255906000526020600020908101928215613fc75791602002820182811115613fc7578251825591602001919060010190613fac565b5080546140ea90614c2d565b6000825580601f106140fa575050565b601f01602090049060005260206000209081019061245e91906141cf565b508054600082559060005260206000209081019061245e91906141e4565b508054600082559060005260206000209081019061245e91906141cf565b82805461416090614c2d565b90600052602060002090601f0160209004810192826141825760008555613fc7565b82601f106141935780548555613fc7565b82800160010185558215613fc757600052602060002091601f016020900482015b82811115613fc75782548255916001019190600101906141b4565b5b80821115613fd357600081556001016141d0565b80821115613fd35760006141f882826140de565b506001016141e4565b6000806020838503121561421457600080fd5b82356001600160401b038082111561422b57600080fd5b818501915085601f83011261423f57600080fd5b81358181111561424e57600080fd5b8660208260051b850101111561426357600080fd5b60209290920196919550909350505050565b600081518084526020808501945080840160005b838110156142a557815187529582019590820190600101614289565b509495945050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561430557603f198886030184526142f3858351614275565b945092850192908501906001016142d7565b5092979650505050505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b038111828210171561434a5761434a614312565b60405290565b604051601f8201601f191681016001600160401b038111828210171561437857614378614312565b604052919050565b60006001600160401b0382111561439957614399614312565b50601f01601f191660200190565b600082601f8301126143b857600080fd5b81356143cb6143c682614380565b614350565b8181528460208386010111156143e057600080fd5b816020850160208301376000918101602001919091529392505050565b6000806040838503121561441057600080fd5b82356001600160401b038082111561442757600080fd5b614433868387016143a7565b9350602085013591508082111561444957600080fd5b50614456858286016143a7565b9150509250929050565b80356001600160a01b038116811461447757600080fd5b919050565b60006020828403121561448e57600080fd5b612f0582614460565b60008083601f8401126144a957600080fd5b5081356001600160401b038111156144c057600080fd5b6020830191508360208285010111156144d857600080fd5b9250929050565b600080602083850312156144f257600080fd5b82356001600160401b0381111561450857600080fd5b61451485828601614497565b90969095509350505050565b60006020828403121561453257600080fd5b81356001600160401b0381111561454857600080fd5b612866848285016143a7565b6020808252825182820181905260009190848201906040850190845b818110156139245783516001600160a01b031683529284019291840191600101614570565b600080604083850312156145a857600080fd5b82356001600160401b038111156145be57600080fd5b6145ca858286016143a7565b9250506145d960208401614460565b90509250929050565b60006001600160401b038211156145fb576145fb614312565b5060051b60200190565b600082601f83011261461657600080fd5b813560206146266143c6836145e2565b82815260059290921b8401810191818101908684111561464557600080fd5b8286015b848110156146605780358352918301918301614649565b509695505050505050565b600082601f83011261467c57600080fd5b8135602061468c6143c6836145e2565b82815260059290921b840181019181810190868411156146ab57600080fd5b8286015b848110156146605780356001600160401b038111156146ce5760008081fd5b6146dc8986838b0101614605565b8452509183019183016146af565b600080604083850312156146fd57600080fd5b82356001600160401b038082111561471457600080fd5b818501915085601f83011261472857600080fd5b813560206147386143c6836145e2565b82815260059290921b8401810191818101908984111561475757600080fd5b8286015b8481101561478f578035868111156147735760008081fd5b6147818c86838b01016143a7565b84525091830191830161475b565b50965050860135925050808211156147a657600080fd5b506144568582860161466b565b60005b838110156147ce5781810151838201526020016147b6565b83811115610d395750506000910152565b600081518084526147f78160208601602086016147b3565b601f01601f19169290920160200192915050565b600081516040845261482060408501826147df565b6020938401516001600160a01b0316949093019390935250919050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561430557603f1988860301845261488085835161480b565b94509285019290850190600101614864565b602081526000612f0560208301846147df565b60008060008060008060008060008060e08b8d0312156148c457600080fd5b8a356001600160401b03808211156148db57600080fd5b6148e78e838f01614497565b909c509a5060208d0135995060408d013591508082111561490757600080fd5b6149138e838f01614497565b909950975060608d0135965060808d0135955060a08d013591508082111561493a57600080fd5b6149468e838f01614497565b909550935060c08d013591508082111561495f57600080fd5b5061496c8d828e01614605565b9150509295989b9194979a5092959850565b60008060006040848603121561499357600080fd5b83356001600160401b038111156149a957600080fd5b6149b586828701614497565b909450925050602084013580151581146149ce57600080fd5b809150509250925092565b8281526040602082015260006128666040830184614275565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015614a6957888303603f1901855281518051878552614a3d888601826147df565b91890151858303868b0152919050614a5581836147df565b968901969450505090860190600101614a19565b509098975050505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561430557603f19888603018452614aba85835161480b565b94509285019290850190600101614a9e565b600080600060408486031215614ae157600080fd5b83356001600160401b03811115614af757600080fd5b614b0386828701614497565b9094509250614b16905060208501614460565b90509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561430557603f19888603018452614b628583516147df565b94509285019290850190600101614b46565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112614ba157600080fd5b8301803591506001600160401b03821115614bbb57600080fd5b6020019150368190038213156144d857600080fd5b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415614c0a57614c0a614be0565b5060010190565b60008251614c238184602087016147b3565b9190910192915050565b600181811c90821680614c4157607f821691505b60208210811415611b3b57634e487b7160e01b600052602260045260246000fd5b600081614c7157614c71614be0565b506000190190565b634e487b7160e01b600052601260045260246000fd5b600082614c9e57614c9e614c79565b500490565b600082614cb257614cb2614c79565b500690565b600080835481600182811c915080831680614cd357607f831692505b6020808410821415614cf357634e487b7160e01b86526022600452602486fd5b818015614d075760018114614d1857614d45565b60ff19861689528489019650614d45565b60008a81526020902060005b86811015614d3d5781548b820152908501908301614d24565b505084890196505b509498975050505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081526000612866602083018486614d53565b604081526000614da4604083018587614d53565b8281036020840152614db68185614275565b9695505050505050565b600082601f830112614dd157600080fd5b81516020614de16143c6836145e2565b82815260059290921b84018101918181019086841115614e0057600080fd5b8286015b848110156146605780518352918301918301614e04565b60006020808385031215614e2e57600080fd5b82516001600160401b0380821115614e4557600080fd5b9084019060408287031215614e5957600080fd5b614e61614328565b825182811115614e7057600080fd5b8301601f81018813614e8157600080fd5b8051614e8f6143c682614380565b8181528987838501011115614ea357600080fd5b614eb2828883018986016147b3565b835250508284015182811115614ec757600080fd5b614ed388828601614dc0565b948201949094529695505050505050565b606081526000614ef760608301866147df565b8460208401528281036040840152835160e08252614f1860e08301826147df565b905060208501518282036020840152614f3182826147df565b91505060408501518282036040840152614f4b82826147df565b9150506060850151606083015260808501518282036080840152614f6f82826147df565b91505060a085015160a083015260c085015182820360c08401528051925060408252614f9e60408301846147df565b9250602081015190508183036020830152614fb98382614275565b98975050505050505050565b60008219821115614fd857614fd8614be0565b500190565b60008351614fef8184602088016147b3565b8351908301906150038183602088016147b3565b01949350505050565b60408152600061501f60408301856147df565b828103602084015261503181856147df565b95945050505050565b60008282101561504c5761504c614be0565b500390565b634e487b7160e01b600052603160045260246000fd5b600081600019048311821515161561508157615081614be0565b500290565b600181815b808511156150c15781600019048211156150a7576150a7614be0565b808516156150b457918102915b93841c939080029061508b565b509250929050565b6000826150d8575060016106ad565b816150e5575060006106ad565b81600181146150fb576002811461510557615121565b60019150506106ad565b60ff84111561511657615116614be0565b50506001821b6106ad565b5060208310610133831016604e8410600b8410161715615144575081810a6106ad565b61514e8383615086565b806000190482111561516257615162614be0565b029392505050565b6000612f0583836150c956fea2646970667358221220c7fdaa5abbafe065c6e947184a23eacab18c79ffe3937684228982cc69536c2264736f6c634300080c0033"; + +type BMCManagementConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BMCManagementConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BMCManagement__factory extends ContractFactory { + constructor(...args: BMCManagementConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): BMCManagement { + return super.attach(address) as BMCManagement; + } + override connect(signer: Signer): BMCManagement__factory { + return super.connect(signer) as BMCManagement__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BMCManagementInterface { + return new utils.Interface(_abi) as BMCManagementInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BMCManagement { + return new Contract(address, _abi, signerOrProvider) as BMCManagement; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/BMCPeriphery__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/BMCPeriphery__factory.ts new file mode 100644 index 00000000..b5d90d81 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/BMCPeriphery__factory.ts @@ -0,0 +1,694 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + BMCPeriphery, + BMCPeripheryInterface, +} from "../../../../solidity/contracts/bmc/BMCPeriphery"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_src", + type: "string", + }, + { + indexed: true, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_next", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_event", + type: "string", + }, + ], + name: "BTPEvent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: true, + internalType: "string", + name: "_network", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_receiver", + type: "string", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + ], + name: "ClaimReward", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: true, + internalType: "string", + name: "_network", + type: "string", + }, + { + indexed: false, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + indexed: false, + internalType: "uint256", + name: "_result", + type: "uint256", + }, + ], + name: "ClaimRewardResult", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_next", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "Message", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_prev", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "_ecode", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "_emsg", + type: "string", + }, + ], + name: "MessageDropped", + type: "event", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "string", + name: "_receiver", + type: "string", + }, + ], + name: "claimReward", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "clearSeq", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + components: [ + { + internalType: "string", + name: "src", + type: "string", + }, + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "int256", + name: "sn", + type: "int256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "feeInfo", + type: "tuple", + }, + ], + internalType: "struct Types.BTPMessage", + name: "_msg", + type: "tuple", + }, + ], + name: "dropMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + internalType: "uint256", + name: "_result", + type: "uint256", + }, + ], + name: "emitClaimRewardResult", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getBMCManagement", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBMCService", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBtpAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bool", + name: "_response", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLinks", + outputs: [ + { + internalType: "string[]", + name: "", + type: "string[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkSn", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "getReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRoutes", + outputs: [ + { + components: [ + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "next", + type: "string", + }, + ], + internalType: "struct Types.Route[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getServices", + outputs: [ + { + components: [ + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + internalType: "struct Types.Service[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "getStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "rxSeq", + type: "uint256", + }, + { + internalType: "uint256", + name: "txSeq", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + internalType: "bytes", + name: "extra", + type: "bytes", + }, + ], + internalType: "struct IBMV.VerifierStatus", + name: "verifier", + type: "tuple", + }, + { + internalType: "uint256", + name: "currentHeight", + type: "uint256", + }, + ], + internalType: "struct Types.LinkStatus", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleRelayMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_bmcManagementAddr", + type: "address", + }, + { + internalType: "address", + name: "_bmcServiceAddr", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_next", + type: "string", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "sendInternal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "sendMessage", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b506155f080620000216000396000f3fe6080604052600436106100e85760003560e01c8063019d2420146100f457806321b1e9bb1461011657806322b05ed21461013657806339ff9dc11461016c578063463fd1af1461018c5780634f63a21d146101ac578063522a901e146101ce57806364cd3750146101ef578063676286ba1461020f5780636bf459cb1461022457806375417851146102395780637d4c4f4a1461025b5780637e9280721461027b578063947dfac21461029d578063ae86c53d146102bd578063be81db47146102ef578063cb7477b51461030d578063df9ccb1014610320578063f66ddcbb1461034057600080fd5b366100ef57005b600080fd5b34801561010057600080fd5b5061011461010f366004613d0e565b610362565b005b34801561012257600080fd5b50610114610131366004613d83565b6103b1565b34801561014257600080fd5b50610156610151366004613dee565b610a83565b6040516101639190613e87565b60405180910390f35b34801561017857600080fd5b50610114610187366004613fda565b610c06565b34801561019857600080fd5b506101146101a7366004614133565b610cea565b3480156101b857600080fd5b506101c1610e61565b6040516101639190614196565b6101e16101dc3660046141a9565b610ef3565b604051908152602001610163565b3480156101fb57600080fd5b506101e161020a36600461423a565b611001565b34801561021b57600080fd5b506007546101e1565b34801561023057600080fd5b506101c1611080565b34801561024557600080fd5b5061024e61108f565b6040516101639190614285565b34801561026757600080fd5b506101e1610276366004614312565b611106565b34801561028757600080fd5b5061029061118e565b604051610163919061435d565b3480156102a957600080fd5b506101146102b83660046143d4565b611200565b3480156102c957600080fd5b506003546001600160a01b03165b6040516001600160a01b039091168152602001610163565b3480156102fb57600080fd5b506004546001600160a01b03166102d7565b61011461031b366004613d83565b611267565b34801561032c57600080fd5b5061011461033b366004614433565b6116bc565b34801561034c57600080fd5b5061035561189c565b6040516101639190614496565b61036a61190e565b60068160405161037a91906144f8565b90815260200160405180910390206000905560058160405161039c91906144f8565b90815260200160405180910390206000905550565b60006103f285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061196392505050565b9050600060068686604051610408929190614514565b90815260405190819003602001812054600354630f7a555160e21b83529092506060916000916001600160a01b031690633de955449061044c908790600401614196565b602060405180830381865afa158015610469573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048d9190614524565b6040516355272d2f60e01b81529091506001600160a01b038216906355272d2f906104c7906001908c908c9089908d908d9060040161459f565b6000604051808303816000875af192505050801561050757506040513d6000823e601f3d908101601f1916820160405261050491908101906146cb565b60015b6105c057610513614786565b806308c379a0141561055657506105286147a2565b806105335750610558565b8060405162461bcd60e51b815260040161054d9190614196565b60405180910390fd5b505b3d808015610582576040519150601f19603f3d011682016040523d82523d6000602084013e610587565b606091505b50604080518082018252600a815269191a9d2ab735b737bbb760b11b6020820152905162461bcd60e51b815261054d9190600401614196565b60035460405163c265ab8560e01b81529193506001600160a01b03169063c265ab85906105f5908b908b90339060040161482b565b602060405180830381865afa158015610612573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106369190614857565b6040518060400160405280600f81526020016e0c4c4e955b985d5d1a1bdc9a5e9959608a1b8152509061067c5760405162461bcd60e51b815260040161054d9190614196565b50610685613a8b565b60005b8351811015610a41578461069b8161488a565b60045486519197506001600160a01b031691506387df8a9a9033908790859081106106c8576106c86148a5565b60200260200101516040518363ffffffff1660e01b81526004016106ed9291906148bb565b6000604051808303816000875af192505050801561072d57506040513d6000823e601f3d908101601f1916820160405261072a91908101906149c6565b60015b6107c857610739614786565b806308c379a01415610759575061074e6147a2565b80610533575061075b565b505b3d808015610785576040519150601f19603f3d011682016040523d82523d6000602084013e61078a565b606091505b50604080518082018252600f81526e31303a45727248616e646c6546656560881b6020820152905162461bcd60e51b815261054d9190600401614196565b9150610864600280546107da90614541565b80601f016020809104026020016040519081016040528092919081815260200182805461080690614541565b80156108535780601f1061082857610100808354040283529160200191610853565b820191906000526020600020905b81548152906001019060200180831161083657829003601f168201915b505050602086015192915050611979565b15610947576000806108ad8c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892506119e0915050565b91509150600082141561090c576109078460008660600151136108df57604051806020016040528060008152506108e2565b85515b604051806040016040528060078152602001665245434549564560c81b815250611db4565b610940565b60008460600151131561093257610930846000015185604001518660600151611e43565b505b6109408c8c89878686611ec5565b5050610a2f565b60035460208301516040516378ad5a7d60e01b81526001600160a01b03909216916378ad5a7d9161097a91600401614196565b600060405180830381865afa9250505080156109b857506040513d6000823e601f3d908101601f191682016040526109b59190810190614ad6565b60015b610a05576109c4614786565b806308c379a014156109f957506109d96147a2565b806109e457506109fb565b6109f38b8b8886600286611ec5565b50610a2f565b505b3d6000803e3d6000fd5b610a2d818460405180604001604052806005815260200164524f55544560d81b815250612162565b505b80610a398161488a565b915050610688565b50825160068a8a604051610a56929190614514565b90815260200160405180910390206000828254610a739190614b0a565b9091555050505050505050505050565b610a8b613acd565b604051806080016040528060068585604051610aa8929190614514565b908152602001604051809103902054815260200160058585604051610ace929190614514565b90815260408051602092819003830190205483526003548151601f8801849004840281018401909252868252928201926001600160a01b031691633de9554491610b3291899089908190840183828082843760009201919091525061196392505050565b6040518263ffffffff1660e01b8152600401610b4e9190614196565b602060405180830381865afa158015610b6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8f9190614524565b6001600160a01b0316634e69d5606040518163ffffffff1660e01b8152600401600060405180830381865afa158015610bcc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bf49190810190614b22565b81526020014381525090505b92915050565b610c0e61190e565b60068484604051610c20929190614514565b9081526020016040518091039020546001610c3b9190614b0a565b82146040518060400160405280600d81526020016c31303a496e76616c696453657160981b81525090610c815760405162461bcd60e51b815260040161054d9190614196565b5060068484604051610c94929190614514565b9081526040519081900360200190208054906000610cb18361488a565b9190505550610ce484848484600160405180604001604052806007815260200166032323a44726f760cc1b815250611ec5565b50505050565b600054610100900460ff1615808015610d0a5750600054600160ff909116105b80610d245750303b158015610d24575060005460ff166001145b610d875760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161054d565b6000805460ff191660011790558015610daa576000805461ff0019166101001790555b8351610dbd906002906020870190613b10565b50610dd1610dca3061221b565b8590612226565b8051610de591600191602090910190613b10565b50600380546001600160a01b038086166001600160a01b03199283161790925560048054928516929091169190911790558015610ce4576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b606060018054610e7090614541565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9c90614541565b8015610ee95780601f10610ebe57610100808354040283529160200191610ee9565b820191906000526020600020905b815481529060010190602001808311610ecc57829003601f168201915b5050505050905090565b6004546000906001600160a01b03163314610fcb57600354604051633ca3ac5f60e11b815233916001600160a01b03169063794758be90610f38908890600401614196565b602060405180830381865afa158015610f55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f799190614524565b6001600160a01b0316146040518060400160405280600f81526020016e0c4c4e955b985d5d1a1bdc9a5e9959608a1b81525090610fc95760405162461bcd60e51b815260040161054d9190614196565b505b600080841215610fe857610fe184600019614b9c565b9350600190505b610ff78686868685600061228d565b9695505050505050565b6004805460405163064cd37560e41b81526000926001600160a01b03909216916364cd375091611037918891889188910161482b565b602060405180830381865afa158015611054573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110789190614c21565b949350505050565b606060028054610e7090614541565b60035460408051637541785160e01b815290516060926001600160a01b03169163754178519160048083019260009291908290030181865afa1580156110d9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111019190810190614c3a565b905090565b600354604051633ea627a560e11b815260009182916001600160a01b0390911690637d4c4f4a9061113f90889088908890600401614d41565b600060405180830381865afa15801561115c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111849190810190614d67565b5095945050505050565b60035460408051633f49403960e11b815290516060926001600160a01b031691637e9280729160048083019260009291908290030181865afa1580156111d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111019190810190614da4565b61120861276d565b8260405161121691906144f8565b6040805191829003822084835260208301849052916001600160a01b038716917fe4a536fde1966a83411167748abc5fbd80e0247bffe941ca4ddb5079fd730636910160405180910390a350505050565b6003546040805163bef47adf60e01b8152905133926001600160a01b03169163bef47adf9160048083019260209291908290030181865afa1580156112b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d49190614524565b6001600160a01b0316816001600160a01b031614156112f05750305b6004805460405163149324c760e11b81526000926001600160a01b0390921691632926498e91611326918a918a9188910161482b565b6020604051808303816000875af1158015611345573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113699190614c21565b9050600061144187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050600280549092506113b59150614541565b80601f01602080910402602001604051908101604052809291908181526020018280546113e190614541565b801561142e5780601f106114035761010080835404028352916020019161142e565b820191906000526020600020905b81548152906001019060200180831161141157829003601f168201915b505050505061197990919063ffffffff16565b156114f1576114b3604051806040016040528060128152602001710c4c0e925b9d985b1a59105c99dd5b595b9d60721b81525086868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092939250506127bf9050565b6001600160a01b03166108fc839081150290604051600060405180830381858888f193505050501580156114eb573d6000803e3d6000fd5b50611654565b6115e987878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505060405180604001604052806003815260200162626d6360e81b81525060006115e0604051806040016040528060405180604001604052806005815260200164436c61696d60d81b81525081526020016115d960405180604001604052808b81526020018e8e8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250612aa2565b9052612af2565b6000600161228d565b6004805460405163e04fc02560e01b81529293506001600160a01b03169163e04fc025916116219185918c918c918a918a9101614eae565b600060405180830381600087803b15801561163b57600080fd5b505af115801561164f573d6000803e3d6000fd5b505050505b8686604051611664929190614514565b6040518091039020836001600160a01b03167f92a1bf3ab6e4839bb58db5f99ae98936355e94c1223779807563d1a08a3bf449878786866040516116ab9493929190614ee5565b60405180910390a350505050505050565b6116c461190e565b611898826040518060e00160405280600280546116e090614541565b80601f016020809104026020016040519081016040528092919081815260200182805461170c90614541565b80156117595780601f1061172e57610100808354040283529160200191611759565b820191906000526020600020905b81548152906001019060200180831161173c57829003601f168201915b5050505050815260200161176c86611963565b815260200160405180604001604052806003815260200162626d6360e81b8152508152602001600081526020018481526020016117a7612b10565b81526020016040518060400160405280600280546117c490614541565b80601f01602080910402602001604051908101604052809291908181526020018280546117f090614541565b801561183d5780601f106118125761010080835404028352916020019161183d565b820191906000526020600020905b81548152906001019060200180831161182057829003601f168201915b50505091835250506020016000604051908082528060200260200182016040528015611873578160200160208202803683370190505b509052905260408051808201909152600481526314d1539160e21b6020820152612162565b5050565b6003546040805163f66ddcbb60e01b815290516060926001600160a01b03169163f66ddcbb9160048083019260009291908290030181865afa1580156118e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111019190810190614f0c565b60035460408051808201909152600f81526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b6020820152906001600160a01b031633146119605760405162461bcd60e51b815260040161054d9190614196565b50565b6060610c0082600661197485612b2b565b612cff565b60008160405160200161198c91906144f8565b60405160208183030381529060405280519060200120836040516020016119b391906144f8565b6040516020818303038152906040528051906020012014156119d757506001610c00565b50600092915050565b60006060600080600060049050611a1f60405180604001604052806003815260200162626d6360e81b815250876040015161197990919063ffffffff16565b15611a7a5760045460608701516001600160a01b039091169250600013801590611a4d575060008660a00151125b15611a6a5760a0860151611a6390600019614b9c565b9250611a72565b8560a0015192505b506001611b2b565b6003546040808801519051633ca3ac5f60e11b81526001600160a01b039092169163794758be91611aad91600401614196565b602060405180830381865afa925050508015611ae6575060408051601f3d908101601f19168201909252611ae391810190614524565b60015b611b2157611af2614786565b806308c379a014156109f95750611b076147a2565b80611b1257506109fb565b600395509350611dad92505050565b9150856060015192505b60606000876060015112611c1357865160408089015160808a0151915163b70eeb8d60e01b81526001600160a01b0387169363b70eeb8d93611b749391928a9190600401614fba565b600060405180830381600087803b158015611b8e57600080fd5b505af1925050508015611b9f575060015b611c0a57611bab614786565b806308c379a01415611bd25750611bc06147a2565b80611bcb5750611bd4565b9050611da5565b505b3d808015611bfe576040519150601f19603f3d011682016040523d82523d6000602084013e611c03565b606091505b5050611da5565b60009150611da5565b6004805460808901516040516364945d5d60e01b81526001600160a01b03909216926364945d5d92611c46929101614196565b600060405180830381865afa925050508015611c8457506040513d6000823e601f3d908101601f19168201604052611c819190810190614b22565b60015b611cb857505060408051808201909152600f81526e31303a50617273654661696c75726560881b6020820152600190611da5565b875160408901516001600160a01b03861691630a823dea91611cdc89600019614b9c565b855160208701516040516001600160e01b031960e088901b168152611d08959493929190600401615004565b600060405180830381600087803b158015611d2257600080fd5b505af1925050508015611d33575060015b611d9e57611d3f614786565b806308c379a01415611d665750611d546147a2565b80611d5f5750611d68565b9150611da3565b505b3d808015611d92576040519150601f19603f3d011682016040523d82523d6000602084013e611d97565b606091505b5050611da3565b600092505b505b909450925050505b9250929050565b60008360a001511215611e2a5760a0830151611dd290600019614b9c565b8360200151604051611de491906144f8565b60405180910390207f51f135d1c44e53689ca91af3b1bce4918d2b590d92bb76a854ab30e7de7418288484604051611e1d929190615055565b60405180910390a3505050565b60a08301518351604051611de491906144f8565b505050565b611e4b613b94565b600480546040516328e9442960e11b81526001600160a01b03909116916351d2885291611e7e918891889188910161507a565b6000604051808303816000875af1158015611e9d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261107891908101906150b0565b600480548451606086015160c0870151604051634d601a0560e11b81526001600160a01b0390941694639ac0340a94611f01949392910161511b565b6000604051808303816000875af1158015611f20573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f48919081019061519d565b60c08401526060830151600012156120c7576120c286868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805160e081019091526002805491935083925090611fb090614541565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdc90614541565b80156120295780601f10611ffe57610100808354040283529160200191612029565b820191906000526020600020905b81548152906001019060200180831161200c57829003601f168201915b50505050508152602001866000015181526020018660400151815260200186606001516000196120599190614b9c565b815260200161207b604051806040016040528088815260200187815250612aa2565b81526020018660a001516000196120929190614b9c565b81526020018660c001518152506040518060400160405280600581526020016422a92927a960d91b815250612162565b61215a565b6120fd836040518060200160405280600081525060405180604001604052806004815260200163044524f560e41b815250611db4565b83868660405161210e929190614514565b60405180910390207f35348898083dc8da7eb4e604320d7cc250732cc1f584d2596f670b5d6bab8de561214086612dce565b8585604051612151939291906151d1565b60405180910390a35b505050505050565b60058360405161217291906144f8565b908152604051908190036020019020805490600061218f8361488a565b91905055506005836040516121a491906144f8565b908152602001604051809103902054836040516121c191906144f8565b60405180910390207f37be353f216cf7e33639101fd610c542e6a0c0109173fa1c1d8b04d34edb7c1b6121f385612dce565b6040516122009190614196565b60405180910390a3611e3e8261221585611963565b83611db4565b6060610c0082612e43565b6060604051806040016040528060068152602001656274703a2f2f60d01b81525083604051806040016040528060018152602001602f60f81b8152508460405160200161227694939291906151fc565b604051602081830303815290604052905092915050565b6003546040516378ad5a7d60e01b815260009182916001600160a01b03909116906378ad5a7d906122c2908b90600401614196565b600060405180830381865afa1580156122df573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123079190810190614ad6565b905060006040518060e001604052806002805461232390614541565b80601f016020809104026020016040519081016040528092919081815260200182805461234f90614541565b801561239c5780601f106123715761010080835404028352916020019161239c565b820191906000526020600020905b81548152906001019060200180831161237f57829003601f168201915b505050505081526020018a8152602001898152602001888152602001878152602001600081526020016040518060400160405280600280546123dd90614541565b80601f016020809104026020016040519081016040528092919081815260200182805461240990614541565b80156124565780601f1061242b57610100808354040283529160200191612456565b820191906000526020600020905b81548152906001019060200180831161243957829003601f168201915b5050509183525050602001600060405190808252806020026020018201604052801561248c578160200160208202803683370190505b50905290529050606085156125885760006124a88b8b8b611e43565b905061253e600280546124ba90614541565b80601f01602080910402602001604051908101604052809291908181526020018280546124e690614541565b80156125335780601f1061250857610100808354040283529160200191612533565b820191906000526020600020905b81548152906001019060200180831161251657829003601f168201915b505050505034613018565b60006060840152805161255390600019614b9c565b60a084015260209081015160c08401526040805180820190915260058152645245504c5960d81b918101919091529050612751565b612590612b10565b60a083015284156125a65760a082015160608301525b6004546001600160a01b0316331461273457600354604051633ea627a560e11b815260009182916001600160a01b0390911690637d4c4f4a906125f1908f90858f1390600401615253565b600060405180830381865afa15801561260e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526126369190810190614d67565b91509150808460c0015160200181905250813410156040518060400160405280600f81526020016e31303a4e6f74456e6f75676846656560881b815250906126915760405162461bcd60e51b815260040161054d9190614196565b50612731600280546126a290614541565b80601f01602080910402602001604051908101604052809291908181526020018280546126ce90614541565b801561271b5780601f106126f05761010080835404028352916020019161271b565b820191906000526020600020905b8154815290600101906020018083116126fe57829003601f168201915b5050505050833461272c9190615277565b613018565b50505b5060408051808201909152600481526314d1539160e21b60208201525b61275c838383612162565b5060a0015198975050505050505050565b60045460408051808201909152600f81526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b6020820152906001600160a01b031633146119605760405162461bcd60e51b815260040161054d9190614196565b81516000908390602a1480156128035750600360fc1b6001600160f81b031916816000815181106127f2576127f26148a5565b01602001516001600160f81b031916145b801561283d5750600f60fb1b6001600160f81b0319168160018151811061282c5761282c6148a5565b01602001516001600160f81b031916145b839061285c5760405162461bcd60e51b815260040161054d9190614196565b5060408051601480825281830190925260009160208201818036833701905050905060008080805b60288110156129f35785612899826002614b0a565b815181106128a9576128a96148a5565b016020015160f81c9350600160308510156128c2575060005b8460ff1660391080156128d8575060418560ff16105b156128e1575060005b8460ff1660461080156128f7575060618560ff16105b15612900575060005b8460ff1660661015612910575060005b8061292f578860405162461bcd60e51b815260040161054d9190614196565b60418560ff161015612944576030925061295e565b8460ff1660461015612959576057925061295e565b603792505b6129696002836152a4565b61297e5761297783866152b8565b93506129e0565b61298883866152b8565b6129938560106152db565b61299d9190615304565b60f81b8660026129ae600186615277565b6129b89190615329565b815181106129c8576129c86148a5565b60200101906001600160f81b031916908160001a9053505b50806129eb8161488a565b915050612884565b50600084604051602001612a0791906144f8565b60408051601f198184030181529190526014810151975090506001600160a01b038716612a965760025b8651811015612a9457868181518110612a4c57612a4c6148a5565b60209101015189906001600160f81b031916600360fc1b14612a815760405162461bcd60e51b815260040161054d9190614196565b5080612a8c8161488a565b915050612a31565b505b50505050505092915050565b60606000612ab3836000015161307f565b612ac08460200151613092565b604051602001612ad192919061533d565b6040516020818303038152906040529050612aeb8161309d565b9392505050565b60606000612b038360000151613092565b612ac084602001516130d3565b6000600760008154612b219061536c565b9182905550919050565b600081815b6006811015612bf557604051806040016040528060068152602001656274703a2f2f60d01b8152508181518110612b6957612b696148a5565b602001015160f81c60f81b6001600160f81b031916828281518110612b9057612b906148a5565b01602001516001600160f81b03191614612be3576040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b815261054d9190600401614196565b80612bed8161488a565b915050612b30565b8151811015612cc0576040805180820190915260018152602f60f81b60209091018190528251839083908110612c2d57612c2d6148a5565b01602001516001600160f81b0319161415612cae57600681118015612c5e575060018251612c5b9190615277565b81105b60405180604001604052806011815260200170696e76616c69644254504164647265737360781b81525090612ca65760405162461bcd60e51b815260040161054d9190614196565b509392505050565b80612cb88161488a565b915050612bf5565b6040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b815261054d9190600401614196565b6060836000612d0e8585615277565b6001600160401b03811115612d2557612d25613bfc565b6040519080825280601f01601f191660200182016040528015612d4f576020820181803683370190505b5090508460005b8251811015612dc2578382612d6a8161488a565b935081518110612d7c57612d7c6148a5565b602001015160f81c60f81b838281518110612d9957612d996148a5565b60200101906001600160f81b031916908160001a90535080612dba8161488a565b915050612d56565b50909695505050505050565b60606000612ddf8360000151613092565b612dec8460200151613092565b612df98560400151613092565b612e06866060015161312b565b612e1387608001516130d3565b612e208860a0015161312b565b612e2d8960c00151613139565b604051602001612ad19796959493929190615385565b604080516028808252606082810190935283831b916000916020820181803683370190505090506000806000806000806000612e7e8b61323a565b905060005b6014811015612fe757612e97816013615277565b612ea2906008615417565b612ead906002615512565b612ebb9060608c901c615329565b9750612ec860108961551e565b9650612ed58760106152db565b612edf90896152b8565b955081612eed826002615417565b60288110612efd57612efd6148a5565b6020020151945081612f10826002615417565b612f1b906001614b0a565b60288110612f2b57612f2b6148a5565b60200201519350612f3c87866133cb565b9250612f488388615304565b60f81b89612f57836002615417565b81518110612f6757612f676148a5565b60200101906001600160f81b031916908160001a905350612f8886856133cb565b9250612f948387615304565b60f81b89612fa3836002615417565b612fae906001614b0a565b81518110612fbe57612fbe6148a5565b60200101906001600160f81b031916908160001a90535080612fdf8161488a565b915050612e83565b5087604051602001612ff99190615540565b6040516020818303038152906040529950505050505050505050919050565b80156118985760048054604051633501470160e01b81526001600160a01b0390911691633501470191613051918691309187910161556a565b600060405180830381600087803b15801561306b57600080fd5b505af115801561215a573d6000803e3d6000fd5b6060610c0061308d836133f8565b6130d3565b6060610c00826130d3565b60606130ab825160c06134b8565b826040516020016130bd92919061533d565b6040516020818303038152906040529050919050565b6060808251600114801561310157506080836000815181106130f7576130f76148a5565b016020015160f81c105b1561310d575081610c00565b613119835160806134b8565b8360405160200161227692919061533d565b6060610c0061308d8361366e565b606060008260200151516001600160401b0381111561315a5761315a613bfc565b60405190808252806020026020018201604052801561318d57816020015b60608152602001906001900390816131785790505b50905060005b8360200151518110156131f6576131c6846020015182815181106131b9576131b96148a5565b602002602001015161307f565b8282815181106131d8576131d86148a5565b602002602001018190525080806131ee9061488a565b915050613193565b5060006132068460000151613092565b61320f836136f5565b60405160200161322092919061533d565b60405160208183030381529060405290506110788161309d565b613242613bae565b606082901b600061325282613722565b60405160200161326291906144f8565b60405160208183030381529060405280519060200120905060008060008060005b60148110156133bf5760108782601481106132a0576132a06148a5565b6132ac9291901a615598565b93506010848883601481106132c3576132c36148a5565b6132cf9291901a6152b8565b6132d9919061551e565b945060108682602081106132ef576132ef6148a5565b6132fb9291901a615598565b9150601082878360208110613312576133126148a5565b61331e9291901a6152b8565b613328919061551e565b925060098560ff16118015613340575060078360ff16115b8861334c836002615417565b6028811061335c5761335c6148a5565b91151560209092020152600960ff851611801561337c575060078260ff16115b88613388836002615417565b613393906001614b0a565b602881106133a3576133a36148a5565b91151560209092020152806133b78161488a565b915050613283565b50505050505050919050565b6000600a8360ff1610156133e157506030610c00565b81156133ef57506037610c00565b50605792915050565b6060816134335760015b6040519080825280601f01601f19166020018201604052801561342c576020820181803683370190505b5092915050565b608060015b602081101561346c578184101561345357611078848261387c565b60089190911b90806134648161488a565b915050613438565b5080831015613499576040805160208101859052015b604051602081830303815290604052915050919050565b6040516000602082015260218101849052604101613482565b50919050565b606080603884101561352257604080516001808252818301909252906020820181803683370190505090506134ed8385614b0a565b601f1a60f81b81600081518110613506576135066148a5565b60200101906001600160f81b031916908160001a905350612aeb565b600060015b6135318187615329565b1561355757816135408161488a565b9250613550905061010082615417565b9050613527565b613562826001614b0a565b6001600160401b0381111561357957613579613bfc565b6040519080825280601f01601f1916602001820160405280156135a3576020820181803683370190505b5092506135b08583614b0a565b6135bb906037614b0a565b601f1a60f81b836000815181106135d4576135d46148a5565b60200101906001600160f81b031916908160001a905350600190505b818111613665576101006136048284615277565b61361090610100615512565b61361a9088615329565b61362491906152a4565b601f1a60f81b83828151811061363c5761363c6148a5565b60200101906001600160f81b031916908160001a9053508061365d8161488a565b9150506135f0565b50509392505050565b60608161367c576001613402565b608060801960015b60208110156136d057828512801561369b57508185135b156136b3576136aa858261387c565b95945050505050565b600892831b929190911b90806136c88161488a565b915050613684565b5060408051602081018690520160405160208183030381529060405292505050919050565b60606000613702836138e8565b9050613710815160c06134b8565b8160405160200161348292919061533d565b60408051602880825260608281019093526000919060208201818036833701905050905060008080805b601481101561387157613760816013615277565b61376b906008615417565b613776906002615512565b61378490606089901c615329565b935061379160108561551e565b925061379e8360106152db565b6137a890856152b8565b9150600a8360ff16106137bc5760576137bf565b60305b6137c99084615304565b60f81b856137d8836002615417565b815181106137e8576137e86148a5565b60200101906001600160f81b031916908160001a905350600a8260ff1610613811576057613814565b60305b61381e9083615304565b60f81b8561382d836002615417565b613838906001614b0a565b81518110613848576138486148a5565b60200101906001600160f81b031916908160001a905350806138698161488a565b91505061374c565b509295945050505050565b60606000826001600160401b0381111561389857613898613bfc565b6040519080825280601f01601f1916602001820160405280156138c2576020820181803683370190505b50905060208101836020035b60208110156136655785811a8253600191820191016138ce565b60608151600014156138fb576000613402565b6000805b83518110156139425783818151811061391a5761391a6148a5565b6020026020010151518261392e9190614b0a565b91508061393a8161488a565b9150506138ff565b6000826001600160401b0381111561395c5761395c613bfc565b6040519080825280601f01601f191660200182016040528015613986576020820181803683370190505b50600092509050602081015b8551831015613a0a5760008684815181106139af576139af6148a5565b6020026020010151905060006020820190506139cd83828451613a13565b8785815181106139df576139df6148a5565b602002602001015151836139f39190614b0a565b925050508280613a029061488a565b935050613992565b50949350505050565b60208110613a4b5781518352613a2a602084614b0a565b9250613a37602083614b0a565b9150613a44602082615277565b9050613a13565b6000198115610ce4576001613a61836020615277565b613a6d90610100615512565b613a779190615277565b925184518416931916929092179092525050565b6040518060e00160405280606081526020016060815260200160608152602001600081526020016060815260200160008152602001613ac8613bcd565b905290565b60405180608001604052806000815260200160008152602001613b03604051806040016040528060008152602001606081525090565b8152602001600081525090565b828054613b1c90614541565b90600052602060002090601f016020900481019282613b3e5760008555613b84565b82601f10613b5757805160ff1916838001178555613b84565b82800160010185558215613b84579182015b82811115613b84578251825591602001919060010190613b69565b50613b90929150613be7565b5090565b604051806040016040528060008152602001613ac8613bcd565b6040518061050001604052806028906020820280368337509192915050565b604051806040016040528060608152602001606081525090565b5b80821115613b905760008155600101613be8565b634e487b7160e01b600052604160045260246000fd5b604081016001600160401b0381118282101715613c3157613c31613bfc565b60405250565b601f8201601f191681016001600160401b0381118282101715613c5c57613c5c613bfc565b6040525050565b60405160e081016001600160401b0381118282101715613c8557613c85613bfc565b60405290565b60006001600160401b03821115613ca457613ca4613bfc565b50601f01601f191660200190565b600082601f830112613cc357600080fd5b8135613cce81613c8b565b604051613cdb8282613c37565b828152856020848701011115613cf057600080fd5b82602086016020830137600092810160200192909252509392505050565b600060208284031215613d2057600080fd5b81356001600160401b03811115613d3657600080fd5b61107884828501613cb2565b60008083601f840112613d5457600080fd5b5081356001600160401b03811115613d6b57600080fd5b602083019150836020828501011115611dad57600080fd5b60008060008060408587031215613d9957600080fd5b84356001600160401b0380821115613db057600080fd5b613dbc88838901613d42565b90965094506020870135915080821115613dd557600080fd5b50613de287828801613d42565b95989497509550505050565b60008060208385031215613e0157600080fd5b82356001600160401b03811115613e1757600080fd5b613e2385828601613d42565b90969095509350505050565b60005b83811015613e4a578181015183820152602001613e32565b83811115610ce45750506000910152565b60008151808452613e73816020860160208601613e2f565b601f01601f19169290920160200192915050565b6020815281516020820152602082015160408201526000604083015160806060840152805160a084015260208101519050604060c0840152613ecc60e0840182613e5b565b9050606084015160808401528091505092915050565b60006001600160401b03821115613efb57613efb613bfc565b5060051b60200190565b600060408284031215613f1757600080fd5b604051613f2381613c12565b90508082356001600160401b0380821115613f3d57600080fd5b613f4986838701613cb2565b8352602091508185013581811115613f6057600080fd5b85019050601f81018613613f7357600080fd5b8035613f7e81613ee2565b604051613f8b8282613c37565b82815260059290921b8301840191848101915088831115613fab57600080fd5b928401925b82841015613fc957833582529284019290840190613fb0565b808587015250505050505092915050565b60008060008060608587031215613ff057600080fd5b84356001600160401b038082111561400757600080fd5b61401388838901613d42565b909650945060208701359350604087013591508082111561403357600080fd5b9086019060e0828903121561404757600080fd5b61404f613c63565b82358281111561405e57600080fd5b61406a8a828601613cb2565b82525060208301358281111561407f57600080fd5b61408b8a828601613cb2565b6020830152506040830135828111156140a357600080fd5b6140af8a828601613cb2565b604083015250606083013560608201526080830135828111156140d157600080fd5b6140dd8a828601613cb2565b60808301525060a083013560a082015260c0830135828111156140ff57600080fd5b61410b8a828601613f05565b60c0830152509598949750929550505050565b6001600160a01b038116811461196057600080fd5b60008060006060848603121561414857600080fd5b83356001600160401b0381111561415e57600080fd5b61416a86828701613cb2565b935050602084013561417b8161411e565b9150604084013561418b8161411e565b809150509250925092565b602081526000612aeb6020830184613e5b565b600080600080608085870312156141bf57600080fd5b84356001600160401b03808211156141d657600080fd5b6141e288838901613cb2565b955060208701359150808211156141f857600080fd5b61420488838901613cb2565b945060408701359350606087013591508082111561422157600080fd5b5061422e87828801613cb2565b91505092959194509250565b60008060006040848603121561424f57600080fd5b83356001600160401b0381111561426557600080fd5b61427186828701613d42565b909450925050602084013561418b8161411e565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156142f657888303603f19018552815180518785526142d088860182613e5b565b918901516001600160a01b031694890194909452948701949250908601906001016142ac565b509098975050505050505050565b801515811461196057600080fd5b60008060006040848603121561432757600080fd5b83356001600160401b0381111561433d57600080fd5b61434986828701613d42565b909450925050602084013561418b81614304565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b838110156142f657888303603f19018552815180518785526143a888860182613e5b565b91890151858303868b01529190506143c08183613e5b565b968901969450505090860190600101614384565b600080600080608085870312156143ea57600080fd5b84356143f58161411e565b935060208501356001600160401b0381111561441057600080fd5b61441c87828801613cb2565b949794965050505060408301359260600135919050565b6000806040838503121561444657600080fd5b82356001600160401b038082111561445d57600080fd5b61446986838701613cb2565b9350602085013591508082111561447f57600080fd5b5061448c85828601613cb2565b9150509250929050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156144eb57603f198886030184526144d9858351613e5b565b945092850192908501906001016144bd565b5092979650505050505050565b6000825161450a818460208701613e2f565b9190910192915050565b8183823760009101908152919050565b60006020828403121561453657600080fd5b8151612aeb8161411e565b600181811c9082168061455557607f821691505b602082108114156134b257634e487b7160e01b600052602260045260246000fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b608081526000808854818160011c905060018216806145bf57607f821691505b60208083108214156145df57634e487b7160e01b85526022600452602485fd5b6080870183905260a087018280156145fe576001811461460f5761463c565b60ff1986168252828201965061463c565b60008f81526020902060005b8681101561463657815484820152600190910190840161461b565b83019750505b5050868503818801525050505061465481888a614576565b9050856040840152828103606084015261466f818587614576565b9998505050505050505050565b600082601f83011261468d57600080fd5b815161469881613c8b565b6040516146a58282613c37565b8281528560208487010111156146ba57600080fd5b6136aa836020830160208801613e2f565b600060208083850312156146de57600080fd5b82516001600160401b03808211156146f557600080fd5b818501915085601f83011261470957600080fd5b815161471481613ee2565b6040516147218282613c37565b82815260059290921b840185019185810191508883111561474157600080fd5b8585015b838110156147795780518581111561475d5760008081fd5b61476b8b89838a010161467c565b845250918601918601614745565b5098975050505050505050565b600060033d111561479f5760046000803e5060005160e01c5b90565b600060443d10156147b05790565b6040516003193d81016004833e81513d6001600160401b0380831160248401831017156147df57505050505090565b82850191508151818111156147f75750505050505090565b843d87010160208285010111156148115750505050505090565b61482060208286010187613c37565b509095945050505050565b60408152600061483f604083018587614576565b905060018060a01b0383166020830152949350505050565b60006020828403121561486957600080fd5b8151612aeb81614304565b634e487b7160e01b600052601160045260246000fd5b600060001982141561489e5761489e614874565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038316815260406020820181905260009061107890830184613e5b565b600082601f8301126148f057600080fd5b815160206148fd82613ee2565b60405161490a8282613c37565b83815260059390931b850182019282810191508684111561492a57600080fd5b8286015b84811015614945578051835291830191830161492e565b509695505050505050565b60006040828403121561496257600080fd5b60405161496e81613c12565b825190915081906001600160401b038082111561498a57600080fd5b6149968683870161467c565b835260208501519150808211156149ac57600080fd5b506149b9858286016148df565b6020830152505092915050565b6000602082840312156149d857600080fd5b81516001600160401b03808211156149ef57600080fd5b9083019060e08286031215614a0357600080fd5b614a0b613c63565b825182811115614a1a57600080fd5b614a268782860161467c565b825250602083015182811115614a3b57600080fd5b614a478782860161467c565b602083015250604083015182811115614a5f57600080fd5b614a6b8782860161467c565b60408301525060608301516060820152608083015182811115614a8d57600080fd5b614a998782860161467c565b60808301525060a083015160a082015260c083015182811115614abb57600080fd5b614ac787828601614950565b60c08301525095945050505050565b600060208284031215614ae857600080fd5b81516001600160401b03811115614afe57600080fd5b6110788482850161467c565b60008219821115614b1d57614b1d614874565b500190565b600060208284031215614b3457600080fd5b81516001600160401b0380821115614b4b57600080fd5b9083019060408286031215614b5f57600080fd5b604051614b6b81613c12565b82518152602083015182811115614b8157600080fd5b614b8d8782860161467c565b60208301525095945050505050565b60006001600160ff1b0381841382841380821686840486111615614bc257614bc2614874565b600160ff1b6000871282811687830589121615614be157614be1614874565b60008712925087820587128484161615614bfd57614bfd614874565b87850587128184161615614c1357614c13614874565b505050929093029392505050565b600060208284031215614c3357600080fd5b5051919050565b60006020808385031215614c4d57600080fd5b82516001600160401b0380821115614c6457600080fd5b818501915085601f830112614c7857600080fd5b8151614c8381613ee2565b60408051614c918382613c37565b83815260059390931b8501860192868101925089841115614cb157600080fd5b8686015b84811015614d3357805186811115614ccd5760008081fd5b8701808c03601f1901841315614ce35760008081fd5b8351614cee81613c12565b8982015188811115614d005760008081fd5b614d0e8e8c8386010161467c565b8252509084015190614d1f8261411e565b808a01919091528452928701928701614cb5565b509998505050505050505050565b604081526000614d55604083018587614576565b90508215156020830152949350505050565b60008060408385031215614d7a57600080fd5b825160208401519092506001600160401b03811115614d9857600080fd5b61448c858286016148df565b60006020808385031215614db757600080fd5b82516001600160401b0380821115614dce57600080fd5b818501915085601f830112614de257600080fd5b8151614ded81613ee2565b60408051614dfb8382613c37565b83815260059390931b8501860192868101925089841115614e1b57600080fd5b8686015b84811015614d3357805186811115614e375760008081fd5b8701808c03601f1901841315614e4d5760008081fd5b8351614e5881613c12565b8982015188811115614e6a5760008081fd5b614e788e8c8386010161467c565b8252508482015188811115614e8d5760008081fd5b614e9b8e8c8386010161467c565b828c015250855250928701928701614e1f565b858152608060208201526000614ec8608083018688614576565b6001600160a01b0394909416604083015250606001529392505050565b606081526000614ef9606083018688614576565b6020830194909452506040015292915050565b60006020808385031215614f1f57600080fd5b82516001600160401b0380821115614f3657600080fd5b818501915085601f830112614f4a57600080fd5b8151614f5581613ee2565b604051614f628282613c37565b82815260059290921b8401850191858101915088831115614f8257600080fd5b8585015b8381101561477957805185811115614f9e5760008081fd5b614fac8b89838a010161467c565b845250918601918601614f86565b608081526000614fcd6080830187613e5b565b8281036020840152614fdf8187613e5b565b90508460408401528281036060840152614ff98185613e5b565b979650505050505050565b60a08152600061501760a0830188613e5b565b82810360208401526150298188613e5b565b905085604084015284606084015282810360808401526150498185613e5b565b98975050505050505050565b6040815260006150686040830185613e5b565b82810360208401526136aa8185613e5b565b60608152600061508d6060830186613e5b565b828103602084015261509f8186613e5b565b915050826040830152949350505050565b6000602082840312156150c257600080fd5b81516001600160401b03808211156150d957600080fd5b90830190604082860312156150ed57600080fd5b6040516150f981613c12565b8251815260208301518281111561510f57600080fd5b614b8d87828601614950565b60608152600061512e6060830186613e5b565b6020858185015283820360408501528451604083526151506040840182613e5b565b8683015184820394840194909452835180825290830193830191506000905b8082101561518f578251855293830193918301916001919091019061516f565b509298975050505050505050565b6000602082840312156151af57600080fd5b81516001600160401b038111156151c557600080fd5b61107884828501614950565b6060815260006151e46060830186613e5b565b8460208401528281036040840152610ff78185613e5b565b6000855161520e818460208a01613e2f565b855190830190615222818360208a01613e2f565b8551910190615235818360208901613e2f565b8451910190615248818360208801613e2f565b019695505050505050565b6040815260006152666040830185613e5b565b905082151560208301529392505050565b60008282101561528957615289614874565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826152b3576152b361528e565b500690565b600060ff821660ff8416808210156152d2576152d2614874565b90039392505050565b600060ff821660ff84168160ff04811182151516156152fc576152fc614874565b029392505050565b600060ff821660ff84168060ff0382111561532157615321614874565b019392505050565b6000826153385761533861528e565b500490565b6000835161534f818460208801613e2f565b835190830190615363818360208801613e2f565b01949350505050565b60006001600160ff1b0382141561489e5761489e614874565b6000885160206153988285838e01613e2f565b8951918401916153ab8184848e01613e2f565b89519201916153bd8184848d01613e2f565b88519201916153cf8184848c01613e2f565b87519201916153e18184848b01613e2f565b86519201916153f38184848a01613e2f565b85519201916154058184848901613e2f565b919091019a9950505050505050505050565b600081600019048311821515161561543157615431614874565b500290565b600181815b8085111561547157816000190482111561545757615457614874565b8085161561546457918102915b93841c939080029061543b565b509250929050565b60008261548857506001610c00565b8161549557506000610c00565b81600181146154ab57600281146154b5576154d1565b6001915050610c00565b60ff8411156154c6576154c6614874565b50506001821b610c00565b5060208310610133831016604e8410600b84101617156154f4575081810a610c00565b6154fe8383615436565b80600019048211156152fc576152fc614874565b6000612aeb8383615479565b600060ff8316806155315761553161528e565b8060ff84160491505092915050565b61060f60f31b81526000825161555d816002850160208701613e2f565b9190910160020192915050565b60608152600061557d6060830186613e5b565b6001600160a01b039490941660208301525060400152919050565b600060ff8316806155ab576155ab61528e565b8060ff8416069150509291505056fea2646970667358221220eafc7e8d1550aa64d2cf547f6bfbddb48ec2a78d4dbcd56cb593d19e540d118c64736f6c634300080c0033"; + +type BMCPeripheryConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BMCPeripheryConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BMCPeriphery__factory extends ContractFactory { + constructor(...args: BMCPeripheryConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): BMCPeriphery { + return super.attach(address) as BMCPeriphery; + } + override connect(signer: Signer): BMCPeriphery__factory { + return super.connect(signer) as BMCPeriphery__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BMCPeripheryInterface { + return new utils.Interface(_abi) as BMCPeripheryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BMCPeriphery { + return new Contract(address, _abi, signerOrProvider) as BMCPeriphery; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/BMCService__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/BMCService__factory.ts new file mode 100644 index 00000000..681fa79c --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/BMCService__factory.ts @@ -0,0 +1,534 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + BMCService, + BMCServiceInterface, +} from "../../../../solidity/contracts/bmc/BMCService"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + internalType: "string", + name: "_dst", + type: "string", + }, + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "addRequest", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "addReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "clearReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_rlp", + type: "bytes", + }, + ], + name: "decodeResponseMessage", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "code", + type: "uint256", + }, + { + internalType: "string", + name: "message", + type: "string", + }, + ], + internalType: "struct Types.ResponseMessage", + name: "", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "getBMCManagement", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBMCPeriphery", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "getReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "uint256", + name: "_code", + type: "uint256", + }, + { + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "handleBTPError", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleBTPMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "uint256[]", + name: "_values", + type: "uint256[]", + }, + ], + name: "handleDropFee", + outputs: [ + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "_feeInfo", + type: "tuple", + }, + ], + name: "handleErrorFee", + outputs: [ + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleFee", + outputs: [ + { + components: [ + { + internalType: "string", + name: "src", + type: "string", + }, + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "int256", + name: "sn", + type: "int256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "feeInfo", + type: "tuple", + }, + ], + internalType: "struct Types.BTPMessage", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_bmcManagementAddr", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + ], + name: "removeResponse", + outputs: [ + { + components: [ + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "feeInfo", + type: "tuple", + }, + ], + internalType: "struct Types.Response", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setBMCPeriphery", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b506139d9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100c55760003560e01c80630a823dea146100ca5780632926498e146100df578063350147011461010557806351d288521461011857806364945d5d1461013857806364cd37501461015857806376bf87671461016b57806387df8a9a1461018b5780639ac0340a146101ab578063ae86c53d146101cb578063b70eeb8d146101dc578063c4d66de8146101ef578063c620234c14610202578063ce5cef5a14610215578063e04fc02514610228575b600080fd5b6100dd6100d8366004612cc7565b61023b565b005b6100f26100ed366004612d8f565b610257565b6040519081526020015b60405180910390f35b6100dd610113366004612ed5565b610333565b61012b610126366004612f2b565b61034b565b6040516100fc9190613054565b61014b610146366004613079565b610580565b6040516100fc91906130ba565b6100f2610166366004612d8f565b6105d0565b6000546201000090046001600160a01b03165b6040516100fc91906130df565b61019e6101993660046130f3565b610610565b6040516100fc9190613154565b6101be6101b9366004613283565b61090e565b6040516100fc9190613343565b6001546001600160a01b031661017e565b6100dd6101ea366004613356565b610af9565b6100dd6101fd3660046133f9565b61109f565b6100dd6102103660046133f9565b6111c4565b6101be610223366004613414565b61136f565b6100dd61023636600461346d565b6113b2565b610243611445565b61024d84846114a0565b5050505050505050565b6000610261611445565b6001600160a01b038216600090815260056020526040808220905161028990879087906134cb565b908152602001604051809103902054905060008111604051806040016040528060128152602001710c4c0e939bdd115e1a5cdd1cd4995dd85c9960721b815250906102f05760405162461bcd60e51b81526004016102e791906134db565b60405180910390fd5b506001600160a01b038316600090815260056020526040808220905161031990889088906134cb565b9081526040519081900360200190205590505b9392505050565b61033b611445565b6103468383836116a1565b505050565b610353612aaa565b61035b611445565b600060038560405161036d91906134ee565b90815260200160405180910390208460405161038991906134ee565b9081526020016040518091039020600084815260200190815260200160002060405180604001604052908160008201548152602001600182016040518060400160405290816000820180546103dd9061350a565b80601f01602080910402602001604051908101604052809291908181526020018280546104099061350a565b80156104565780601f1061042b57610100808354040283529160200191610456565b820191906000526020600020905b81548152906001019060200180831161043957829003601f168201915b50505050508152602001600182018054806020026020016040519081016040528092919081815260200182805480156104ae57602002820191906000526020600020905b81548152602001906001019080831161049a575b50505091909252505050905250805160408051808201909152601481527331303a4e6f74457869737473526573706f6e736560601b602082015291925060001261050b5760405162461bcd60e51b81526004016102e791906134db565b5060038560405161051c91906134ee565b90815260200160405180910390208460405161053891906134ee565b90815260408051602092819003830190206000868152925281208181559060018201816105658282612ac9565b610573600183016000612b03565b5092979650505050505050565b610588612b21565b6105c783838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061172692505050565b90505b92915050565b6001600160a01b03811660009081526005602052604080822090516105f890869086906134cb565b90815260200160405180910390205490509392505050565b610618612b3b565b610620611445565b600061062b836117a2565b905061063b848260c00151611897565b60c0820152600280546106dc91906106529061350a565b80601f016020809104026020016040519081016040528092919081815260200182805461067e9061350a565b80156106cb5780601f106106a0576101008083540402835291602001916106cb565b820191906000526020600020905b8154815290600101906020018083116106ae57829003601f168201915b50505060208501519291505061199e565b156105c7576000816060015113156108f55761083d6003826000015160405161070591906134ee565b9081526020016040518091039020826040015160405161072591906134ee565b90815260408051918290036020908101832060608601516000908152915281902082820190915260010180548290829061075e9061350a565b80601f016020809104026020016040519081016040528092919081815260200182805461078a9061350a565b80156107d75780601f106107ac576101008083540402835291602001916107d7565b820191906000526020600020905b8154815290600101906020018083116107ba57829003601f168201915b505050505081526020016001820180548060200260200160405190810160405280929190818152602001828054801561082f57602002820191906000526020600020905b81548152602001906001019080831161081b575b505050505081525050611a05565b5060405180604001604052808260a0015181526020018260c001518152506003826000015160405161086f91906134ee565b9081526020016040518091039020826040015160405161088f91906134ee565b908152604080516020928190038301902060608501516000908152908352208251815582820151805180519293919260018501926108d1928492910190612b78565b5060208281015180516108ea9260018501920190612bfc565b5050509050506105c7565b6109028160c00151611a05565b60c08201529392505050565b610916612c36565b61091e611445565b6000831315610ae95760015460405162d2c16f60e61b81526000916001600160a01b0316906334b05bc0906109579088906004016134db565b602060405180830381865afa158015610974573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610998919061353f565b90506000811180156109ae575080836020015151115b15610ae0576000818460200151516109c6919061356e565b905060008460200151516001600160401b038111156109e7576109e7612de2565b604051908082528060200260200182016040528015610a10578160200160208202803683370190505b50905060005b83811015610a74576020860151610a2d8285613585565b81518110610a3d57610a3d61359d565b6020026020010151828281518110610a5757610a5761359d565b602090810291909101015280610a6c816135b3565b915050610a16565b5060005b82811015610ad85785602001518181518110610a9657610a9661359d565b6020026020010151828286610aab9190613585565b81518110610abb57610abb61359d565b602090810291909101015280610ad0816135b3565b915050610a78565b506020850152505b8291505061032c565b610af282611a05565b905061032c565b610b01611445565b6000610b4283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a5292505050565b905060008160000151604051602001610b5b91906134ee565b60408051601f19818403018152828252805160209182012083830183526005845264436c61696d60d81b848301529151919350610b999291016134ee565b60405160208183030381529060405280519060200120811415610db0576000610bc58360200151611a97565b9050610c9d60028054610bd79061350a565b80601f0160208091040260200160405190810160405280929190818152602001828054610c039061350a565b8015610c505780601f10610c2557610100808354040283529160200191610c50565b820191906000526020600020905b815481529060010190602001808311610c3357829003601f168201915b5050505050610c96604051806040016040528060128152602001710c4c0e925b9d985b1a59105c99dd5b595b9d60721b8152508460200151611ab190919063ffffffff16565b83516116a1565b600060029054906101000a90046001600160a01b03166001600160a01b031663522a901e8b8b60405180604001604052806003815260200162626d6360e81b8152508a600019610ced91906135ce565b60408051608081018252600881830190815267526573706f6e736560c01b606083015281528151808301835260008082528351602081810190955290815281840152610d4692820190610d3f90611d94565b9052611ddd565b6040518663ffffffff1660e01b8152600401610d6695949392919061367c565b6020604051808303816000875af1158015610d85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da9919061353f565b5050611094565b60405180604001604052806008815260200167526573706f6e736560c01b815250604051602001610de191906134ee565b60405160208183030381529060405280519060200120811415610e1a57610e1585610e0f8460200151611726565b516114a0565b611094565b604051806040016040528060048152602001634c696e6b60e01b815250604051602001610e4791906134ee565b60405160208183030381529060405280519060200120811415610ee05760015460208301516001600160a01b039091169063acc3a7a5908b908b90610e8b90611dfb565b6040518463ffffffff1660e01b8152600401610ea9939291906136c8565b600060405180830381600087803b158015610ec357600080fd5b505af1158015610ed7573d6000803e3d6000fd5b50505050611094565b60405180604001604052806006815260200165556e6c696e6b60d01b815250604051602001610f0f91906134ee565b60405160208183030381529060405280519060200120811415610f535760015460208301516001600160a01b039091169063766639ce908b908b90610e8b90611dfb565b60405180604001604052806004815260200163125b9a5d60e21b815250604051602001610f8091906134ee565b60405160208183030381529060405280519060200120811415611052576000610fac8360200151611e23565b905060005b8151811015610da95760015482516001600160a01b039091169063acc3a7a5908d908d90869086908110610fe757610fe761359d565b60200260200101516040518463ffffffff1660e01b815260040161100d939291906136c8565b600060405180830381600087803b15801561102757600080fd5b505af115801561103b573d6000803e3d6000fd5b50505050808061104a906135b3565b915050610fb1565b60408051808201825260148152730c4c0e939bdd115e1a5cdd1cd25b9d195c9b985b60621b6020820152905162461bcd60e51b81526102e791906004016134db565b505050505050505050565b600054610100900460ff16158080156110bf5750600054600160ff909116105b806110d95750303b1580156110d9575060005460ff166001145b61113c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102e7565b6000805460ff19166001179055801561115f576000805461ff0019166101001790555b600180546001600160a01b0319166001600160a01b03841617905580156111c0576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6001546040516317aa5fb760e11b81526001600160a01b0390911690632f54bf6e906111f49033906004016130df565b602060405180830381865afa158015611211573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123591906136f8565b6040518060400160405280600f81526020016e0c4c4e955b985d5d1a1bdc9a5e9959608a1b8152509061127b5760405162461bcd60e51b81526004016102e791906134db565b506040805180820190915260128152710c4c0e925b9d985b1a59105c99dd5b595b9d60721b60208201526001600160a01b0382166112cc5760405162461bcd60e51b81526004016102e791906134db565b506000805462010000600160b01b031916620100006001600160a01b0384811682029290921780845560408051636bf459cb60e01b815290519290910490921692636bf459cb92600480820193918290030181865afa158015611333573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261135b919081019061371a565b80516111c091600291602090910190612b78565b611377612c36565b61137f611f04565b6105c7600060029054906101000a90046001600160a01b0316604051806040016040528086815260200185815250611897565b6113ba611445565b6040805160808101825285815260208082018681526001600160a01b038616838501526060830185905260008881526004835293909320825181559251805192939261140c9260018501920190612b78565b5060408201516002820180546001600160a01b0319166001600160a01b0390921691909117905560609091015160039091015550505050565b60005460408051808201909152600f81526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b6020820152906201000090046001600160a01b0316331461149d5760405162461bcd60e51b81526004016102e791906134db565b50565b600060046000848152602001908152602001600020604051806080016040529081600082015481526020016001820180546114da9061350a565b80601f01602080910402602001604051908101604052809291908181526020018280546115069061350a565b80156115535780601f1061152857610100808354040283529160200191611553565b820191906000526020600020905b81548152906001019060200180831161153657829003601f168201915b505050918352505060028201546001600160a01b03166020808301919091526003909201546040918201528251815180830190925260138252720c4c0e939bdd115e1a5cdd1cd4995c5d595cdd606a1b928201929092529192506000126115cd5760405162461bcd60e51b81526004016102e791906134db565b5080516000908152600460205260408120818155906115ef6001830182612ac9565b506002810180546001600160a01b031916905560006003909101558115611627576116278160200151826040015183606001516116a1565b600054604082810151602084015184519251634a3efd6160e11b8152620100009094046001600160a01b03169363947dfac29361166a9392918890600401613787565b600060405180830381600087803b15801561168457600080fd5b505af1158015611698573d6000803e3d6000fd5b50505050505050565b8015610346576001600160a01b0382166000908152600560205260409081902090518291906116d19086906134ee565b9081526020016040518091039020546116ea9190613585565b6001600160a01b0383166000908152600560205260409081902090516117119086906134ee565b90815260405190819003602001902055505050565b61172e612b21565b600061174161173c84611f56565b611f7c565b90506040518060400160405280611771836000815181106117645761176461359d565b60200260200101516120b9565b81526020016117998360018151811061178c5761178c61359d565b602002602001015161216d565b90529392505050565b6117aa612b3b565b60006117b861173c84611f56565b90506040518060e001604052806117db8360008151811061178c5761178c61359d565b81526020016117f68360018151811061178c5761178c61359d565b81526020016118118360028151811061178c5761178c61359d565b81526020016118398360038151811061182c5761182c61359d565b602002602001015161223d565b81526020016118548360048151811061178c5761178c61359d565b815260200161186f8360058151811061182c5761182c61359d565b81526020016117998360068151811061188a5761188a61359d565b60200260200101516122e0565b61189f612c36565b60208201515115611998576118d782600001518484602001516000815181106118ca576118ca61359d565b60200260200101516116a1565b600060018360200151516118eb919061356e565b6001600160401b0381111561190257611902612de2565b60405190808252806020026020018201604052801561192b578160200160208202803683370190505b50905060005b815181101561199157602084015161194a826001613585565b8151811061195a5761195a61359d565b60200260200101518282815181106119745761197461359d565b602090810291909101015280611989816135b3565b915050611931565b5060208301525b50919050565b6000816040516020016119b191906134ee565b60405160208183030381529060405280519060200120836040516020016119d891906134ee565b6040516020818303038152906040528051906020012014156119fc575060016105ca565b50600092915050565b611a0d612c36565b81516000546020840151611a3a92916201000090046001600160a01b031690611a3590612414565b6116a1565b50604080516000815260208082019092529082015290565b60408051808201909152606080825260208201526000611a7461173c84611f56565b905060405180604001604052806117718360008151811061178c5761178c61359d565b60408051808201909152600081526060602082015261172e565b81516000908390602a148015611af55750600360fc1b6001600160f81b03191681600081518110611ae457611ae461359d565b01602001516001600160f81b031916145b8015611b2f5750600f60fb1b6001600160f81b03191681600181518110611b1e57611b1e61359d565b01602001516001600160f81b031916145b8390611b4e5760405162461bcd60e51b81526004016102e791906134db565b5060408051601480825281830190925260009160208201818036833701905050905060008080805b6028811015611ce55785611b8b826002613585565b81518110611b9b57611b9b61359d565b016020015160f81c935060016030851015611bb4575060005b8460ff166039108015611bca575060418560ff16105b15611bd3575060005b8460ff166046108015611be9575060618560ff16105b15611bf2575060005b8460ff1660661015611c02575060005b80611c21578860405162461bcd60e51b81526004016102e791906134db565b60418560ff161015611c365760309250611c50565b8460ff1660461015611c4b5760579250611c50565b603792505b611c5b6002836137d4565b611c7057611c6983866137e8565b9350611cd2565b611c7a83866137e8565b611c8585601061380b565b611c8f9190613834565b60f81b866002611ca060018661356e565b611caa9190613859565b81518110611cba57611cba61359d565b60200101906001600160f81b031916908160001a9053505b5080611cdd816135b3565b915050611b76565b50600084604051602001611cf991906134ee565b60408051601f198184030181529190526014810151975090506001600160a01b038716611d885760025b8651811015611d8657868181518110611d3e57611d3e61359d565b60209101015189906001600160f81b031916600360fc1b14611d735760405162461bcd60e51b81526004016102e791906134db565b5080611d7e816135b3565b915050611d23565b505b50505050505092915050565b60606000611da58360000151612462565b611db28460200151612475565b604051602001611dc392919061386d565b604051602081830303815290604052905061032c81612480565b60606000611dee8360000151612475565b611db284602001516124b6565b60606000611e0b61173c84611f56565b905061032c8160008151811061178c5761178c61359d565b60606000611e3361173c84611f56565b90506000611e5a82600081518110611e4d57611e4d61359d565b6020026020010151611f7c565b905080516001600160401b03811115611e7557611e75612de2565b604051908082528060200260200182016040528015611ea857816020015b6060815260200190600190039081611e935790505b50925060005b8151811015611efc57611ecc82828151811061178c5761178c61359d565b848281518110611ede57611ede61359d565b60200260200101819052508080611ef4906135b3565b915050611eae565b505050919050565b60015460408051808201909152600f81526e0c4c4e955b985d5d1a1bdc9a5e9959608a1b6020820152906001600160a01b0316331461149d5760405162461bcd60e51b81526004016102e791906134db565b611f5e612c50565b50604080518082019091528151815260209182019181019190915290565b6060611f8782612525565b611fc45760405162461bcd60e51b815260206004820152600e60248201526d135d5cdd0818994818481b1a5cdd60921b60448201526064016102e7565b6000611fcf8361255e565b90506000816001600160401b03811115611feb57611feb612de2565b60405190808252806020026020018201604052801561202457816020015b612011612c50565b8152602001906001900390816120095790505b509050600061203685602001516125e1565b85602001516120459190613585565b90506000805b848110156120ae5761205c8361265c565b91506040518060400160405280838152602001848152508482815181106120855761208561359d565b602090810291909101015261209a8284613585565b9250806120a6816135b3565b91505061204b565b509195945050505050565b8051600090158015906120ce57508151602110155b6121105760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103ab4b73a10373ab6b132b960691b60448201526064016102e7565b600061211f83602001516125e1565b90506000818460000151612133919061356e565b90506000808386602001516121489190613585565b905080519150602083101561216457826020036101000a820491505b50949350505050565b80516060906121af5760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b60448201526064016102e7565b60006121be83602001516125e1565b905060008184600001516121d2919061356e565b90506000816001600160401b038111156121ee576121ee612de2565b6040519080825280601f01601f191660200182016040528015612218576020820181803683370190505b50905060008160200190506121648487602001516122369190613585565b8285612700565b600081516021116122855760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21034b73a10373ab6b132b960711b60448201526064016102e7565b600061229483602001516125e1565b905060008184600001516122a8919061356e565b90506000808386602001516122bd9190613585565b90508051915060208310156121645781836020036008021d915050949350505050565b6122e8612c36565b6122f18261277f565b156123235750506040805160608101825260008183018181528252825190815260208082019093529181019190915290565b600061232e83611f7c565b9050600061234882600181518110611e4d57611e4d61359d565b9050600081516001600160401b0381111561236557612365612de2565b60405190808252806020026020018201604052801561238e578160200160208202803683370190505b50905060005b82518110156123e1576123b28382815181106117645761176461359d565b8282815181106123c4576123c461359d565b6020908102919091010152806123d9816135b3565b915050612394565b5060405180604001604052806124038560008151811061178c5761178c61359d565b815260200191909152949350505050565b600080805b835181101561245b578381815181106124345761243461359d565b6020026020010151826124479190613585565b915080612453816135b3565b915050612419565b5092915050565b60606105ca612470836127d6565b6124b6565b60606105ca826124b6565b606061248e825160c0612887565b826040516020016124a092919061386d565b6040516020818303038152906040529050919050565b606080825160011480156124e457506080836000815181106124da576124da61359d565b016020015160f81c105b156124f05750816105ca565b6124fc83516080612887565b8360405160200161250e92919061386d565b604051602081830303815290604052905092915050565b805160009061253657506000919050565b6020820151805160001a9060c0821015612554575060009392505050565b5060019392505050565b805160009061256f57506000919050565b60008061257f84602001516125e1565b846020015161258e9190613585565b90506000846000015185602001516125a69190613585565b90505b808210156125d8576125ba8261265c565b6125c49083613585565b9150826125d0816135b3565b9350506125a9565b50909392505050565b8051600090811a60808110156125fa5750600092915050565b60b8811080612615575060c08110801590612615575060f881105b156126235750600192915050565b60c081101561265057612638600160b86137e8565b6126459060ff168261356e565b61032c906001613585565b612638600160f86137e8565b80516000908190811a6080811015612677576001915061245b565b60b881101561269d5761268b60808261356e565b612696906001613585565b915061245b565b60c08110156126ca5760b78103600185019450806020036101000a8551046001820181019350505061245b565b60f88110156126de5761268b60c08261356e565b60019390930151602084900360f7016101000a900490920160f5190192915050565b8061270a57505050565b602081106127425782518252612721602084613585565b925061272e602083613585565b915061273b60208261356e565b905061270a565b8015610346576000600161275783602061356e565b61276390610100613978565b61276d919061356e565b84518451821691191617835250505050565b805160009060021461279357506000919050565b6020820151805160019091018051600092831a921a9060f8831415806127bb575060ff821615155b156127cb57506000949350505050565b506001949350505050565b60608161280057604080516001808252818301909252906020820181803683370190505092915050565b608060015b60208110156128415781841015612828576128208482612a3e565b949350505050565b60089190911b9080612839816135b3565b915050612805565b508083101561286e576040805160208101859052015b604051602081830303815290604052915050919050565b6040516000602082015260218101849052604101612857565b60608060388410156128f157604080516001808252818301909252906020820181803683370190505090506128bc8385613585565b601f1a60f81b816000815181106128d5576128d561359d565b60200101906001600160f81b031916908160001a9053506105c7565b600060015b6129008187613859565b15612926578161290f816135b3565b925061291f905061010082613984565b90506128f6565b612931826001613585565b6001600160401b0381111561294857612948612de2565b6040519080825280601f01601f191660200182016040528015612972576020820181803683370190505b50925061297f8583613585565b61298a906037613585565b601f1a60f81b836000815181106129a3576129a361359d565b60200101906001600160f81b031916908160001a905350600190505b818111612a34576101006129d3828461356e565b6129df90610100613978565b6129e99088613859565b6129f391906137d4565b601f1a60f81b838281518110612a0b57612a0b61359d565b60200101906001600160f81b031916908160001a90535080612a2c816135b3565b9150506129bf565b5050905092915050565b60606000826001600160401b03811115612a5a57612a5a612de2565b6040519080825280601f01601f191660200182016040528015612a84576020820181803683370190505b50905060208101836020035b6020811015612a345785811a825360019182019101612a90565b604051806040016040528060008152602001612ac4612c36565b905290565b508054612ad59061350a565b6000825580601f10612ae5575050565b601f01602090049060005260206000209081019061149d9190612c6a565b508054600082559060005260206000209081019061149d9190612c6a565b604051806040016040528060008152602001606081525090565b6040518060e00160405280606081526020016060815260200160608152602001600081526020016060815260200160008152602001612ac4612c36565b828054612b849061350a565b90600052602060002090601f016020900481019282612ba65760008555612bec565b82601f10612bbf57805160ff1916838001178555612bec565b82800160010185558215612bec579182015b82811115612bec578251825591602001919060010190612bd1565b50612bf8929150612c6a565b5090565b828054828255906000526020600020908101928215612bec5791602002820182811115612bec578251825591602001919060010190612bd1565b604051806040016040528060608152602001606081525090565b604051806040016040528060008152602001600081525090565b5b80821115612bf85760008155600101612c6b565b60008083601f840112612c9157600080fd5b5081356001600160401b03811115612ca857600080fd5b602083019150836020828501011115612cc057600080fd5b9250929050565b60008060008060008060008060a0898b031215612ce357600080fd5b88356001600160401b0380821115612cfa57600080fd5b612d068c838d01612c7f565b909a50985060208b0135915080821115612d1f57600080fd5b612d2b8c838d01612c7f565b909850965060408b0135955060608b0135945060808b0135915080821115612d5257600080fd5b50612d5f8b828c01612c7f565b999c989b5096995094979396929594505050565b80356001600160a01b0381168114612d8a57600080fd5b919050565b600080600060408486031215612da457600080fd5b83356001600160401b03811115612dba57600080fd5b612dc686828701612c7f565b9094509250612dd9905060208501612d73565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612e1a57612e1a612de2565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612e4857612e48612de2565b604052919050565b60006001600160401b03821115612e6957612e69612de2565b50601f01601f191660200190565b6000612e8a612e8584612e50565b612e20565b9050828152838383011115612e9e57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612ec657600080fd5b6105c783833560208501612e77565b600080600060608486031215612eea57600080fd5b83356001600160401b03811115612f0057600080fd5b612f0c86828701612eb5565b935050612f1b60208501612d73565b9150604084013590509250925092565b600080600060608486031215612f4057600080fd5b83356001600160401b0380821115612f5757600080fd5b612f6387838801612eb5565b94506020860135915080821115612f7957600080fd5b50612f8686828701612eb5565b925050604084013590509250925092565b60005b83811015612fb2578181015183820152602001612f9a565b83811115612fc1576000848401525b50505050565b60008151808452612fdf816020860160208601612f97565b601f01601f19169290920160200192915050565b60008151604084526130086040850182612fc7565b60208481015186830387830152805180845290820193509091600091908301905b808310156130495784518252938301936001929092019190830190613029565b509695505050505050565b6020815281516020820152600060208301516040808401526128206060840182612ff3565b6000806020838503121561308c57600080fd5b82356001600160401b038111156130a257600080fd5b6130ae85828601612c7f565b90969095509350505050565b6020815281516020820152600060208301516040808401526128206060840182612fc7565b6001600160a01b0391909116815260200190565b6000806040838503121561310657600080fd5b61310f83612d73565b915060208301356001600160401b0381111561312a57600080fd5b8301601f8101851361313b57600080fd5b61314a85823560208401612e77565b9150509250929050565b602081526000825160e06020840152613171610100840182612fc7565b90506020840151601f198085840301604086015261318f8383612fc7565b925060408601519150808584030160608601526131ac8383612fc7565b92506060860151608086015260808601519150808584030160a08601526131d38383612fc7565b925060a086015160c086015260c08601519150808584030160e0860152506131fb8282612ff3565b95945050505050565b600082601f83011261321557600080fd5b813560206001600160401b0382111561323057613230612de2565b8160051b61323f828201612e20565b928352848101820192828101908785111561325957600080fd5b83870192505b848310156132785782358252918301919083019061325f565b979650505050505050565b60008060006060848603121561329857600080fd5b83356001600160401b03808211156132af57600080fd5b6132bb87838801612eb5565b94506020860135935060408601359150808211156132d857600080fd5b90850190604082880312156132ec57600080fd5b6132f4612df8565b82358281111561330357600080fd5b61330f89828601612eb5565b82525060208301358281111561332457600080fd5b61333089828601613204565b6020830152508093505050509250925092565b6020815260006105c76020830184612ff3565b60008060008060008060006080888a03121561337157600080fd5b87356001600160401b038082111561338857600080fd5b6133948b838c01612c7f565b909950975060208a01359150808211156133ad57600080fd5b6133b98b838c01612c7f565b909750955060408a0135945060608a01359150808211156133d957600080fd5b506133e68a828b01612c7f565b989b979a50959850939692959293505050565b60006020828403121561340b57600080fd5b6105c782612d73565b6000806040838503121561342757600080fd5b82356001600160401b038082111561343e57600080fd5b61344a86838701612eb5565b9350602085013591508082111561346057600080fd5b5061314a85828601613204565b6000806000806080858703121561348357600080fd5b8435935060208501356001600160401b038111156134a057600080fd5b6134ac87828801612eb5565b9350506134bb60408601612d73565b9396929550929360600135925050565b8183823760009101908152919050565b6020815260006105c76020830184612fc7565b60008251613500818460208701612f97565b9190910192915050565b600181811c9082168061351e57607f821691505b6020821081141561199857634e487b7160e01b600052602260045260246000fd5b60006020828403121561355157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008282101561358057613580613558565b500390565b6000821982111561359857613598613558565b500190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156135c7576135c7613558565b5060010190565b60006001600160ff1b03818413828413808216868404861116156135f4576135f4613558565b600160ff1b600087128281168783058912161561361357613613613558565b6000871292508782058712848416161561362f5761362f613558565b8785058712818416161561364557613645613558565b505050929093029392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b608081526000613690608083018789613653565b82810360208401526136a28187612fc7565b905084604084015282810360608401526136bc8185612fc7565b98975050505050505050565b6040815260006136dc604083018587613653565b82810360208401526136ee8185612fc7565b9695505050505050565b60006020828403121561370a57600080fd5b815180151581146105c757600080fd5b60006020828403121561372c57600080fd5b81516001600160401b0381111561374257600080fd5b8201601f8101841361375357600080fd5b8051613761612e8582612e50565b81815285602083850101111561377657600080fd5b6131fb826020830160208601612f97565b6001600160a01b03851681526080602082018190526000906137ab90830186612fc7565b6040830194909452506060015292915050565b634e487b7160e01b600052601260045260246000fd5b6000826137e3576137e36137be565b500690565b600060ff821660ff84168082101561380257613802613558565b90039392505050565b600060ff821660ff84168160ff048111821515161561382c5761382c613558565b029392505050565b600060ff821660ff84168060ff0382111561385157613851613558565b019392505050565b600082613868576138686137be565b500490565b6000835161387f818460208801612f97565b835190830190613893818360208801612f97565b01949350505050565b600181815b808511156138d75781600019048211156138bd576138bd613558565b808516156138ca57918102915b93841c93908002906138a1565b509250929050565b6000826138ee575060016105ca565b816138fb575060006105ca565b8160018114613911576002811461391b57613937565b60019150506105ca565b60ff84111561392c5761392c613558565b50506001821b6105ca565b5060208310610133831016604e8410600b841016171561395a575081810a6105ca565b613964838361389c565b806000190482111561382c5761382c613558565b60006105c783836138df565b600081600019048311821515161561399e5761399e613558565b50029056fea2646970667358221220ed7327df934937a1036abc49b63aaa76f0474a07e2fdf842dd4c4c32c4497c0464736f6c634300080c0033"; + +type BMCServiceConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BMCServiceConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BMCService__factory extends ContractFactory { + constructor(...args: BMCServiceConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): BMCService { + return super.attach(address) as BMCService; + } + override connect(signer: Signer): BMCService__factory { + return super.connect(signer) as BMCService__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BMCServiceInterface { + return new utils.Interface(_abi) as BMCServiceInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BMCService { + return new Contract(address, _abi, signerOrProvider) as BMCService; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/index.ts b/test/typechain-types/factories/solidity/contracts/bmc/index.ts new file mode 100644 index 00000000..0722ae84 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; +export { BMCManagement__factory } from "./BMCManagement__factory"; +export { BMCPeriphery__factory } from "./BMCPeriphery__factory"; +export { BMCService__factory } from "./BMCService__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IBMCManagement__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IBMCManagement__factory.ts new file mode 100644 index 00000000..d2ff847f --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IBMCManagement__factory.ts @@ -0,0 +1,394 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IBMCManagement, + IBMCManagementInterface, +} from "../../../../../solidity/contracts/bmc/interfaces/IBMCManagement"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "addLink", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "addRelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "addRoute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "addService", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "addVerifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + internalType: "string", + name: "_feeNetwork", + type: "string", + }, + { + internalType: "uint256[]", + name: "_feeValues", + type: "uint256[]", + }, + ], + name: "dropMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getFeeHandler", + outputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "_dst", + type: "string[]", + }, + ], + name: "getFeeTable", + outputs: [ + { + internalType: "uint256[][]", + name: "_feeTable", + type: "uint256[][]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getLinks", + outputs: [ + { + internalType: "string[]", + name: "_links", + type: "string[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "getRelays", + outputs: [ + { + internalType: "address[]", + name: "_relays", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRoutes", + outputs: [ + { + components: [ + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "next", + type: "string", + }, + ], + internalType: "struct Types.Route[]", + name: "_routes", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getServices", + outputs: [ + { + components: [ + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + internalType: "struct Types.Service[]", + name: "_servicers", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVerifiers", + outputs: [ + { + components: [ + { + internalType: "string", + name: "net", + type: "string", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + internalType: "struct Types.Verifier[]", + name: "_verifiers", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "removeLink", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "removeRelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + ], + name: "removeRoute", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_svc", + type: "string", + }, + ], + name: "removeService", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + ], + name: "removeVerifier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setFeeHandler", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string[]", + name: "_dst", + type: "string[]", + }, + { + internalType: "uint256[][]", + name: "_value", + type: "uint256[][]", + }, + ], + name: "setFeeTable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IBMCManagement__factory { + static readonly abi = _abi; + static createInterface(): IBMCManagementInterface { + return new utils.Interface(_abi) as IBMCManagementInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IBMCManagement { + return new Contract(address, _abi, signerOrProvider) as IBMCManagement; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IBMCPeriphery__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IBMCPeriphery__factory.ts new file mode 100644 index 00000000..c995343d --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IBMCPeriphery__factory.ts @@ -0,0 +1,397 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IBMCPeriphery, + IBMCPeripheryInterface, +} from "../../../../../solidity/contracts/bmc/interfaces/IBMCPeriphery"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_src", + type: "string", + }, + { + indexed: true, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_next", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_event", + type: "string", + }, + ], + name: "BTPEvent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: true, + internalType: "string", + name: "_network", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "_receiver", + type: "string", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + ], + name: "ClaimReward", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: true, + internalType: "string", + name: "_network", + type: "string", + }, + { + indexed: false, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + indexed: false, + internalType: "uint256", + name: "_result", + type: "uint256", + }, + ], + name: "ClaimRewardResult", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_next", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "Message", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_prev", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "_ecode", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "_emsg", + type: "string", + }, + ], + name: "MessageDropped", + type: "event", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "string", + name: "_receiver", + type: "string", + }, + ], + name: "claimReward", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getBtpAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bool", + name: "_response", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "_fee", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkSn", + outputs: [ + { + internalType: "int256", + name: "", + type: "int256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "getReward", + outputs: [ + { + internalType: "uint256", + name: "_reward", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "getStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "rxSeq", + type: "uint256", + }, + { + internalType: "uint256", + name: "txSeq", + type: "uint256", + }, + { + components: [ + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + internalType: "bytes", + name: "extra", + type: "bytes", + }, + ], + internalType: "struct IBMV.VerifierStatus", + name: "verifier", + type: "tuple", + }, + { + internalType: "uint256", + name: "currentHeight", + type: "uint256", + }, + ], + internalType: "struct Types.LinkStatus", + name: "_status", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleRelayMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "sendMessage", + outputs: [ + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + ], + stateMutability: "payable", + type: "function", + }, +] as const; + +export class IBMCPeriphery__factory { + static readonly abi = _abi; + static createInterface(): IBMCPeripheryInterface { + return new utils.Interface(_abi) as IBMCPeripheryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IBMCPeriphery { + return new Contract(address, _abi, signerOrProvider) as IBMCPeriphery; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCManagement__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCManagement__factory.ts new file mode 100644 index 00000000..f971d45d --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCManagement__factory.ts @@ -0,0 +1,191 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ICCManagement, + ICCManagementInterface, +} from "../../../../../solidity/contracts/bmc/interfaces/ICCManagement"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_reachable", + type: "string", + }, + ], + name: "addReachable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bool", + name: "_response", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "_fee", + type: "uint256", + }, + { + internalType: "uint256[]", + name: "_values", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + ], + name: "getHop", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_svc", + type: "string", + }, + ], + name: "getService", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + ], + name: "getVerifier", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "isLinkRelay", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_reachable", + type: "string", + }, + ], + name: "removeReachable", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_dst", + type: "string", + }, + ], + name: "resolveNext", + outputs: [ + { + internalType: "string", + name: "_next", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class ICCManagement__factory { + static readonly abi = _abi; + static createInterface(): ICCManagementInterface { + return new utils.Interface(_abi) as ICCManagementInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICCManagement { + return new Contract(address, _abi, signerOrProvider) as ICCManagement; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCPeriphery__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCPeriphery__factory.ts new file mode 100644 index 00000000..c0fad7c0 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCPeriphery__factory.ts @@ -0,0 +1,157 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ICCPeriphery, + ICCPeripheryInterface, +} from "../../../../../solidity/contracts/bmc/interfaces/ICCPeriphery"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_link", + type: "string", + }, + ], + name: "clearSeq", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + components: [ + { + internalType: "string", + name: "src", + type: "string", + }, + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "int256", + name: "sn", + type: "int256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "feeInfo", + type: "tuple", + }, + ], + internalType: "struct Types.BTPMessage", + name: "_msg", + type: "tuple", + }, + ], + name: "dropMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + internalType: "uint256", + name: "_result", + type: "uint256", + }, + ], + name: "emitClaimRewardResult", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_next", + type: "string", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "sendInternal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class ICCPeriphery__factory { + static readonly abi = _abi; + static createInterface(): ICCPeripheryInterface { + return new utils.Interface(_abi) as ICCPeripheryInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICCPeriphery { + return new Contract(address, _abi, signerOrProvider) as ICCPeriphery; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCService__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCService__factory.ts new file mode 100644 index 00000000..6d3e7da7 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/ICCService__factory.ts @@ -0,0 +1,371 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ICCService, + ICCServiceInterface, +} from "../../../../../solidity/contracts/bmc/interfaces/ICCService"; + +const _abi = [ + { + inputs: [ + { + internalType: "int256", + name: "_nsn", + type: "int256", + }, + { + internalType: "string", + name: "_dst", + type: "string", + }, + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "addRequest", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "addReward", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "clearReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_rlp", + type: "bytes", + }, + ], + name: "decodeResponseMessage", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "code", + type: "uint256", + }, + { + internalType: "string", + name: "message", + type: "string", + }, + ], + internalType: "struct Types.ResponseMessage", + name: "", + type: "tuple", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "getReward", + outputs: [ + { + internalType: "uint256", + name: "_reward", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_network", + type: "string", + }, + { + internalType: "uint256[]", + name: "_values", + type: "uint256[]", + }, + ], + name: "handleDropFee", + outputs: [ + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "_feeInfo", + type: "tuple", + }, + ], + name: "handleErrorFee", + outputs: [ + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleFee", + outputs: [ + { + components: [ + { + internalType: "string", + name: "src", + type: "string", + }, + { + internalType: "string", + name: "dst", + type: "string", + }, + { + internalType: "string", + name: "svc", + type: "string", + }, + { + internalType: "int256", + name: "sn", + type: "int256", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "feeInfo", + type: "tuple", + }, + ], + internalType: "struct Types.BTPMessage", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "int256", + name: "_sn", + type: "int256", + }, + ], + name: "removeResponse", + outputs: [ + { + components: [ + { + internalType: "int256", + name: "nsn", + type: "int256", + }, + { + components: [ + { + internalType: "string", + name: "network", + type: "string", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + ], + internalType: "struct Types.FeeInfo", + name: "feeInfo", + type: "tuple", + }, + ], + internalType: "struct Types.Response", + name: "", + type: "tuple", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class ICCService__factory { + static readonly abi = _abi; + static createInterface(): ICCServiceInterface { + return new utils.Interface(_abi) as ICCServiceInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICCService { + return new Contract(address, _abi, signerOrProvider) as ICCService; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IOwnerManager__factory.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IOwnerManager__factory.ts new file mode 100644 index 00000000..147789c6 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/IOwnerManager__factory.ts @@ -0,0 +1,71 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IOwnerManager, + IOwnerManagerInterface, +} from "../../../../../solidity/contracts/bmc/interfaces/IOwnerManager"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "addOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "removeOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IOwnerManager__factory { + static readonly abi = _abi; + static createInterface(): IOwnerManagerInterface { + return new utils.Interface(_abi) as IOwnerManagerInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IOwnerManager { + return new Contract(address, _abi, signerOrProvider) as IOwnerManager; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmc/interfaces/index.ts b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/index.ts new file mode 100644 index 00000000..6f3b8479 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmc/interfaces/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IBMCManagement__factory } from "./IBMCManagement__factory"; +export { IBMCPeriphery__factory } from "./IBMCPeriphery__factory"; +export { ICCManagement__factory } from "./ICCManagement__factory"; +export { ICCPeriphery__factory } from "./ICCPeriphery__factory"; +export { ICCService__factory } from "./ICCService__factory"; +export { IOwnerManager__factory } from "./IOwnerManager__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/bmv-bridge/BMV__factory.ts b/test/typechain-types/factories/solidity/contracts/bmv-bridge/BMV__factory.ts new file mode 100644 index 00000000..b7a277ae --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv-bridge/BMV__factory.ts @@ -0,0 +1,176 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + BMV, + BMVInterface, +} from "../../../../solidity/contracts/bmv-bridge/BMV"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_bmcAddr", + type: "address", + }, + { + internalType: "string", + name: "_netAddr", + type: "string", + }, + { + internalType: "uint256", + name: "_height", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "getConnectedBMC", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + internalType: "bytes", + name: "extra", + type: "bytes", + }, + ], + internalType: "struct IBMV.VerifierStatus", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_bmc", + type: "string", + }, + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "uint256", + name: "_seq", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleRelayMessage", + outputs: [ + { + internalType: "bytes[]", + name: "", + type: "bytes[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x60806040523480156200001157600080fd5b5060405162001de138038062001de183398101604081905262000034916200012d565b600080546001600160a01b0319166001600160a01b03851617905581516200006490600190602085019062000071565b5060025550620002739050565b8280546200007f9062000236565b90600052602060002090601f016020900481019282620000a35760008555620000ee565b82601f10620000be57805160ff1916838001178555620000ee565b82800160010185558215620000ee579182015b82811115620000ee578251825591602001919060010190620000d1565b50620000fc92915062000100565b5090565b5b80821115620000fc576000815560010162000101565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156200014357600080fd5b83516001600160a01b03811681146200015b57600080fd5b602085810151919450906001600160401b03808211156200017b57600080fd5b818701915087601f8301126200019057600080fd5b815181811115620001a557620001a562000117565b604051601f8201601f19908116603f01168101908382118183101715620001d057620001d062000117565b816040528281528a86848701011115620001e957600080fd5b600093505b828410156200020d5784840186015181850187015292850192620001ee565b828411156200021f5760008684830101525b809750505050505050604084015190509250925092565b600181811c908216806200024b57607f821691505b602082108114156200026d57634e487b7160e01b600052602260045260246000fd5b50919050565b611b5e80620002836000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80634e69d5601461004657806355272d2f1461008b578063eb59858d146100ab575b600080fd5b604080518082018252600080825260606020928301528251808401845260025481528351808401855291825291820152905161008291906116c4565b60405180910390f35b61009e610099366004611793565b6100c6565b6040516100829190611855565b6000546040516001600160a01b039091168152602001610082565b60606100d286866103a0565b600086805190602001209050600061011f85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061058992505050565b9050610129611501565b610131611522565b600061013e8960016118cd565b600354909150156101555761015560036000611541565b60005b8451518110156102bd578451805182908110610176576101766118e5565b6020026020010151935060025484604001511015610193576102ab565b604084015160025560005b8460200151518110156102a957846020015181815181106101c1576101c16118e5565b60200260200101519350836000015187146101db57610297565b82846020015110156101ec57610297565b828460200151111561023f57604080518082018252601081526f32363a4e6f7456657269666961626c6560801b6020820152905162461bcd60e51b815261023691906004016118fb565b60405180910390fd5b6040840151600380546001810182556000919091528151610288927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9092019160200190611562565b50826102938161190e565b9350505b806102a18161190e565b91505061019e565b505b806102b58161190e565b915050610158565b506003805480602002602001604051908101604052809291908181526020016000905b8282101561038c5783829060005260206000200180546102ff90611929565b80601f016020809104026020016040519081016040528092919081815260200182805461032b90611929565b80156103785780601f1061034d57610100808354040283529160200191610378565b820191906000526020600020905b81548152906001019060200180831161035b57829003601f168201915b5050505050815260200190600101906102e0565b505050509550505050505095945050505050565b6104456103ac826106e9565b600180546103b990611929565b80601f01602080910402602001604051908101604052809291908181526020018280546103e590611929565b80156104325780601f1061040757610100808354040283529160200191610432565b820191906000526020600020905b81548152906001019060200180831161041557829003601f168201915b505050505061070590919063ffffffff16565b60405180604001604052806012815260200171191a9d24b73b30b634b2283932bb20b2323960711b8152509061048e5760405162461bcd60e51b815260040161023691906118fb565b5060005460408051808201909152600f81526e0c8d4e955b985d5d1a1bdc9a5e9959608a1b6020820152906001600160a01b031633146104e15760405162461bcd60e51b815260040161023691906118fb565b5060006104ed8361076c565b600054604080518082019091526011815270191a9d24b73b30b634b22126a1a0b2323960791b60208201529193506001600160a01b031691506105319083906107a8565b6001600160a01b03161460405180604001604052806011815260200170191a9d24b73b30b634b22126a1a0b2323960791b815250906105835760405162461bcd60e51b815260040161023691906118fb565b50505050565b60408051602081019091526060815260006105ab6105a684610a8b565b610ab1565b905060606105d2826000815181106105c5576105c56118e5565b6020026020010151610bee565b51156106d4576105fb826000815181106105ee576105ee6118e5565b6020026020010151610ab1565b516001600160401b03811115610613576106136116f1565b60405190808252806020026020018201604052801561064c57816020015b610639611501565b8152602001906001900390816106315790505b50905060005b610668836000815181106105ee576105ee6118e5565b518110156106d2576106a261069d61068c856000815181106105ee576105ee6118e5565b83815181106105c5576105c56118e5565b610cc7565b8282815181106106b4576106b46118e5565b602002602001018190525080806106ca9061190e565b915050610652565b505b60408051602081019091529081529392505050565b60606106ff8260066106fa85610e4c565b611020565b92915050565b600081604051602001610718919061195e565b604051602081830303815290604052805190602001208360405160200161073f919061195e565b604051602081830303815290604052805190602001201415610763575060016106ff565b50600092915050565b606080600061077a84610e4c565b905061078884600683611020565b61079e856107978460016118cd565b8751611020565b9250925050915091565b81516000908390602a1480156107ec5750600360fc1b6001600160f81b031916816000815181106107db576107db6118e5565b01602001516001600160f81b031916145b80156108265750600f60fb1b6001600160f81b03191681600181518110610815576108156118e5565b01602001516001600160f81b031916145b83906108455760405162461bcd60e51b815260040161023691906118fb565b5060408051601480825281830190925260009160208201818036833701905050905060008080805b60288110156109dc57856108828260026118cd565b81518110610892576108926118e5565b016020015160f81c9350600160308510156108ab575060005b8460ff1660391080156108c1575060418560ff16105b156108ca575060005b8460ff1660461080156108e0575060618560ff16105b156108e9575060005b8460ff16606610156108f9575060005b80610918578860405162461bcd60e51b815260040161023691906118fb565b60418560ff16101561092d5760309250610947565b8460ff16604610156109425760579250610947565b603792505b610952600283611990565b6109675761096083866119a4565b93506109c9565b61097183866119a4565b61097c8560106119c7565b61098691906119f0565b60f81b866002610997600186611a15565b6109a19190611a2c565b815181106109b1576109b16118e5565b60200101906001600160f81b031916908160001a9053505b50806109d48161190e565b91505061086d565b506000846040516020016109f0919061195e565b60408051601f198184030181529190526014810151975090506001600160a01b038716610a7f5760025b8651811015610a7d57868181518110610a3557610a356118e5565b60209101015189906001600160f81b031916600360fc1b14610a6a5760405162461bcd60e51b815260040161023691906118fb565b5080610a758161190e565b915050610a1a565b505b50505050505092915050565b610a936115e6565b50604080518082019091528151815260209182019181019190915290565b6060610abc826110ef565b610af95760405162461bcd60e51b815260206004820152600e60248201526d135d5cdd0818994818481b1a5cdd60921b6044820152606401610236565b6000610b0483611128565b90506000816001600160401b03811115610b2057610b206116f1565b604051908082528060200260200182016040528015610b5957816020015b610b466115e6565b815260200190600190039081610b3e5790505b5090506000610b6b85602001516111ab565b8560200151610b7a91906118cd565b90506000805b84811015610be357610b9183611233565b9150604051806040016040528083815260200184815250848281518110610bba57610bba6118e5565b6020908102919091010152610bcf82846118cd565b925080610bdb8161190e565b915050610b80565b509195945050505050565b8051606090610c305760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b6044820152606401610236565b6000610c3f83602001516111ab565b90506000818460000151610c539190611a15565b90506000816001600160401b03811115610c6f57610c6f6116f1565b6040519080825280601f01601f191660200182016040528015610c99576020820181803683370190505b5090506000816020019050610cbe848760200151610cb791906118cd565b82856112dc565b50949350505050565b610ccf611501565b6000610cdd6105a684610a8b565b90506000610d026105a6610cfd846001815181106105c5576105c56118e5565b610a8b565b516001600160401b03811115610d1a57610d1a6116f1565b604051908082528060200260200182016040528015610d5357816020015b610d40611522565b815260200190600190039081610d385790505b50905060005b610d756105a6610cfd856001815181106105c5576105c56118e5565b51811015610df257610dc2610dbd610d9f6105a6610cfd876001815181106105c5576105c56118e5565b8381518110610db057610db06118e5565b602002602001015161135c565b6113d4565b828281518110610dd457610dd46118e5565b60200260200101819052508080610dea9061190e565b915050610d59565b506040518060600160405280610e2184600081518110610e1457610e146118e5565b602002602001015161144f565b8152602001828152602001610e4284600281518110610e1457610e146118e5565b9052949350505050565b600081815b6006811015610f1657604051806040016040528060068152602001656274703a2f2f60d01b8152508181518110610e8a57610e8a6118e5565b602001015160f81c60f81b6001600160f81b031916828281518110610eb157610eb16118e5565b01602001516001600160f81b03191614610f04576040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b815261023691906004016118fb565b80610f0e8161190e565b915050610e51565b8151811015610fe1576040805180820190915260018152602f60f81b60209091018190528251839083908110610f4e57610f4e6118e5565b01602001516001600160f81b0319161415610fcf57600681118015610f7f575060018251610f7c9190611a15565b81105b60405180604001604052806011815260200170696e76616c69644254504164647265737360781b81525090610fc75760405162461bcd60e51b815260040161023691906118fb565b509392505050565b80610fd98161190e565b915050610f16565b6040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b815261023691906004016118fb565b606083600061102f8585611a15565b6001600160401b03811115611046576110466116f1565b6040519080825280601f01601f191660200182016040528015611070576020820181803683370190505b5090508460005b82518110156110e357838261108b8161190e565b93508151811061109d5761109d6118e5565b602001015160f81c60f81b8382815181106110ba576110ba6118e5565b60200101906001600160f81b031916908160001a905350806110db8161190e565b915050611077565b50909695505050505050565b805160009061110057506000919050565b6020820151805160001a9060c082101561111e575060009392505050565b5060019392505050565b805160009061113957506000919050565b60008061114984602001516111ab565b846020015161115891906118cd565b905060008460000151856020015161117091906118cd565b90505b808210156111a25761118482611233565b61118e90836118cd565b91508261119a8161190e565b935050611173565b50909392505050565b8051600090811a60808110156111c45750600092915050565b60b88110806111df575060c081108015906111df575060f881105b156111ed5750600192915050565b60c081101561122157611202600160b86119a4565b61120f9060ff1682611a15565b61121a9060016118cd565b9392505050565b611202600160f86119a4565b50919050565b80516000908190811a608081101561124e57600191506112d5565b60b881101561127457611262608082611a15565b61126d9060016118cd565b91506112d5565b60c08110156112a15760b78103600185019450806020036101000a855104600182018101935050506112d5565b60f88110156112b55761126260c082611a15565b60f78103600185019450806020036101000a855104600182018101935050505b5092915050565b806112e657505050565b6020811061131e57825182526112fd6020846118cd565b925061130a6020836118cd565b9150611317602082611a15565b90506112e6565b80156113575760006001611333836020611a15565b61133f90610100611b1c565b6113499190611a15565b845184518216911916178352505b505050565b6060600082600001516001600160401b0381111561137c5761137c6116f1565b6040519080825280601f01601f1916602001820160405280156113a6576020820181803683370190505b5090508051600014156113b95792915050565b60008160200190506112d584602001518286600001516112dc565b6113dc611522565b60006113ea6105a684610a8b565b9050604051806060016040528061140d83600081518110610e1457610e146118e5565b60001b815260200161142b83600181518110610e1457610e146118e5565b8152602001611446836002815181106105c5576105c56118e5565b90529392505050565b80516000901580159061146457508151602110155b6114a65760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103ab4b73a10373ab6b132b960691b6044820152606401610236565b60006114b583602001516111ab565b905060008184600001516114c99190611a15565b90506000808386602001516114de91906118cd565b9050805191506020831015610cbe57506020919091036101000a90049392505050565b60405180606001604052806000815260200160608152602001600081525090565b6040805160608082018352600080835260208301529181019190915290565b508054600082559060005260206000209081019061155f9190611600565b50565b82805461156e90611929565b90600052602060002090601f01602090048101928261159057600085556115d6565b82601f106115a957805160ff19168380011785556115d6565b828001600101855582156115d6579182015b828111156115d65782518255916020019190600101906115bb565b506115e292915061161d565b5090565b604051806040016040528060008152602001600081525090565b808211156115e25760006116148282611632565b50600101611600565b5b808211156115e2576000815560010161161e565b50805461163e90611929565b6000825580601f1061164e575050565b601f01602090049060005260206000209081019061155f919061161d565b60005b8381101561168757818101518382015260200161166f565b838111156105835750506000910152565b600081518084526116b081602086016020860161166c565b601f01601f19169290920160200192915050565b6020815281516020820152600060208301516040808401526116e96060840182611698565b949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261171857600080fd5b81356001600160401b0380821115611732576117326116f1565b604051601f8301601f19908116603f0116810190828211818310171561175a5761175a6116f1565b8160405283815286602085880101111561177357600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806000608086880312156117ab57600080fd5b85356001600160401b03808211156117c257600080fd5b6117ce89838a01611707565b965060208801359150808211156117e457600080fd5b6117f089838a01611707565b955060408801359450606088013591508082111561180d57600080fd5b818801915088601f83011261182157600080fd5b81358181111561183057600080fd5b89602082850101111561184257600080fd5b9699959850939650602001949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156118aa57603f19888603018452611898858351611698565b9450928501929085019060010161187c565b5092979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156118e0576118e06118b7565b500190565b634e487b7160e01b600052603260045260246000fd5b60208152600061121a6020830184611698565b6000600019821415611922576119226118b7565b5060010190565b600181811c9082168061193d57607f821691505b6020821081141561122d57634e487b7160e01b600052602260045260246000fd5b6000825161197081846020870161166c565b9190910192915050565b634e487b7160e01b600052601260045260246000fd5b60008261199f5761199f61197a565b500690565b600060ff821660ff8416808210156119be576119be6118b7565b90039392505050565b600060ff821660ff84168160ff04811182151516156119e8576119e86118b7565b029392505050565b600060ff821660ff84168060ff03821115611a0d57611a0d6118b7565b019392505050565b600082821015611a2757611a276118b7565b500390565b600082611a3b57611a3b61197a565b500490565b600181815b80851115611a7b578160001904821115611a6157611a616118b7565b80851615611a6e57918102915b93841c9390800290611a45565b509250929050565b600082611a92575060016106ff565b81611a9f575060006106ff565b8160018114611ab55760028114611abf57611adb565b60019150506106ff565b60ff841115611ad057611ad06118b7565b50506001821b6106ff565b5060208310610133831016604e8410600b8410161715611afe575081810a6106ff565b611b088383611a40565b80600019048211156119e8576119e86118b7565b600061121a8383611a8356fea2646970667358221220d33017a539b5ba1143f3b5cddc1c6f5bf0bd5f96c939d9610732a9339e5a475a64736f6c634300080c0033"; + +type BMVConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BMVConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BMV__factory extends ContractFactory { + constructor(...args: BMVConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + _bmcAddr: PromiseOrValue, + _netAddr: PromiseOrValue, + _height: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + _bmcAddr, + _netAddr, + _height, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + _bmcAddr: PromiseOrValue, + _netAddr: PromiseOrValue, + _height: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction( + _bmcAddr, + _netAddr, + _height, + overrides || {} + ); + } + override attach(address: string): BMV { + return super.attach(address) as BMV; + } + override connect(signer: Signer): BMV__factory { + return super.connect(signer) as BMV__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BMVInterface { + return new utils.Interface(_abi) as BMVInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): BMV { + return new Contract(address, _abi, signerOrProvider) as BMV; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmv-bridge/index.ts b/test/typechain-types/factories/solidity/contracts/bmv-bridge/index.ts new file mode 100644 index 00000000..909e0ff3 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv-bridge/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { BMV__factory } from "./BMV__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/bmv/BtpMessageVerifierV2__factory.ts b/test/typechain-types/factories/solidity/contracts/bmv/BtpMessageVerifierV2__factory.ts new file mode 100644 index 00000000..dbbfe96a --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv/BtpMessageVerifierV2__factory.ts @@ -0,0 +1,347 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BytesLike, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + BtpMessageVerifierV2, + BtpMessageVerifierV2Interface, +} from "../../../../solidity/contracts/bmv/BtpMessageVerifierV2"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_bmc", + type: "address", + }, + { + internalType: "string", + name: "_srcNetworkId", + type: "string", + }, + { + internalType: "bytes32", + name: "_networkSectionHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_messageRoot", + type: "bytes32", + }, + { + internalType: "uint256[7]", + name: "_integers", + type: "uint256[7]", + }, + { + internalType: "address[]", + name: "_validators", + type: "address[]", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "getHeight", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMessageCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMessageRoot", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkSectionHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkTypeId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNextMessageSn", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRemainMessageCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSrcNetworkId", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + internalType: "bytes", + name: "extra", + type: "bytes", + }, + ], + internalType: "struct IBMV.VerifierStatus", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "nth", + type: "uint256", + }, + ], + name: "getValidators", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getValidatorsCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleRelayMessage", + outputs: [ + { + internalType: "bytes[]", + name: "messages", + type: "bytes[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x6101006040523480156200001257600080fd5b5060405162003fe038038062003fe0833981016040819052620000359162000395565b6001600160a01b0386166080528451620000579060009060208801906200012c565b50815160a05260208083015160e090815260408085015160c0528051918201815286825291810185905260608085015192820192909252608080850151928201929092529081018360056020020151815260200183600660078110620000c157620000c1620004b8565b602090810291909101518252908101839052815160019081558282015160025560408301516003556060830151600455608083015160055560a083015160065560c0830151805191926200011c9260079290910190620001bb565b509050505050505050506200050b565b8280546200013a90620004ce565b90600052602060002090601f0160209004810192826200015e5760008555620001a9565b82601f106200017957805160ff1916838001178555620001a9565b82800160010185558215620001a9579182015b82811115620001a95782518255916020019190600101906200018c565b50620001b792915062000213565b5090565b828054828255906000526020600020908101928215620001a9579160200282015b82811115620001a957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620001dc565b5b80821115620001b7576000815560010162000214565b80516001600160a01b03811681146200024257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000288576200028862000247565b604052919050565b600082601f830112620002a257600080fd5b60405160e081016001600160401b0381118282101715620002c757620002c762000247565b6040528060e0840185811115620002dd57600080fd5b845b81811015620002f9578051835260209283019201620002df565b509195945050505050565b600082601f8301126200031657600080fd5b815160206001600160401b0382111562000334576200033462000247565b8160051b620003458282016200025d565b92835284810182019282810190878511156200036057600080fd5b83870192505b848310156200038a576200037a836200022a565b8252918301919083019062000366565b979650505050505050565b6000806000806000806101808789031215620003b057600080fd5b620003bb876200022a565b602088810151919750906001600160401b0380821115620003db57600080fd5b818a0191508a601f830112620003f057600080fd5b81518181111562000405576200040562000247565b62000419601f8201601f191685016200025d565b8181528c858386010111156200042e57600080fd5b60005b828110156200044e57848101860151828201870152850162000431565b82811115620004605760008684840101525b50809950505060408a0151965060608a01519550620004838b60808c0162000290565b94506101608a01519250808311156200049b57600080fd5b5050620004ab89828a0162000304565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680620004e357607f821691505b602082108114156200050557634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051613a8762000559600039600081816102ca015261054d01526000818160e501526106be0152600081816101900152610de0015260006103bf0152613a876000f3fe608060405234801561001057600080fd5b50600436106100af5760003560e01c806319efb11d146100b457806327498240146100cb578063287e3fd4146100d357806331933916146100db57806339c5f3fc146100e35780633eecc1cf14610109578063471f40fb1461011e5780634e69d5601461014957806355272d2f1461015e578063934f16271461017e5780639b49f78f14610186578063be5e0f571461018e578063d179a196146101b4575b600080fd5b6003545b6040519081526020015b60405180910390f35b6007546100b8565b6001546100b8565b6004546100b8565b7f00000000000000000000000000000000000000000000000000000000000000006100b8565b6101116101bc565b6040516100c291906133d7565b61013161012c3660046133ea565b61024e565b6040516001600160a01b0390911681526020016100c2565b610151610281565b6040516100c29190613403565b61017161016c3660046134d3565b61038b565b6040516100c29190613578565b6100b86109d5565b6006546100b8565b7f00000000000000000000000000000000000000000000000000000000000000006100b8565b6002546100b8565b6060600080546101cb906135da565b80601f01602080910402602001604051908101604052809291908181526020018280546101f7906135da565b80156102445780601f1061021957610100808354040283529160200191610244565b820191906000526020600020905b81548152906001019060200180831161022757829003601f168201915b5050505050905090565b6000600160060182815481106102665761026661360f565b6000918252602090912001546001600160a01b031692915050565b60408051808201825260008082526060602083015282516003808252608082019094529192909190816020015b60608152602001906001900390816102ae5790505090506102ee7f00000000000000000000000000000000000000000000000000000000000000006109f9565b816000815181106103015761030161360f565b602002602001018190525061031a6001600401546109f9565b8160018151811061032d5761032d61360f565b60200260200101819052506103466001600301546109f9565b816002815181106103595761035961360f565b60200260200101819052506040518060400160405280600160020154815260200161038383610a12565b905292915050565b60408051808201909152600f81526e0c8d4e955b985d5d1a1bdc9a5e9959608a1b6020820152606090336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104065760405162461bcd60e51b81526004016103fd91906133d7565b60405180910390fd5b5083600061041382610a56565b509050806040516020016104279190613625565b60405160208183030381529060405280519060200120600060405160200161044f9190613641565b60405160208183030381529060405280519060200120146040518060400160405280600f81526020016e0c8d4e955b985d5d1a1bdc9a5e9959608a1b815250906104ac5760405162461bcd60e51b81526004016103fd91906133d7565b506040805160e081018252600180548252600254602080840191909152600354838501526004546060840152600554608084015260065460a08401526007805485518184028101840190965280865260009560c08601939092919083018282801561054057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610522575b50505050508152505090507f00000000000000000000000000000000000000000000000000000000000000008661057791906136f3565b8160a00151146040518060400160405280600e81526020016d32353a496e76616c69644172677360901b815250906105c25760405162461bcd60e51b81526004016103fd91906133d7565b50600081608001518260a001516105d991906136f3565b82606001516105e891906136f3565b905060006105f587610ac0565b905060005b81518110156109785760018282815181106106175761061761360f565b602002602001015160000151141561085257826000146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b815250604051602001610660919061370a565b6040516020818303038152906040529061068d5760405162461bcd60e51b81526004016103fd91906133d7565b506000806106b38484815181106106a6576106a661360f565b6020026020010151610c30565b9150915081608001517f0000000000000000000000000000000000000000000000000000000000000000146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b8152506040516020016107119190613744565b6040516020818303038152906040529061073e5760405162461bcd60e51b81526004016103fd91906133d7565b508160e001518660000151146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b81525060405160200161077d9190613773565b604051602081830303815290604052906107aa5760405162461bcd60e51b81526004016103fd91906133d7565b506107bd8660a001518360a00151610cbb565b6107cc82828860c00151610d4d565b815160408701526107dc82610f1f565b865260c0820151156107f45761014082015160c08701525b6101208201511561084b5760008660600151876080015161081591906137a2565b9050610825818460a00151610cbb565b50610120820151602087015260a082015160808701526101008201516060870181905294505b5050610966565b60028282815181106108665761086661360f565b602002602001015160000151141561096657600061089c83838151811061088f5761088f61360f565b60200260200101516110b8565b90506000806108aa83611133565b915091508660200151821480156108c45750866060015181145b6040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b8152506040516020016108f791906137ba565b604051602081830303815290604052906109245760405162461bcd60e51b81526004016103fd91906133d7565b506109338a8460200151611269565b99508260200151518661094691906136f3565b95508260200151518760a00181815161095f91906137a2565b9052505050505b80610970816137f2565b9150506105fa565b5060408301511561098c5760408301516003555b82516001556020808401516002556060840151600455608084015160055560a084015160065560c084015180516109c7926007920190613217565b505050505050949350505050565b6005546006546000916109e7916136f3565b6004546109f491906136f3565b905090565b6060610a0c610a078361139a565b61144f565b92915050565b60606000610a1f836114be565b9050610a2d815160c06115e0565b81604051602001610a3f92919061380d565b604051602081830303815290604052915050919050565b6060806000610a7e84604051806040016040528060018152602001602f60f81b815250611797565b905080600281518110610a9357610a9361360f565b602002602001015181600381518110610aae57610aae61360f565b60200260200101519250925050915091565b60606000610acd8361198a565b90506000610ada826119b0565b9050610aff81600081518110610af257610af261360f565b60200260200101516119b0565b9050600081516001600160401b03811115610b1c57610b1c613428565b604051908082528060200260200182016040528015610b6257816020015b604080518082019091526000815260606020820152815260200190600190039081610b3a5790505b50905060005b8251811015610c27576000610b88848381518110610af257610af261360f565b9050610bad81600081518110610ba057610ba061360f565b6020026020010151611aed565b838381518110610bbf57610bbf61360f565b60200260200101516000018181525050610bf281600181518110610be557610be561360f565b6020026020010151611b9f565b838381518110610c0457610c0461360f565b602002602001015160200181905250508080610c1f906137f2565b915050610b68565b50949350505050565b610c3861327c565b610c406132e1565b8251600114610ca55760405162461bcd60e51b815260206004820152602b60248201527f52656c61794d6573736167653a20537570706f7274206f6e6c7920426c6f636b60448201526a557064617465207479706560a81b60648201526084016103fd565b610cb28360200151611c6f565b91509150915091565b80821015610d0157604080518082018252601081526f32363a4e6f7456657269666961626c6560801b6020820152905162461bcd60e51b81526103fd91906004016133d7565b80821115610d495760408051808201825260128152710c8dce905b1c9958591e55995c9a599a595960721b6020820152905162461bcd60e51b81526103fd91906004016133d7565b5050565b600080610e0f60008054610d60906135da565b80601f0160208091040260200160405190810160405280929190818152602001828054610d8c906135da565b8015610dd95780601f10610dae57610100808354040283529160200191610dd9565b820191906000526020600020905b815481529060010190602001808311610dbc57829003601f168201915b50505050507f000000000000000000000000000000000000000000000000000000000000000087611ce09092919063ffffffff16565b905060005b84515181108015610e2d5750610e2b845184611e0c565b155b15610eab57838181518110610e4457610e4461360f565b60200260200101516001600160a01b0316610e7c8387600001518481518110610e6f57610e6f61360f565b6020026020010151611e2c565b6001600160a01b03161415610e995782610e95816137f2565b9350505b80610ea3816137f2565b915050610e14565b50610eb7835183611e0c565b6040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b815250604051602001610eea919061383c565b60405160208183030381529060405290610f175760405162461bcd60e51b81526004016103fd91906133d7565b505050505050565b60408051600580825260c08201909252600091829190816020015b6060815260200190600190039081610f3a579050509050610f5e83608001516109f9565b81600081518110610f7157610f7161360f565b6020026020010181905250610fa48360c00151610f8f576000610f92565b60015b60ff1660018560a00151901b176109f9565b81600181518110610fb757610fb761360f565b602090810291909101015260e0830151610fd857610fd3611ec6565b611006565b6110068360e00151604051602001610ff291815260200190565b60405160208183030381529060405261144f565b816002815181106110195761101961360f565b60200260200101819052506110328361010001516109f9565b816003815181106110455761104561360f565b602090810291909101015261012083015161106757611062611ec6565b611082565b611082836101200151604051602001610ff291815260200190565b816004815181106110955761109561360f565b60200260200101819052506110a981610a12565b80519060200120915050919050565b6110c06132f4565b81516002146111265760405162461bcd60e51b815260206004820152602c60248201527f52656c61794d6573736167653a20537570706f7274206f6e6c79204d6573736160448201526b676550726f6f66207479706560a01b60648201526084016103fd565b610a0c8260200151611ee1565b600080600061114184612020565b9050600061115282606001516121e9565b90508060015b81156111775780611168816137f2565b915050600182901c9150611158565b6000805b82811015611239576040860151935083915060005b848110156112265760006111a388612233565b9050836111af8161386b565b94506111be90508360016137a2565b8151118015906111ce5750600084115b156112095760006111de89612233565b90506111ea82826122a9565b9150846111f68161386b565b9550508280611204906137f2565b935050505b61121388826123d8565b508061121e816137f2565b915050611190565b5080611231816137f2565b91505061117b565b50846040015160011461124e5761124e613882565b61125785612233565b60400151989397509295505050505050565b6060600082511161127b575081610a0c565b8251825184919061128c90826137a2565b6001600160401b038111156112a3576112a3613428565b6040519080825280602002602001820160405280156112d657816020015b60608152602001906001900390816112c15790505b50945060005b8181101561132e578281815181106112f6576112f661360f565b60200260200101518682815181106113105761131061360f565b60200260200101819052508080611326906137f2565b9150506112dc565b5060005b84518110156113905784818151811061134d5761134d61360f565b602002602001015186828461136291906137a2565b815181106113725761137261360f565b60200260200101819052508080611388906137f2565b915050611332565b5093949350505050565b6060816113d55760015b6040519080825280601f01601f1916602001820160405280156113ce576020820181803683370190505b5092915050565b608060015b602081101561141657818410156113fd576113f58482612453565b949350505050565b60089190911b908061140e816137f2565b9150506113da565b508083101561143057604080516020810185905201610a3f565b6040516000602082015260218101849052604101610a3f565b50919050565b6060808251600114801561147d57506080836000815181106114735761147361360f565b016020015160f81c105b15611489575081610a0c565b611495835160806115e0565b836040516020016114a792919061380d565b604051602081830303815290604052905092915050565b60608151600014156114d15760006113a4565b6000805b8351811015611518578381815181106114f0576114f061360f565b6020026020010151518261150491906137a2565b915080611510816137f2565b9150506114d5565b6000826001600160401b0381111561153257611532613428565b6040519080825280601f01601f19166020018201604052801561155c576020820181803683370190505b50600092509050602081015b8551831015610c275760008684815181106115855761158561360f565b6020026020010151905060006020820190506115a3838284516124bf565b8785815181106115b5576115b561360f565b602002602001015151836115c991906137a2565b9250505082806115d8906137f2565b935050611568565b606080603884101561164a576040805160018082528183019092529060208201818036833701905050905061161583856137a2565b601f1a60f81b8160008151811061162e5761162e61360f565b60200101906001600160f81b031916908160001a905350611790565b600060015b61165981876138ae565b1561167f5781611668816137f2565b92506116789050610100826138c2565b905061164f565b61168a8260016137a2565b6001600160401b038111156116a1576116a1613428565b6040519080825280601f01601f1916602001820160405280156116cb576020820181803683370190505b5092506116d885836137a2565b6116e39060376137a2565b601f1a60f81b836000815181106116fc576116fc61360f565b60200101906001600160f81b031916908160001a905350600190505b81811161178d5761010061172c82846136f3565b611738906101006139c5565b61174290886138ae565b61174c91906139d1565b601f1a60f81b8382815181106117645761176461360f565b60200101906001600160f81b031916908160001a90535080611785816137f2565b915050611718565b50505b9392505050565b606082600060015b600183516117ad91906136f3565b8210156117f45760006117c187878561253b565b90508060001914156117d357506117f4565b816117dd816137f2565b92506117ec90508160016137a2565b92505061179f565b806001600160401b0381111561180c5761180c613428565b60405190808252806020026020018201604052801561183f57816020015b606081526020019060019003908161182a5790505b50935060009150600090505b6001835161185991906136f3565b82101561198157600061186d87878561253b565b905080600019141561187d575082515b600061188984836136f3565b6001600160401b038111156118a0576118a0613428565b6040519080825280601f01601f1916602001820160405280156118ca576020820181803683370190505b509050806000855b84811015611941578781815181106118ec576118ec61360f565b01602001516001600160f81b0319168383611906816137f2565b9450815181106119185761191861360f565b60200101906001600160f81b031916908160001a90535080611939816137f2565b9150506118d2565b5061194d8460016137a2565b955081888661195b816137f2565b97508151811061196d5761196d61360f565b60200260200101819052505050505061184b565b50505092915050565b611992613315565b50604080518082019091528151815260209182019181019190915290565b60606119bb826125d7565b6119f85760405162461bcd60e51b815260206004820152600e60248201526d135d5cdd0818994818481b1a5cdd60921b60448201526064016103fd565b6000611a0383612610565b90506000816001600160401b03811115611a1f57611a1f613428565b604051908082528060200260200182016040528015611a5857816020015b611a45613315565b815260200190600190039081611a3d5790505b5090506000611a6a8560200151612693565b8560200151611a7991906137a2565b90506000805b84811015611ae257611a908361270e565b9150604051806040016040528083815260200184815250848281518110611ab957611ab961360f565b6020908102919091010152611ace82846137a2565b925080611ada816137f2565b915050611a7f565b509195945050505050565b805160009015801590611b0257508151602110155b611b445760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103ab4b73a10373ab6b132b960691b60448201526064016103fd565b6000611b538360200151612693565b90506000818460000151611b6791906136f3565b9050600080838660200151611b7c91906137a2565b9050805191506020831015610c2757506020919091036101000a90049392505050565b8051606090611be15760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b60448201526064016103fd565b6000611bf08360200151612693565b90506000818460000151611c0491906136f3565b90506000816001600160401b03811115611c2057611c20613428565b6040519080825280601f01601f191660200182016040528015611c4a576020820181803683370190505b5090506000816020019050610c27848760200151611c6891906137a2565b82856127b2565b611c7761327c565b611c7f6132e1565b6000611c8a8461198a565b90506000611c97826119b0565b9050611cb7611cb282600081518110610be557610be561360f565b612832565b611cd5611cd083600181518110610be557610be561360f565b612aaf565b935093505050915091565b60408051600580825260c08201909252600091829190816020015b6060815260200190600190039081611cfb579050509050611d1b84612be2565b81600081518110611d2e57611d2e61360f565b6020026020010181905250611d42836109f9565b81600181518110611d5557611d5561360f565b6020026020010181905250611d6d85600001516109f9565b81600281518110611d8057611d8061360f565b6020026020010181905250611d9885602001516109f9565b81600381518110611dab57611dab61360f565b6020026020010181905250611dd4611dc286612bed565b604051602001610ff291815260200190565b81600481518110611de757611de761360f565b6020026020010181905250611dfb81610a12565b805190602001209150509392505050565b6000611e198360026138c2565b611e248360036138c2565b119392505050565b60008151604114611e3f57506000610a0c565b6000806000611e4d85612c76565b91945092509050600186611e6283601b6139e5565b6040805160008152602081018083529390935260ff90911690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611eb1573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805180820190915260028152601f60fb1b602082015290565b611ee96132f4565b6000611ef48361198a565b90506000611f01826119b0565b90506000611f1b82600181518110610af257610af261360f565b90506000611f3d611f3884600081518110610af257610af261360f565b612ca5565b90506000611f5a611f3885600281518110610af257610af261360f565b9050600083516001600160401b03811115611f7757611f77613428565b604051908082528060200260200182016040528015611faa57816020015b6060815260200190600190039081611f955790505b50905060005b8451811015611ffe57611fce858281518110610be557610be561360f565b828281518110611fe057611fe061360f565b60200260200101819052508080611ff6906137f2565b915050611fb0565b5060408051606081018252938452602084019190915282015295945050505050565b61204b6040518060800160405280600081526020016000815260200160008152602001606081525090565b6000604051806080016040528060008152602001600081526020016000815260200184604001515185602001515186600001515161208991906137a2565b61209391906137a2565b6001600160401b038111156120aa576120aa613428565b6040519080825280602002602001820160405280156120e357816020015b6120d061332f565b8152602001906001900390816120c85790505b509052905060005b835151811015612137576121258460000151828151811061210e5761210e61360f565b6020026020010151836123d890919063ffffffff16565b8061212f816137f2565b9150506120eb565b5060005b8360200151518110156121ad5761219b604051806060016040528060018152602001600181526020018660200151848151811061217a5761217a61360f565b602002602001015180519060200120815250836123d890919063ffffffff16565b806121a5816137f2565b91505061213b565b5060005b8360400151518110156113ce576121d78460400151828151811061210e5761210e61360f565b806121e1816137f2565b9150506121b1565b6000805b8251811015611449578281815181106122085761220861360f565b6020026020010151602001518261221f91906137a2565b91508061222b816137f2565b9150506121ed565b61223b61332f565b600082604001511161224f5761224f613882565b6060820151825183612260826137f2565b9052815181106122725761227261360f565b6020026020010151905081604001805180919061228e9061386b565b905250606082015151825114156122a457600082525b919050565b6122b161332f565b82516122bf906001906136f3565b6001901b8360200151146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b8152509061230a5760405162461bcd60e51b81526004016103fd91906133d7565b508160200151836020015110156040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b815250906123585760405162461bcd60e51b81526004016103fd91906133d7565b5060405180606001604052808460000151600161237591906137a2565b81526020018360200151856020015161238e91906137a2565b8152602001846040015184604001516040516020016123b7929190918252602082015260400190565b60405160208183030381529060405280519060200120815250905092915050565b8160600151518260400151106123f0576123f0613882565b6060820151602083018051839291612407826137f2565b9052815181106124195761241961360f565b602090810291909101015260408201805190612434826137f2565b90525060608201515160208301511415610d4957600060208301525050565b60606000826001600160401b0381111561246f5761246f613428565b6040519080825280601f01601f191660200182016040528015612499576020820181803683370190505b50905060208101836020035b602081101561178d5785811a8253600191820191016124a5565b602081106124f757815183526124d66020846137a2565b92506124e36020836137a2565b91506124f06020826136f3565b90506124bf565b600019811561253557600161250d8360206136f3565b612519906101006139c5565b61252391906136f3565b83518551821682199190911617855290505b50505050565b81516000908490849060011461255357612553613882565b835b82518110156125c957816000815181106125715761257161360f565b602001015160f81c60f81b6001600160f81b0319168382815181106125985761259861360f565b01602001516001600160f81b03191614156125b7579250611790915050565b806125c1816137f2565b915050612555565b506000199695505050505050565b80516000906125e857506000919050565b6020820151805160001a9060c0821015612606575060009392505050565b5060019392505050565b805160009061262157506000919050565b6000806126318460200151612693565b846020015161264091906137a2565b905060008460000151856020015161265891906137a2565b90505b8082101561268a5761266c8261270e565b61267690836137a2565b915082612682816137f2565b93505061265b565b50909392505050565b8051600090811a60808110156126ac5750600092915050565b60b88110806126c7575060c081108015906126c7575060f881105b156126d55750600192915050565b60c0811015612702576126ea600160b8613a0a565b6126f79060ff16826136f3565b6117909060016137a2565b6126ea600160f8613a0a565b80516000908190811a608081101561272957600191506113ce565b60b881101561274f5761273d6080826136f3565b6127489060016137a2565b91506113ce565b60c081101561277c5760b78103600185019450806020036101000a855104600182018101935050506113ce565b60f88110156127905761273d60c0826136f3565b60019390930151602084900360f7016101000a900490920160f5190192915050565b806127bc57505050565b602081106127f457825182526127d36020846137a2565b92506127e06020836137a2565b91506127ed6020826136f3565b90506127bc565b801561282d57600060016128098360206136f3565b612815906101006139c5565b61281f91906136f3565b845184518216911916178352505b505050565b61283a61327c565b60006128458361198a565b90506000612852826119b0565b905060405180610160016040528061287683600081518110610ba057610ba061360f565b815260200161289183600181518110610ba057610ba061360f565b81526020016128ac83600281518110610be557610be561360f565b6128b590613a2d565b815260200160006128df846003815181106128d2576128d261360f565b6020026020010151612dc5565b1161291b576040805160008082526020820190925290612915565b612902613353565b8152602001906001900390816128fa5790505b50612946565b612946612941846003815181106129345761293461360f565b6020026020010151612de0565b612e58565b815260200161296183600481518110610ba057610ba061360f565b8152602001600161297e84600581518110610ba057610ba061360f565b901c815260200161299b83600581518110610ba057610ba061360f565b6001166001141515815260200160006129c0846006815181106128d2576128d261360f565b116129cc5760006129eb565b6129e283600681518110610be557610be561360f565b6129eb90613a2d565b8152602001612a0683600781518110610ba057610ba061360f565b81526020016000612a23846008815181106128d2576128d261360f565b11612a2f576000612a4e565b612a4583600881518110610be557610be561360f565b612a4e90613a2d565b8152602001612a6983600581518110610ba057610ba061360f565b600116600114612a8757604080516000815260208101909152612aa5565b612aa5612aa084600981518110610be557610be561360f565b612f64565b9052949350505050565b612ab76132e1565b6000612ac28361198a565b90506000612acf826119b0565b905080600081518110612ae457612ae461360f565b60200260200101519150612af7826119b0565b9050600081516001600160401b03811115612b1457612b14613428565b604051908082528060200260200182016040528015612b4757816020015b6060815260200190600190039081612b325790505b50905060005b8251811015612bcb576000612b6d8483815181106128d2576128d261360f565b11612b8657604080516000815260208101909152612b9b565b612b9b838281518110610be557610be561360f565b828281518110612bad57612bad61360f565b60200260200101819052508080612bc3906137f2565b915050612b4d565b506040805160208101909152908152949350505050565b6060610a0c8261144f565b60408051600280825260608201909252600091829190816020015b6060815260200190600190039081612c08579050509050612c398360400151604051602001610ff291815260200190565b81600081518110612c4c57612c4c61360f565b6020026020010181905250612c63611dc284613049565b816001815181106110955761109561360f565b60008060008351604114612c8957600080fd5b50505060208101516040820151606083015160001a9193909250565b606080600083516001600160401b03811115612cc357612cc3613428565b604051908082528060200260200182016040528015612cfc57816020015b612ce961332f565b815260200190600190039081612ce15790505b50905060005b8451811015612dbd57612d20858281518110610af257610af261360f565b92506040518060600160405280612d4b612d4686600081518110610ba057610ba061360f565b613061565b8152602001612d6685600081518110610ba057610ba061360f565b8152602001612d8185600181518110610be557610be561360f565b612d8a90613a2d565b815250828281518110612d9f57612d9f61360f565b60200260200101819052508080612db5906137f2565b915050612d02565b509392505050565b6000612dd48260200151612693565b8251610a0c91906136f3565b6060600082600001516001600160401b03811115612e0057612e00613428565b6040519080825280601f01601f191660200182016040528015612e2a576020820181803683370190505b509050805160001415612e3d5792915050565b60008160200190506113ce84602001518286600001516127b2565b60606000612e6d612e688461198a565b6119b0565b9050600081516001600160401b03811115612e8a57612e8a613428565b604051908082528060200260200182016040528015612ec357816020015b612eb0613353565b815260200190600190039081612ea85790505b50905060005b8251811015612dbd576000612ee9848381518110610af257610af261360f565b90506040518060400160405280612f0c83600081518110610ba057610ba061360f565b8152602001612f2783600181518110610be557610be561360f565b612f3090613a2d565b815250838381518110612f4557612f4561360f565b6020026020010181905250508080612f5c906137f2565b915050612ec9565b60606000612f718361198a565b90506000612f7e826119b0565b9050612f9681600081518110610af257610af261360f565b9050600081516001600160401b03811115612fb357612fb3613428565b604051908082528060200260200182016040528015612fdc578160200160208202803683370190505b50905060005b8251811015610c275761300d8382815181106130005761300061360f565b602002602001015161307b565b82828151811061301f5761301f61360f565b6001600160a01b039092166020928302919091019091015280613041816137f2565b915050612fe2565b6000610a0c61305783610f1f565b83606001516130ce565b600160001982015b8015611449576001918201911c613069565b80516000906015146130c55760405162461bcd60e51b81526020600482015260136024820152724d7573742068617665206c656e67746820323160681b60448201526064016103fd565b610a0c82611aed565b600082815b8351811015612dbd578381815181106130ee576130ee61360f565b6020026020010151600001516000146131855760408051602081018490520160405160208183030381529060405284828151811061312e5761312e61360f565b60200260200101516020015160405160200161314c91815260200190565b60408051601f198184030181529082905261316a929160200161380d565b60405160208183030381529060405280519060200120613203565b8381815181106131975761319761360f565b6020026020010151602001516040516020016131b591815260200190565b60408051601f1981840301815282825260208301859052910160408051601f19818403018152908290526131ec929160200161380d565b604051602081830303815290604052805190602001205b91508061320f816137f2565b9150506130d3565b82805482825590600052602060002090810192821561326c579160200282015b8281111561326c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613237565b5061327892915061336a565b5090565b604051806101600160405280600081526020016000815260200160008019168152602001606081526020016000815260200160008152602001600015158152602001600080191681526020016000815260200160008019168152602001606081525090565b6040518060200160405280606081525090565b60405180606001604052806060815260200160608152602001606081525090565b604051806040016040528060008152602001600081525090565b60405180606001604052806000815260200160008152602001600080191681525090565b604080518082019091526000808252602082015290565b5b80821115613278576000815560010161336b565b60005b8381101561339a578181015183820152602001613382565b838111156125355750506000910152565b600081518084526133c381602086016020860161337f565b601f01601f19169290920160200192915050565b60208152600061179060208301846133ab565b6000602082840312156133fc57600080fd5b5035919050565b6020815281516020820152600060208301516040808401526113f560608401826133ab565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561345857613458613428565b604051601f8501601f19908116603f0116810190828211818310171561348057613480613428565b8160405280935085815286868601111561349957600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126134c457600080fd5b6117908383356020850161343e565b600080600080608085870312156134e957600080fd5b84356001600160401b038082111561350057600080fd5b61350c888389016134b3565b9550602087013591508082111561352257600080fd5b61352e888389016134b3565b945060408701359350606087013591508082111561354b57600080fd5b508501601f8101871361355d57600080fd5b61356c8782356020840161343e565b91505092959194509250565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156135cd57603f198886030184526135bb8583516133ab565b9450928501929085019060010161359f565b5092979650505050505050565b600181811c908216806135ee57607f821691505b6020821081141561144957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000825161363781846020870161337f565b9190910192915050565b600080835481600182811c91508083168061365d57607f831692505b602080841082141561367d57634e487b7160e01b86526022600452602486fd5b81801561369157600181146136a2576136cf565b60ff198616895284890196506136cf565b60008a81526020902060005b868110156136c75781548b8201529085019083016136ae565b505084890196505b509498975050505050505050565b634e487b7160e01b600052601160045260246000fd5b600082821015613705576137056136dd565b500390565b6000825161371c81846020870161337f565b753a556e6578706563746564426c6f636b55706461746560501b920191825250601601919050565b6000825161375681846020870161337f565b6a0e925b9d985b1a5913925160aa1b920191825250600b01919050565b6000825161378581846020870161337f565b6a07492dcecc2d8d2c89ca6960ab1b920191825250600b01919050565b600082198211156137b5576137b56136dd565b500190565b600082516137cc81846020870161337f565b731d24b73b30b634b226b2b9b9b0b3b2a83937b7b360611b920191825250601401919050565b6000600019821415613806576138066136dd565b5060010190565b6000835161381f81846020880161337f565b83519083019061383381836020880161337f565b01949350505050565b6000825161384e81846020870161337f565b6a3a4c61636b51756f72756d60a81b920191825250600b01919050565b60008161387a5761387a6136dd565b506000190190565b634e487b7160e01b600052600160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6000826138bd576138bd613898565b500490565b60008160001904831182151516156138dc576138dc6136dd565b500290565b600181815b8085111561391c578160001904821115613902576139026136dd565b8085161561390f57918102915b93841c93908002906138e6565b509250929050565b60008261393357506001610a0c565b8161394057506000610a0c565b816001811461395657600281146139605761397c565b6001915050610a0c565b60ff841115613971576139716136dd565b50506001821b610a0c565b5060208310610133831016604e8410600b841016171561399f575081810a610a0c565b6139a983836138e1565b80600019048211156139bd576139bd6136dd565b029392505050565b60006117908383613924565b6000826139e0576139e0613898565b500690565b600060ff821660ff84168060ff03821115613a0257613a026136dd565b019392505050565b600060ff821660ff841680821015613a2457613a246136dd565b90039392505050565b805160208083015191908110156114495760001960209190910360031b1b1691905056fea2646970667358221220e9d228b8751daaa95a434244691df45283af94ea7a9df1e1d49ca135a101592864736f6c634300080c0033"; + +type BtpMessageVerifierV2ConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BtpMessageVerifierV2ConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BtpMessageVerifierV2__factory extends ContractFactory { + constructor(...args: BtpMessageVerifierV2ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + _bmc: PromiseOrValue, + _srcNetworkId: PromiseOrValue, + _networkSectionHash: PromiseOrValue, + _messageRoot: PromiseOrValue, + _integers: PromiseOrValue[], + _validators: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + _bmc, + _srcNetworkId, + _networkSectionHash, + _messageRoot, + _integers, + _validators, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + _bmc: PromiseOrValue, + _srcNetworkId: PromiseOrValue, + _networkSectionHash: PromiseOrValue, + _messageRoot: PromiseOrValue, + _integers: PromiseOrValue[], + _validators: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction( + _bmc, + _srcNetworkId, + _networkSectionHash, + _messageRoot, + _integers, + _validators, + overrides || {} + ); + } + override attach(address: string): BtpMessageVerifierV2 { + return super.attach(address) as BtpMessageVerifierV2; + } + override connect(signer: Signer): BtpMessageVerifierV2__factory { + return super.connect(signer) as BtpMessageVerifierV2__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BtpMessageVerifierV2Interface { + return new utils.Interface(_abi) as BtpMessageVerifierV2Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BtpMessageVerifierV2 { + return new Contract( + address, + _abi, + signerOrProvider + ) as BtpMessageVerifierV2; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmv/BtpMessageVerifier__factory.ts b/test/typechain-types/factories/solidity/contracts/bmv/BtpMessageVerifier__factory.ts new file mode 100644 index 00000000..416be7d8 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv/BtpMessageVerifier__factory.ts @@ -0,0 +1,334 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + BytesLike, + BigNumberish, + Overrides, +} from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + BtpMessageVerifier, + BtpMessageVerifierInterface, +} from "../../../../solidity/contracts/bmv/BtpMessageVerifier"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_bmc", + type: "address", + }, + { + internalType: "string", + name: "_srcNetworkId", + type: "string", + }, + { + internalType: "uint256", + name: "_networkTypeId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_firstBlockHeader", + type: "bytes", + }, + { + internalType: "uint256", + name: "_sequenceOffset", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "getHeight", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMessageCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getMessageRoot", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkSectionHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNetworkTypeId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getNextMessageSn", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getRemainMessageCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSrcNetworkId", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStatus", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "height", + type: "uint256", + }, + { + internalType: "bytes", + name: "extra", + type: "bytes", + }, + ], + internalType: "struct IBMV.VerifierStatus", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "nth", + type: "uint256", + }, + ], + name: "getValidators", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getValidatorsCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + { + internalType: "string", + name: "_prev", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleRelayMessage", + outputs: [ + { + internalType: "bytes[]", + name: "messages", + type: "bytes[]", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x6101006040523480156200001257600080fd5b50604051620056f9380380620056f983398101604081905262000035916200188f565b6001600160a01b038516608052835162000057906000906020870190620016ad565b5060a083905260e081905260006200007b836200019e602090811b620009f917901c565b9050600081610140015151116040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b81525090620000d45760405162461bcd60e51b8152600401620000cb919062001945565b60405180910390fd5b50806080015160c081815250506040518060e0016040528062000102836200053c60201b62000c901760201c565b8152610120830151602080830191909152835160408084019190915261010085015160608085019190915260a0808701805160808088019190915290518287015261014088015160c09687015286516001908155878601516002559387015160035591860151600455908501516005558401516006559183015180516200018e9260079201906200173c565b5090505050505050505062001c1f565b62000207604051806101600160405280600081526020016000815260200160008019168152602001606081526020016000815260200160008152602001600015158152602001600080191681526020016000815260200160008019168152602001606081525090565b60006200021f836200074960201b62000e291760201c565b9050600062000239826200077660201b62000e4f1760201c565b90506040518061016001604052806200027a836000815181106200026157620002616200197a565b6020026020010151620008df60201b62000f8c1760201c565b815260200162000299836001815181106200026157620002616200197a565b8152602001620002d183600281518110620002b857620002b86200197a565b6020026020010151620009ad60201b620010401760201c565b620002dc9062001990565b815260200160006200031684600381518110620002fd57620002fd6200197a565b602002602001015162000a9160201b620011101760201c565b11620003625760408051600080825260208201909252906200035b565b6040805180820190915260008082526020820152815260200190600190039081620003335790505b506200039f565b6200039f62000399846003815181106200038057620003806200197a565b602002602001015162000abc60201b620011311760201c565b62000b3f565b8152602001620003be836004815181106200026157620002616200197a565b81526020016001620003df846005815181106200026157620002616200197a565b901c815260200162000400836005815181106200026157620002616200197a565b6001166001141515815260200160006200042984600681518110620002fd57620002fd6200197a565b11620004375760006200045c565b6200045183600681518110620002b857620002b86200197a565b6200045c9062001990565b81526020016200047b836007815181106200026157620002616200197a565b815260200160006200049c84600881518110620002fd57620002fd6200197a565b11620004aa576000620004cf565b620004c483600881518110620002b857620002b86200197a565b620004cf9062001990565b8152602001620004ee836005815181106200026157620002616200197a565b6001166001146200050e5760408051600081526020810190915262000532565b620005326200052c84600981518110620002b857620002b86200197a565b62000cac565b9052949350505050565b60408051600580825260c08201909252600091829190816020015b60608152602001906001900390816200055757905050905062000589836080015162000dca60201b620011b01760201c565b816000815181106200059f576200059f6200197a565b6020026020010181905250620005e18360c00151620005c0576000620005c3565b60015b60ff1660018560a00151901b1762000dca60201b620011b01760201c565b81600181518110620005f757620005f76200197a565b602090810291909101015260e083015162000627576200062162000de160201b620011c31760201c565b62000663565b620006638360e001516040516020016200064391815260200190565b60405160208183030381529060405262000dfc60201b620011de1760201c565b816002815181106200067957620006796200197a565b60200260200101819052506200069f83610100015162000dca60201b620011b01760201c565b81600381518110620006b557620006b56200197a565b6020908102919091010152610120830151620006e657620006e062000de160201b620011c31760201c565b62000703565b620007038361012001516040516020016200064391815260200190565b816004815181106200071957620007196200197a565b60200260200101819052506200073a8162000e7660201b6200124d1760201c565b80519060200120915050919050565b60408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6060620007838262000ec6565b620007c25760405162461bcd60e51b815260206004820152600e60248201526d135d5cdd0818994818481b1a5cdd60921b6044820152606401620000cb565b6000620007cf8362000f01565b90506000816001600160401b03811115620007ee57620007ee620017ab565b6040519080825280602002602001820160405280156200083557816020015b60408051808201909152600080825260208201528152602001906001900390816200080d5790505b50905060006200084f856020015162000f9960201b60201c565b8560200151620008609190620019cb565b90506000805b84811015620008d4576200087a836200102e565b9150604051806040016040528083815260200184815250848281518110620008a657620008a66200197a565b6020908102919091010152620008bd8284620019cb565b925080620008cb81620019e6565b91505062000866565b509195945050505050565b805160009015801590620008f557508151602110155b620009435760405162461bcd60e51b815260206004820152601360248201527f496e76616c69642075696e74206e756d626572000000000000000000000000006044820152606401620000cb565b60006200095a836020015162000f9960201b60201c565b9050600081846000015162000970919062001a04565b9050600080838660200151620009879190620019cb565b9050805191506020831015620009a457826020036101000a820491505b50949350505050565b8051606090620009f15760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b6044820152606401620000cb565b600062000a08836020015162000f9960201b60201c565b9050600081846000015162000a1e919062001a04565b90506000816001600160401b0381111562000a3d5762000a3d620017ab565b6040519080825280601f01601f19166020018201604052801562000a68576020820181803683370190505b5090506000816020019050620009a484876020015162000a899190620019cb565b8285620010df565b600062000aa8826020015162000f9960201b60201c565b825162000ab6919062001a04565b92915050565b6060600082600001516001600160401b0381111562000adf5762000adf620017ab565b6040519080825280601f01601f19166020018201604052801562000b0a576020820181803683370190505b50905080516000141562000b1e5792915050565b60208381015184519183019162000b3891908390620010df565b5092915050565b6060600062000b6e62000b5d846200074960201b62000e291760201c565b6200077660201b62000e4f1760201c565b9050600081516001600160401b0381111562000b8e5762000b8e620017ab565b60405190808252806020026020018201604052801562000bd557816020015b604080518082019091526000808252602082015281526020019060019003908162000bad5790505b50905060005b825181101562000ca457600062000c1984838151811062000c005762000c006200197a565b60200260200101516200077660201b62000e4f1760201c565b9050604051806040016040528062000c40836000815181106200026157620002616200197a565b815260200162000c5f83600181518110620002b857620002b86200197a565b62000c6a9062001990565b81525083838151811062000c825762000c826200197a565b602002602001018190525050808062000c9b90620019e6565b91505062000bdb565b509392505050565b6060600062000cc6836200074960201b62000e291760201c565b9050600062000ce0826200077660201b62000e4f1760201c565b905062000cfc8160008151811062000c005762000c006200197a565b9050600081516001600160401b0381111562000d1c5762000d1c620017ab565b60405190808252806020026020018201604052801562000d46578160200160208202803683370190505b50905060005b8251811015620009a45762000d8883828151811062000d6f5762000d6f6200197a565b60200260200101516200116f60201b620012911760201c565b82828151811062000d9d5762000d9d6200197a565b6001600160a01b03909216602092830291909101909101528062000dc181620019e6565b91505062000d4c565b606062000ab662000ddb83620011d0565b62000dfc565b6040805180820190915260028152601f60fb1b602082015290565b6060808251600114801562000e2e575060808360008151811062000e245762000e246200197a565b016020015160f81c105b1562000e3c57508162000ab6565b825162000e4b9060806200128a565b8360405160200162000e5f92919062001a1e565b604051602081830303815290604052905092915050565b6060600062000e85836200146b565b905062000e9b815160c06200128a60201b60201c565b8160405160200162000eaf92919062001a1e565b604051602081830303815290604052915050919050565b805160009062000ed857506000919050565b6020820151805160001a9060c082101562000ef7575060009392505050565b5060019392505050565b805160009062000f1357506000919050565b60008062000f2b846020015162000f9960201b60201c565b846020015162000f3c9190620019cb565b905060008460000151856020015162000f569190620019cb565b90505b8082101562000f905762000f6d826200102e565b62000f799083620019cb565b91508262000f8781620019e6565b93505062000f59565b50909392505050565b8051600090811a608081101562000fb35750600092915050565b60b881108062000fd0575060c0811080159062000fd0575060f881105b1562000fdf5750600192915050565b60c08110156200101a5762000ff7600160b862001a51565b620010069060ff168262001a04565b62001013906001620019cb565b9392505050565b62000ff7600160f862001a51565b50919050565b80516000908190811a60808110156200104b576001915062000b38565b60b881101562001077576200106260808262001a04565b6200106f906001620019cb565b915062000b38565b60c0811015620010a65760b78103600185019450806020036101000a8551046001820181019350505062000b38565b60f8811015620010bd576200106260c08262001a04565b60019390930151602084900360f7016101000a900490920160f5190192915050565b80620010ea57505050565b602081106200112a578251825262001104602084620019cb565b925062001113602083620019cb565b91506200112260208262001a04565b9050620010ea565b80156200116a57600060016200114283602062001a04565b620011509061010062001b74565b6200115c919062001a04565b845184518216911916178352505b505050565b8051600090601514620011c55760405162461bcd60e51b815260206004820152601360248201527f4d7573742068617665206c656e677468203231000000000000000000000000006044820152606401620000cb565b62000ab682620008df565b6060816200120c5760015b6040519080825280601f01601f19166020018201604052801562000b38576020820181803683370190505092915050565b608060015b60208110156200125457818410156200123857620012308482620015b0565b949350505050565b60089190911b90806200124b81620019e6565b91505062001211565b5080831015620012705760408051602081018590520162000eaf565b604051600060208201526021810184905260410162000eaf565b6060806038841015620012fb5760408051600180825281830190925290602082018180368337019050509050620012c28385620019cb565b601f1a60f81b81600081518110620012de57620012de6200197a565b60200101906001600160f81b031916908160001a90535062001013565b600060015b6200130c818762001b98565b156200133857816200131e81620019e6565b92506200133090506101008262001baf565b905062001300565b62001345826001620019cb565b6001600160401b038111156200135f576200135f620017ab565b6040519080825280601f01601f1916602001820160405280156200138a576020820181803683370190505b509250620013998583620019cb565b620013a6906037620019cb565b601f1a60f81b83600081518110620013c257620013c26200197a565b60200101906001600160f81b031916908160001a905350600190505b8181116200146257610100620013f5828462001a04565b620014039061010062001b74565b6200140f908862001b98565b6200141b919062001bd1565b601f1a60f81b8382815181106200143657620014366200197a565b60200101906001600160f81b031916908160001a905350806200145981620019e6565b915050620013de565b50509392505050565b606081516000141562001480576000620011db565b6000805b8351811015620014d057838181518110620014a357620014a36200197a565b60200260200101515182620014b99190620019cb565b915080620014c781620019e6565b91505062001484565b6000826001600160401b03811115620014ed57620014ed620017ab565b6040519080825280601f01601f19166020018201604052801562001518576020820181803683370190505b50600092509050602081015b8551831015620009a45760008684815181106200154557620015456200197a565b6020026020010151905060006020820190506200156b838284516200162260201b60201c565b8785815181106200158057620015806200197a565b60200260200101515183620015969190620019cb565b925050508280620015a790620019e6565b93505062001524565b60606000826001600160401b03811115620015cf57620015cf620017ab565b6040519080825280601f01601f191660200182016040528015620015fa576020820181803683370190505b50905060208101836020035b6020811015620014625785811a82536001918201910162001606565b602081106200166257815183526200163c602084620019cb565b92506200164b602083620019cb565b91506200165a60208262001a04565b905062001622565b6000198115620016a75760016200167b83602062001a04565b620016899061010062001b74565b62001695919062001a04565b83518551821682199190911617855290505b50505050565b828054620016bb9062001be8565b90600052602060002090601f016020900481019282620016df57600085556200172a565b82601f10620016fa57805160ff19168380011785556200172a565b828001600101855582156200172a579182015b828111156200172a5782518255916020019190600101906200170d565b506200173892915062001794565b5090565b8280548282559060005260206000209081019282156200172a579160200282015b828111156200172a57825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906200175d565b5b8082111562001738576000815560010162001795565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620017de578181015183820152602001620017c4565b83811115620016a75750506000910152565b60006001600160401b03808411156200180d576200180d620017ab565b604051601f8501601f19908116603f01168101908282118183101715620018385762001838620017ab565b816040528093508581528686860111156200185257600080fd5b62001862866020830187620017c1565b5050509392505050565b600082601f8301126200187e57600080fd5b6200101383835160208501620017f0565b600080600080600060a08688031215620018a857600080fd5b85516001600160a01b0381168114620018c057600080fd5b60208701519095506001600160401b0380821115620018de57600080fd5b818801915088601f830112620018f357600080fd5b6200190489835160208501620017f0565b95506040880151945060608801519150808211156200192257600080fd5b5062001931888289016200186c565b925050608086015190509295509295909350565b602081526000825180602084015262001966816040850160208701620017c1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b80516020808301519190811015620010285760001960209190910360031b1b16919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115620019e157620019e1620019b5565b500190565b6000600019821415620019fd57620019fd620019b5565b5060010190565b60008282101562001a195762001a19620019b5565b500390565b6000835162001a32818460208801620017c1565b83519083019062001a48818360208801620017c1565b01949350505050565b600060ff821660ff84168082101562001a6e5762001a6e620019b5565b90039392505050565b600181815b8085111562001ab857816000190482111562001a9c5762001a9c620019b5565b8085161562001aaa57918102915b93841c939080029062001a7c565b509250929050565b60008262001ad15750600162000ab6565b8162001ae05750600062000ab6565b816001811462001af9576002811462001b045762001b24565b600191505062000ab6565b60ff84111562001b185762001b18620019b5565b50506001821b62000ab6565b5060208310610133831016604e8410600b841016171562001b49575081810a62000ab6565b62001b55838362001a77565b806000190482111562001b6c5762001b6c620019b5565b029392505050565b600062001013838362001ac0565b634e487b7160e01b600052601260045260246000fd5b60008262001baa5762001baa62001b82565b500490565b600081600019048311821515161562001bcc5762001bcc620019b5565b500290565b60008262001be35762001be362001b82565b500690565b600181811c9082168062001bfd57607f821691505b602082108114156200102857634e487b7160e01b600052602260045260246000fd5b60805160a05160c05160e051613a8c62001c6d600039600081816102ca015261054d01526000818160e501526106be015260008181610190015261164b015260006103bf0152613a8c6000f3fe608060405234801561001057600080fd5b50600436106100af5760003560e01c806319efb11d146100b457806327498240146100cb578063287e3fd4146100d357806331933916146100db57806339c5f3fc146100e35780633eecc1cf14610109578063471f40fb1461011e5780634e69d5601461014957806355272d2f1461015e578063934f16271461017e5780639b49f78f14610186578063be5e0f571461018e578063d179a196146101b4575b600080fd5b6003545b6040519081526020015b60405180910390f35b6007546100b8565b6001546100b8565b6004546100b8565b7f00000000000000000000000000000000000000000000000000000000000000006100b8565b6101116101bc565b6040516100c291906133dc565b61013161012c3660046133ef565b61024e565b6040516001600160a01b0390911681526020016100c2565b610151610281565b6040516100c29190613408565b61017161016c3660046134d8565b61038b565b6040516100c2919061357d565b6100b86109d5565b6006546100b8565b7f00000000000000000000000000000000000000000000000000000000000000006100b8565b6002546100b8565b6060600080546101cb906135df565b80601f01602080910402602001604051908101604052809291908181526020018280546101f7906135df565b80156102445780601f1061021957610100808354040283529160200191610244565b820191906000526020600020905b81548152906001019060200180831161022757829003601f168201915b5050505050905090565b60006001600601828154811061026657610266613614565b6000918252602090912001546001600160a01b031692915050565b60408051808201825260008082526060602083015282516003808252608082019094529192909190816020015b60608152602001906001900390816102ae5790505090506102ee7f00000000000000000000000000000000000000000000000000000000000000006111b0565b8160008151811061030157610301613614565b602002602001018190525061031a6001600401546111b0565b8160018151811061032d5761032d613614565b60200260200101819052506103466001600301546111b0565b8160028151811061035957610359613614565b6020026020010181905250604051806040016040528060016002015481526020016103838361124d565b905292915050565b60408051808201909152600f81526e0c8d4e955b985d5d1a1bdc9a5e9959608a1b6020820152606090336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104065760405162461bcd60e51b81526004016103fd91906133dc565b60405180910390fd5b50836000610413826112e4565b50905080604051602001610427919061362a565b60405160208183030381529060405280519060200120600060405160200161044f9190613646565b60405160208183030381529060405280519060200120146040518060400160405280600f81526020016e0c8d4e955b985d5d1a1bdc9a5e9959608a1b815250906104ac5760405162461bcd60e51b81526004016103fd91906133dc565b506040805160e081018252600180548252600254602080840191909152600354838501526004546060840152600554608084015260065460a08401526007805485518184028101840190965280865260009560c08601939092919083018282801561054057602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610522575b50505050508152505090507f00000000000000000000000000000000000000000000000000000000000000008661057791906136f8565b8160a00151146040518060400160405280600e81526020016d32353a496e76616c69644172677360901b815250906105c25760405162461bcd60e51b81526004016103fd91906133dc565b50600081608001518260a001516105d991906136f8565b82606001516105e891906136f8565b905060006105f58761134e565b905060005b815181101561097857600182828151811061061757610617613614565b602002602001015160000151141561085257826000146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b815250604051602001610660919061370f565b6040516020818303038152906040529061068d5760405162461bcd60e51b81526004016103fd91906133dc565b506000806106b38484815181106106a6576106a6613614565b602002602001015161149b565b9150915081608001517f0000000000000000000000000000000000000000000000000000000000000000146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b8152506040516020016107119190613749565b6040516020818303038152906040529061073e5760405162461bcd60e51b81526004016103fd91906133dc565b508160e001518660000151146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b81525060405160200161077d9190613778565b604051602081830303815290604052906107aa5760405162461bcd60e51b81526004016103fd91906133dc565b506107bd8660a001518360a00151611526565b6107cc82828860c001516115b8565b815160408701526107dc82610c90565b865260c0820151156107f45761014082015160c08701525b6101208201511561084b5760008660600151876080015161081591906137a7565b9050610825818460a00151611526565b50610120820151602087015260a082015160808701526101008201516060870181905294505b5050610966565b600282828151811061086657610866613614565b602002602001015160000151141561096657600061089c83838151811061088f5761088f613614565b602002602001015161178a565b90506000806108aa83611805565b915091508660200151821480156108c45750866060015181145b6040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b8152506040516020016108f791906137bf565b604051602081830303815290604052906109245760405162461bcd60e51b81526004016103fd91906133dc565b506109338a846020015161193b565b99508260200151518661094691906136f8565b95508260200151518760a00181815161095f91906137a7565b9052505050505b80610970816137f7565b9150506105fa565b5060408301511561098c5760408301516003555b82516001556020808401516002556060840151600455608084015160055560a084015160065560c084015180516109c792600792019061321c565b505050505050949350505050565b6005546006546000916109e7916136f8565b6004546109f491906136f8565b905090565b610a01613281565b6000610a0c83610e29565b90506000610a1982610e4f565b9050604051806101600160405280610a4a83600081518110610a3d57610a3d613614565b6020026020010151610f8c565b8152602001610a6583600181518110610a3d57610a3d613614565b8152602001610a8d83600281518110610a8057610a80613614565b6020026020010151611040565b610a9690613812565b81526020016000610ac084600381518110610ab357610ab3613614565b6020026020010151611110565b11610afc576040805160008082526020820190925290610af6565b610ae36132e6565b815260200190600190039081610adb5790505b50610b27565b610b27610b2284600381518110610b1557610b15613614565b6020026020010151611131565b611a6c565b8152602001610b4283600481518110610a3d57610a3d613614565b81526020016001610b5f84600581518110610a3d57610a3d613614565b901c8152602001610b7c83600581518110610a3d57610a3d613614565b600116600114151581526020016000610ba184600681518110610ab357610ab3613614565b11610bad576000610bcc565b610bc383600681518110610a8057610a80613614565b610bcc90613812565b8152602001610be783600781518110610a3d57610a3d613614565b81526020016000610c0484600881518110610ab357610ab3613614565b11610c10576000610c2f565b610c2683600881518110610a8057610a80613614565b610c2f90613812565b8152602001610c4a83600581518110610a3d57610a3d613614565b600116600114610c6857604080516000815260208101909152610c86565b610c86610c8184600981518110610a8057610a80613614565b611b80565b9052949350505050565b60408051600580825260c08201909252600091829190816020015b6060815260200190600190039081610cab579050509050610ccf83608001516111b0565b81600081518110610ce257610ce2613614565b6020026020010181905250610d158360c00151610d00576000610d03565b60015b60ff1660018560a00151901b176111b0565b81600181518110610d2857610d28613614565b602090810291909101015260e0830151610d4957610d446111c3565b610d77565b610d778360e00151604051602001610d6391815260200190565b6040516020818303038152906040526111de565b81600281518110610d8a57610d8a613614565b6020026020010181905250610da38361010001516111b0565b81600381518110610db657610db6613614565b6020908102919091010152610120830151610dd857610dd36111c3565b610df3565b610df3836101200151604051602001610d6391815260200190565b81600481518110610e0657610e06613614565b6020026020010181905250610e1a8161124d565b80519060200120915050919050565b610e316132fd565b50604080518082019091528151815260209182019181019190915290565b6060610e5a82611c65565b610e975760405162461bcd60e51b815260206004820152600e60248201526d135d5cdd0818994818481b1a5cdd60921b60448201526064016103fd565b6000610ea283611c9e565b90506000816001600160401b03811115610ebe57610ebe61342d565b604051908082528060200260200182016040528015610ef757816020015b610ee46132fd565b815260200190600190039081610edc5790505b5090506000610f098560200151611d21565b8560200151610f1891906137a7565b90506000805b84811015610f8157610f2f83611da9565b9150604051806040016040528083815260200184815250848281518110610f5857610f58613614565b6020908102919091010152610f6d82846137a7565b925080610f79816137f7565b915050610f1e565b509195945050505050565b805160009015801590610fa157508151602110155b610fe35760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103ab4b73a10373ab6b132b960691b60448201526064016103fd565b6000610ff28360200151611d21565b9050600081846000015161100691906136f8565b905060008083866020015161101b91906137a7565b905080519150602083101561103757826020036101000a820491505b50949350505050565b80516060906110825760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b60448201526064016103fd565b60006110918360200151611d21565b905060008184600001516110a591906136f8565b90506000816001600160401b038111156110c1576110c161342d565b6040519080825280601f01601f1916602001820160405280156110eb576020820181803683370190505b509050600081602001905061103784876020015161110991906137a7565b8285611e4d565b600061111f8260200151611d21565b825161112b91906136f8565b92915050565b6060600082600001516001600160401b038111156111515761115161342d565b6040519080825280601f01601f19166020018201604052801561117b576020820181803683370190505b50905080516000141561118e5792915050565b60008160200190506111a98460200151828660000151611e4d565b5092915050565b606061112b6111be83611ecd565b6111de565b6040805180820190915260028152601f60fb1b602082015290565b6060808251600114801561120c575060808360008151811061120257611202613614565b016020015160f81c105b1561121857508161112b565b61122483516080611f7b565b83604051602001611236929190613836565b604051602081830303815290604052905092915050565b6060600061125a83612131565b9050611268815160c0611f7b565b8160405160200161127a929190613836565b604051602081830303815290604052915050919050565b80516000906015146112db5760405162461bcd60e51b81526020600482015260136024820152724d7573742068617665206c656e67746820323160681b60448201526064016103fd565b61112b82610f8c565b606080600061130c84604051806040016040528060018152602001602f60f81b815250612253565b90508060028151811061132157611321613614565b60200260200101518160038151811061133c5761133c613614565b60200260200101519250925050915091565b6060600061135b83610e29565b9050600061136882610e4f565b905061138d8160008151811061138057611380613614565b6020026020010151610e4f565b9050600081516001600160401b038111156113aa576113aa61342d565b6040519080825280602002602001820160405280156113f057816020015b6040805180820190915260008152606060208201528152602001906001900390816113c85790505b50905060005b825181101561103757600061141684838151811061138057611380613614565b905061142e81600081518110610a3d57610a3d613614565b83838151811061144057611440613614565b6020026020010151600001818152505061146681600181518110610a8057610a80613614565b83838151811061147857611478613614565b602002602001015160200181905250508080611493906137f7565b9150506113f6565b6114a3613281565b6114ab613317565b82516001146115105760405162461bcd60e51b815260206004820152602b60248201527f52656c61794d6573736167653a20537570706f7274206f6e6c7920426c6f636b60448201526a557064617465207479706560a81b60648201526084016103fd565b61151d8360200151612446565b91509150915091565b8082101561156c57604080518082018252601081526f32363a4e6f7456657269666961626c6560801b6020820152905162461bcd60e51b81526103fd91906004016133dc565b808211156115b45760408051808201825260128152710c8dce905b1c9958591e55995c9a599a595960721b6020820152905162461bcd60e51b81526103fd91906004016133dc565b5050565b60008061167a600080546115cb906135df565b80601f01602080910402602001604051908101604052809291908181526020018280546115f7906135df565b80156116445780601f1061161957610100808354040283529160200191611644565b820191906000526020600020905b81548152906001019060200180831161162757829003601f168201915b50505050507f0000000000000000000000000000000000000000000000000000000000000000876124b79092919063ffffffff16565b905060005b8451518110801561169857506116968451846125e3565b155b15611716578381815181106116af576116af613614565b60200260200101516001600160a01b03166116e783876000015184815181106116da576116da613614565b6020026020010151612603565b6001600160a01b031614156117045782611700816137f7565b9350505b8061170e816137f7565b91505061167f565b506117228351836125e3565b6040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b8152506040516020016117559190613865565b604051602081830303815290604052906117825760405162461bcd60e51b81526004016103fd91906133dc565b505050505050565b61179261332a565b81516002146117f85760405162461bcd60e51b815260206004820152602c60248201527f52656c61794d6573736167653a20537570706f7274206f6e6c79204d6573736160448201526b676550726f6f66207479706560a01b60648201526084016103fd565b61112b826020015161269d565b6000806000611813846127dc565b9050600061182482606001516129a5565b90508060015b8115611849578061183a816137f7565b915050600182901c915061182a565b6000805b8281101561190b576040860151935083915060005b848110156118f8576000611875886129ef565b90508361188181613894565b945061189090508360016137a7565b8151118015906118a05750600084115b156118db5760006118b0896129ef565b90506118bc8282612a65565b9150846118c881613894565b95505082806118d6906137f7565b935050505b6118e58882612b94565b50806118f0816137f7565b915050611862565b5080611903816137f7565b91505061184d565b508460400151600114611920576119206138ab565b611929856129ef565b60400151989397509295505050505050565b6060600082511161194d57508161112b565b8251825184919061195e90826137a7565b6001600160401b038111156119755761197561342d565b6040519080825280602002602001820160405280156119a857816020015b60608152602001906001900390816119935790505b50945060005b81811015611a00578281815181106119c8576119c8613614565b60200260200101518682815181106119e2576119e2613614565b602002602001018190525080806119f8906137f7565b9150506119ae565b5060005b8451811015611a6257848181518110611a1f57611a1f613614565b6020026020010151868284611a3491906137a7565b81518110611a4457611a44613614565b60200260200101819052508080611a5a906137f7565b915050611a04565b5093949350505050565b60606000611a81611a7c84610e29565b610e4f565b9050600081516001600160401b03811115611a9e57611a9e61342d565b604051908082528060200260200182016040528015611ad757816020015b611ac46132e6565b815260200190600190039081611abc5790505b50905060005b8251811015611b78576000611afd84838151811061138057611380613614565b90506040518060400160405280611b2083600081518110610a3d57610a3d613614565b8152602001611b3b83600181518110610a8057610a80613614565b611b4490613812565b815250838381518110611b5957611b59613614565b6020026020010181905250508080611b70906137f7565b915050611add565b509392505050565b60606000611b8d83610e29565b90506000611b9a82610e4f565b9050611bb28160008151811061138057611380613614565b9050600081516001600160401b03811115611bcf57611bcf61342d565b604051908082528060200260200182016040528015611bf8578160200160208202803683370190505b50905060005b825181101561103757611c29838281518110611c1c57611c1c613614565b6020026020010151611291565b828281518110611c3b57611c3b613614565b6001600160a01b039092166020928302919091019091015280611c5d816137f7565b915050611bfe565b8051600090611c7657506000919050565b6020820151805160001a9060c0821015611c94575060009392505050565b5060019392505050565b8051600090611caf57506000919050565b600080611cbf8460200151611d21565b8460200151611cce91906137a7565b9050600084600001518560200151611ce691906137a7565b90505b80821015611d1857611cfa82611da9565b611d0490836137a7565b915082611d10816137f7565b935050611ce9565b50909392505050565b8051600090811a6080811015611d3a5750600092915050565b60b8811080611d55575060c08110801590611d55575060f881105b15611d635750600192915050565b60c0811015611d9757611d78600160b86138c1565b611d859060ff16826136f8565b611d909060016137a7565b9392505050565b611d78600160f86138c1565b50919050565b80516000908190811a6080811015611dc457600191506111a9565b60b8811015611dea57611dd86080826136f8565b611de39060016137a7565b91506111a9565b60c0811015611e175760b78103600185019450806020036101000a855104600182018101935050506111a9565b60f8811015611e2b57611dd860c0826136f8565b60019390930151602084900360f7016101000a900490920160f5190192915050565b80611e5757505050565b60208110611e8f5782518252611e6e6020846137a7565b9250611e7b6020836137a7565b9150611e886020826136f8565b9050611e57565b8015611ec85760006001611ea48360206136f8565b611eb0906101006139c8565b611eba91906136f8565b845184518216911916178352505b505050565b606081611f075760015b6040519080825280601f01601f1916602001820160405280156111a9576020820181803683370190505092915050565b608060015b6020811015611f485781841015611f2f57611f278482612c0f565b949350505050565b60089190911b9080611f40816137f7565b915050611f0c565b5080831015611f625760408051602081018590520161127a565b604051600060208201526021810184905260410161127a565b6060806038841015611fe55760408051600180825281830190925290602082018180368337019050509050611fb083856137a7565b601f1a60f81b81600081518110611fc957611fc9613614565b60200101906001600160f81b031916908160001a905350611d90565b600060015b611ff481876139ea565b1561201a5781612003816137f7565b92506120139050610100826139fe565b9050611fea565b6120258260016137a7565b6001600160401b0381111561203c5761203c61342d565b6040519080825280601f01601f191660200182016040528015612066576020820181803683370190505b50925061207385836137a7565b61207e9060376137a7565b601f1a60f81b8360008151811061209757612097613614565b60200101906001600160f81b031916908160001a905350600190505b818111612128576101006120c782846136f8565b6120d3906101006139c8565b6120dd90886139ea565b6120e79190613a1d565b601f1a60f81b8382815181106120ff576120ff613614565b60200101906001600160f81b031916908160001a90535080612120816137f7565b9150506120b3565b50509392505050565b6060815160001415612144576000611ed7565b6000805b835181101561218b5783818151811061216357612163613614565b6020026020010151518261217791906137a7565b915080612183816137f7565b915050612148565b6000826001600160401b038111156121a5576121a561342d565b6040519080825280601f01601f1916602001820160405280156121cf576020820181803683370190505b50600092509050602081015b85518310156110375760008684815181106121f8576121f8613614565b60200260200101519050600060208201905061221683828451612c7b565b87858151811061222857612228613614565b6020026020010151518361223c91906137a7565b92505050828061224b906137f7565b9350506121db565b606082600060015b6001835161226991906136f8565b8210156122b057600061227d878785612cf7565b905080600019141561228f57506122b0565b81612299816137f7565b92506122a890508160016137a7565b92505061225b565b806001600160401b038111156122c8576122c861342d565b6040519080825280602002602001820160405280156122fb57816020015b60608152602001906001900390816122e65790505b50935060009150600090505b6001835161231591906136f8565b82101561243d576000612329878785612cf7565b9050806000191415612339575082515b600061234584836136f8565b6001600160401b0381111561235c5761235c61342d565b6040519080825280601f01601f191660200182016040528015612386576020820181803683370190505b509050806000855b848110156123fd578781815181106123a8576123a8613614565b01602001516001600160f81b03191683836123c2816137f7565b9450815181106123d4576123d4613614565b60200101906001600160f81b031916908160001a905350806123f5816137f7565b91505061238e565b506124098460016137a7565b9550818886612417816137f7565b97508151811061242957612429613614565b602002602001018190525050505050612307565b50505092915050565b61244e613281565b612456613317565b600061246184610e29565b9050600061246e82610e4f565b905061248e61248982600081518110610a8057610a80613614565b6109f9565b6124ac6124a783600181518110610a8057610a80613614565b612d93565b935093505050915091565b60408051600580825260c08201909252600091829190816020015b60608152602001906001900390816124d25790505090506124f284612ec6565b8160008151811061250557612505613614565b6020026020010181905250612519836111b0565b8160018151811061252c5761252c613614565b602002602001018190525061254485600001516111b0565b8160028151811061255757612557613614565b602002602001018190525061256f85602001516111b0565b8160038151811061258257612582613614565b60200260200101819052506125ab61259986612ed1565b604051602001610d6391815260200190565b816004815181106125be576125be613614565b60200260200101819052506125d28161124d565b805190602001209150509392505050565b60006125f08360026139fe565b6125fb8360036139fe565b119392505050565b600081516041146126165750600061112b565b600080600061262485612f5a565b9194509250905060018661263983601b613a31565b6040805160008152602081018083529390935260ff90911690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015612688573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6126a561332a565b60006126b083610e29565b905060006126bd82610e4f565b905060006126d78260018151811061138057611380613614565b905060006126f96126f48460008151811061138057611380613614565b612f89565b905060006127166126f48560028151811061138057611380613614565b9050600083516001600160401b038111156127335761273361342d565b60405190808252806020026020018201604052801561276657816020015b60608152602001906001900390816127515790505b50905060005b84518110156127ba5761278a858281518110610a8057610a80613614565b82828151811061279c5761279c613614565b602002602001018190525080806127b2906137f7565b91505061276c565b5060408051606081018252938452602084019190915282015295945050505050565b6128076040518060800160405280600081526020016000815260200160008152602001606081525090565b6000604051806080016040528060008152602001600081526020016000815260200184604001515185602001515186600001515161284591906137a7565b61284f91906137a7565b6001600160401b038111156128665761286661342d565b60405190808252806020026020018201604052801561289f57816020015b61288c61334b565b8152602001906001900390816128845790505b509052905060005b8351518110156128f3576128e1846000015182815181106128ca576128ca613614565b602002602001015183612b9490919063ffffffff16565b806128eb816137f7565b9150506128a7565b5060005b83602001515181101561296957612957604051806060016040528060018152602001600181526020018660200151848151811061293657612936613614565b60200260200101518051906020012081525083612b9490919063ffffffff16565b80612961816137f7565b9150506128f7565b5060005b8360400151518110156111a957612993846040015182815181106128ca576128ca613614565b8061299d816137f7565b91505061296d565b6000805b8251811015611da3578281815181106129c4576129c4613614565b602002602001015160200151826129db91906137a7565b9150806129e7816137f7565b9150506129a9565b6129f761334b565b6000826040015111612a0b57612a0b6138ab565b6060820151825183612a1c826137f7565b905281518110612a2e57612a2e613614565b60200260200101519050816040018051809190612a4a90613894565b90525060608201515182511415612a6057600082525b919050565b612a6d61334b565b8251612a7b906001906136f8565b6001901b8360200151146040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b81525090612ac65760405162461bcd60e51b81526004016103fd91906133dc565b508160200151836020015110156040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b81525090612b145760405162461bcd60e51b81526004016103fd91906133dc565b50604051806060016040528084600001516001612b3191906137a7565b815260200183602001518560200151612b4a91906137a7565b815260200184604001518460400151604051602001612b73929190918252602082015260400190565b60405160208183030381529060405280519060200120815250905092915050565b816060015151826040015110612bac57612bac6138ab565b6060820151602083018051839291612bc3826137f7565b905281518110612bd557612bd5613614565b602090810291909101015260408201805190612bf0826137f7565b905250606082015151602083015114156115b457600060208301525050565b60606000826001600160401b03811115612c2b57612c2b61342d565b6040519080825280601f01601f191660200182016040528015612c55576020820181803683370190505b50905060208101836020035b60208110156121285785811a825360019182019101612c61565b60208110612cb35781518352612c926020846137a7565b9250612c9f6020836137a7565b9150612cac6020826136f8565b9050612c7b565b6000198115612cf1576001612cc98360206136f8565b612cd5906101006139c8565b612cdf91906136f8565b83518551821682199190911617855290505b50505050565b815160009084908490600114612d0f57612d0f6138ab565b835b8251811015612d855781600081518110612d2d57612d2d613614565b602001015160f81c60f81b6001600160f81b031916838281518110612d5457612d54613614565b01602001516001600160f81b0319161415612d73579250611d90915050565b80612d7d816137f7565b915050612d11565b506000199695505050505050565b612d9b613317565b6000612da683610e29565b90506000612db382610e4f565b905080600081518110612dc857612dc8613614565b60200260200101519150612ddb82610e4f565b9050600081516001600160401b03811115612df857612df861342d565b604051908082528060200260200182016040528015612e2b57816020015b6060815260200190600190039081612e165790505b50905060005b8251811015612eaf576000612e51848381518110610ab357610ab3613614565b11612e6a57604080516000815260208101909152612e7f565b612e7f838281518110610a8057610a80613614565b828281518110612e9157612e91613614565b60200260200101819052508080612ea7906137f7565b915050612e31565b506040805160208101909152908152949350505050565b606061112b826111de565b60408051600280825260608201909252600091829190816020015b6060815260200190600190039081612eec579050509050612f1d8360400151604051602001610d6391815260200190565b81600081518110612f3057612f30613614565b6020026020010181905250612f47612599846130a1565b81600181518110610e0657610e06613614565b60008060008351604114612f6d57600080fd5b50505060208101516040820151606083015160001a9193909250565b606080600083516001600160401b03811115612fa757612fa761342d565b604051908082528060200260200182016040528015612fe057816020015b612fcd61334b565b815260200190600190039081612fc55790505b50905060005b8451811015611b785761300485828151811061138057611380613614565b9250604051806060016040528061302f61302a86600081518110610a3d57610a3d613614565b6130b9565b815260200161304a85600081518110610a3d57610a3d613614565b815260200161306585600181518110610a8057610a80613614565b61306e90613812565b81525082828151811061308357613083613614565b60200260200101819052508080613099906137f7565b915050612fe6565b600061112b6130af83610c90565b83606001516130d3565b600160001982015b8015611da3576001918201911c6130c1565b600082815b8351811015611b78578381815181106130f3576130f3613614565b60200260200101516000015160001461318a5760408051602081018490520160405160208183030381529060405284828151811061313357613133613614565b60200260200101516020015160405160200161315191815260200190565b60408051601f198184030181529082905261316f9291602001613836565b60405160208183030381529060405280519060200120613208565b83818151811061319c5761319c613614565b6020026020010151602001516040516020016131ba91815260200190565b60408051601f1981840301815282825260208301859052910160408051601f19818403018152908290526131f19291602001613836565b604051602081830303815290604052805190602001205b915080613214816137f7565b9150506130d8565b828054828255906000526020600020908101928215613271579160200282015b8281111561327157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061323c565b5061327d92915061336f565b5090565b604051806101600160405280600081526020016000815260200160008019168152602001606081526020016000815260200160008152602001600015158152602001600080191681526020016000815260200160008019168152602001606081525090565b604080518082019091526000808252602082015290565b604051806040016040528060008152602001600081525090565b6040518060200160405280606081525090565b60405180606001604052806060815260200160608152602001606081525090565b60405180606001604052806000815260200160008152602001600080191681525090565b5b8082111561327d5760008155600101613370565b60005b8381101561339f578181015183820152602001613387565b83811115612cf15750506000910152565b600081518084526133c8816020860160208601613384565b601f01601f19169290920160200192915050565b602081526000611d9060208301846133b0565b60006020828403121561340157600080fd5b5035919050565b602081528151602082015260006020830151604080840152611f2760608401826133b0565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b038084111561345d5761345d61342d565b604051601f8501601f19908116603f011681019082821181831017156134855761348561342d565b8160405280935085815286868601111561349e57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126134c957600080fd5b611d9083833560208501613443565b600080600080608085870312156134ee57600080fd5b84356001600160401b038082111561350557600080fd5b613511888389016134b8565b9550602087013591508082111561352757600080fd5b613533888389016134b8565b945060408701359350606087013591508082111561355057600080fd5b508501601f8101871361356257600080fd5b61357187823560208401613443565b91505092959194509250565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156135d257603f198886030184526135c08583516133b0565b945092850192908501906001016135a4565b5092979650505050505050565b600181811c908216806135f357607f821691505b60208210811415611da357634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000825161363c818460208701613384565b9190910192915050565b600080835481600182811c91508083168061366257607f831692505b602080841082141561368257634e487b7160e01b86526022600452602486fd5b81801561369657600181146136a7576136d4565b60ff198616895284890196506136d4565b60008a81526020902060005b868110156136cc5781548b8201529085019083016136b3565b505084890196505b509498975050505050505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561370a5761370a6136e2565b500390565b60008251613721818460208701613384565b753a556e6578706563746564426c6f636b55706461746560501b920191825250601601919050565b6000825161375b818460208701613384565b6a0e925b9d985b1a5913925160aa1b920191825250600b01919050565b6000825161378a818460208701613384565b6a07492dcecc2d8d2c89ca6960ab1b920191825250600b01919050565b600082198211156137ba576137ba6136e2565b500190565b600082516137d1818460208701613384565b731d24b73b30b634b226b2b9b9b0b3b2a83937b7b360611b920191825250601401919050565b600060001982141561380b5761380b6136e2565b5060010190565b80516020808301519190811015611da35760001960209190910360031b1b16919050565b60008351613848818460208801613384565b83519083019061385c818360208801613384565b01949350505050565b60008251613877818460208701613384565b6a3a4c61636b51756f72756d60a81b920191825250600b01919050565b6000816138a3576138a36136e2565b506000190190565b634e487b7160e01b600052600160045260246000fd5b600060ff821660ff8416808210156138db576138db6136e2565b90039392505050565b600181815b8085111561391f578160001904821115613905576139056136e2565b8085161561391257918102915b93841c93908002906138e9565b509250929050565b6000826139365750600161112b565b816139435750600061112b565b816001811461395957600281146139635761397f565b600191505061112b565b60ff841115613974576139746136e2565b50506001821b61112b565b5060208310610133831016604e8410600b84101617156139a2575081810a61112b565b6139ac83836138e4565b80600019048211156139c0576139c06136e2565b029392505050565b6000611d908383613927565b634e487b7160e01b600052601260045260246000fd5b6000826139f9576139f96139d4565b500490565b6000816000190483118215151615613a1857613a186136e2565b500290565b600082613a2c57613a2c6139d4565b500690565b600060ff821660ff84168060ff03821115613a4e57613a4e6136e2565b01939250505056fea26469706673582212200b1b5df1e822096f16f03257ed4b1cddb561625ab1401a80c086ebbc569c64bf64736f6c634300080c0033"; + +type BtpMessageVerifierConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: BtpMessageVerifierConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class BtpMessageVerifier__factory extends ContractFactory { + constructor(...args: BtpMessageVerifierConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + _bmc: PromiseOrValue, + _srcNetworkId: PromiseOrValue, + _networkTypeId: PromiseOrValue, + _firstBlockHeader: PromiseOrValue, + _sequenceOffset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy( + _bmc, + _srcNetworkId, + _networkTypeId, + _firstBlockHeader, + _sequenceOffset, + overrides || {} + ) as Promise; + } + override getDeployTransaction( + _bmc: PromiseOrValue, + _srcNetworkId: PromiseOrValue, + _networkTypeId: PromiseOrValue, + _firstBlockHeader: PromiseOrValue, + _sequenceOffset: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction( + _bmc, + _srcNetworkId, + _networkTypeId, + _firstBlockHeader, + _sequenceOffset, + overrides || {} + ); + } + override attach(address: string): BtpMessageVerifier { + return super.attach(address) as BtpMessageVerifier; + } + override connect(signer: Signer): BtpMessageVerifier__factory { + return super.connect(signer) as BtpMessageVerifier__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): BtpMessageVerifierInterface { + return new utils.Interface(_abi) as BtpMessageVerifierInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BtpMessageVerifier { + return new Contract(address, _abi, signerOrProvider) as BtpMessageVerifier; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmv/Migrations__factory.ts b/test/typechain-types/factories/solidity/contracts/bmv/Migrations__factory.ts new file mode 100644 index 00000000..c5f7d25d --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv/Migrations__factory.ts @@ -0,0 +1,115 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + Migrations, + MigrationsInterface, +} from "../../../../solidity/contracts/bmv/Migrations"; + +const _abi = [ + { + inputs: [], + name: "last_completed_migration", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "completed", + type: "uint256", + }, + ], + name: "setCompleted", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "new_address", + type: "address", + }, + ], + name: "upgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x6080604052600080546001600160a01b0319163317905534801561002257600080fd5b5061025d806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100665780638da5cb5b14610082578063fdacd576146100ad575b600080fd5b61006461005f36600461018b565b6100c0565b005b61006f60015481565b6040519081526020015b60405180910390f35b600054610095906001600160a01b031681565b6040516001600160a01b039091168152602001610079565b6100646100bb3660046101bb565b61015c565b6000546001600160a01b031633146100f35760405162461bcd60e51b81526004016100ea906101d4565b60405180910390fd5b600154604051637ed66abb60e11b815282916001600160a01b0383169163fdacd576916101269160040190815260200190565b600060405180830381600087803b15801561014057600080fd5b505af1158015610154573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146101865760405162461bcd60e51b81526004016100ea906101d4565b600155565b60006020828403121561019d57600080fd5b81356001600160a01b03811681146101b457600080fd5b9392505050565b6000602082840312156101cd57600080fd5b5035919050565b60208082526033908201527f546869732066756e6374696f6e206973207265737472696374656420746f207460408201527234329031b7b73a3930b1ba13b99037bbb732b960691b60608201526080019056fea26469706673582212204a46aaaf4db1eedabedf3ddfef292c9706821f3d0d811b7d5fcf8a2af16a7b3d64736f6c634300080c0033"; + +type MigrationsConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: MigrationsConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Migrations__factory extends ContractFactory { + constructor(...args: MigrationsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): Migrations { + return super.attach(address) as Migrations; + } + override connect(signer: Signer): Migrations__factory { + return super.connect(signer) as Migrations__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): MigrationsInterface { + return new utils.Interface(_abi) as MigrationsInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Migrations { + return new Contract(address, _abi, signerOrProvider) as Migrations; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmv/index.ts b/test/typechain-types/factories/solidity/contracts/bmv/index.ts new file mode 100644 index 00000000..6d50c2c1 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as libraries from "./libraries"; +export { BtpMessageVerifier__factory } from "./BtpMessageVerifier__factory"; +export { BtpMessageVerifierV2__factory } from "./BtpMessageVerifierV2__factory"; +export { Migrations__factory } from "./Migrations__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/bmv/libraries/Errors__factory.ts b/test/typechain-types/factories/solidity/contracts/bmv/libraries/Errors__factory.ts new file mode 100644 index 00000000..91b65e3c --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv/libraries/Errors__factory.ts @@ -0,0 +1,125 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../../common"; +import type { + Errors, + ErrorsInterface, +} from "../../../../../solidity/contracts/bmv/libraries/Errors"; + +const _abi = [ + { + inputs: [], + name: "ERR_ALREADY_VERIFIED", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ERR_INVALID_ARGS", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ERR_NOT_VERIFIABLE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ERR_UNAUTHORIZED", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ERR_UNKNOWN", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +const _bytecode = + "0x6101ea61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100605760003560e01c806221eb7a1461006557806349626c7d146100a85780635b9ad75f146100d957806385f1742b14610107578063d550cf8a14610130575b600080fd5b6100926040518060400160405280600e81526020016d32353a496e76616c69644172677360901b81525081565b60405161009f919061015f565b60405180910390f35b610092604051806040016040528060128152602001710c8dce905b1c9958591e55995c9a599a595960721b81525081565b6100926040518060400160405280600f81526020016e0c8d4e955b985d5d1a1bdc9a5e9959608a1b81525081565b6100926040518060400160405280600a815260200169191a9d2ab735b737bbb760b11b81525081565b6100926040518060400160405280601081526020016f32363a4e6f7456657269666961626c6560801b81525081565b600060208083528351808285015260005b8181101561018c57858101830151858201604001528201610170565b8181111561019e576000604083870101525b50601f01601f191692909201604001939250505056fea2646970667358221220852d58f432e0ccfdc2d05be118a911af9b1d4379ebcf7b1a21df76d5a741ef2f64736f6c634300080c0033"; + +type ErrorsConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: ErrorsConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Errors__factory extends ContractFactory { + constructor(...args: ErrorsConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): Errors { + return super.attach(address) as Errors; + } + override connect(signer: Signer): Errors__factory { + return super.connect(signer) as Errors__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ErrorsInterface { + return new utils.Interface(_abi) as ErrorsInterface; + } + static connect(address: string, signerOrProvider: Signer | Provider): Errors { + return new Contract(address, _abi, signerOrProvider) as Errors; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/bmv/libraries/index.ts b/test/typechain-types/factories/solidity/contracts/bmv/libraries/index.ts new file mode 100644 index 00000000..82065247 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/bmv/libraries/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { Errors__factory } from "./Errors__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/dapp-sample/DAppProxySample__factory.ts b/test/typechain-types/factories/solidity/contracts/dapp-sample/DAppProxySample__factory.ts new file mode 100644 index 00000000..c5f39690 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/dapp-sample/DAppProxySample__factory.ts @@ -0,0 +1,174 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + DAppProxySample, + DAppProxySampleInterface, +} from "../../../../solidity/contracts/dapp-sample/DAppProxySample"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "string", + name: "_from", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "MessageReceived", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "string", + name: "_from", + type: "string", + }, + { + indexed: false, + internalType: "uint256", + name: "_ssn", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_rollback", + type: "bytes", + }, + ], + name: "RollbackDataReceived", + type: "event", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "handleCallMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_callService", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + { + internalType: "bytes", + name: "_rollback", + type: "bytes", + }, + ], + name: "sendMessage", + outputs: [], + stateMutability: "payable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610e58806100206000396000f3fe6080604052600436106100345760003560e01c80634bd9f84614610039578063af4287de1461005b578063c4d66de81461006e575b600080fd5b34801561004557600080fd5b50610059610054366004610960565b61008e565b005b6100596100693660046109cb565b610442565b34801561007a57600080fd5b50610059610089366004610a64565b61062d565b6000546201000090046001600160a01b031633146100e55760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c7943616c6c5365727669636560881b60448201526064015b60405180910390fd5b6101b084848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001805490925061012d9150610a94565b80601f016020809104026020016040519081016040528092919081815260200182805461015990610a94565b80156101a65780601f1061017b576101008083540402835291602001916101a6565b820191906000526020600020905b81548152906001019060200180831161018957829003601f168201915b50505050506107da565b15610354576000806101c483850185610b3c565b915091506000600360008481526020019081526020016000206040518060600160405290816000820154815260200160018201805461020290610a94565b80601f016020809104026020016040519081016040528092919081815260200182805461022e90610a94565b801561027b5780601f106102505761010080835404028352916020019161027b565b820191906000526020600020905b81548152906001019060200180831161025e57829003601f168201915b50505050508152602001600282015481525050905061029e8282602001516107da565b6102e25760405162461bcd60e51b81526020600482015260156024820152740e4ded8d8c4c2c6d688c2e8c240dad2e6dac2e8c6d605b1b60448201526064016100dc565b6000838152600360205260408120818155906103016001830182610842565b600282016000905550507f7b919a8fc571abe317af6235eb957d569c1754b4a029f1d1804e3a862673597187878360400151856040516103449493929190610c46565b60405180910390a150505061043c565b600082828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505060408051808201909152600d81526c7265766572744d65737361676560981b60208201529293506103bf9291508390506107da565b156103fd5760405162461bcd60e51b815260206004820152600e60248201526d072657665727446726f6d444170760941b60448201526064016100dc565b7f0d8291c70d2bb268eb9759e50f86de9237a804a0f6f014192af802551d5a2f3f858585856040516104329493929190610c7d565b60405180910390a1505b50505050565b801561059f57600060026000815461045990610ca4565b9190508190559050600081848460405160200161047893929190610ccd565b60408051808303601f1901815290829052600080546311de6f1760e31b845291935091620100009091046001600160a01b031690638ef378b89034906104ca908d908d908d908d908a90600401610cf0565b60206040518083038185885af11580156104e8573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061050d9190610d37565b9050604051806060016040528084815260200186868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820184905285815260038252604090208251815582820151805191926105899260018501929091019061087f565b5060408201518160020155905050505050610625565b6000546040516311de6f1760e31b8152620100009091046001600160a01b031690638ef378b89034906105e0908a908a908a908a908a908a90600401610d50565b60206040518083038185885af11580156105fe573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106239190610d37565b505b505050505050565b600054610100900460ff161580801561064d5750600054600160ff909116105b806106675750303b158015610667575060005460ff166001145b6106ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016100dc565b6000805460ff1916600117905580156106ed576000805461ff0019166101001790555b6000805462010000600160b01b031916620100006001600160a01b0385811682029290921780845560408051634f63a21d60e01b815290519290910490921692634f63a21d92600480820193918290030181865afa158015610753573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261077b9190810190610d99565b805161078f9160019160209091019061087f565b5080156107d6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6000816040516020016107ed9190610e06565b60405160208183030381529060405280519060200120836040516020016108149190610e06565b6040516020818303038152906040528051906020012014156108385750600161083c565b5060005b92915050565b50805461084e90610a94565b6000825580601f1061085e575050565b601f01602090049060005260206000209081019061087c9190610903565b50565b82805461088b90610a94565b90600052602060002090601f0160209004810192826108ad57600085556108f3565b82601f106108c657805160ff19168380011785556108f3565b828001600101855582156108f3579182015b828111156108f35782518255916020019190600101906108d8565b506108ff929150610903565b5090565b5b808211156108ff5760008155600101610904565b60008083601f84011261092a57600080fd5b5081356001600160401b0381111561094157600080fd5b60208301915083602082850101111561095957600080fd5b9250929050565b6000806000806040858703121561097657600080fd5b84356001600160401b038082111561098d57600080fd5b61099988838901610918565b909650945060208701359150808211156109b257600080fd5b506109bf87828801610918565b95989497509550505050565b600080600080600080606087890312156109e457600080fd5b86356001600160401b03808211156109fb57600080fd5b610a078a838b01610918565b90985096506020890135915080821115610a2057600080fd5b610a2c8a838b01610918565b90965094506040890135915080821115610a4557600080fd5b50610a5289828a01610918565b979a9699509497509295939492505050565b600060208284031215610a7657600080fd5b81356001600160a01b0381168114610a8d57600080fd5b9392505050565b600181811c90821680610aa857607f821691505b60208210811415610ac957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715610b0d57610b0d610acf565b604052919050565b60006001600160401b03821115610b2e57610b2e610acf565b50601f01601f191660200190565b60008060408385031215610b4f57600080fd5b8235915060208301356001600160401b03811115610b6c57600080fd5b8301601f81018513610b7d57600080fd5b8035610b90610b8b82610b15565b610ae5565b818152866020838501011115610ba557600080fd5b816020840160208301376000602083830101528093505050509250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60005b83811015610c09578181015183820152602001610bf1565b8381111561043c5750506000910152565b60008151808452610c32816020860160208601610bee565b601f01601f19169290920160200192915050565b606081526000610c5a606083018688610bc5565b8460208401528281036040840152610c728185610c1a565b979650505050505050565b604081526000610c91604083018688610bc5565b8281036020840152610c72818587610bc5565b6000600019821415610cc657634e487b7160e01b600052601160045260246000fd5b5060010190565b838152604060208201526000610ce7604083018486610bc5565b95945050505050565b606081526000610d04606083018789610bc5565b8281036020840152610d17818688610bc5565b90508281036040840152610d2b8185610c1a565b98975050505050505050565b600060208284031215610d4957600080fd5b5051919050565b606081526000610d6460608301888a610bc5565b8281036020840152610d77818789610bc5565b90508281036040840152610d8c818587610bc5565b9998505050505050505050565b600060208284031215610dab57600080fd5b81516001600160401b03811115610dc157600080fd5b8201601f81018413610dd257600080fd5b8051610de0610b8b82610b15565b818152856020838501011115610df557600080fd5b610ce7826020830160208601610bee565b60008251610e18818460208701610bee565b919091019291505056fea2646970667358221220b1e038e9fcf04863499c3841f6a9df567301b217890ca4a2af75c5ffea17432664736f6c634300080c0033"; + +type DAppProxySampleConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: DAppProxySampleConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class DAppProxySample__factory extends ContractFactory { + constructor(...args: DAppProxySampleConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): DAppProxySample { + return super.attach(address) as DAppProxySample; + } + override connect(signer: Signer): DAppProxySample__factory { + return super.connect(signer) as DAppProxySample__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): DAppProxySampleInterface { + return new utils.Interface(_abi) as DAppProxySampleInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DAppProxySample { + return new Contract(address, _abi, signerOrProvider) as DAppProxySample; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/dapp-sample/index.ts b/test/typechain-types/factories/solidity/contracts/dapp-sample/index.ts new file mode 100644 index 00000000..92c43986 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/dapp-sample/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { DAppProxySample__factory } from "./DAppProxySample__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/index.ts b/test/typechain-types/factories/solidity/contracts/index.ts new file mode 100644 index 00000000..4b284405 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as bmc from "./bmc"; +export * as bmv from "./bmv"; +export * as bmvBridge from "./bmv-bridge"; +export * as dappSample from "./dapp-sample"; +export * as xcall from "./xcall"; diff --git a/test/typechain-types/factories/solidity/contracts/xcall/CallService__factory.ts b/test/typechain-types/factories/solidity/contracts/xcall/CallService__factory.ts new file mode 100644 index 00000000..b8f3fbfc --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/xcall/CallService__factory.ts @@ -0,0 +1,509 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import type { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PromiseOrValue } from "../../../../common"; +import type { + CallService, + CallServiceInterface, +} from "../../../../solidity/contracts/xcall/CallService"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_reqId", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_code", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "CallExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_from", + type: "string", + }, + { + indexed: true, + internalType: "string", + name: "_to", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_reqId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "CallMessage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_from", + type: "address", + }, + { + indexed: true, + internalType: "string", + name: "_to", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + ], + name: "CallMessageSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_code", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "ResponseMessage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_code", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "RollbackExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + ], + name: "RollbackMessage", + type: "event", + }, + { + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_reqId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + ], + name: "executeRollback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getBtpAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + { + internalType: "bool", + name: "_rollback", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProtocolFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProtocolFeeHandler", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_src", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "uint256", + name: "_code", + type: "uint256", + }, + { + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "handleBTPError", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "string", + name: "_svc", + type: "string", + }, + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + internalType: "bytes", + name: "_msg", + type: "bytes", + }, + ], + name: "handleBTPMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_bmc", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + { + internalType: "bytes", + name: "_rollback", + type: "bytes", + }, + ], + name: "sendCallMessage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "setAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + ], + name: "setProtocolFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setProtocolFeeHandler", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "toAddr", + type: "address", + }, + { + internalType: "string", + name: "to", + type: "string", + }, + { + internalType: "string", + name: "from", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "tryHandleCallMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +const _bytecode = + "0x608060405234801561001057600080fd5b506144ac806100206000396000f3fe6080604052600436106100b85760003560e01c80630a823dea146100bd5780632a84e1b0146100df5780632eb71414146100ff5780634f63a21d14610136578063502bf8e014610158578063704b6c0214610178578063787dce3d146101985780637d4c4f4a146101b85780638ef378b8146101e6578063a5a41031146101f9578063b70eeb8d1461020e578063b822da231461022e578063bda8ce211461024e578063c4d66de81461026e578063f851a4401461028e575b600080fd5b3480156100c957600080fd5b506100dd6100d83660046137e2565b6102a3565b005b3480156100eb57600080fd5b506100dd6100fa36600461388e565b6103cd565b34801561010b57600080fd5b506009546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014257600080fd5b5061014b61076c565b60405161012d9190613903565b34801561016457600080fd5b506100dd610173366004613932565b6107fe565b34801561018457600080fd5b506100dd610193366004613932565b6108a1565b3480156101a457600080fd5b506100dd6101b336600461388e565b610909565b3480156101c457600080fd5b506101d86101d3366004613a12565b610946565b60405190815260200161012d565b6101d86101f4366004613a68565b61095b565b34801561020557600080fd5b506004546101d8565b34801561021a57600080fd5b506100dd610229366004613aef565b610c77565b34801561023a57600080fd5b506100dd610249366004613b92565b610de9565b34801561025a57600080fd5b506100dd610269366004613c2a565b610ec5565b34801561027a57600080fd5b506100dd610289366004613932565b6112e7565b34801561029a57600080fd5b506101196114c0565b6000546201000090046001600160a01b031633146102dc5760405162461bcd60e51b81526004016102d390613c70565b60405180910390fd5b6102e686866114cf565b600061039b604051806040016040528060018152602001607d60f81b81525061039585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260068152652c206d73673d60d01b6020820152610395925090508161036a8b61156c565b60408051808201909152600e81526d4254504572726f727b636f64653d60901b6020820152906116e3565b906116e3565b90506103c2604051806060016040528087815260200160011981526020018381525061170f565b505050505050505050565b600081815260056020908152604080832081516080810190925280546001600160a01b03168252600181018054929391929184019161040b90613c91565b80601f016020809104026020016040519081016040528092919081815260200182805461043790613c91565b80156104845780601f1061045957610100808354040283529160200191610484565b820191906000526020600020905b81548152906001019060200180831161046757829003601f168201915b5050505050815260200160028201805461049d90613c91565b80601f01602080910402602001604051908101604052809291908181526020018280546104c990613c91565b80156105165780601f106104eb57610100808354040283529160200191610516565b820191906000526020600020905b8154815290600101906020018083116104f957829003601f168201915b50505091835250506003919091015460ff16151560209091015280519091506001600160a01b031661057d5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696453657269616c4e756d60801b60448201526064016102d3565b80606001516105c35760405162461bcd60e51b8152602060048201526012602482015271149bdb1b189858dad39bdd115b98589b195960721b60448201526064016102d3565b6105cc826119e3565b6105d461366d565b8151604080840151905163b822da2360e01b8152309263b822da23926106009260019190600401613cc6565b600060405180830381600087803b15801561061a57600080fd5b505af192505050801561062b575060015b6106f757610637613da2565b806308c379a0141561067c575061064c613dbe565b80610657575061067e565b6040518060600160405280858152602001600019815260200182815250915050610725565b505b3d8080156106a8576040519150601f19603f3d011682016040523d82523d6000602084013e6106ad565b606091505b50604051806060016040528085815260200160001981526020016040518060400160405280600c81526020016b3ab735b737bbb722b93937b960a11b815250815250915050610725565b6040518060600160405280848152602001600081526020016040518060200160405280600081525081525090505b827fa624620c8bd50b7672875f280750fffe1cfe3bed0d3c4a1454ac11e6567435e68260200151836040015160405161075f929190613e47565b60405180910390a2505050565b60606001805461077b90613c91565b80601f01602080910402602001604051908101604052809291908181526020018280546107a790613c91565b80156107f45780601f106107c9576101008083540402835291602001916107f4565b820191906000526020600020905b8154815290600101906020018083116107d757829003601f168201915b5050505050905090565b610806611a2a565b6001600160a01b0316336001600160a01b0316146108365760405162461bcd60e51b81526004016102d390613e60565b600980546001600160a01b0319166001600160a01b0383169081179091551561089e5747801561089c576009546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561089a573d6000803e3d6000fd5b505b505b50565b6007546001600160a01b031633146108e75760405162461bcd60e51b815260206004820152600960248201526827b7363ca7bbb732b960b91b60448201526064016102d3565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610911611a2a565b6001600160a01b0316336001600160a01b0316146109415760405162461bcd60e51b81526004016102d390613e60565b600455565b60006109528383611a5d565b90505b92915050565b6000333b15158061096b57508151155b6109ad5760405162461bcd60e51b8152602060048201526013602482015272526f6c6c6261636b4e6f74506f737369626c6560681b60448201526064016102d3565b610800835111156109f65760405162461bcd60e51b815260206004820152601360248201527213585e11185d1854da5e99515e18d959591959606a1b60448201526064016102d3565b61040082511115610a435760405162461bcd60e51b815260206004820152601760248201527613585e149bdb1b189858dad4da5e99515e18d959591959604a1b60448201526064016102d3565b81511515600080610a5387611ae3565b915091506000610a638385611a5d565b905080341015610aa75760405162461bcd60e51b815260206004820152600f60248201526e496e73756666696369656e7446656560881b60448201526064016102d3565b6009546001600160a01b031615801590610ac357506000600454115b15610b06576009546004546040516001600160a01b039092169181156108fc0291906000818181858888f19350505050158015610b04573d6000803e3d6000fd5b505b6000610b10611b1f565b905060008515610bb7576040805160808101825233815260208082018d81528284018c90526000606084018190528681526005835293909320825181546001600160a01b0319166001600160a01b0390911617815592518051929392610b7c926001850192019061368e565b5060408201518051610b9891600284019160209091019061368e565b50606091909101516003909101805460ff191691151591909117905550805b60006040518060a00160405280610bd6336001600160a01b0316611b3a565b815260200186815260200184815260200188151581526020018b81525090506000610c1a60045434610c089190613e99565b88600186610c1587611b45565b611bc1565b9050838c604051610c2b9190613eb0565b6040519081900381208382529033907f30bd7b24c8b4484378d242d4b94ef187d71ef050444e6b1bd9b18d1b75a294389060200160405180910390a450919a9950505050505050505050565b6000546201000090046001600160a01b03163314610ca75760405162461bcd60e51b81526004016102d390613c70565b610cb185856114cf565b6000610cf283838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611c9092505050565b805190915060011415610d4957610d4488888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050506020840151879150611d19565b610ddf565b805160021415610d6857610d44610d638260200151611e66565b61170f565b6000610dc3604051806040016040528060018152602001602960f81b815250610395610d97856000015161156c565b60408051808201909152600f81526e0aadcd6dcdeeedc9ae6cea8f2e0ca5608b1b6020820152906116e3565b90508060405162461bcd60e51b81526004016102d39190613903565b5050505050505050565b333014610e275760405162461bcd60e51b815260206004820152600c60248201526b13db9b1e525b9d195c9b985b60a21b60448201526064016102d3565b6001600160a01b038416610e695760408051808201909152600f81526e125b1b1959d85b105c99dd5b595b9d608a1b6020820152610e66908490611ee2565b93505b6040516325ecfc2360e11b81526001600160a01b03851690634bd9f84690610e979085908590600401613ecc565b600060405180830381600087803b158015610eb157600080fd5b505af1158015610ddf573d6000803e3d6000fd5b600082815260066020526040808220815160a08101909252805482908290610eec90613c91565b80601f0160208091040260200160405190810160405280929190818152602001828054610f1890613c91565b8015610f655780601f10610f3a57610100808354040283529160200191610f65565b820191906000526020600020905b815481529060010190602001808311610f4857829003601f168201915b50505050508152602001600182018054610f7e90613c91565b80601f0160208091040260200160405190810160405280929190818152602001828054610faa90613c91565b8015610ff75780601f10610fcc57610100808354040283529160200191610ff7565b820191906000526020600020905b815481529060010190602001808311610fda57829003601f168201915b505050918352505060028201546020820152600382015460ff16151560408201526004909101546060909101528051519091506110695760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5914995c5d595cdd125960821b60448201526064016102d3565b815160208301206080820151146110b55760405162461bcd60e51b815260206004820152601060248201526f088c2e8c290c2e6d09ad2e6dac2e8c6d60831b60448201526064016102d3565b6000838152600660205260408120906110ce8282613712565b6110dc600183016000613712565b5060006002820181905560038201805460ff1916905560049091018190558151611105906121c5565b905061110f61366d565b6020830151835160405163b822da2360e01b8152309263b822da239261113e9260009291908a90600401613ef1565b600060405180830381600087803b15801561115857600080fd5b505af1925050508015611169575060015b61123d57611175613da2565b806308c379a014156111be575061118a613dbe565b8061119557506111c0565b60405180606001604052808560400151815260200160001981526020018281525091505061126f565b505b3d8080156111ea576040519150601f19603f3d011682016040523d82523d6000602084013e6111ef565b606091505b5060405180606001604052808560400151815260200160001981526020016040518060400160405280600c81526020016b3ab735b737bbb722b93937b960a11b81525081525091505061126f565b604051806060016040528084604001518152602001600081526020016040518060200160405280600081525081525090505b847fc7391e04887f8b3c16fa20877e028e8163139a478c8447e7d449eba1905caa51826020015183604001516040516112a9929190613e47565b60405180910390a28260600151156112e0576112de600083600286604001516000196112d59190613f46565b610c15866121db565b505b5050505050565b600054610100900460ff16158080156113075750600054600160ff909116105b806113215750303b158015611321575060005460ff166001145b6113845760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102d3565b6000805460ff1916600117905580156113a7576000805461ff0019166101001790555b60078054336001600160a01b03199091161790556000805462010000600160b01b031916620100006001600160a01b0385811682029290921780845560408051636bf459cb60e01b815290519290910490921691636bf459cb91600480830192869291908290030181865afa158015611424573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261144c9190810190613fcb565b905061146161145a30611b3a565b8290612218565b80516114759160019160209091019061368e565b5050801561089c576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b60006114ca611a2a565b905090565b61152b82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040805180820190915260058152641e18d85b1b60da1b602082015292915050612268565b61089c5760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964536572766963654e616d6560701b60448201526064016102d3565b6060816115905750506040805180820190915260018152600360fc1b602082015290565b60408051602080825281830190925260009160208201818036833701905050905060005b831561161b576115c5600a85614058565b6115d090603061406c565b60f81b8282815181106115e5576115e5614084565b60200101906001600160f81b031916908160001a905350611607600a8561409a565b935080611613816140ae565b9150506115b4565b600081611627816140c9565b92506001600160401b038111156116405761164061394d565b6040519080825280601f01601f19166020018201604052801561166a576020820181803683370190505b50905060005b81518110156116da57836116848285613e99565b8151811061169457611694614084565b602001015160f81c60f81b8282815181106116b1576116b1614084565b60200101906001600160f81b031916908160001a905350806116d2816140ae565b915050611670565b50949350505050565b606082826040516020016116f89291906140e0565b604051602081830303815290604052905092915050565b8051600090815260056020908152604080832081516080810190925280546001600160a01b03168252600181018054929391929184019161174f90613c91565b80601f016020809104026020016040519081016040528092919081815260200182805461177b90613c91565b80156117c85780601f1061179d576101008083540402835291602001916117c8565b820191906000526020600020905b8154815290600101906020018083116117ab57829003601f168201915b505050505081526020016002820180546117e190613c91565b80601f016020809104026020016040519081016040528092919081815260200182805461180d90613c91565b801561185a5780601f1061182f5761010080835404028352916020019161185a565b820191906000526020600020905b81548152906001019060200180831161183d57829003601f168201915b50505091835250506003919091015460ff16151560209091015280519091506001600160a01b03161561089c5781600001517fe1280b9ed2814cffdf5af58c3dae53306da235dbbe85ab3d9911672a0a09bb6d836020015184604001516040516118c5929190613e47565b60405180910390a260208201516118e65781516118e1906119e3565b61089c565b60008160400151511161192c5760405162461bcd60e51b815260206004820152600e60248201526d4e6f526f6c6c6261636b4461746160901b60448201526064016102d3565b60016060820181905282516000908152600560209081526040909120835181546001600160a01b0319166001600160a01b039091161781558184015180518594929361197c93850192019061368e565b506040820151805161199891600284019160209091019061368e565b50606091909101516003909101805460ff191691151591909117905581516040517f38934ab923f985814047679ba041577b8203ddd15fe9910d3fc6a7aa6001e9c790600090a25050565b600081815260056020526040812080546001600160a01b031916815590611a0d6001830182613712565b611a1b600283016000613712565b50600301805460ff1916905550565b6008546000906001600160a01b0316611a4d57506007546001600160a01b031690565b506008546001600160a01b031690565b60008054604051633ea627a560e11b8152620100009091046001600160a01b031690637d4c4f4a90611a95908690869060040161410f565b602060405180830381865afa158015611ab2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ad69190614133565b600454610952919061406c565b6060806000611af1846122cf565b9050611aff846006836124a3565b611b1585611b0e84600161406c565b87516124a3565b9250925050915091565b60006002546001611b30919061406c565b6002819055919050565b606061095582612572565b60606000611b568360000151612747565b611b638460200151612747565b611b708560400151612752565b611b7f86606001511515612765565b611b8c87608001516127cc565b604051602001611ba095949392919061414c565b6040516020818303038152906040529050611bba81612824565b9392505050565b60008060029054906101000a90046001600160a01b03166001600160a01b031663522a901e8787604051806040016040528060058152602001641e18d85b1b60da1b81525087611c2460405180604001604052808c81526020018a81525061285a565b6040518663ffffffff1660e01b8152600401611c4394939291906141b7565b60206040518083038185885af1158015611c61573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611c869190614133565b9695505050505050565b6040805180820190915260008152606060208201526000611cb8611cb384612889565b6128af565b90506040518060400160405280611ce883600081518110611cdb57611cdb614084565b60200260200101516129ec565b8152602001611d1083600181518110611d0357611d03614084565b6020026020010151612a8f565b90529392505050565b6000611d2482612b5f565b8051909150600090611d37908690612218565b90506000611d43612c3f565b6040805160a08101825284815260208681015181830152868301518284015260608088015115159083015260808088015180519083012090830152600084815260068252929092208151805194955091939092611da492849291019061368e565b506020828101518051611dbd926001850192019061368e565b506040828101516002830155606083015160038301805460ff191691151591909117905560809092015160049091015583810151602085015191519091611e0391613eb0565b604051809103902083604051611e199190613eb0565b60405180910390207f2cbc78425621c181f9f8a25fc06e44a0ac2b67cd6a31f8ed7918934187f8cc59848760800151604051611e56929190613e47565b60405180910390a4505050505050565b611e6e61366d565b6000611e7c611cb384612889565b90506040518060600160405280611eac83600081518110611e9f57611e9f614084565b6020026020010151612c5a565b8152602001611ec783600181518110611cdb57611cdb614084565b8152602001611d1083600281518110611d0357611d03614084565b81516000908390602a148015611f265750600360fc1b6001600160f81b03191681600081518110611f1557611f15614084565b01602001516001600160f81b031916145b8015611f605750600f60fb1b6001600160f81b03191681600181518110611f4f57611f4f614084565b01602001516001600160f81b031916145b8390611f7f5760405162461bcd60e51b81526004016102d39190613903565b5060408051601480825281830190925260009160208201818036833701905050905060008080805b60288110156121165785611fbc82600261406c565b81518110611fcc57611fcc614084565b016020015160f81c935060016030851015611fe5575060005b8460ff166039108015611ffb575060418560ff16105b15612004575060005b8460ff16604610801561201a575060618560ff16105b15612023575060005b8460ff1660661015612033575060005b80612052578860405162461bcd60e51b81526004016102d39190613903565b60418560ff1610156120675760309250612081565b8460ff166046101561207c5760579250612081565b603792505b61208c600283614058565b6120a15761209a83866141f6565b9350612103565b6120ab83866141f6565b6120b6856010614219565b6120c09190614242565b60f81b8660026120d1600186613e99565b6120db919061409a565b815181106120eb576120eb614084565b60200101906001600160f81b031916908160001a9053505b508061210e816140ae565b915050611fa7565b5060008460405160200161212a9190613eb0565b60408051601f198184030181529190526014810151975090506001600160a01b0387166121b95760025b86518110156121b75786818151811061216f5761216f614084565b60209101015189906001600160f81b031916600360fc1b146121a45760405162461bcd60e51b81526004016102d39190613903565b50806121af816140ae565b915050612154565b505b50505050505092915050565b60606109558260066121d6856122cf565b6124a3565b606060006121ec8360000151612752565b6121f98460200151612d0c565b6122068560400151612747565b604051602001611ba093929190614267565b6060604051806040016040528060068152602001656274703a2f2f60d01b81525083604051806040016040528060018152602001602f60f81b815250846040516020016116f894939291906142aa565b60008160405160200161227b9190613eb0565b60405160208183030381529060405280519060200120836040516020016122a29190613eb0565b6040516020818303038152906040528051906020012014156122c657506001610955565b50600092915050565b600081815b600681101561239957604051806040016040528060068152602001656274703a2f2f60d01b815250818151811061230d5761230d614084565b602001015160f81c60f81b6001600160f81b03191682828151811061233457612334614084565b01602001516001600160f81b03191614612387576040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b81526102d39190600401613903565b80612391816140ae565b9150506122d4565b8151811015612464576040805180820190915260018152602f60f81b602090910181905282518390839081106123d1576123d1614084565b01602001516001600160f81b0319161415612452576006811180156124025750600182516123ff9190613e99565b81105b60405180604001604052806011815260200170696e76616c69644254504164647265737360781b8152509061244a5760405162461bcd60e51b81526004016102d39190613903565b509392505050565b8061245c816140ae565b915050612399565b6040805180820182526011815270696e76616c69644254504164647265737360781b6020820152905162461bcd60e51b81526102d39190600401613903565b60608360006124b28585613e99565b6001600160401b038111156124c9576124c961394d565b6040519080825280601f01601f1916602001820160405280156124f3576020820181803683370190505b5090508460005b825181101561256657838261250e816140ae565b93508151811061252057612520614084565b602001015160f81c60f81b83828151811061253d5761253d614084565b60200101906001600160f81b031916908160001a9053508061255e816140ae565b9150506124fa565b50909695505050505050565b604080516028808252606082810190935283831b9160009160208201818036833701905050905060008060008060008060006125ad8b612d1a565b905060005b6014811015612716576125c6816013613e99565b6125d1906008614301565b6125dc9060026143fc565b6125ea9060608c901c61409a565b97506125f7601089614408565b9650612604876010614219565b61260e90896141f6565b95508161261c826002614301565b6028811061262c5761262c614084565b602002015194508161263f826002614301565b61264a90600161406c565b6028811061265a5761265a614084565b6020020151935061266b8786612eab565b92506126778388614242565b60f81b89612686836002614301565b8151811061269657612696614084565b60200101906001600160f81b031916908160001a9053506126b78685612eab565b92506126c38387614242565b60f81b896126d2836002614301565b6126dd90600161406c565b815181106126ed576126ed614084565b60200101906001600160f81b031916908160001a9053508061270e816140ae565b9150506125b2565b5087604051602001612728919061442a565b6040516020818303038152906040529950505050505050505050919050565b6060610955826127cc565b606061095561276083612ed8565b6127cc565b604080516001808252818301909252606091600091906020820181803683370190505090508261279657600061279c565b600160f81b5b816000815181106127af576127af614084565b60200101906001600160f81b031916908160001a90535092915050565b606080825160011480156127fa57506080836000815181106127f0576127f0614084565b016020015160f81c105b15612806575081610955565b61281283516080612fa0565b836040516020016116f89291906140e0565b6060612832825160c0612fa0565b826040516020016128449291906140e0565b6040516020818303038152906040529050919050565b6060600061286b8360000151612d0c565b61287884602001516127cc565b604051602001611ba09291906140e0565b61289161374c565b50604080518082019091528151815260209182019181019190915290565b60606128ba82613156565b6128f75760405162461bcd60e51b815260206004820152600e60248201526d135d5cdd0818994818481b1a5cdd60921b60448201526064016102d3565b60006129028361318f565b90506000816001600160401b0381111561291e5761291e61394d565b60405190808252806020026020018201604052801561295757816020015b61294461374c565b81526020019060019003908161293c5790505b50905060006129698560200151613212565b8560200151612978919061406c565b90506000805b848110156129e15761298f8361328d565b91506040518060400160405280838152602001848152508482815181106129b8576129b8614084565b60209081029190910101526129cd828461406c565b9250806129d9816140ae565b91505061297e565b509195945050505050565b60008151602111612a345760405162461bcd60e51b815260206004820152601260248201527124b73b30b634b21034b73a10373ab6b132b960711b60448201526064016102d3565b6000612a438360200151613212565b90506000818460000151612a579190613e99565b9050600080838660200151612a6c919061406c565b90508051915060208310156116da5781836020036008021d915050949350505050565b8051606090612ad15760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b60448201526064016102d3565b6000612ae08360200151613212565b90506000818460000151612af49190613e99565b90506000816001600160401b03811115612b1057612b1061394d565b6040519080825280601f01601f191660200182016040528015612b3a576020820181803683370190505b50905060008160200190506116da848760200151612b58919061406c565b8285613331565b612b936040518060a00160405280606081526020016060815260200160008152602001600015158152602001606081525090565b6000612ba1611cb384612889565b90506040518060a00160405280612bc483600081518110611d0357611d03614084565b8152602001612bdf83600181518110611d0357611d03614084565b8152602001612bfa83600281518110611e9f57611e9f614084565b8152602001612c2283600381518110612c1557612c15614084565b60200260200101516133b0565b15158152602001611d1083600481518110611d0357611d03614084565b60006003546001612c50919061406c565b6003819055919050565b805160009015801590612c6f57508151602110155b612cb15760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b2103ab4b73a10373ab6b132b960691b60448201526064016102d3565b6000612cc08360200151613212565b90506000818460000151612cd49190613e99565b9050600080838660200151612ce9919061406c565b90508051915060208310156116da57506020919091036101000a90049392505050565b606061095561276083613420565b612d22613766565b606082901b6000612d32826134a7565b604051602001612d429190613eb0565b60405160208183030381529060405280519060200120905060008060008060005b6014811015612e9f576010878260148110612d8057612d80614084565b612d8c9291901a614454565b9350601084888360148110612da357612da3614084565b612daf9291901a6141f6565b612db99190614408565b94506010868260208110612dcf57612dcf614084565b612ddb9291901a614454565b9150601082878360208110612df257612df2614084565b612dfe9291901a6141f6565b612e089190614408565b925060098560ff16118015612e20575060078360ff16115b88612e2c836002614301565b60288110612e3c57612e3c614084565b91151560209092020152600960ff8516118015612e5c575060078260ff16115b88612e68836002614301565b612e7390600161406c565b60288110612e8357612e83614084565b9115156020909202015280612e97816140ae565b915050612d63565b50505050505050919050565b6000600a8360ff161015612ec157506030610955565b8115612ecf57506037610955565b50605792915050565b606081612f135760015b6040519080825280601f01601f191660200182016040528015612f0c576020820181803683370190505b5092915050565b608060015b6020811015612f545781841015612f3b57612f338482613601565b949350505050565b60089190911b9080612f4c816140ae565b915050612f18565b5080831015612f81576040805160208101859052015b604051602081830303815290604052915050919050565b6040516000602082015260218101849052604101612f6a565b50919050565b606080603884101561300a5760408051600180825281830190925290602082018180368337019050509050612fd5838561406c565b601f1a60f81b81600081518110612fee57612fee614084565b60200101906001600160f81b031916908160001a905350610952565b600060015b613019818761409a565b1561303f5781613028816140ae565b9250613038905061010082614301565b905061300f565b61304a82600161406c565b6001600160401b038111156130615761306161394d565b6040519080825280601f01601f19166020018201604052801561308b576020820181803683370190505b509250613098858361406c565b6130a390603761406c565b601f1a60f81b836000815181106130bc576130bc614084565b60200101906001600160f81b031916908160001a905350600190505b81811161314d576101006130ec8284613e99565b6130f8906101006143fc565b613102908861409a565b61310c9190614058565b601f1a60f81b83828151811061312457613124614084565b60200101906001600160f81b031916908160001a90535080613145816140ae565b9150506130d8565b50509392505050565b805160009061316757506000919050565b6020820151805160001a9060c0821015613185575060009392505050565b5060019392505050565b80516000906131a057506000919050565b6000806131b08460200151613212565b84602001516131bf919061406c565b90506000846000015185602001516131d7919061406c565b90505b80821015613209576131eb8261328d565b6131f5908361406c565b915082613201816140ae565b9350506131da565b50909392505050565b8051600090811a608081101561322b5750600092915050565b60b8811080613246575060c08110801590613246575060f881105b156132545750600192915050565b60c081101561328157613269600160b86141f6565b6132769060ff1682613e99565b611bba90600161406c565b613269600160f86141f6565b80516000908190811a60808110156132a85760019150612f0c565b60b88110156132ce576132bc608082613e99565b6132c790600161406c565b9150612f0c565b60c08110156132fb5760b78103600185019450806020036101000a85510460018201810193505050612f0c565b60f881101561330f576132bc60c082613e99565b60019390930151602084900360f7016101000a900490920160f5190192915050565b8061333b57505050565b60208110613373578251825261335260208461406c565b925061335f60208361406c565b915061336c602082613e99565b905061333b565b801561089a5760006001613388836020613e99565b613394906101006143fc565b61339e9190613e99565b84518451821691191617835250505050565b80516000906001146133f95760405162461bcd60e51b81526020600482015260126024820152714d7573742068617665206c656e677468203160701b60448201526064016102d3565b6020820151805160001a908115806134115750608082145b15613185575060009392505050565b60608161342e576001612ee2565b608060801960015b602081101561348257828512801561344d57508185135b156134655761345c8582613601565b95945050505050565b600892831b929190911b908061347a816140ae565b915050613436565b5060408051602081018690520160405160208183030381529060405292505050919050565b60408051602880825260608281019093526000919060208201818036833701905050905060008080805b60148110156135f6576134e5816013613e99565b6134f0906008614301565b6134fb9060026143fc565b61350990606089901c61409a565b9350613516601085614408565b9250613523836010614219565b61352d90856141f6565b9150600a8360ff1610613541576057613544565b60305b61354e9084614242565b60f81b8561355d836002614301565b8151811061356d5761356d614084565b60200101906001600160f81b031916908160001a905350600a8260ff1610613596576057613599565b60305b6135a39083614242565b60f81b856135b2836002614301565b6135bd90600161406c565b815181106135cd576135cd614084565b60200101906001600160f81b031916908160001a905350806135ee816140ae565b9150506134d1565b509295945050505050565b60606000826001600160401b0381111561361d5761361d61394d565b6040519080825280601f01601f191660200182016040528015613647576020820181803683370190505b50905060208101836020035b602081101561314d5785811a825360019182019101613653565b60405180606001604052806000815260200160008152602001606081525090565b82805461369a90613c91565b90600052602060002090601f0160209004810192826136bc5760008555613702565b82601f106136d557805160ff1916838001178555613702565b82800160010185558215613702579182015b828111156137025782518255916020019190600101906136e7565b5061370e929150613785565b5090565b50805461371e90613c91565b6000825580601f1061372e575050565b601f01602090049060005260206000209081019061089e9190613785565b604051806040016040528060008152602001600081525090565b6040518061050001604052806028906020820280368337509192915050565b5b8082111561370e5760008155600101613786565b60008083601f8401126137ac57600080fd5b5081356001600160401b038111156137c357600080fd5b6020830191508360208285010111156137db57600080fd5b9250929050565b60008060008060008060008060a0898b0312156137fe57600080fd5b88356001600160401b038082111561381557600080fd5b6138218c838d0161379a565b909a50985060208b013591508082111561383a57600080fd5b6138468c838d0161379a565b909850965060408b0135955060608b0135945060808b013591508082111561386d57600080fd5b5061387a8b828c0161379a565b999c989b5096995094979396929594505050565b6000602082840312156138a057600080fd5b5035919050565b60005b838110156138c25781810151838201526020016138aa565b838111156138d1576000848401525b50505050565b600081518084526138ef8160208601602086016138a7565b601f01601f19169290920160200192915050565b60208152600061095260208301846138d7565b80356001600160a01b038116811461392d57600080fd5b919050565b60006020828403121561394457600080fd5b61095282613916565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156139885761398861394d565b6040525050565b60006001600160401b038211156139a8576139a861394d565b50601f01601f191660200190565b600082601f8301126139c757600080fd5b81356139d28161398f565b6040516139df8282613963565b8281528560208487010111156139f457600080fd5b82602086016020830137600092810160200192909252509392505050565b60008060408385031215613a2557600080fd5b82356001600160401b03811115613a3b57600080fd5b613a47858286016139b6565b92505060208301358015158114613a5d57600080fd5b809150509250929050565b600080600060608486031215613a7d57600080fd5b83356001600160401b0380821115613a9457600080fd5b613aa0878388016139b6565b94506020860135915080821115613ab657600080fd5b613ac2878388016139b6565b93506040860135915080821115613ad857600080fd5b50613ae5868287016139b6565b9150509250925092565b60008060008060008060006080888a031215613b0a57600080fd5b87356001600160401b0380821115613b2157600080fd5b613b2d8b838c0161379a565b909950975060208a0135915080821115613b4657600080fd5b613b528b838c0161379a565b909750955060408a0135945060608a0135915080821115613b7257600080fd5b50613b7f8a828b0161379a565b989b979a50959850939692959293505050565b60008060008060808587031215613ba857600080fd5b613bb185613916565b935060208501356001600160401b0380821115613bcd57600080fd5b613bd9888389016139b6565b94506040870135915080821115613bef57600080fd5b613bfb888389016139b6565b93506060870135915080821115613c1157600080fd5b50613c1e878288016139b6565b91505092959194509250565b60008060408385031215613c3d57600080fd5b8235915060208301356001600160401b03811115613c5a57600080fd5b613c66858286016139b6565b9150509250929050565b6020808252600790820152664f6e6c79424d4360c81b604082015260600190565b600181811c90821680613ca557607f821691505b60208210811415612f9a57634e487b7160e01b600052602260045260246000fd5b6001600160a01b038416815260806020808301829052600091830182905260a06040840152845482908190600181811c9082811680613d0657607f831692505b868310811415613d2457634e487b7160e01b86526022600452602486fd5b60a0890183905260c08901818015613d435760018114613d5457613d7e565b60ff19861682528882019650613d7e565b60008d815260209020885b86811015613d7857815484820152908501908a01613d5f565b83019750505b5050505050508481036060860152613d9681876138d7565b98975050505050505050565b600060033d1115613dbb5760046000803e5060005160e01c5b90565b600060443d1015613dcc5790565b6040516003193d81016004833e81513d6001600160401b038083116024840183101715613dfb57505050505090565b8285019150815181811115613e135750505050505090565b843d8701016020828501011115613e2d5750505050505090565b613e3c60208286010187613963565b509095945050505050565b828152604060208201526000612f3360408301846138d7565b60208082526009908201526827b7363ca0b236b4b760b91b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015613eab57613eab613e83565b500390565b60008251613ec28184602087016138a7565b9190910192915050565b604081526000613edf60408301856138d7565b828103602084015261345c81856138d7565b6001600160a01b0385168152608060208201819052600090613f15908301866138d7565b8281036040840152613f2781866138d7565b90508281036060840152613f3b81856138d7565b979650505050505050565b60006001600160ff1b0381841382841380821686840486111615613f6c57613f6c613e83565b600160ff1b6000871282811687830589121615613f8b57613f8b613e83565b60008712925087820587128484161615613fa757613fa7613e83565b87850587128184161615613fbd57613fbd613e83565b505050929093029392505050565b600060208284031215613fdd57600080fd5b81516001600160401b03811115613ff357600080fd5b8201601f8101841361400457600080fd5b805161400f8161398f565b60405161401c8282613963565b82815286602084860101111561403157600080fd5b611c868360208301602087016138a7565b634e487b7160e01b600052601260045260246000fd5b60008261406757614067614042565b500690565b6000821982111561407f5761407f613e83565b500190565b634e487b7160e01b600052603260045260246000fd5b6000826140a9576140a9614042565b500490565b60006000198214156140c2576140c2613e83565b5060010190565b6000816140d8576140d8613e83565b506000190190565b600083516140f28184602088016138a7565b8351908301906141068183602088016138a7565b01949350505050565b60408152600061412260408301856138d7565b905082151560208301529392505050565b60006020828403121561414557600080fd5b5051919050565b6000865161415e818460208b016138a7565b865190830190614172818360208b016138a7565b8651910190614185818360208a016138a7565b85519101906141988183602089016138a7565b84519101906141ab8183602088016138a7565b01979650505050505050565b6080815260006141ca60808301876138d7565b82810360208401526141dc81876138d7565b90508460408401528281036060840152613f3b81856138d7565b600060ff821660ff84168082101561421057614210613e83565b90039392505050565b600060ff821660ff84168160ff048111821515161561423a5761423a613e83565b029392505050565b600060ff821660ff84168060ff0382111561425f5761425f613e83565b019392505050565b600084516142798184602089016138a7565b84519083019061428d8183602089016138a7565b84519101906142a08183602088016138a7565b0195945050505050565b600085516142bc818460208a016138a7565b8551908301906142d0818360208a016138a7565b85519101906142e38183602089016138a7565b84519101906142f68183602088016138a7565b019695505050505050565b600081600019048311821515161561431b5761431b613e83565b500290565b600181815b8085111561435b57816000190482111561434157614341613e83565b8085161561434e57918102915b93841c9390800290614325565b509250929050565b60008261437257506001610955565b8161437f57506000610955565b8160018114614395576002811461439f576143bb565b6001915050610955565b60ff8411156143b0576143b0613e83565b50506001821b610955565b5060208310610133831016604e8410600b84101617156143de575081810a610955565b6143e88383614320565b806000190482111561423a5761423a613e83565b60006109528383614363565b600060ff83168061441b5761441b614042565b8060ff84160491505092915050565b61060f60f31b8152600082516144478160028501602087016138a7565b9190910160020192915050565b600060ff83168061446757614467614042565b8060ff8416069150509291505056fea2646970667358221220bddf6149df3929cd9d3345364aa2b688686fc14b141ac41104cb5a173bdc965664736f6c634300080c0033"; + +type CallServiceConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: CallServiceConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class CallService__factory extends ContractFactory { + constructor(...args: CallServiceConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + override deploy( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + override getDeployTransaction( + overrides?: Overrides & { from?: PromiseOrValue } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + override attach(address: string): CallService { + return super.attach(address) as CallService; + } + override connect(signer: Signer): CallService__factory { + return super.connect(signer) as CallService__factory; + } + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): CallServiceInterface { + return new utils.Interface(_abi) as CallServiceInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): CallService { + return new Contract(address, _abi, signerOrProvider) as CallService; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/xcall/index.ts b/test/typechain-types/factories/solidity/contracts/xcall/index.ts new file mode 100644 index 00000000..b3e79687 --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/xcall/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as interfaces from "./interfaces"; +export { CallService__factory } from "./CallService__factory"; diff --git a/test/typechain-types/factories/solidity/contracts/xcall/interfaces/ICallServiceReceiver__factory.ts b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/ICallServiceReceiver__factory.ts new file mode 100644 index 00000000..9deec7ba --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/ICallServiceReceiver__factory.ts @@ -0,0 +1,48 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ICallServiceReceiver, + ICallServiceReceiverInterface, +} from "../../../../../solidity/contracts/xcall/interfaces/ICallServiceReceiver"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_from", + type: "string", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "handleCallMessage", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class ICallServiceReceiver__factory { + static readonly abi = _abi; + static createInterface(): ICallServiceReceiverInterface { + return new utils.Interface(_abi) as ICallServiceReceiverInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICallServiceReceiver { + return new Contract( + address, + _abi, + signerOrProvider + ) as ICallServiceReceiver; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/xcall/interfaces/ICallService__factory.ts b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/ICallService__factory.ts new file mode 100644 index 00000000..e653b2fc --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/ICallService__factory.ts @@ -0,0 +1,255 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + ICallService, + ICallServiceInterface, +} from "../../../../../solidity/contracts/xcall/interfaces/ICallService"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_reqId", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_code", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "CallExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "string", + name: "_from", + type: "string", + }, + { + indexed: true, + internalType: "string", + name: "_to", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "_reqId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "CallMessage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_from", + type: "address", + }, + { + indexed: true, + internalType: "string", + name: "_to", + type: "string", + }, + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_nsn", + type: "int256", + }, + ], + name: "CallMessageSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_code", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "ResponseMessage", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "_code", + type: "int256", + }, + { + indexed: false, + internalType: "string", + name: "_msg", + type: "string", + }, + ], + name: "RollbackExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + ], + name: "RollbackMessage", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_reqId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "executeCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_sn", + type: "uint256", + }, + ], + name: "executeRollback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getBtpAddress", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "_to", + type: "string", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + { + internalType: "bytes", + name: "_rollback", + type: "bytes", + }, + ], + name: "sendCallMessage", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, +] as const; + +export class ICallService__factory { + static readonly abi = _abi; + static createInterface(): ICallServiceInterface { + return new utils.Interface(_abi) as ICallServiceInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICallService { + return new Contract(address, _abi, signerOrProvider) as ICallService; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/xcall/interfaces/IFeeManage__factory.ts b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/IFeeManage__factory.ts new file mode 100644 index 00000000..b009c61d --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/IFeeManage__factory.ts @@ -0,0 +1,102 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import type { Provider } from "@ethersproject/providers"; +import type { + IFeeManage, + IFeeManageInterface, +} from "../../../../../solidity/contracts/xcall/interfaces/IFeeManage"; + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "_net", + type: "string", + }, + { + internalType: "bool", + name: "_rollback", + type: "bool", + }, + ], + name: "getFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProtocolFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProtocolFeeHandler", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + ], + name: "setProtocolFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_addr", + type: "address", + }, + ], + name: "setProtocolFeeHandler", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IFeeManage__factory { + static readonly abi = _abi; + static createInterface(): IFeeManageInterface { + return new utils.Interface(_abi) as IFeeManageInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IFeeManage { + return new Contract(address, _abi, signerOrProvider) as IFeeManage; + } +} diff --git a/test/typechain-types/factories/solidity/contracts/xcall/interfaces/index.ts b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/index.ts new file mode 100644 index 00000000..47f39c3e --- /dev/null +++ b/test/typechain-types/factories/solidity/contracts/xcall/interfaces/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ICallService__factory } from "./ICallService__factory"; +export { ICallServiceReceiver__factory } from "./ICallServiceReceiver__factory"; +export { IFeeManage__factory } from "./IFeeManage__factory"; diff --git a/test/typechain-types/factories/solidity/index.ts b/test/typechain-types/factories/solidity/index.ts new file mode 100644 index 00000000..6397da09 --- /dev/null +++ b/test/typechain-types/factories/solidity/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as contracts from "./contracts"; diff --git a/test/typechain-types/hardhat.d.ts b/test/typechain-types/hardhat.d.ts new file mode 100644 index 00000000..c0dc8c57 --- /dev/null +++ b/test/typechain-types/hardhat.d.ts @@ -0,0 +1,249 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { ethers } from "ethers"; +import { + FactoryOptions, + HardhatEthersHelpers as HardhatEthersHelpersBase, +} from "@nomiclabs/hardhat-ethers/types"; + +import * as Contracts from "."; + +declare module "hardhat/types/runtime" { + interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory( + name: "IBMC", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IBMV", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IBSH", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Integers", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Initializable", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "BMCManagement", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "BMCPeriphery", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "BMCService", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IBMCManagement", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IBMCPeriphery", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ICCManagement", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ICCPeriphery", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ICCService", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IOwnerManager", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "BMV", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "BtpMessageVerifier", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "BtpMessageVerifierV2", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Errors", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "Migrations", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "DAppProxySample", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "CallService", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ICallService", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "ICallServiceReceiver", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + name: "IFeeManage", + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + + getContractAt( + name: "IBMC", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IBMV", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IBSH", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Integers", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Initializable", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "BMCManagement", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "BMCPeriphery", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "BMCService", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IBMCManagement", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IBMCPeriphery", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ICCManagement", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ICCPeriphery", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ICCService", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IOwnerManager", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "BMV", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "BtpMessageVerifier", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "BtpMessageVerifierV2", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Errors", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "Migrations", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "DAppProxySample", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "CallService", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ICallService", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "ICallServiceReceiver", + address: string, + signer?: ethers.Signer + ): Promise; + getContractAt( + name: "IFeeManage", + address: string, + signer?: ethers.Signer + ): Promise; + + // default types + getContractFactory( + name: string, + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + abi: any[], + bytecode: ethers.utils.BytesLike, + signer?: ethers.Signer + ): Promise; + getContractAt( + nameOrAbi: string | any[], + address: string, + signer?: ethers.Signer + ): Promise; + } +} diff --git a/test/typechain-types/index.ts b/test/typechain-types/index.ts new file mode 100644 index 00000000..c6fac1ad --- /dev/null +++ b/test/typechain-types/index.ts @@ -0,0 +1,58 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as iconfoundation from "./@iconfoundation"; +export type { iconfoundation }; +import type * as openzeppelin from "./@openzeppelin"; +export type { openzeppelin }; +import type * as solidity from "./solidity"; +export type { solidity }; +export * as factories from "./factories"; +export type { IBMC } from "./@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC"; +export { IBMC__factory } from "./factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMC__factory"; +export type { IBMV } from "./@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV"; +export { IBMV__factory } from "./factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBMV__factory"; +export type { IBSH } from "./@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH"; +export { IBSH__factory } from "./factories/@iconfoundation/btp2-solidity-library/contracts/interfaces/IBSH__factory"; +export type { Integers } from "./@iconfoundation/btp2-solidity-library/contracts/utils/Integers"; +export { Integers__factory } from "./factories/@iconfoundation/btp2-solidity-library/contracts/utils/Integers__factory"; +export type { Initializable } from "./@openzeppelin/contracts-upgradeable/proxy/utils/Initializable"; +export { Initializable__factory } from "./factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory"; +export type { BMCManagement } from "./solidity/contracts/bmc/BMCManagement"; +export { BMCManagement__factory } from "./factories/solidity/contracts/bmc/BMCManagement__factory"; +export type { BMCPeriphery } from "./solidity/contracts/bmc/BMCPeriphery"; +export { BMCPeriphery__factory } from "./factories/solidity/contracts/bmc/BMCPeriphery__factory"; +export type { BMCService } from "./solidity/contracts/bmc/BMCService"; +export { BMCService__factory } from "./factories/solidity/contracts/bmc/BMCService__factory"; +export type { IBMCManagement } from "./solidity/contracts/bmc/interfaces/IBMCManagement"; +export { IBMCManagement__factory } from "./factories/solidity/contracts/bmc/interfaces/IBMCManagement__factory"; +export type { IBMCPeriphery } from "./solidity/contracts/bmc/interfaces/IBMCPeriphery"; +export { IBMCPeriphery__factory } from "./factories/solidity/contracts/bmc/interfaces/IBMCPeriphery__factory"; +export type { ICCManagement } from "./solidity/contracts/bmc/interfaces/ICCManagement"; +export { ICCManagement__factory } from "./factories/solidity/contracts/bmc/interfaces/ICCManagement__factory"; +export type { ICCPeriphery } from "./solidity/contracts/bmc/interfaces/ICCPeriphery"; +export { ICCPeriphery__factory } from "./factories/solidity/contracts/bmc/interfaces/ICCPeriphery__factory"; +export type { ICCService } from "./solidity/contracts/bmc/interfaces/ICCService"; +export { ICCService__factory } from "./factories/solidity/contracts/bmc/interfaces/ICCService__factory"; +export type { IOwnerManager } from "./solidity/contracts/bmc/interfaces/IOwnerManager"; +export { IOwnerManager__factory } from "./factories/solidity/contracts/bmc/interfaces/IOwnerManager__factory"; +export type { BMV } from "./solidity/contracts/bmv-bridge/BMV"; +export { BMV__factory } from "./factories/solidity/contracts/bmv-bridge/BMV__factory"; +export type { BtpMessageVerifier } from "./solidity/contracts/bmv/BtpMessageVerifier"; +export { BtpMessageVerifier__factory } from "./factories/solidity/contracts/bmv/BtpMessageVerifier__factory"; +export type { BtpMessageVerifierV2 } from "./solidity/contracts/bmv/BtpMessageVerifierV2"; +export { BtpMessageVerifierV2__factory } from "./factories/solidity/contracts/bmv/BtpMessageVerifierV2__factory"; +export type { Errors } from "./solidity/contracts/bmv/libraries/Errors"; +export { Errors__factory } from "./factories/solidity/contracts/bmv/libraries/Errors__factory"; +export type { Migrations } from "./solidity/contracts/bmv/Migrations"; +export { Migrations__factory } from "./factories/solidity/contracts/bmv/Migrations__factory"; +export type { DAppProxySample } from "./solidity/contracts/dapp-sample/DAppProxySample"; +export { DAppProxySample__factory } from "./factories/solidity/contracts/dapp-sample/DAppProxySample__factory"; +export type { CallService } from "./solidity/contracts/xcall/CallService"; +export { CallService__factory } from "./factories/solidity/contracts/xcall/CallService__factory"; +export type { ICallService } from "./solidity/contracts/xcall/interfaces/ICallService"; +export { ICallService__factory } from "./factories/solidity/contracts/xcall/interfaces/ICallService__factory"; +export type { ICallServiceReceiver } from "./solidity/contracts/xcall/interfaces/ICallServiceReceiver"; +export { ICallServiceReceiver__factory } from "./factories/solidity/contracts/xcall/interfaces/ICallServiceReceiver__factory"; +export type { IFeeManage } from "./solidity/contracts/xcall/interfaces/IFeeManage"; +export { IFeeManage__factory } from "./factories/solidity/contracts/xcall/interfaces/IFeeManage__factory"; diff --git a/test/typechain-types/solidity/contracts/bmc/BMCManagement.ts b/test/typechain-types/solidity/contracts/bmc/BMCManagement.ts new file mode 100644 index 00000000..17b10c8d --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/BMCManagement.ts @@ -0,0 +1,1322 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace Types { + export type RouteStruct = { + dst: PromiseOrValue; + next: PromiseOrValue; + }; + + export type RouteStructOutput = [string, string] & { + dst: string; + next: string; + }; + + export type ServiceStruct = { + svc: PromiseOrValue; + addr: PromiseOrValue; + }; + + export type ServiceStructOutput = [string, string] & { + svc: string; + addr: string; + }; + + export type VerifierStruct = { + net: PromiseOrValue; + addr: PromiseOrValue; + }; + + export type VerifierStructOutput = [string, string] & { + net: string; + addr: string; + }; +} + +export interface BMCManagementInterface extends utils.Interface { + functions: { + "addLink(string)": FunctionFragment; + "addOwner(address)": FunctionFragment; + "addReachable(string,string)": FunctionFragment; + "addRelay(string,address)": FunctionFragment; + "addRoute(string,string)": FunctionFragment; + "addService(string,address)": FunctionFragment; + "addVerifier(string,address)": FunctionFragment; + "dropMessage(string,uint256,string,int256,int256,string,uint256[])": FunctionFragment; + "getBMCPeriphery()": FunctionFragment; + "getBMCService()": FunctionFragment; + "getFee(string,bool)": FunctionFragment; + "getFeeHandler()": FunctionFragment; + "getFeeTable(string[])": FunctionFragment; + "getHop(string)": FunctionFragment; + "getLinks()": FunctionFragment; + "getRelays(string)": FunctionFragment; + "getRoutes()": FunctionFragment; + "getService(string)": FunctionFragment; + "getServices()": FunctionFragment; + "getVerifier(string)": FunctionFragment; + "getVerifiers()": FunctionFragment; + "initialize()": FunctionFragment; + "isLinkRelay(string,address)": FunctionFragment; + "isOwner(address)": FunctionFragment; + "removeLink(string)": FunctionFragment; + "removeOwner(address)": FunctionFragment; + "removeReachable(string,string)": FunctionFragment; + "removeRelay(string,address)": FunctionFragment; + "removeRoute(string)": FunctionFragment; + "removeService(string)": FunctionFragment; + "removeVerifier(string)": FunctionFragment; + "resolveNext(string)": FunctionFragment; + "setBMCPeriphery(address)": FunctionFragment; + "setBMCService(address)": FunctionFragment; + "setFeeHandler(address)": FunctionFragment; + "setFeeTable(string[],uint256[][])": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addLink" + | "addOwner" + | "addReachable" + | "addRelay" + | "addRoute" + | "addService" + | "addVerifier" + | "dropMessage" + | "getBMCPeriphery" + | "getBMCService" + | "getFee" + | "getFeeHandler" + | "getFeeTable" + | "getHop" + | "getLinks" + | "getRelays" + | "getRoutes" + | "getService" + | "getServices" + | "getVerifier" + | "getVerifiers" + | "initialize" + | "isLinkRelay" + | "isOwner" + | "removeLink" + | "removeOwner" + | "removeReachable" + | "removeRelay" + | "removeRoute" + | "removeService" + | "removeVerifier" + | "resolveNext" + | "setBMCPeriphery" + | "setBMCService" + | "setFeeHandler" + | "setFeeTable" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addLink", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addReachable", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addRelay", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addRoute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addService", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addVerifier", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "dropMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[] + ] + ): string; + encodeFunctionData( + functionFragment: "getBMCPeriphery", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBMCService", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getFeeHandler", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFeeTable", + values: [PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "getHop", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "getLinks", values?: undefined): string; + encodeFunctionData( + functionFragment: "getRelays", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "getRoutes", values?: undefined): string; + encodeFunctionData( + functionFragment: "getService", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getServices", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVerifier", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getVerifiers", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isLinkRelay", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeLink", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeReachable", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeRelay", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeRoute", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeService", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeVerifier", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "resolveNext", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setBMCPeriphery", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setBMCService", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFeeHandler", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFeeTable", + values: [PromiseOrValue[], PromiseOrValue[][]] + ): string; + + decodeFunctionResult(functionFragment: "addLink", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addReachable", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addRelay", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addRoute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addService", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "dropMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBMCPeriphery", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBMCService", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFeeTable", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getHop", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLinks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRelays", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRoutes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getService", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getServices", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifiers", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isLinkRelay", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeLink", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeOwner", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeReachable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeRelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeRoute", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeService", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "resolveNext", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setBMCPeriphery", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setBMCService", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFeeTable", + data: BytesLike + ): Result; + + events: { + "Initialized(uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface BMCManagement extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BMCManagementInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise<[string]>; + + getBMCService(overrides?: CallOverrides): Promise<[string]>; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber[]]>; + + getFeeHandler(overrides?: CallOverrides): Promise<[string]>; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise<[BigNumber[][]] & { _feeTable: BigNumber[][] }>; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getLinks(overrides?: CallOverrides): Promise<[string[]]>; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[]]>; + + getRoutes(overrides?: CallOverrides): Promise<[Types.RouteStructOutput[]]>; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getServices( + overrides?: CallOverrides + ): Promise<[Types.ServiceStructOutput[]]>; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getVerifiers( + overrides?: CallOverrides + ): Promise<[Types.VerifierStructOutput[]]>; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCService( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber[]]>; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifiers( + overrides?: CallOverrides + ): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCService( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addLink( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber, BigNumber[]]>; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getServices( + overrides?: CallOverrides + ): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifiers( + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setBMCService( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + }; + + estimateGas: { + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifiers(overrides?: CallOverrides): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCService( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifiers(overrides?: CallOverrides): Promise; + + initialize( + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCService( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/BMCPeriphery.ts b/test/typechain-types/solidity/contracts/bmc/BMCPeriphery.ts new file mode 100644 index 00000000..909d9ba9 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/BMCPeriphery.ts @@ -0,0 +1,943 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace Types { + export type FeeInfoStruct = { + network: PromiseOrValue; + values: PromiseOrValue[]; + }; + + export type FeeInfoStructOutput = [string, BigNumber[]] & { + network: string; + values: BigNumber[]; + }; + + export type BTPMessageStruct = { + src: PromiseOrValue; + dst: PromiseOrValue; + svc: PromiseOrValue; + sn: PromiseOrValue; + message: PromiseOrValue; + nsn: PromiseOrValue; + feeInfo: Types.FeeInfoStruct; + }; + + export type BTPMessageStructOutput = [ + string, + string, + string, + BigNumber, + string, + BigNumber, + Types.FeeInfoStructOutput + ] & { + src: string; + dst: string; + svc: string; + sn: BigNumber; + message: string; + nsn: BigNumber; + feeInfo: Types.FeeInfoStructOutput; + }; + + export type RouteStruct = { + dst: PromiseOrValue; + next: PromiseOrValue; + }; + + export type RouteStructOutput = [string, string] & { + dst: string; + next: string; + }; + + export type ServiceStruct = { + svc: PromiseOrValue; + addr: PromiseOrValue; + }; + + export type ServiceStructOutput = [string, string] & { + svc: string; + addr: string; + }; + + export type LinkStatusStruct = { + rxSeq: PromiseOrValue; + txSeq: PromiseOrValue; + verifier: IBMV.VerifierStatusStruct; + currentHeight: PromiseOrValue; + }; + + export type LinkStatusStructOutput = [ + BigNumber, + BigNumber, + IBMV.VerifierStatusStructOutput, + BigNumber + ] & { + rxSeq: BigNumber; + txSeq: BigNumber; + verifier: IBMV.VerifierStatusStructOutput; + currentHeight: BigNumber; + }; +} + +export declare namespace IBMV { + export type VerifierStatusStruct = { + height: PromiseOrValue; + extra: PromiseOrValue; + }; + + export type VerifierStatusStructOutput = [BigNumber, string] & { + height: BigNumber; + extra: string; + }; +} + +export interface BMCPeripheryInterface extends utils.Interface { + functions: { + "claimReward(string,string)": FunctionFragment; + "clearSeq(string)": FunctionFragment; + "dropMessage(string,uint256,(string,string,string,int256,bytes,int256,(string,uint256[])))": FunctionFragment; + "emitClaimRewardResult(address,string,int256,uint256)": FunctionFragment; + "getBMCManagement()": FunctionFragment; + "getBMCService()": FunctionFragment; + "getBtpAddress()": FunctionFragment; + "getFee(string,bool)": FunctionFragment; + "getLinks()": FunctionFragment; + "getNetworkAddress()": FunctionFragment; + "getNetworkSn()": FunctionFragment; + "getReward(string,address)": FunctionFragment; + "getRoutes()": FunctionFragment; + "getServices()": FunctionFragment; + "getStatus(string)": FunctionFragment; + "handleRelayMessage(string,bytes)": FunctionFragment; + "initialize(string,address,address)": FunctionFragment; + "sendInternal(string,bytes)": FunctionFragment; + "sendMessage(string,string,int256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "claimReward" + | "clearSeq" + | "dropMessage" + | "emitClaimRewardResult" + | "getBMCManagement" + | "getBMCService" + | "getBtpAddress" + | "getFee" + | "getLinks" + | "getNetworkAddress" + | "getNetworkSn" + | "getReward" + | "getRoutes" + | "getServices" + | "getStatus" + | "handleRelayMessage" + | "initialize" + | "sendInternal" + | "sendMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "claimReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "clearSeq", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "dropMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + Types.BTPMessageStruct + ] + ): string; + encodeFunctionData( + functionFragment: "emitClaimRewardResult", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "getBMCManagement", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBMCService", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBtpAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "getLinks", values?: undefined): string; + encodeFunctionData( + functionFragment: "getNetworkAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkSn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "getRoutes", values?: undefined): string; + encodeFunctionData( + functionFragment: "getServices", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getStatus", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "handleRelayMessage", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sendInternal", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "claimReward", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "clearSeq", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "dropMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "emitClaimRewardResult", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBMCManagement", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBMCService", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBtpAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getLinks", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getNetworkAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkSn", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRoutes", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getServices", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getStatus", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "handleRelayMessage", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sendInternal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendMessage", + data: BytesLike + ): Result; + + events: { + "BTPEvent(string,int256,string,string)": EventFragment; + "ClaimReward(address,string,string,uint256,int256)": EventFragment; + "ClaimRewardResult(address,string,int256,uint256)": EventFragment; + "Initialized(uint8)": EventFragment; + "Message(string,uint256,bytes)": EventFragment; + "MessageDropped(string,uint256,bytes,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "BTPEvent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ClaimReward"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ClaimRewardResult"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Message"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MessageDropped"): EventFragment; +} + +export interface BTPEventEventObject { + _src: string; + _nsn: BigNumber; + _next: string; + _event: string; +} +export type BTPEventEvent = TypedEvent< + [string, BigNumber, string, string], + BTPEventEventObject +>; + +export type BTPEventEventFilter = TypedEventFilter; + +export interface ClaimRewardEventObject { + _sender: string; + _network: string; + _receiver: string; + _amount: BigNumber; + _nsn: BigNumber; +} +export type ClaimRewardEvent = TypedEvent< + [string, string, string, BigNumber, BigNumber], + ClaimRewardEventObject +>; + +export type ClaimRewardEventFilter = TypedEventFilter; + +export interface ClaimRewardResultEventObject { + _sender: string; + _network: string; + _nsn: BigNumber; + _result: BigNumber; +} +export type ClaimRewardResultEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + ClaimRewardResultEventObject +>; + +export type ClaimRewardResultEventFilter = + TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface MessageEventObject { + _next: string; + _seq: BigNumber; + _msg: string; +} +export type MessageEvent = TypedEvent< + [string, BigNumber, string], + MessageEventObject +>; + +export type MessageEventFilter = TypedEventFilter; + +export interface MessageDroppedEventObject { + _prev: string; + _seq: BigNumber; + _msg: string; + _ecode: BigNumber; + _emsg: string; +} +export type MessageDroppedEvent = TypedEvent< + [string, BigNumber, string, BigNumber, string], + MessageDroppedEventObject +>; + +export type MessageDroppedEventFilter = TypedEventFilter; + +export interface BMCPeriphery extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BMCPeripheryInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise<[string]>; + + getBMCService(overrides?: CallOverrides): Promise<[string]>; + + getBtpAddress(overrides?: CallOverrides): Promise<[string]>; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getLinks(overrides?: CallOverrides): Promise<[string[]]>; + + getNetworkAddress(overrides?: CallOverrides): Promise<[string]>; + + getNetworkSn(overrides?: CallOverrides): Promise<[BigNumber]>; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getRoutes(overrides?: CallOverrides): Promise<[Types.RouteStructOutput[]]>; + + getServices( + overrides?: CallOverrides + ): Promise<[Types.ServiceStructOutput[]]>; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[Types.LinkStatusStructOutput]>; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _network: PromiseOrValue, + _bmcManagementAddr: PromiseOrValue, + _bmcServiceAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _network: PromiseOrValue, + _bmcManagementAddr: PromiseOrValue, + _bmcServiceAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + clearSeq( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: CallOverrides + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices( + overrides?: CallOverrides + ): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _network: PromiseOrValue, + _bmcManagementAddr: PromiseOrValue, + _bmcServiceAddr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "BTPEvent(string,int256,string,string)"( + _src?: PromiseOrValue | null, + _nsn?: PromiseOrValue | null, + _next?: null, + _event?: null + ): BTPEventEventFilter; + BTPEvent( + _src?: PromiseOrValue | null, + _nsn?: PromiseOrValue | null, + _next?: null, + _event?: null + ): BTPEventEventFilter; + + "ClaimReward(address,string,string,uint256,int256)"( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _receiver?: null, + _amount?: null, + _nsn?: null + ): ClaimRewardEventFilter; + ClaimReward( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _receiver?: null, + _amount?: null, + _nsn?: null + ): ClaimRewardEventFilter; + + "ClaimRewardResult(address,string,int256,uint256)"( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _nsn?: null, + _result?: null + ): ClaimRewardResultEventFilter; + ClaimRewardResult( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _nsn?: null, + _result?: null + ): ClaimRewardResultEventFilter; + + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + "Message(string,uint256,bytes)"( + _next?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null + ): MessageEventFilter; + Message( + _next?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null + ): MessageEventFilter; + + "MessageDropped(string,uint256,bytes,uint256,string)"( + _prev?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null, + _ecode?: null, + _emsg?: null + ): MessageDroppedEventFilter; + MessageDropped( + _prev?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null, + _ecode?: null, + _emsg?: null + ): MessageDroppedEventFilter; + }; + + estimateGas: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _network: PromiseOrValue, + _bmcManagementAddr: PromiseOrValue, + _bmcServiceAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCService(overrides?: CallOverrides): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _network: PromiseOrValue, + _bmcManagementAddr: PromiseOrValue, + _bmcServiceAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/BMCService.ts b/test/typechain-types/solidity/contracts/bmc/BMCService.ts new file mode 100644 index 00000000..74ca0c0f --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/BMCService.ts @@ -0,0 +1,760 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace Types { + export type ResponseMessageStruct = { + code: PromiseOrValue; + message: PromiseOrValue; + }; + + export type ResponseMessageStructOutput = [BigNumber, string] & { + code: BigNumber; + message: string; + }; + + export type FeeInfoStruct = { + network: PromiseOrValue; + values: PromiseOrValue[]; + }; + + export type FeeInfoStructOutput = [string, BigNumber[]] & { + network: string; + values: BigNumber[]; + }; + + export type BTPMessageStruct = { + src: PromiseOrValue; + dst: PromiseOrValue; + svc: PromiseOrValue; + sn: PromiseOrValue; + message: PromiseOrValue; + nsn: PromiseOrValue; + feeInfo: Types.FeeInfoStruct; + }; + + export type BTPMessageStructOutput = [ + string, + string, + string, + BigNumber, + string, + BigNumber, + Types.FeeInfoStructOutput + ] & { + src: string; + dst: string; + svc: string; + sn: BigNumber; + message: string; + nsn: BigNumber; + feeInfo: Types.FeeInfoStructOutput; + }; + + export type ResponseStruct = { + nsn: PromiseOrValue; + feeInfo: Types.FeeInfoStruct; + }; + + export type ResponseStructOutput = [BigNumber, Types.FeeInfoStructOutput] & { + nsn: BigNumber; + feeInfo: Types.FeeInfoStructOutput; + }; +} + +export interface BMCServiceInterface extends utils.Interface { + functions: { + "addRequest(int256,string,address,uint256)": FunctionFragment; + "addReward(string,address,uint256)": FunctionFragment; + "clearReward(string,address)": FunctionFragment; + "decodeResponseMessage(bytes)": FunctionFragment; + "getBMCManagement()": FunctionFragment; + "getBMCPeriphery()": FunctionFragment; + "getReward(string,address)": FunctionFragment; + "handleBTPError(string,string,uint256,uint256,string)": FunctionFragment; + "handleBTPMessage(string,string,uint256,bytes)": FunctionFragment; + "handleDropFee(string,uint256[])": FunctionFragment; + "handleErrorFee(string,int256,(string,uint256[]))": FunctionFragment; + "handleFee(address,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "removeResponse(string,string,int256)": FunctionFragment; + "setBMCPeriphery(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addRequest" + | "addReward" + | "clearReward" + | "decodeResponseMessage" + | "getBMCManagement" + | "getBMCPeriphery" + | "getReward" + | "handleBTPError" + | "handleBTPMessage" + | "handleDropFee" + | "handleErrorFee" + | "handleFee" + | "initialize" + | "removeResponse" + | "setBMCPeriphery" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addRequest", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "addReward", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "clearReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "decodeResponseMessage", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getBMCManagement", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBMCPeriphery", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "handleBTPError", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "handleBTPMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "handleDropFee", + values: [PromiseOrValue, PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "handleErrorFee", + values: [ + PromiseOrValue, + PromiseOrValue, + Types.FeeInfoStruct + ] + ): string; + encodeFunctionData( + functionFragment: "handleFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeResponse", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setBMCPeriphery", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "addRequest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addReward", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "clearReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "decodeResponseMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBMCManagement", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBMCPeriphery", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "handleBTPError", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleBTPMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleDropFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleErrorFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "handleFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeResponse", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setBMCPeriphery", + data: BytesLike + ): Result; + + events: { + "Initialized(uint8)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface BMCService extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BMCServiceInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[Types.ResponseMessageStructOutput]>; + + getBMCManagement(overrides?: CallOverrides): Promise<[string]>; + + getBMCPeriphery(overrides?: CallOverrides): Promise<[string]>; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmcManagementAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmcManagementAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: CallOverrides + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _bmcManagementAddr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + }; + + estimateGas: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmcManagementAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBMCManagement(overrides?: CallOverrides): Promise; + + getBMCPeriphery(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmcManagementAddr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setBMCPeriphery( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/index.ts b/test/typechain-types/solidity/contracts/bmc/index.ts new file mode 100644 index 00000000..c390b44d --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; +export type { BMCManagement } from "./BMCManagement"; +export type { BMCPeriphery } from "./BMCPeriphery"; +export type { BMCService } from "./BMCService"; diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/IBMCManagement.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/IBMCManagement.ts new file mode 100644 index 00000000..6c1bc027 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/IBMCManagement.ts @@ -0,0 +1,795 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace Types { + export type RouteStruct = { + dst: PromiseOrValue; + next: PromiseOrValue; + }; + + export type RouteStructOutput = [string, string] & { + dst: string; + next: string; + }; + + export type ServiceStruct = { + svc: PromiseOrValue; + addr: PromiseOrValue; + }; + + export type ServiceStructOutput = [string, string] & { + svc: string; + addr: string; + }; + + export type VerifierStruct = { + net: PromiseOrValue; + addr: PromiseOrValue; + }; + + export type VerifierStructOutput = [string, string] & { + net: string; + addr: string; + }; +} + +export interface IBMCManagementInterface extends utils.Interface { + functions: { + "addLink(string)": FunctionFragment; + "addRelay(string,address)": FunctionFragment; + "addRoute(string,string)": FunctionFragment; + "addService(string,address)": FunctionFragment; + "addVerifier(string,address)": FunctionFragment; + "dropMessage(string,uint256,string,int256,int256,string,uint256[])": FunctionFragment; + "getFeeHandler()": FunctionFragment; + "getFeeTable(string[])": FunctionFragment; + "getLinks()": FunctionFragment; + "getRelays(string)": FunctionFragment; + "getRoutes()": FunctionFragment; + "getServices()": FunctionFragment; + "getVerifiers()": FunctionFragment; + "removeLink(string)": FunctionFragment; + "removeRelay(string,address)": FunctionFragment; + "removeRoute(string)": FunctionFragment; + "removeService(string)": FunctionFragment; + "removeVerifier(string)": FunctionFragment; + "setFeeHandler(address)": FunctionFragment; + "setFeeTable(string[],uint256[][])": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addLink" + | "addRelay" + | "addRoute" + | "addService" + | "addVerifier" + | "dropMessage" + | "getFeeHandler" + | "getFeeTable" + | "getLinks" + | "getRelays" + | "getRoutes" + | "getServices" + | "getVerifiers" + | "removeLink" + | "removeRelay" + | "removeRoute" + | "removeService" + | "removeVerifier" + | "setFeeHandler" + | "setFeeTable" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addLink", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addRelay", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addRoute", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addService", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "addVerifier", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "dropMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue[] + ] + ): string; + encodeFunctionData( + functionFragment: "getFeeHandler", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFeeTable", + values: [PromiseOrValue[]] + ): string; + encodeFunctionData(functionFragment: "getLinks", values?: undefined): string; + encodeFunctionData( + functionFragment: "getRelays", + values: [PromiseOrValue] + ): string; + encodeFunctionData(functionFragment: "getRoutes", values?: undefined): string; + encodeFunctionData( + functionFragment: "getServices", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVerifiers", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "removeLink", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeRelay", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeRoute", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeService", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeVerifier", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFeeHandler", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setFeeTable", + values: [PromiseOrValue[], PromiseOrValue[][]] + ): string; + + decodeFunctionResult(functionFragment: "addLink", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addRelay", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addRoute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addService", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "addVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "dropMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFeeTable", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getLinks", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRelays", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getRoutes", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getServices", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifiers", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "removeLink", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeRelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeRoute", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeService", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setFeeTable", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IBMCManagement extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IBMCManagementInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFeeHandler( + overrides?: CallOverrides + ): Promise<[string] & { _addr: string }>; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise<[BigNumber[][]] & { _feeTable: BigNumber[][] }>; + + getLinks( + overrides?: CallOverrides + ): Promise<[string[]] & { _links: string[] }>; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string[]] & { _relays: string[] }>; + + getRoutes( + overrides?: CallOverrides + ): Promise< + [Types.RouteStructOutput[]] & { _routes: Types.RouteStructOutput[] } + >; + + getServices( + overrides?: CallOverrides + ): Promise< + [Types.ServiceStructOutput[]] & { + _servicers: Types.ServiceStructOutput[]; + } + >; + + getVerifiers( + overrides?: CallOverrides + ): Promise< + [Types.VerifierStructOutput[]] & { + _verifiers: Types.VerifierStructOutput[]; + } + >; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getVerifiers( + overrides?: CallOverrides + ): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addLink( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices( + overrides?: CallOverrides + ): Promise; + + getVerifiers( + overrides?: CallOverrides + ): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getVerifiers(overrides?: CallOverrides): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + addLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addRoute( + _dst: PromiseOrValue, + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addService( + _svc: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addVerifier( + _net: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _src: PromiseOrValue, + _seq: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _nsn: PromiseOrValue, + _feeNetwork: PromiseOrValue, + _feeValues: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFeeHandler(overrides?: CallOverrides): Promise; + + getFeeTable( + _dst: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + getLinks(overrides?: CallOverrides): Promise; + + getRelays( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getRoutes(overrides?: CallOverrides): Promise; + + getServices(overrides?: CallOverrides): Promise; + + getVerifiers(overrides?: CallOverrides): Promise; + + removeLink( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeRoute( + _dst: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeService( + _svc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeVerifier( + _net: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setFeeTable( + _dst: PromiseOrValue[], + _value: PromiseOrValue[][], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/IBMCPeriphery.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/IBMCPeriphery.ts new file mode 100644 index 00000000..f012d5db --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/IBMCPeriphery.ts @@ -0,0 +1,561 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace IBMV { + export type VerifierStatusStruct = { + height: PromiseOrValue; + extra: PromiseOrValue; + }; + + export type VerifierStatusStructOutput = [BigNumber, string] & { + height: BigNumber; + extra: string; + }; +} + +export declare namespace Types { + export type LinkStatusStruct = { + rxSeq: PromiseOrValue; + txSeq: PromiseOrValue; + verifier: IBMV.VerifierStatusStruct; + currentHeight: PromiseOrValue; + }; + + export type LinkStatusStructOutput = [ + BigNumber, + BigNumber, + IBMV.VerifierStatusStructOutput, + BigNumber + ] & { + rxSeq: BigNumber; + txSeq: BigNumber; + verifier: IBMV.VerifierStatusStructOutput; + currentHeight: BigNumber; + }; +} + +export interface IBMCPeripheryInterface extends utils.Interface { + functions: { + "claimReward(string,string)": FunctionFragment; + "getBtpAddress()": FunctionFragment; + "getFee(string,bool)": FunctionFragment; + "getNetworkAddress()": FunctionFragment; + "getNetworkSn()": FunctionFragment; + "getReward(string,address)": FunctionFragment; + "getStatus(string)": FunctionFragment; + "handleRelayMessage(string,bytes)": FunctionFragment; + "sendMessage(string,string,int256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "claimReward" + | "getBtpAddress" + | "getFee" + | "getNetworkAddress" + | "getNetworkSn" + | "getReward" + | "getStatus" + | "handleRelayMessage" + | "sendMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "claimReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getBtpAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getNetworkAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkSn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getStatus", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "handleRelayMessage", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "claimReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBtpAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getNetworkAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkSn", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getStatus", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "handleRelayMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendMessage", + data: BytesLike + ): Result; + + events: { + "BTPEvent(string,int256,string,string)": EventFragment; + "ClaimReward(address,string,string,uint256,int256)": EventFragment; + "ClaimRewardResult(address,string,int256,uint256)": EventFragment; + "Message(string,uint256,bytes)": EventFragment; + "MessageDropped(string,uint256,bytes,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "BTPEvent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ClaimReward"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ClaimRewardResult"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Message"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MessageDropped"): EventFragment; +} + +export interface BTPEventEventObject { + _src: string; + _nsn: BigNumber; + _next: string; + _event: string; +} +export type BTPEventEvent = TypedEvent< + [string, BigNumber, string, string], + BTPEventEventObject +>; + +export type BTPEventEventFilter = TypedEventFilter; + +export interface ClaimRewardEventObject { + _sender: string; + _network: string; + _receiver: string; + _amount: BigNumber; + _nsn: BigNumber; +} +export type ClaimRewardEvent = TypedEvent< + [string, string, string, BigNumber, BigNumber], + ClaimRewardEventObject +>; + +export type ClaimRewardEventFilter = TypedEventFilter; + +export interface ClaimRewardResultEventObject { + _sender: string; + _network: string; + _nsn: BigNumber; + _result: BigNumber; +} +export type ClaimRewardResultEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + ClaimRewardResultEventObject +>; + +export type ClaimRewardResultEventFilter = + TypedEventFilter; + +export interface MessageEventObject { + _next: string; + _seq: BigNumber; + _msg: string; +} +export type MessageEvent = TypedEvent< + [string, BigNumber, string], + MessageEventObject +>; + +export type MessageEventFilter = TypedEventFilter; + +export interface MessageDroppedEventObject { + _prev: string; + _seq: BigNumber; + _msg: string; + _ecode: BigNumber; + _emsg: string; +} +export type MessageDroppedEvent = TypedEvent< + [string, BigNumber, string, BigNumber, string], + MessageDroppedEventObject +>; + +export type MessageDroppedEventFilter = TypedEventFilter; + +export interface IBMCPeriphery extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IBMCPeripheryInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise<[string]>; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { _fee: BigNumber }>; + + getNetworkAddress(overrides?: CallOverrides): Promise<[string]>; + + getNetworkSn(overrides?: CallOverrides): Promise<[BigNumber]>; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { _reward: BigNumber }>; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [Types.LinkStatusStructOutput] & { _status: Types.LinkStatusStructOutput } + >; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "BTPEvent(string,int256,string,string)"( + _src?: PromiseOrValue | null, + _nsn?: PromiseOrValue | null, + _next?: null, + _event?: null + ): BTPEventEventFilter; + BTPEvent( + _src?: PromiseOrValue | null, + _nsn?: PromiseOrValue | null, + _next?: null, + _event?: null + ): BTPEventEventFilter; + + "ClaimReward(address,string,string,uint256,int256)"( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _receiver?: null, + _amount?: null, + _nsn?: null + ): ClaimRewardEventFilter; + ClaimReward( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _receiver?: null, + _amount?: null, + _nsn?: null + ): ClaimRewardEventFilter; + + "ClaimRewardResult(address,string,int256,uint256)"( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _nsn?: null, + _result?: null + ): ClaimRewardResultEventFilter; + ClaimRewardResult( + _sender?: PromiseOrValue | null, + _network?: PromiseOrValue | null, + _nsn?: null, + _result?: null + ): ClaimRewardResultEventFilter; + + "Message(string,uint256,bytes)"( + _next?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null + ): MessageEventFilter; + Message( + _next?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null + ): MessageEventFilter; + + "MessageDropped(string,uint256,bytes,uint256,string)"( + _prev?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null, + _ecode?: null, + _emsg?: null + ): MessageDroppedEventFilter; + MessageDropped( + _prev?: PromiseOrValue | null, + _seq?: PromiseOrValue | null, + _msg?: null, + _ecode?: null, + _emsg?: null + ): MessageDroppedEventFilter; + }; + + estimateGas: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + claimReward( + _network: PromiseOrValue, + _receiver: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getNetworkAddress(overrides?: CallOverrides): Promise; + + getNetworkSn(overrides?: CallOverrides): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getStatus( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _prev: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/ICCManagement.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/ICCManagement.ts new file mode 100644 index 00000000..a211f1ea --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/ICCManagement.ts @@ -0,0 +1,370 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ICCManagementInterface extends utils.Interface { + functions: { + "addReachable(string,string)": FunctionFragment; + "getFee(string,bool)": FunctionFragment; + "getHop(string)": FunctionFragment; + "getService(string)": FunctionFragment; + "getVerifier(string)": FunctionFragment; + "isLinkRelay(string,address)": FunctionFragment; + "removeReachable(string,string)": FunctionFragment; + "resolveNext(string)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addReachable" + | "getFee" + | "getHop" + | "getService" + | "getVerifier" + | "isLinkRelay" + | "removeReachable" + | "resolveNext" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addReachable", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getHop", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getService", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getVerifier", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isLinkRelay", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeReachable", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "resolveNext", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "addReachable", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getHop", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getService", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isLinkRelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeReachable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "resolveNext", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ICCManagement extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ICCManagementInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber[]] & { _fee: BigNumber; _values: BigNumber[] } + >; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string] & { _next: string }>; + }; + + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber[]] & { _fee: BigNumber; _values: BigNumber[] } + >; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + callStatic: { + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber[]] & { _fee: BigNumber; _values: BigNumber[] } + >; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + addReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getFee( + _to: PromiseOrValue, + _response: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getHop( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getService( + _svc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getVerifier( + _net: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isLinkRelay( + _link: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeReachable( + _from: PromiseOrValue, + _reachable: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + resolveNext( + _dst: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/ICCPeriphery.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/ICCPeriphery.ts new file mode 100644 index 00000000..9a665aaf --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/ICCPeriphery.ts @@ -0,0 +1,290 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace Types { + export type FeeInfoStruct = { + network: PromiseOrValue; + values: PromiseOrValue[]; + }; + + export type FeeInfoStructOutput = [string, BigNumber[]] & { + network: string; + values: BigNumber[]; + }; + + export type BTPMessageStruct = { + src: PromiseOrValue; + dst: PromiseOrValue; + svc: PromiseOrValue; + sn: PromiseOrValue; + message: PromiseOrValue; + nsn: PromiseOrValue; + feeInfo: Types.FeeInfoStruct; + }; + + export type BTPMessageStructOutput = [ + string, + string, + string, + BigNumber, + string, + BigNumber, + Types.FeeInfoStructOutput + ] & { + src: string; + dst: string; + svc: string; + sn: BigNumber; + message: string; + nsn: BigNumber; + feeInfo: Types.FeeInfoStructOutput; + }; +} + +export interface ICCPeripheryInterface extends utils.Interface { + functions: { + "clearSeq(string)": FunctionFragment; + "dropMessage(string,uint256,(string,string,string,int256,bytes,int256,(string,uint256[])))": FunctionFragment; + "emitClaimRewardResult(address,string,int256,uint256)": FunctionFragment; + "sendInternal(string,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "clearSeq" + | "dropMessage" + | "emitClaimRewardResult" + | "sendInternal" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "clearSeq", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "dropMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + Types.BTPMessageStruct + ] + ): string; + encodeFunctionData( + functionFragment: "emitClaimRewardResult", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "sendInternal", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "clearSeq", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "dropMessage", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "emitClaimRewardResult", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendInternal", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ICCPeriphery extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ICCPeripheryInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + clearSeq( + _link: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: CallOverrides + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + clearSeq( + _link: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + dropMessage( + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: Types.BTPMessageStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + emitClaimRewardResult( + _sender: PromiseOrValue, + _network: PromiseOrValue, + _nsn: PromiseOrValue, + _result: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendInternal( + _next: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/ICCService.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/ICCService.ts new file mode 100644 index 00000000..ba004bed --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/ICCService.ts @@ -0,0 +1,519 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export declare namespace Types { + export type ResponseMessageStruct = { + code: PromiseOrValue; + message: PromiseOrValue; + }; + + export type ResponseMessageStructOutput = [BigNumber, string] & { + code: BigNumber; + message: string; + }; + + export type FeeInfoStruct = { + network: PromiseOrValue; + values: PromiseOrValue[]; + }; + + export type FeeInfoStructOutput = [string, BigNumber[]] & { + network: string; + values: BigNumber[]; + }; + + export type BTPMessageStruct = { + src: PromiseOrValue; + dst: PromiseOrValue; + svc: PromiseOrValue; + sn: PromiseOrValue; + message: PromiseOrValue; + nsn: PromiseOrValue; + feeInfo: Types.FeeInfoStruct; + }; + + export type BTPMessageStructOutput = [ + string, + string, + string, + BigNumber, + string, + BigNumber, + Types.FeeInfoStructOutput + ] & { + src: string; + dst: string; + svc: string; + sn: BigNumber; + message: string; + nsn: BigNumber; + feeInfo: Types.FeeInfoStructOutput; + }; + + export type ResponseStruct = { + nsn: PromiseOrValue; + feeInfo: Types.FeeInfoStruct; + }; + + export type ResponseStructOutput = [BigNumber, Types.FeeInfoStructOutput] & { + nsn: BigNumber; + feeInfo: Types.FeeInfoStructOutput; + }; +} + +export interface ICCServiceInterface extends utils.Interface { + functions: { + "addRequest(int256,string,address,uint256)": FunctionFragment; + "addReward(string,address,uint256)": FunctionFragment; + "clearReward(string,address)": FunctionFragment; + "decodeResponseMessage(bytes)": FunctionFragment; + "getReward(string,address)": FunctionFragment; + "handleDropFee(string,uint256[])": FunctionFragment; + "handleErrorFee(string,int256,(string,uint256[]))": FunctionFragment; + "handleFee(address,bytes)": FunctionFragment; + "removeResponse(string,string,int256)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "addRequest" + | "addReward" + | "clearReward" + | "decodeResponseMessage" + | "getReward" + | "handleDropFee" + | "handleErrorFee" + | "handleFee" + | "removeResponse" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addRequest", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "addReward", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "clearReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "decodeResponseMessage", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getReward", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "handleDropFee", + values: [PromiseOrValue, PromiseOrValue[]] + ): string; + encodeFunctionData( + functionFragment: "handleErrorFee", + values: [ + PromiseOrValue, + PromiseOrValue, + Types.FeeInfoStruct + ] + ): string; + encodeFunctionData( + functionFragment: "handleFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeResponse", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "addRequest", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addReward", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "clearReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "decodeResponseMessage", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getReward", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "handleDropFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleErrorFee", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "handleFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeResponse", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ICCService extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ICCServiceInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[Types.ResponseMessageStructOutput]>; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber] & { _reward: BigNumber }>; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: CallOverrides + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: CallOverrides + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + addRequest( + _nsn: PromiseOrValue, + _dst: PromiseOrValue, + _sender: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + addReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + _amount: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + clearReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + decodeResponseMessage( + _rlp: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getReward( + _network: PromiseOrValue, + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleDropFee( + _network: PromiseOrValue, + _values: PromiseOrValue[], + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleErrorFee( + _src: PromiseOrValue, + _sn: PromiseOrValue, + _feeInfo: Types.FeeInfoStruct, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleFee( + _addr: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + removeResponse( + _to: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/IOwnerManager.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/IOwnerManager.ts new file mode 100644 index 00000000..684f389b --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/IOwnerManager.ts @@ -0,0 +1,169 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IOwnerManagerInterface extends utils.Interface { + functions: { + "addOwner(address)": FunctionFragment; + "isOwner(address)": FunctionFragment; + "removeOwner(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "addOwner" | "isOwner" | "removeOwner" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "addOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "isOwner", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "removeOwner", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "addOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "removeOwner", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IOwnerManager extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IOwnerManagerInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[boolean]>; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + addOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + addOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + isOwner( + _owner: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + removeOwner( + _owner: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmc/interfaces/index.ts b/test/typechain-types/solidity/contracts/bmc/interfaces/index.ts new file mode 100644 index 00000000..b0631ab0 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmc/interfaces/index.ts @@ -0,0 +1,9 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IBMCManagement } from "./IBMCManagement"; +export type { IBMCPeriphery } from "./IBMCPeriphery"; +export type { ICCManagement } from "./ICCManagement"; +export type { ICCPeriphery } from "./ICCPeriphery"; +export type { ICCService } from "./ICCService"; +export type { IOwnerManager } from "./IOwnerManager"; diff --git a/test/typechain-types/solidity/contracts/bmv-bridge/BMV.ts b/test/typechain-types/solidity/contracts/bmv-bridge/BMV.ts new file mode 100644 index 00000000..eff7c303 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv-bridge/BMV.ts @@ -0,0 +1,181 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IBMV { + export type VerifierStatusStruct = { + height: PromiseOrValue; + extra: PromiseOrValue; + }; + + export type VerifierStatusStructOutput = [BigNumber, string] & { + height: BigNumber; + extra: string; + }; +} + +export interface BMVInterface extends utils.Interface { + functions: { + "getConnectedBMC()": FunctionFragment; + "getStatus()": FunctionFragment; + "handleRelayMessage(string,string,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getConnectedBMC" + | "getStatus" + | "handleRelayMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getConnectedBMC", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getStatus", values?: undefined): string; + encodeFunctionData( + functionFragment: "handleRelayMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "getConnectedBMC", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getStatus", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "handleRelayMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface BMV extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BMVInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getConnectedBMC(overrides?: CallOverrides): Promise<[string]>; + + getStatus( + overrides?: CallOverrides + ): Promise<[IBMV.VerifierStatusStructOutput]>; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + getConnectedBMC(overrides?: CallOverrides): Promise; + + getStatus( + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + getConnectedBMC(overrides?: CallOverrides): Promise; + + getStatus( + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getConnectedBMC(overrides?: CallOverrides): Promise; + + getStatus(overrides?: CallOverrides): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + getConnectedBMC(overrides?: CallOverrides): Promise; + + getStatus(overrides?: CallOverrides): Promise; + + handleRelayMessage( + _bmc: PromiseOrValue, + _prev: PromiseOrValue, + _seq: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmv-bridge/index.ts b/test/typechain-types/solidity/contracts/bmv-bridge/index.ts new file mode 100644 index 00000000..93d50418 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv-bridge/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { BMV } from "./BMV"; diff --git a/test/typechain-types/solidity/contracts/bmv/BtpMessageVerifier.ts b/test/typechain-types/solidity/contracts/bmv/BtpMessageVerifier.ts new file mode 100644 index 00000000..98078a0c --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv/BtpMessageVerifier.ts @@ -0,0 +1,396 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IBMV { + export type VerifierStatusStruct = { + height: PromiseOrValue; + extra: PromiseOrValue; + }; + + export type VerifierStatusStructOutput = [BigNumber, string] & { + height: BigNumber; + extra: string; + }; +} + +export interface BtpMessageVerifierInterface extends utils.Interface { + functions: { + "getHeight()": FunctionFragment; + "getMessageCount()": FunctionFragment; + "getMessageRoot()": FunctionFragment; + "getNetworkId()": FunctionFragment; + "getNetworkSectionHash()": FunctionFragment; + "getNetworkTypeId()": FunctionFragment; + "getNextMessageSn()": FunctionFragment; + "getRemainMessageCount()": FunctionFragment; + "getSrcNetworkId()": FunctionFragment; + "getStatus()": FunctionFragment; + "getValidators(uint256)": FunctionFragment; + "getValidatorsCount()": FunctionFragment; + "handleRelayMessage(string,string,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getHeight" + | "getMessageCount" + | "getMessageRoot" + | "getNetworkId" + | "getNetworkSectionHash" + | "getNetworkTypeId" + | "getNextMessageSn" + | "getRemainMessageCount" + | "getSrcNetworkId" + | "getStatus" + | "getValidators" + | "getValidatorsCount" + | "handleRelayMessage" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "getHeight", values?: undefined): string; + encodeFunctionData( + functionFragment: "getMessageCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getMessageRoot", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkSectionHash", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkTypeId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNextMessageSn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRemainMessageCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getSrcNetworkId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getStatus", values?: undefined): string; + encodeFunctionData( + functionFragment: "getValidators", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getValidatorsCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "handleRelayMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "getHeight", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getMessageCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMessageRoot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkSectionHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkTypeId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNextMessageSn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRemainMessageCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getSrcNetworkId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getStatus", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getValidators", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getValidatorsCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleRelayMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface BtpMessageVerifier extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BtpMessageVerifierInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getHeight(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMessageCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMessageRoot(overrides?: CallOverrides): Promise<[string]>; + + getNetworkId(overrides?: CallOverrides): Promise<[BigNumber]>; + + getNetworkSectionHash(overrides?: CallOverrides): Promise<[string]>; + + getNetworkTypeId(overrides?: CallOverrides): Promise<[BigNumber]>; + + getNextMessageSn(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRemainMessageCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + getSrcNetworkId(overrides?: CallOverrides): Promise<[string]>; + + getStatus( + overrides?: CallOverrides + ): Promise<[IBMV.VerifierStatusStructOutput]>; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getValidatorsCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash(overrides?: CallOverrides): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount(overrides?: CallOverrides): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus( + overrides?: CallOverrides + ): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount(overrides?: CallOverrides): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash(overrides?: CallOverrides): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount(overrides?: CallOverrides): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus( + overrides?: CallOverrides + ): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount(overrides?: CallOverrides): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash(overrides?: CallOverrides): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount(overrides?: CallOverrides): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus(overrides?: CallOverrides): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount(overrides?: CallOverrides): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash( + overrides?: CallOverrides + ): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount( + overrides?: CallOverrides + ): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus(overrides?: CallOverrides): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount( + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmv/BtpMessageVerifierV2.ts b/test/typechain-types/solidity/contracts/bmv/BtpMessageVerifierV2.ts new file mode 100644 index 00000000..00f27313 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv/BtpMessageVerifierV2.ts @@ -0,0 +1,396 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export declare namespace IBMV { + export type VerifierStatusStruct = { + height: PromiseOrValue; + extra: PromiseOrValue; + }; + + export type VerifierStatusStructOutput = [BigNumber, string] & { + height: BigNumber; + extra: string; + }; +} + +export interface BtpMessageVerifierV2Interface extends utils.Interface { + functions: { + "getHeight()": FunctionFragment; + "getMessageCount()": FunctionFragment; + "getMessageRoot()": FunctionFragment; + "getNetworkId()": FunctionFragment; + "getNetworkSectionHash()": FunctionFragment; + "getNetworkTypeId()": FunctionFragment; + "getNextMessageSn()": FunctionFragment; + "getRemainMessageCount()": FunctionFragment; + "getSrcNetworkId()": FunctionFragment; + "getStatus()": FunctionFragment; + "getValidators(uint256)": FunctionFragment; + "getValidatorsCount()": FunctionFragment; + "handleRelayMessage(string,string,uint256,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getHeight" + | "getMessageCount" + | "getMessageRoot" + | "getNetworkId" + | "getNetworkSectionHash" + | "getNetworkTypeId" + | "getNextMessageSn" + | "getRemainMessageCount" + | "getSrcNetworkId" + | "getStatus" + | "getValidators" + | "getValidatorsCount" + | "handleRelayMessage" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "getHeight", values?: undefined): string; + encodeFunctionData( + functionFragment: "getMessageCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getMessageRoot", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkSectionHash", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNetworkTypeId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getNextMessageSn", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRemainMessageCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getSrcNetworkId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getStatus", values?: undefined): string; + encodeFunctionData( + functionFragment: "getValidators", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getValidatorsCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "handleRelayMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "getHeight", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getMessageCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMessageRoot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkSectionHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNetworkTypeId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNextMessageSn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRemainMessageCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getSrcNetworkId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getStatus", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getValidators", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getValidatorsCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleRelayMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface BtpMessageVerifierV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: BtpMessageVerifierV2Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getHeight(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMessageCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMessageRoot(overrides?: CallOverrides): Promise<[string]>; + + getNetworkId(overrides?: CallOverrides): Promise<[BigNumber]>; + + getNetworkSectionHash(overrides?: CallOverrides): Promise<[string]>; + + getNetworkTypeId(overrides?: CallOverrides): Promise<[BigNumber]>; + + getNextMessageSn(overrides?: CallOverrides): Promise<[BigNumber]>; + + getRemainMessageCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + getSrcNetworkId(overrides?: CallOverrides): Promise<[string]>; + + getStatus( + overrides?: CallOverrides + ): Promise<[IBMV.VerifierStatusStructOutput]>; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[string]>; + + getValidatorsCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash(overrides?: CallOverrides): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount(overrides?: CallOverrides): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus( + overrides?: CallOverrides + ): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount(overrides?: CallOverrides): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash(overrides?: CallOverrides): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount(overrides?: CallOverrides): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus( + overrides?: CallOverrides + ): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount(overrides?: CallOverrides): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash(overrides?: CallOverrides): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount(overrides?: CallOverrides): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus(overrides?: CallOverrides): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount(overrides?: CallOverrides): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + getHeight(overrides?: CallOverrides): Promise; + + getMessageCount(overrides?: CallOverrides): Promise; + + getMessageRoot(overrides?: CallOverrides): Promise; + + getNetworkId(overrides?: CallOverrides): Promise; + + getNetworkSectionHash( + overrides?: CallOverrides + ): Promise; + + getNetworkTypeId(overrides?: CallOverrides): Promise; + + getNextMessageSn(overrides?: CallOverrides): Promise; + + getRemainMessageCount( + overrides?: CallOverrides + ): Promise; + + getSrcNetworkId(overrides?: CallOverrides): Promise; + + getStatus(overrides?: CallOverrides): Promise; + + getValidators( + nth: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getValidatorsCount( + overrides?: CallOverrides + ): Promise; + + handleRelayMessage( + arg0: PromiseOrValue, + _prev: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmv/Migrations.ts b/test/typechain-types/solidity/contracts/bmv/Migrations.ts new file mode 100644 index 00000000..9b0fce32 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv/Migrations.ts @@ -0,0 +1,177 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface MigrationsInterface extends utils.Interface { + functions: { + "last_completed_migration()": FunctionFragment; + "owner()": FunctionFragment; + "setCompleted(uint256)": FunctionFragment; + "upgrade(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "last_completed_migration" + | "owner" + | "setCompleted" + | "upgrade" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "last_completed_migration", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "setCompleted", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "upgrade", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "last_completed_migration", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setCompleted", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result; + + events: {}; +} + +export interface Migrations extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: MigrationsInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + last_completed_migration(overrides?: CallOverrides): Promise<[BigNumber]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + setCompleted( + completed: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgrade( + new_address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + last_completed_migration(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + setCompleted( + completed: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgrade( + new_address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + last_completed_migration(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + setCompleted( + completed: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + upgrade( + new_address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + last_completed_migration(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + setCompleted( + completed: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgrade( + new_address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + last_completed_migration( + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + setCompleted( + completed: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + upgrade( + new_address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmv/index.ts b/test/typechain-types/solidity/contracts/bmv/index.ts new file mode 100644 index 00000000..5d04dc1f --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as libraries from "./libraries"; +export type { libraries }; +export type { BtpMessageVerifier } from "./BtpMessageVerifier"; +export type { BtpMessageVerifierV2 } from "./BtpMessageVerifierV2"; +export type { Migrations } from "./Migrations"; diff --git a/test/typechain-types/solidity/contracts/bmv/libraries/Errors.ts b/test/typechain-types/solidity/contracts/bmv/libraries/Errors.ts new file mode 100644 index 00000000..deb029e8 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv/libraries/Errors.ts @@ -0,0 +1,174 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, +} from "../../../../common"; + +export interface ErrorsInterface extends utils.Interface { + functions: { + "ERR_ALREADY_VERIFIED()": FunctionFragment; + "ERR_INVALID_ARGS()": FunctionFragment; + "ERR_NOT_VERIFIABLE()": FunctionFragment; + "ERR_UNAUTHORIZED()": FunctionFragment; + "ERR_UNKNOWN()": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "ERR_ALREADY_VERIFIED" + | "ERR_INVALID_ARGS" + | "ERR_NOT_VERIFIABLE" + | "ERR_UNAUTHORIZED" + | "ERR_UNKNOWN" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "ERR_ALREADY_VERIFIED", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ERR_INVALID_ARGS", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ERR_NOT_VERIFIABLE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ERR_UNAUTHORIZED", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ERR_UNKNOWN", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "ERR_ALREADY_VERIFIED", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ERR_INVALID_ARGS", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ERR_NOT_VERIFIABLE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ERR_UNAUTHORIZED", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ERR_UNKNOWN", + data: BytesLike + ): Result; + + events: {}; +} + +export interface Errors extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ErrorsInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + ERR_ALREADY_VERIFIED(overrides?: CallOverrides): Promise<[string]>; + + ERR_INVALID_ARGS(overrides?: CallOverrides): Promise<[string]>; + + ERR_NOT_VERIFIABLE(overrides?: CallOverrides): Promise<[string]>; + + ERR_UNAUTHORIZED(overrides?: CallOverrides): Promise<[string]>; + + ERR_UNKNOWN(overrides?: CallOverrides): Promise<[string]>; + }; + + ERR_ALREADY_VERIFIED(overrides?: CallOverrides): Promise; + + ERR_INVALID_ARGS(overrides?: CallOverrides): Promise; + + ERR_NOT_VERIFIABLE(overrides?: CallOverrides): Promise; + + ERR_UNAUTHORIZED(overrides?: CallOverrides): Promise; + + ERR_UNKNOWN(overrides?: CallOverrides): Promise; + + callStatic: { + ERR_ALREADY_VERIFIED(overrides?: CallOverrides): Promise; + + ERR_INVALID_ARGS(overrides?: CallOverrides): Promise; + + ERR_NOT_VERIFIABLE(overrides?: CallOverrides): Promise; + + ERR_UNAUTHORIZED(overrides?: CallOverrides): Promise; + + ERR_UNKNOWN(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + ERR_ALREADY_VERIFIED(overrides?: CallOverrides): Promise; + + ERR_INVALID_ARGS(overrides?: CallOverrides): Promise; + + ERR_NOT_VERIFIABLE(overrides?: CallOverrides): Promise; + + ERR_UNAUTHORIZED(overrides?: CallOverrides): Promise; + + ERR_UNKNOWN(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + ERR_ALREADY_VERIFIED( + overrides?: CallOverrides + ): Promise; + + ERR_INVALID_ARGS(overrides?: CallOverrides): Promise; + + ERR_NOT_VERIFIABLE( + overrides?: CallOverrides + ): Promise; + + ERR_UNAUTHORIZED(overrides?: CallOverrides): Promise; + + ERR_UNKNOWN(overrides?: CallOverrides): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/bmv/libraries/index.ts b/test/typechain-types/solidity/contracts/bmv/libraries/index.ts new file mode 100644 index 00000000..45413aa3 --- /dev/null +++ b/test/typechain-types/solidity/contracts/bmv/libraries/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { Errors } from "./Errors"; diff --git a/test/typechain-types/solidity/contracts/dapp-sample/DAppProxySample.ts b/test/typechain-types/solidity/contracts/dapp-sample/DAppProxySample.ts new file mode 100644 index 00000000..1d5a7853 --- /dev/null +++ b/test/typechain-types/solidity/contracts/dapp-sample/DAppProxySample.ts @@ -0,0 +1,255 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface DAppProxySampleInterface extends utils.Interface { + functions: { + "handleCallMessage(string,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "sendMessage(string,bytes,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: "handleCallMessage" | "initialize" | "sendMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "handleCallMessage", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "handleCallMessage", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sendMessage", + data: BytesLike + ): Result; + + events: { + "Initialized(uint8)": EventFragment; + "MessageReceived(string,bytes)": EventFragment; + "RollbackDataReceived(string,uint256,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MessageReceived"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RollbackDataReceived"): EventFragment; +} + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface MessageReceivedEventObject { + _from: string; + _data: string; +} +export type MessageReceivedEvent = TypedEvent< + [string, string], + MessageReceivedEventObject +>; + +export type MessageReceivedEventFilter = TypedEventFilter; + +export interface RollbackDataReceivedEventObject { + _from: string; + _ssn: BigNumber; + _rollback: string; +} +export type RollbackDataReceivedEvent = TypedEvent< + [string, BigNumber, string], + RollbackDataReceivedEventObject +>; + +export type RollbackDataReceivedEventFilter = + TypedEventFilter; + +export interface DAppProxySample extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: DAppProxySampleInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _callService: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _callService: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _callService: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + "MessageReceived(string,bytes)"( + _from?: null, + _data?: null + ): MessageReceivedEventFilter; + MessageReceived(_from?: null, _data?: null): MessageReceivedEventFilter; + + "RollbackDataReceived(string,uint256,bytes)"( + _from?: null, + _ssn?: null, + _rollback?: null + ): RollbackDataReceivedEventFilter; + RollbackDataReceived( + _from?: null, + _ssn?: null, + _rollback?: null + ): RollbackDataReceivedEventFilter; + }; + + estimateGas: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _callService: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _callService: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/dapp-sample/index.ts b/test/typechain-types/solidity/contracts/dapp-sample/index.ts new file mode 100644 index 00000000..b87a2717 --- /dev/null +++ b/test/typechain-types/solidity/contracts/dapp-sample/index.ts @@ -0,0 +1,4 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { DAppProxySample } from "./DAppProxySample"; diff --git a/test/typechain-types/solidity/contracts/index.ts b/test/typechain-types/solidity/contracts/index.ts new file mode 100644 index 00000000..70bd28a1 --- /dev/null +++ b/test/typechain-types/solidity/contracts/index.ts @@ -0,0 +1,13 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as bmc from "./bmc"; +export type { bmc }; +import type * as bmv from "./bmv"; +export type { bmv }; +import type * as bmvBridge from "./bmv-bridge"; +export type { bmvBridge }; +import type * as dappSample from "./dapp-sample"; +export type { dappSample }; +import type * as xcall from "./xcall"; +export type { xcall }; diff --git a/test/typechain-types/solidity/contracts/xcall/CallService.ts b/test/typechain-types/solidity/contracts/xcall/CallService.ts new file mode 100644 index 00000000..38712d01 --- /dev/null +++ b/test/typechain-types/solidity/contracts/xcall/CallService.ts @@ -0,0 +1,789 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../common"; + +export interface CallServiceInterface extends utils.Interface { + functions: { + "admin()": FunctionFragment; + "executeCall(uint256,bytes)": FunctionFragment; + "executeRollback(uint256)": FunctionFragment; + "getBtpAddress()": FunctionFragment; + "getFee(string,bool)": FunctionFragment; + "getProtocolFee()": FunctionFragment; + "getProtocolFeeHandler()": FunctionFragment; + "handleBTPError(string,string,uint256,uint256,string)": FunctionFragment; + "handleBTPMessage(string,string,uint256,bytes)": FunctionFragment; + "initialize(address)": FunctionFragment; + "sendCallMessage(string,bytes,bytes)": FunctionFragment; + "setAdmin(address)": FunctionFragment; + "setProtocolFee(uint256)": FunctionFragment; + "setProtocolFeeHandler(address)": FunctionFragment; + "tryHandleCallMessage(address,string,string,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "admin" + | "executeCall" + | "executeRollback" + | "getBtpAddress" + | "getFee" + | "getProtocolFee" + | "getProtocolFeeHandler" + | "handleBTPError" + | "handleBTPMessage" + | "initialize" + | "sendCallMessage" + | "setAdmin" + | "setProtocolFee" + | "setProtocolFeeHandler" + | "tryHandleCallMessage" + ): FunctionFragment; + + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "executeCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeRollback", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getBtpAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getProtocolFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProtocolFeeHandler", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "handleBTPError", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "handleBTPMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "sendCallMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + encodeFunctionData( + functionFragment: "setAdmin", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setProtocolFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setProtocolFeeHandler", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "tryHandleCallMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeRollback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBtpAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getProtocolFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProtocolFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleBTPError", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "handleBTPMessage", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "sendCallMessage", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setAdmin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setProtocolFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtocolFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tryHandleCallMessage", + data: BytesLike + ): Result; + + events: { + "CallExecuted(uint256,int256,string)": EventFragment; + "CallMessage(string,string,uint256,uint256,bytes)": EventFragment; + "CallMessageSent(address,string,uint256,int256)": EventFragment; + "Initialized(uint8)": EventFragment; + "ResponseMessage(uint256,int256,string)": EventFragment; + "RollbackExecuted(uint256,int256,string)": EventFragment; + "RollbackMessage(uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CallExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CallMessage"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CallMessageSent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ResponseMessage"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RollbackExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RollbackMessage"): EventFragment; +} + +export interface CallExecutedEventObject { + _reqId: BigNumber; + _code: BigNumber; + _msg: string; +} +export type CallExecutedEvent = TypedEvent< + [BigNumber, BigNumber, string], + CallExecutedEventObject +>; + +export type CallExecutedEventFilter = TypedEventFilter; + +export interface CallMessageEventObject { + _from: string; + _to: string; + _sn: BigNumber; + _reqId: BigNumber; + _data: string; +} +export type CallMessageEvent = TypedEvent< + [string, string, BigNumber, BigNumber, string], + CallMessageEventObject +>; + +export type CallMessageEventFilter = TypedEventFilter; + +export interface CallMessageSentEventObject { + _from: string; + _to: string; + _sn: BigNumber; + _nsn: BigNumber; +} +export type CallMessageSentEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + CallMessageSentEventObject +>; + +export type CallMessageSentEventFilter = TypedEventFilter; + +export interface InitializedEventObject { + version: number; +} +export type InitializedEvent = TypedEvent<[number], InitializedEventObject>; + +export type InitializedEventFilter = TypedEventFilter; + +export interface ResponseMessageEventObject { + _sn: BigNumber; + _code: BigNumber; + _msg: string; +} +export type ResponseMessageEvent = TypedEvent< + [BigNumber, BigNumber, string], + ResponseMessageEventObject +>; + +export type ResponseMessageEventFilter = TypedEventFilter; + +export interface RollbackExecutedEventObject { + _sn: BigNumber; + _code: BigNumber; + _msg: string; +} +export type RollbackExecutedEvent = TypedEvent< + [BigNumber, BigNumber, string], + RollbackExecutedEventObject +>; + +export type RollbackExecutedEventFilter = + TypedEventFilter; + +export interface RollbackMessageEventObject { + _sn: BigNumber; +} +export type RollbackMessageEvent = TypedEvent< + [BigNumber], + RollbackMessageEventObject +>; + +export type RollbackMessageEventFilter = TypedEventFilter; + +export interface CallService extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: CallServiceInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + admin(overrides?: CallOverrides): Promise<[string]>; + + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise<[string]>; + + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getProtocolFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise<[string]>; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setAdmin( + _address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tryHandleCallMessage( + toAddr: PromiseOrValue, + to: PromiseOrValue, + from: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + admin(overrides?: CallOverrides): Promise; + + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setAdmin( + _address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tryHandleCallMessage( + toAddr: PromiseOrValue, + to: PromiseOrValue, + from: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + admin(overrides?: CallOverrides): Promise; + + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + initialize( + _bmc: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setAdmin( + _address: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + tryHandleCallMessage( + toAddr: PromiseOrValue, + to: PromiseOrValue, + from: PromiseOrValue, + data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "CallExecuted(uint256,int256,string)"( + _reqId?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): CallExecutedEventFilter; + CallExecuted( + _reqId?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): CallExecutedEventFilter; + + "CallMessage(string,string,uint256,uint256,bytes)"( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _reqId?: null, + _data?: null + ): CallMessageEventFilter; + CallMessage( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _reqId?: null, + _data?: null + ): CallMessageEventFilter; + + "CallMessageSent(address,string,uint256,int256)"( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _nsn?: null + ): CallMessageSentEventFilter; + CallMessageSent( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _nsn?: null + ): CallMessageSentEventFilter; + + "Initialized(uint8)"(version?: null): InitializedEventFilter; + Initialized(version?: null): InitializedEventFilter; + + "ResponseMessage(uint256,int256,string)"( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): ResponseMessageEventFilter; + ResponseMessage( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): ResponseMessageEventFilter; + + "RollbackExecuted(uint256,int256,string)"( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): RollbackExecutedEventFilter; + RollbackExecuted( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): RollbackExecutedEventFilter; + + "RollbackMessage(uint256)"( + _sn?: PromiseOrValue | null + ): RollbackMessageEventFilter; + RollbackMessage( + _sn?: PromiseOrValue | null + ): RollbackMessageEventFilter; + }; + + estimateGas: { + admin(overrides?: CallOverrides): Promise; + + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setAdmin( + _address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tryHandleCallMessage( + toAddr: PromiseOrValue, + to: PromiseOrValue, + from: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + admin(overrides?: CallOverrides): Promise; + + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler( + overrides?: CallOverrides + ): Promise; + + handleBTPError( + _src: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _code: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + handleBTPMessage( + _from: PromiseOrValue, + _svc: PromiseOrValue, + _sn: PromiseOrValue, + _msg: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + initialize( + _bmc: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + setAdmin( + _address: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + tryHandleCallMessage( + toAddr: PromiseOrValue, + to: PromiseOrValue, + from: PromiseOrValue, + data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/xcall/index.ts b/test/typechain-types/solidity/contracts/xcall/index.ts new file mode 100644 index 00000000..355a84fd --- /dev/null +++ b/test/typechain-types/solidity/contracts/xcall/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as interfaces from "./interfaces"; +export type { interfaces }; +export type { CallService } from "./CallService"; diff --git a/test/typechain-types/solidity/contracts/xcall/interfaces/ICallService.ts b/test/typechain-types/solidity/contracts/xcall/interfaces/ICallService.ts new file mode 100644 index 00000000..8ce6322e --- /dev/null +++ b/test/typechain-types/solidity/contracts/xcall/interfaces/ICallService.ts @@ -0,0 +1,379 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PayableOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ICallServiceInterface extends utils.Interface { + functions: { + "executeCall(uint256,bytes)": FunctionFragment; + "executeRollback(uint256)": FunctionFragment; + "getBtpAddress()": FunctionFragment; + "sendCallMessage(string,bytes,bytes)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "executeCall" + | "executeRollback" + | "getBtpAddress" + | "sendCallMessage" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "executeCall", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "executeRollback", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getBtpAddress", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "sendCallMessage", + values: [ + PromiseOrValue, + PromiseOrValue, + PromiseOrValue + ] + ): string; + + decodeFunctionResult( + functionFragment: "executeCall", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeRollback", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBtpAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendCallMessage", + data: BytesLike + ): Result; + + events: { + "CallExecuted(uint256,int256,string)": EventFragment; + "CallMessage(string,string,uint256,uint256,bytes)": EventFragment; + "CallMessageSent(address,string,uint256,int256)": EventFragment; + "ResponseMessage(uint256,int256,string)": EventFragment; + "RollbackExecuted(uint256,int256,string)": EventFragment; + "RollbackMessage(uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CallExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CallMessage"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CallMessageSent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ResponseMessage"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RollbackExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RollbackMessage"): EventFragment; +} + +export interface CallExecutedEventObject { + _reqId: BigNumber; + _code: BigNumber; + _msg: string; +} +export type CallExecutedEvent = TypedEvent< + [BigNumber, BigNumber, string], + CallExecutedEventObject +>; + +export type CallExecutedEventFilter = TypedEventFilter; + +export interface CallMessageEventObject { + _from: string; + _to: string; + _sn: BigNumber; + _reqId: BigNumber; + _data: string; +} +export type CallMessageEvent = TypedEvent< + [string, string, BigNumber, BigNumber, string], + CallMessageEventObject +>; + +export type CallMessageEventFilter = TypedEventFilter; + +export interface CallMessageSentEventObject { + _from: string; + _to: string; + _sn: BigNumber; + _nsn: BigNumber; +} +export type CallMessageSentEvent = TypedEvent< + [string, string, BigNumber, BigNumber], + CallMessageSentEventObject +>; + +export type CallMessageSentEventFilter = TypedEventFilter; + +export interface ResponseMessageEventObject { + _sn: BigNumber; + _code: BigNumber; + _msg: string; +} +export type ResponseMessageEvent = TypedEvent< + [BigNumber, BigNumber, string], + ResponseMessageEventObject +>; + +export type ResponseMessageEventFilter = TypedEventFilter; + +export interface RollbackExecutedEventObject { + _sn: BigNumber; + _code: BigNumber; + _msg: string; +} +export type RollbackExecutedEvent = TypedEvent< + [BigNumber, BigNumber, string], + RollbackExecutedEventObject +>; + +export type RollbackExecutedEventFilter = + TypedEventFilter; + +export interface RollbackMessageEventObject { + _sn: BigNumber; +} +export type RollbackMessageEvent = TypedEvent< + [BigNumber], + RollbackMessageEventObject +>; + +export type RollbackMessageEventFilter = TypedEventFilter; + +export interface ICallService extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ICallServiceInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise<[string]>; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "CallExecuted(uint256,int256,string)"( + _reqId?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): CallExecutedEventFilter; + CallExecuted( + _reqId?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): CallExecutedEventFilter; + + "CallMessage(string,string,uint256,uint256,bytes)"( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _reqId?: null, + _data?: null + ): CallMessageEventFilter; + CallMessage( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _reqId?: null, + _data?: null + ): CallMessageEventFilter; + + "CallMessageSent(address,string,uint256,int256)"( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _nsn?: null + ): CallMessageSentEventFilter; + CallMessageSent( + _from?: PromiseOrValue | null, + _to?: PromiseOrValue | null, + _sn?: PromiseOrValue | null, + _nsn?: null + ): CallMessageSentEventFilter; + + "ResponseMessage(uint256,int256,string)"( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): ResponseMessageEventFilter; + ResponseMessage( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): ResponseMessageEventFilter; + + "RollbackExecuted(uint256,int256,string)"( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): RollbackExecutedEventFilter; + RollbackExecuted( + _sn?: PromiseOrValue | null, + _code?: null, + _msg?: null + ): RollbackExecutedEventFilter; + + "RollbackMessage(uint256)"( + _sn?: PromiseOrValue | null + ): RollbackMessageEventFilter; + RollbackMessage( + _sn?: PromiseOrValue | null + ): RollbackMessageEventFilter; + }; + + estimateGas: { + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + executeCall( + _reqId: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + executeRollback( + _sn: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + getBtpAddress(overrides?: CallOverrides): Promise; + + sendCallMessage( + _to: PromiseOrValue, + _data: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: PayableOverrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/xcall/interfaces/ICallServiceReceiver.ts b/test/typechain-types/solidity/contracts/xcall/interfaces/ICallServiceReceiver.ts new file mode 100644 index 00000000..5cdb9cd1 --- /dev/null +++ b/test/typechain-types/solidity/contracts/xcall/interfaces/ICallServiceReceiver.ts @@ -0,0 +1,110 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface ICallServiceReceiverInterface extends utils.Interface { + functions: { + "handleCallMessage(string,bytes)": FunctionFragment; + }; + + getFunction(nameOrSignatureOrTopic: "handleCallMessage"): FunctionFragment; + + encodeFunctionData( + functionFragment: "handleCallMessage", + values: [PromiseOrValue, PromiseOrValue] + ): string; + + decodeFunctionResult( + functionFragment: "handleCallMessage", + data: BytesLike + ): Result; + + events: {}; +} + +export interface ICallServiceReceiver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: ICallServiceReceiverInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + handleCallMessage( + _from: PromiseOrValue, + _data: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/xcall/interfaces/IFeeManage.ts b/test/typechain-types/solidity/contracts/xcall/interfaces/IFeeManage.ts new file mode 100644 index 00000000..16e98c47 --- /dev/null +++ b/test/typechain-types/solidity/contracts/xcall/interfaces/IFeeManage.ts @@ -0,0 +1,223 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { Listener, Provider } from "@ethersproject/providers"; +import type { + TypedEventFilter, + TypedEvent, + TypedListener, + OnEvent, + PromiseOrValue, +} from "../../../../common"; + +export interface IFeeManageInterface extends utils.Interface { + functions: { + "getFee(string,bool)": FunctionFragment; + "getProtocolFee()": FunctionFragment; + "getProtocolFeeHandler()": FunctionFragment; + "setProtocolFee(uint256)": FunctionFragment; + "setProtocolFeeHandler(address)": FunctionFragment; + }; + + getFunction( + nameOrSignatureOrTopic: + | "getFee" + | "getProtocolFee" + | "getProtocolFeeHandler" + | "setProtocolFee" + | "setProtocolFeeHandler" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "getFee", + values: [PromiseOrValue, PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "getProtocolFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProtocolFeeHandler", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setProtocolFee", + values: [PromiseOrValue] + ): string; + encodeFunctionData( + functionFragment: "setProtocolFeeHandler", + values: [PromiseOrValue] + ): string; + + decodeFunctionResult(functionFragment: "getFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getProtocolFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProtocolFeeHandler", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtocolFee", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtocolFeeHandler", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IFeeManage extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IFeeManageInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getProtocolFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise<[string]>; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + callStatic: { + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler(overrides?: CallOverrides): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; + + populateTransaction: { + getFee( + _net: PromiseOrValue, + _rollback: PromiseOrValue, + overrides?: CallOverrides + ): Promise; + + getProtocolFee(overrides?: CallOverrides): Promise; + + getProtocolFeeHandler( + overrides?: CallOverrides + ): Promise; + + setProtocolFee( + _value: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + + setProtocolFeeHandler( + _addr: PromiseOrValue, + overrides?: Overrides & { from?: PromiseOrValue } + ): Promise; + }; +} diff --git a/test/typechain-types/solidity/contracts/xcall/interfaces/index.ts b/test/typechain-types/solidity/contracts/xcall/interfaces/index.ts new file mode 100644 index 00000000..d64ac706 --- /dev/null +++ b/test/typechain-types/solidity/contracts/xcall/interfaces/index.ts @@ -0,0 +1,6 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ICallService } from "./ICallService"; +export type { ICallServiceReceiver } from "./ICallServiceReceiver"; +export type { IFeeManage } from "./IFeeManage"; diff --git a/test/typechain-types/solidity/index.ts b/test/typechain-types/solidity/index.ts new file mode 100644 index 00000000..a11e4ca2 --- /dev/null +++ b/test/typechain-types/solidity/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as contracts from "./contracts"; +export type { contracts };