Код для подключения.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. current_user_address = ''
  2. current_user_data = ''
  3. contract_address = '0x8b1459c586B6a5A30C7A5b057377A878B8De70D0'
  4. contract_abi = [
  5. {
  6. "inputs": [],
  7. "stateMutability": "nonpayable",
  8. "type": "constructor"
  9. },
  10. {
  11. "inputs": [
  12. {
  13. "internalType": "string",
  14. "name": "Name",
  15. "type": "string"
  16. },
  17. {
  18. "internalType": "uint256",
  19. "name": "Price",
  20. "type": "uint256"
  21. }
  22. ],
  23. "name": "AddNewProduct",
  24. "outputs": [],
  25. "stateMutability": "nonpayable",
  26. "type": "function"
  27. },
  28. {
  29. "inputs": [
  30. {
  31. "internalType": "string",
  32. "name": "Password",
  33. "type": "string"
  34. }
  35. ],
  36. "name": "AuthUser",
  37. "outputs": [
  38. {
  39. "internalType": "bool",
  40. "name": "",
  41. "type": "bool"
  42. }
  43. ],
  44. "stateMutability": "view",
  45. "type": "function"
  46. },
  47. {
  48. "inputs": [
  49. {
  50. "internalType": "string",
  51. "name": "Name",
  52. "type": "string"
  53. }
  54. ],
  55. "name": "BuyProduct",
  56. "outputs": [],
  57. "stateMutability": "nonpayable",
  58. "type": "function"
  59. },
  60. {
  61. "inputs": [
  62. {
  63. "internalType": "address",
  64. "name": "addressUser",
  65. "type": "address"
  66. }
  67. ],
  68. "name": "DemotionSellerToBuyer",
  69. "outputs": [],
  70. "stateMutability": "view",
  71. "type": "function"
  72. },
  73. {
  74. "inputs": [
  75. {
  76. "internalType": "string",
  77. "name": "Name",
  78. "type": "string"
  79. },
  80. {
  81. "internalType": "uint256",
  82. "name": "Price",
  83. "type": "uint256"
  84. }
  85. ],
  86. "name": "EditProduct",
  87. "outputs": [],
  88. "stateMutability": "nonpayable",
  89. "type": "function"
  90. },
  91. {
  92. "inputs": [],
  93. "name": "GetProducts",
  94. "outputs": [
  95. {
  96. "internalType": "string[]",
  97. "name": "",
  98. "type": "string[]"
  99. }
  100. ],
  101. "stateMutability": "view",
  102. "type": "function"
  103. },
  104. {
  105. "inputs": [
  106. {
  107. "internalType": "address",
  108. "name": "addressUser",
  109. "type": "address"
  110. }
  111. ],
  112. "name": "PromotionToAdmin",
  113. "outputs": [],
  114. "stateMutability": "nonpayable",
  115. "type": "function"
  116. },
  117. {
  118. "inputs": [
  119. {
  120. "internalType": "address",
  121. "name": "addressUser",
  122. "type": "address"
  123. }
  124. ],
  125. "name": "PromotionToSeller",
  126. "outputs": [],
  127. "stateMutability": "nonpayable",
  128. "type": "function"
  129. },
  130. {
  131. "inputs": [
  132. {
  133. "internalType": "string",
  134. "name": "Name",
  135. "type": "string"
  136. },
  137. {
  138. "internalType": "string",
  139. "name": "Password",
  140. "type": "string"
  141. }
  142. ],
  143. "name": "RegUser",
  144. "outputs": [],
  145. "stateMutability": "nonpayable",
  146. "type": "function"
  147. },
  148. {
  149. "inputs": [],
  150. "name": "ViewBalance",
  151. "outputs": [
  152. {
  153. "internalType": "uint256",
  154. "name": "",
  155. "type": "uint256"
  156. }
  157. ],
  158. "stateMutability": "view",
  159. "type": "function"
  160. },
  161. {
  162. "inputs": [
  163. {
  164. "internalType": "string",
  165. "name": "",
  166. "type": "string"
  167. }
  168. ],
  169. "name": "products",
  170. "outputs": [
  171. {
  172. "internalType": "uint256",
  173. "name": "",
  174. "type": "uint256"
  175. }
  176. ],
  177. "stateMutability": "view",
  178. "type": "function"
  179. },
  180. {
  181. "inputs": [
  182. {
  183. "internalType": "address",
  184. "name": "",
  185. "type": "address"
  186. }
  187. ],
  188. "name": "users",
  189. "outputs": [
  190. {
  191. "internalType": "string",
  192. "name": "Name",
  193. "type": "string"
  194. },
  195. {
  196. "internalType": "bytes32",
  197. "name": "PasswordHash",
  198. "type": "bytes32"
  199. },
  200. {
  201. "internalType": "uint256",
  202. "name": "Balance",
  203. "type": "uint256"
  204. },
  205. {
  206. "internalType": "uint256",
  207. "name": "Role",
  208. "type": "uint256"
  209. },
  210. {
  211. "internalType": "bool",
  212. "name": "isUserExist",
  213. "type": "bool"
  214. }
  215. ],
  216. "stateMutability": "view",
  217. "type": "function"
  218. }
  219. ]