Advertisement
Guest User

OKG parse

a guest
Oct 14th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.04 KB | None | 0 0
  1. ├─ type: SourceUnit
  2. └─ children
  3. ├─ 0
  4. │ ├─ type: PragmaDirective
  5. │ ├─ name: solidity
  6. │ └─ value: 0.5.8
  7. ├─ 1
  8. │ ├─ type: ImportDirective
  9. │ ├─ path: openzeppelin-solidity/contracts/access/roles/WhitelistedRole.sol
  10. │ ├─ unitAlias
  11. │ └─ symbolAliases
  12. ├─ 2
  13. │ ├─ type: ImportDirective
  14. │ ├─ path: openzeppelin-solidity/contracts/ownership/Ownable.sol
  15. │ ├─ unitAlias
  16. │ └─ symbolAliases
  17. ├─ 3
  18. │ ├─ type: ImportDirective
  19. │ ├─ path: openzeppelin-solidity/contracts/math/SafeMath.sol
  20. │ ├─ unitAlias
  21. │ └─ symbolAliases
  22. ├─ 4
  23. │ ├─ type: ImportDirective
  24. │ ├─ path: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol
  25. │ ├─ unitAlias
  26. │ └─ symbolAliases
  27. ├─ 5
  28. │ ├─ type: ImportDirective
  29. │ ├─ path: openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol
  30. │ ├─ unitAlias
  31. │ └─ symbolAliases
  32. └─ 6
  33. ├─ type: ContractDefinition
  34. ├─ name: OkgExchange
  35. ├─ baseContracts
  36. │ ├─ 0
  37. │ │ ├─ type: InheritanceSpecifier
  38. │ │ ├─ baseName
  39. │ │ │ ├─ type: UserDefinedTypeName
  40. │ │ │ └─ namePath: Ownable
  41. │ │ └─ arguments
  42. │ └─ 1
  43. │ ├─ type: InheritanceSpecifier
  44. │ ├─ baseName
  45. │ │ ├─ type: UserDefinedTypeName
  46. │ │ └─ namePath: WhitelistedRole
  47. │ └─ arguments
  48. ├─ subNodes
  49. │ ├─ 0
  50. │ │ ├─ type: UsingForDeclaration
  51. │ │ ├─ typeName
  52. │ │ │ ├─ type: ElementaryTypeName
  53. │ │ │ └─ name: uint256
  54. │ │ └─ libraryName: SafeMath
  55. │ ├─ 1
  56. │ │ ├─ type: UsingForDeclaration
  57. │ │ ├─ typeName
  58. │ │ │ ├─ type: UserDefinedTypeName
  59. │ │ │ └─ namePath: IERC20
  60. │ │ └─ libraryName: SafeERC20
  61. │ ├─ 2
  62. │ │ ├─ type: StateVariableDeclaration
  63. │ │ ├─ variables
  64. │ │ │ └─ 0
  65. │ │ │ ├─ type: VariableDeclaration
  66. │ │ │ ├─ typeName
  67. │ │ │ │ ├─ type: ElementaryTypeName
  68. │ │ │ │ └─ name: address
  69. │ │ │ ├─ name: usdcToken
  70. │ │ │ ├─ expression
  71. │ │ │ ├─ visibility: default
  72. │ │ │ ├─ isStateVar: true
  73. │ │ │ ├─ isDeclaredConst: false
  74. │ │ │ └─ isIndexed: false
  75. │ │ └─ initialValue
  76. │ ├─ 3
  77. │ │ ├─ type: StateVariableDeclaration
  78. │ │ ├─ variables
  79. │ │ │ └─ 0
  80. │ │ │ ├─ type: VariableDeclaration
  81. │ │ │ ├─ typeName
  82. │ │ │ │ ├─ type: ElementaryTypeName
  83. │ │ │ │ └─ name: address
  84. │ │ │ ├─ name: okgToken
  85. │ │ │ ├─ expression
  86. │ │ │ ├─ visibility: default
  87. │ │ │ ├─ isStateVar: true
  88. │ │ │ ├─ isDeclaredConst: false
  89. │ │ │ └─ isIndexed: false
  90. │ │ └─ initialValue
  91. │ ├─ 4
  92. │ │ ├─ type: StateVariableDeclaration
  93. │ │ ├─ variables
  94. │ │ │ └─ 0
  95. │ │ │ ├─ type: VariableDeclaration
  96. │ │ │ ├─ typeName
  97. │ │ │ │ ├─ type: ElementaryTypeName
  98. │ │ │ │ └─ name: address
  99. │ │ │ ├─ name: wallet
  100. │ │ │ ├─ expression
  101. │ │ │ ├─ visibility: default
  102. │ │ │ ├─ isStateVar: true
  103. │ │ │ ├─ isDeclaredConst: false
  104. │ │ │ └─ isIndexed: false
  105. │ │ └─ initialValue
  106. │ ├─ 5
  107. │ │ ├─ type: StateVariableDeclaration
  108. │ │ ├─ variables
  109. │ │ │ └─ 0
  110. │ │ │ ├─ type: VariableDeclaration
  111. │ │ │ ├─ typeName
  112. │ │ │ │ ├─ type: ElementaryTypeName
  113. │ │ │ │ └─ name: uint256
  114. │ │ │ ├─ name: rate
  115. │ │ │ ├─ expression
  116. │ │ │ ├─ visibility: default
  117. │ │ │ ├─ isStateVar: true
  118. │ │ │ ├─ isDeclaredConst: false
  119. │ │ │ └─ isIndexed: false
  120. │ │ └─ initialValue
  121. │ ├─ 6
  122. │ │ ├─ type: StateVariableDeclaration
  123. │ │ ├─ variables
  124. │ │ │ └─ 0
  125. │ │ │ ├─ type: VariableDeclaration
  126. │ │ │ ├─ typeName
  127. │ │ │ │ ├─ type: ElementaryTypeName
  128. │ │ │ │ └─ name: uint256
  129. │ │ │ ├─ name: openingTime
  130. │ │ │ ├─ expression
  131. │ │ │ ├─ visibility: default
  132. │ │ │ ├─ isStateVar: true
  133. │ │ │ ├─ isDeclaredConst: false
  134. │ │ │ └─ isIndexed: false
  135. │ │ └─ initialValue
  136. │ ├─ 7
  137. │ │ ├─ type: StateVariableDeclaration
  138. │ │ ├─ variables
  139. │ │ │ └─ 0
  140. │ │ │ ├─ type: VariableDeclaration
  141. │ │ │ ├─ typeName
  142. │ │ │ │ ├─ type: ElementaryTypeName
  143. │ │ │ │ └─ name: uint256
  144. │ │ │ ├─ name: closingTime
  145. │ │ │ ├─ expression
  146. │ │ │ ├─ visibility: default
  147. │ │ │ ├─ isStateVar: true
  148. │ │ │ ├─ isDeclaredConst: false
  149. │ │ │ └─ isIndexed: false
  150. │ │ └─ initialValue
  151. │ ├─ 8
  152. │ │ ├─ type: ModifierDefinition
  153. │ │ ├─ name: saleOver
  154. │ │ ├─ parameters
  155. │ │ └─ body
  156. │ │ ├─ type: Block
  157. │ │ └─ statements
  158. │ │ ├─ 0
  159. │ │ │ ├─ type: ExpressionStatement
  160. │ │ │ └─ expression
  161. │ │ │ ├─ type: FunctionCall
  162. │ │ │ ├─ expression
  163. │ │ │ │ ├─ type: Identifier
  164. │ │ │ │ └─ name: require
  165. │ │ │ ├─ arguments
  166. │ │ │ │ ├─ 0
  167. │ │ │ │ │ ├─ type: BinaryOperation
  168. │ │ │ │ │ ├─ operator: >
  169. │ │ │ │ │ ├─ left
  170. │ │ │ │ │ │ ├─ type: Identifier
  171. │ │ │ │ │ │ └─ name: now
  172. │ │ │ │ │ └─ right
  173. │ │ │ │ │ ├─ type: Identifier
  174. │ │ │ │ │ └─ name: closingTime
  175. │ │ │ │ └─ 1
  176. │ │ │ │ ├─ type: StringLiteral
  177. │ │ │ │ └─ value: Sale is running!
  178. │ │ │ └─ names
  179. │ │ └─ 1
  180. │ │ ├─ type: ExpressionStatement
  181. │ │ └─ expression
  182. │ │ ├─ type: Identifier
  183. │ │ └─ name: _
  184. │ ├─ 9
  185. │ │ ├─ type: EventDefinition
  186. │ │ ├─ name: TokenPurchased
  187. │ │ ├─ parameters
  188. │ │ │ ├─ 0
  189. │ │ │ │ ├─ type: VariableDeclaration
  190. │ │ │ │ ├─ typeName
  191. │ │ │ │ │ ├─ type: ElementaryTypeName
  192. │ │ │ │ │ └─ name: address
  193. │ │ │ │ ├─ name: buyer
  194. │ │ │ │ ├─ isStateVar: false
  195. │ │ │ │ └─ isIndexed: true
  196. │ │ │ ├─ 1
  197. │ │ │ │ ├─ type: VariableDeclaration
  198. │ │ │ │ ├─ typeName
  199. │ │ │ │ │ ├─ type: ElementaryTypeName
  200. │ │ │ │ │ └─ name: uint256
  201. │ │ │ │ ├─ name: amount
  202. │ │ │ │ ├─ isStateVar: false
  203. │ │ │ │ └─ isIndexed: true
  204. │ │ │ └─ 2
  205. │ │ │ ├─ type: VariableDeclaration
  206. │ │ │ ├─ typeName
  207. │ │ │ │ ├─ type: ElementaryTypeName
  208. │ │ │ │ └─ name: uint256
  209. │ │ │ ├─ name: value
  210. │ │ │ ├─ isStateVar: false
  211. │ │ │ └─ isIndexed: true
  212. │ │ └─ isAnonymous: false
  213. │ ├─ 10
  214. │ │ ├─ type: EventDefinition
  215. │ │ ├─ name: TokensRefunded
  216. │ │ ├─ parameters
  217. │ │ │ ├─ 0
  218. │ │ │ │ ├─ type: VariableDeclaration
  219. │ │ │ │ ├─ typeName
  220. │ │ │ │ │ ├─ type: ElementaryTypeName
  221. │ │ │ │ │ └─ name: address
  222. │ │ │ │ ├─ name: wallet
  223. │ │ │ │ ├─ isStateVar: false
  224. │ │ │ │ └─ isIndexed: true
  225. │ │ │ └─ 1
  226. │ │ │ ├─ type: VariableDeclaration
  227. │ │ │ ├─ typeName
  228. │ │ │ │ ├─ type: ElementaryTypeName
  229. │ │ │ │ └─ name: uint256
  230. │ │ │ ├─ name: amount
  231. │ │ │ ├─ isStateVar: false
  232. │ │ │ └─ isIndexed: true
  233. │ │ └─ isAnonymous: false
  234. │ ├─ 11
  235. │ │ ├─ type: FunctionDefinition
  236. │ │ ├─ name
  237. │ │ ├─ parameters
  238. │ │ │ ├─ 0
  239. │ │ │ │ ├─ type: VariableDeclaration
  240. │ │ │ │ ├─ typeName
  241. │ │ │ │ │ ├─ type: ElementaryTypeName
  242. │ │ │ │ │ └─ name: uint256
  243. │ │ │ │ ├─ name: _rate
  244. │ │ │ │ ├─ storageLocation
  245. │ │ │ │ ├─ isStateVar: false
  246. │ │ │ │ └─ isIndexed: false
  247. │ │ │ ├─ 1
  248. │ │ │ │ ├─ type: VariableDeclaration
  249. │ │ │ │ ├─ typeName
  250. │ │ │ │ │ ├─ type: ElementaryTypeName
  251. │ │ │ │ │ └─ name: uint256
  252. │ │ │ │ ├─ name: _duration
  253. │ │ │ │ ├─ storageLocation
  254. │ │ │ │ ├─ isStateVar: false
  255. │ │ │ │ └─ isIndexed: false
  256. │ │ │ ├─ 2
  257. │ │ │ │ ├─ type: VariableDeclaration
  258. │ │ │ │ ├─ typeName
  259. │ │ │ │ │ ├─ type: ElementaryTypeName
  260. │ │ │ │ │ └─ name: address
  261. │ │ │ │ ├─ name: _usdc
  262. │ │ │ │ ├─ storageLocation
  263. │ │ │ │ ├─ isStateVar: false
  264. │ │ │ │ └─ isIndexed: false
  265. │ │ │ ├─ 3
  266. │ │ │ │ ├─ type: VariableDeclaration
  267. │ │ │ │ ├─ typeName
  268. │ │ │ │ │ ├─ type: ElementaryTypeName
  269. │ │ │ │ │ └─ name: address
  270. │ │ │ │ ├─ name: _okg
  271. │ │ │ │ ├─ storageLocation
  272. │ │ │ │ ├─ isStateVar: false
  273. │ │ │ │ └─ isIndexed: false
  274. │ │ │ └─ 4
  275. │ │ │ ├─ type: VariableDeclaration
  276. │ │ │ ├─ typeName
  277. │ │ │ │ ├─ type: ElementaryTypeName
  278. │ │ │ │ └─ name: address
  279. │ │ │ ├─ name: _wallet
  280. │ │ │ ├─ storageLocation
  281. │ │ │ ├─ isStateVar: false
  282. │ │ │ └─ isIndexed: false
  283. │ │ ├─ body
  284. │ │ │ ├─ type: Block
  285. │ │ │ └─ statements
  286. │ │ │ ├─ 0
  287. │ │ │ │ ├─ type: ExpressionStatement
  288. │ │ │ │ └─ expression
  289. │ │ │ │ ├─ type: FunctionCall
  290. │ │ │ │ ├─ expression
  291. │ │ │ │ │ ├─ type: Identifier
  292. │ │ │ │ │ └─ name: require
  293. │ │ │ │ ├─ arguments
  294. │ │ │ │ │ ├─ 0
  295. │ │ │ │ │ │ ├─ type: BinaryOperation
  296. │ │ │ │ │ │ ├─ operator: !=
  297. │ │ │ │ │ │ ├─ left
  298. │ │ │ │ │ │ │ ├─ type: Identifier
  299. │ │ │ │ │ │ │ └─ name: _usdc
  300. │ │ │ │ │ │ └─ right
  301. │ │ │ │ │ │ ├─ type: FunctionCall
  302. │ │ │ │ │ │ ├─ expression
  303. │ │ │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  304. │ │ │ │ │ │ │ └─ typeName
  305. │ │ │ │ │ │ │ ├─ type: ElementaryTypeName
  306. │ │ │ │ │ │ │ └─ name: address
  307. │ │ │ │ │ │ ├─ arguments
  308. │ │ │ │ │ │ │ └─ 0
  309. │ │ │ │ │ │ │ ├─ type: NumberLiteral
  310. │ │ │ │ │ │ │ ├─ number: 0
  311. │ │ │ │ │ │ │ └─ subdenomination
  312. │ │ │ │ │ │ └─ names
  313. │ │ │ │ │ └─ 1
  314. │ │ │ │ │ ├─ type: StringLiteral
  315. │ │ │ │ │ └─ value: USDC token address can not be zero
  316. │ │ │ │ └─ names
  317. │ │ │ ├─ 1
  318. │ │ │ │ ├─ type: ExpressionStatement
  319. │ │ │ │ └─ expression
  320. │ │ │ │ ├─ type: FunctionCall
  321. │ │ │ │ ├─ expression
  322. │ │ │ │ │ ├─ type: Identifier
  323. │ │ │ │ │ └─ name: require
  324. │ │ │ │ ├─ arguments
  325. │ │ │ │ │ ├─ 0
  326. │ │ │ │ │ │ ├─ type: BinaryOperation
  327. │ │ │ │ │ │ ├─ operator: !=
  328. │ │ │ │ │ │ ├─ left
  329. │ │ │ │ │ │ │ ├─ type: Identifier
  330. │ │ │ │ │ │ │ └─ name: _okg
  331. │ │ │ │ │ │ └─ right
  332. │ │ │ │ │ │ ├─ type: FunctionCall
  333. │ │ │ │ │ │ ├─ expression
  334. │ │ │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  335. │ │ │ │ │ │ │ └─ typeName
  336. │ │ │ │ │ │ │ ├─ type: ElementaryTypeName
  337. │ │ │ │ │ │ │ └─ name: address
  338. │ │ │ │ │ │ ├─ arguments
  339. │ │ │ │ │ │ │ └─ 0
  340. │ │ │ │ │ │ │ ├─ type: NumberLiteral
  341. │ │ │ │ │ │ │ ├─ number: 0
  342. │ │ │ │ │ │ │ └─ subdenomination
  343. │ │ │ │ │ │ └─ names
  344. │ │ │ │ │ └─ 1
  345. │ │ │ │ │ ├─ type: StringLiteral
  346. │ │ │ │ │ └─ value: OKG token address can not be zero
  347. │ │ │ │ └─ names
  348. │ │ │ ├─ 2
  349. │ │ │ │ ├─ type: ExpressionStatement
  350. │ │ │ │ └─ expression
  351. │ │ │ │ ├─ type: FunctionCall
  352. │ │ │ │ ├─ expression
  353. │ │ │ │ │ ├─ type: Identifier
  354. │ │ │ │ │ └─ name: require
  355. │ │ │ │ ├─ arguments
  356. │ │ │ │ │ ├─ 0
  357. │ │ │ │ │ │ ├─ type: BinaryOperation
  358. │ │ │ │ │ │ ├─ operator: >
  359. │ │ │ │ │ │ ├─ left
  360. │ │ │ │ │ │ │ ├─ type: Identifier
  361. │ │ │ │ │ │ │ └─ name: _duration
  362. │ │ │ │ │ │ └─ right
  363. │ │ │ │ │ │ ├─ type: NumberLiteral
  364. │ │ │ │ │ │ ├─ number: 0
  365. │ │ │ │ │ │ └─ subdenomination
  366. │ │ │ │ │ └─ 1
  367. │ │ │ │ │ ├─ type: StringLiteral
  368. │ │ │ │ │ └─ value: Duration for sale must be greater than 0
  369. │ │ │ │ └─ names
  370. │ │ │ ├─ 3
  371. │ │ │ │ ├─ type: ExpressionStatement
  372. │ │ │ │ └─ expression
  373. │ │ │ │ ├─ type: FunctionCall
  374. │ │ │ │ ├─ expression
  375. │ │ │ │ │ ├─ type: Identifier
  376. │ │ │ │ │ └─ name: require
  377. │ │ │ │ ├─ arguments
  378. │ │ │ │ │ ├─ 0
  379. │ │ │ │ │ │ ├─ type: BinaryOperation
  380. │ │ │ │ │ │ ├─ operator: >
  381. │ │ │ │ │ │ ├─ left
  382. │ │ │ │ │ │ │ ├─ type: Identifier
  383. │ │ │ │ │ │ │ └─ name: _rate
  384. │ │ │ │ │ │ └─ right
  385. │ │ │ │ │ │ ├─ type: NumberLiteral
  386. │ │ │ │ │ │ ├─ number: 0
  387. │ │ │ │ │ │ └─ subdenomination
  388. │ │ │ │ │ └─ 1
  389. │ │ │ │ │ ├─ type: StringLiteral
  390. │ │ │ │ │ └─ value: sale rate can not be zero
  391. │ │ │ │ └─ names
  392. │ │ │ ├─ 4
  393. │ │ │ │ ├─ type: ExpressionStatement
  394. │ │ │ │ └─ expression
  395. │ │ │ │ ├─ type: FunctionCall
  396. │ │ │ │ ├─ expression
  397. │ │ │ │ │ ├─ type: Identifier
  398. │ │ │ │ │ └─ name: require
  399. │ │ │ │ ├─ arguments
  400. │ │ │ │ │ ├─ 0
  401. │ │ │ │ │ │ ├─ type: BinaryOperation
  402. │ │ │ │ │ │ ├─ operator: !=
  403. │ │ │ │ │ │ ├─ left
  404. │ │ │ │ │ │ │ ├─ type: Identifier
  405. │ │ │ │ │ │ │ └─ name: _wallet
  406. │ │ │ │ │ │ └─ right
  407. │ │ │ │ │ │ ├─ type: FunctionCall
  408. │ │ │ │ │ │ ├─ expression
  409. │ │ │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  410. │ │ │ │ │ │ │ └─ typeName
  411. │ │ │ │ │ │ │ ├─ type: ElementaryTypeName
  412. │ │ │ │ │ │ │ └─ name: address
  413. │ │ │ │ │ │ ├─ arguments
  414. │ │ │ │ │ │ │ └─ 0
  415. │ │ │ │ │ │ │ ├─ type: NumberLiteral
  416. │ │ │ │ │ │ │ ├─ number: 0
  417. │ │ │ │ │ │ │ └─ subdenomination
  418. │ │ │ │ │ │ └─ names
  419. │ │ │ │ │ └─ 1
  420. │ │ │ │ │ ├─ type: StringLiteral
  421. │ │ │ │ │ └─ value: Wallet address can not be zero
  422. │ │ │ │ └─ names
  423. │ │ │ ├─ 5
  424. │ │ │ │ ├─ type: ExpressionStatement
  425. │ │ │ │ └─ expression
  426. │ │ │ │ ├─ type: BinaryOperation
  427. │ │ │ │ ├─ operator: =
  428. │ │ │ │ ├─ left
  429. │ │ │ │ │ ├─ type: Identifier
  430. │ │ │ │ │ └─ name: usdcToken
  431. │ │ │ │ └─ right
  432. │ │ │ │ ├─ type: Identifier
  433. │ │ │ │ └─ name: _usdc
  434. │ │ │ ├─ 6
  435. │ │ │ │ ├─ type: ExpressionStatement
  436. │ │ │ │ └─ expression
  437. │ │ │ │ ├─ type: BinaryOperation
  438. │ │ │ │ ├─ operator: =
  439. │ │ │ │ ├─ left
  440. │ │ │ │ │ ├─ type: Identifier
  441. │ │ │ │ │ └─ name: okgToken
  442. │ │ │ │ └─ right
  443. │ │ │ │ ├─ type: Identifier
  444. │ │ │ │ └─ name: _okg
  445. │ │ │ ├─ 7
  446. │ │ │ │ ├─ type: ExpressionStatement
  447. │ │ │ │ └─ expression
  448. │ │ │ │ ├─ type: BinaryOperation
  449. │ │ │ │ ├─ operator: =
  450. │ │ │ │ ├─ left
  451. │ │ │ │ │ ├─ type: Identifier
  452. │ │ │ │ │ └─ name: rate
  453. │ │ │ │ └─ right
  454. │ │ │ │ ├─ type: FunctionCall
  455. │ │ │ │ ├─ expression
  456. │ │ │ │ │ ├─ type: MemberAccess
  457. │ │ │ │ │ ├─ expression
  458. │ │ │ │ │ │ ├─ type: Identifier
  459. │ │ │ │ │ │ └─ name: _rate
  460. │ │ │ │ │ └─ memberName: mul
  461. │ │ │ │ ├─ arguments
  462. │ │ │ │ │ └─ 0
  463. │ │ │ │ │ ├─ type: BinaryOperation
  464. │ │ │ │ │ ├─ operator: **
  465. │ │ │ │ │ ├─ left
  466. │ │ │ │ │ │ ├─ type: NumberLiteral
  467. │ │ │ │ │ │ ├─ number: 10
  468. │ │ │ │ │ │ └─ subdenomination
  469. │ │ │ │ │ └─ right
  470. │ │ │ │ │ ├─ type: NumberLiteral
  471. │ │ │ │ │ ├─ number: 12
  472. │ │ │ │ │ └─ subdenomination
  473. │ │ │ │ └─ names
  474. │ │ │ ├─ 8
  475. │ │ │ │ ├─ type: ExpressionStatement
  476. │ │ │ │ └─ expression
  477. │ │ │ │ ├─ type: BinaryOperation
  478. │ │ │ │ ├─ operator: =
  479. │ │ │ │ ├─ left
  480. │ │ │ │ │ ├─ type: Identifier
  481. │ │ │ │ │ └─ name: openingTime
  482. │ │ │ │ └─ right
  483. │ │ │ │ ├─ type: Identifier
  484. │ │ │ │ └─ name: now
  485. │ │ │ ├─ 9
  486. │ │ │ │ ├─ type: ExpressionStatement
  487. │ │ │ │ └─ expression
  488. │ │ │ │ ├─ type: BinaryOperation
  489. │ │ │ │ ├─ operator: =
  490. │ │ │ │ ├─ left
  491. │ │ │ │ │ ├─ type: Identifier
  492. │ │ │ │ │ └─ name: closingTime
  493. │ │ │ │ └─ right
  494. │ │ │ │ ├─ type: FunctionCall
  495. │ │ │ │ ├─ expression
  496. │ │ │ │ │ ├─ type: MemberAccess
  497. │ │ │ │ │ ├─ expression
  498. │ │ │ │ │ │ ├─ type: Identifier
  499. │ │ │ │ │ │ └─ name: openingTime
  500. │ │ │ │ │ └─ memberName: add
  501. │ │ │ │ ├─ arguments
  502. │ │ │ │ │ └─ 0
  503. │ │ │ │ │ ├─ type: Identifier
  504. │ │ │ │ │ └─ name: _duration
  505. │ │ │ │ └─ names
  506. │ │ │ └─ 10
  507. │ │ │ ├─ type: ExpressionStatement
  508. │ │ │ └─ expression
  509. │ │ │ ├─ type: BinaryOperation
  510. │ │ │ ├─ operator: =
  511. │ │ │ ├─ left
  512. │ │ │ │ ├─ type: Identifier
  513. │ │ │ │ └─ name: wallet
  514. │ │ │ └─ right
  515. │ │ │ ├─ type: Identifier
  516. │ │ │ └─ name: _wallet
  517. │ │ ├─ visibility: public
  518. │ │ ├─ modifiers
  519. │ │ ├─ isConstructor: true
  520. │ │ └─ stateMutability
  521. │ ├─ 12
  522. │ │ ├─ type: FunctionDefinition
  523. │ │ ├─ name: buyTokens
  524. │ │ ├─ parameters
  525. │ │ │ └─ 0
  526. │ │ │ ├─ type: VariableDeclaration
  527. │ │ │ ├─ typeName
  528. │ │ │ │ ├─ type: ElementaryTypeName
  529. │ │ │ │ └─ name: uint256
  530. │ │ │ ├─ name: tokenPurchase
  531. │ │ │ ├─ storageLocation
  532. │ │ │ ├─ isStateVar: false
  533. │ │ │ └─ isIndexed: false
  534. │ │ ├─ returnParameters
  535. │ │ ├─ body
  536. │ │ │ ├─ type: Block
  537. │ │ │ └─ statements
  538. │ │ │ ├─ 0
  539. │ │ │ │ ├─ type: ExpressionStatement
  540. │ │ │ │ └─ expression
  541. │ │ │ │ ├─ type: FunctionCall
  542. │ │ │ │ ├─ expression
  543. │ │ │ │ │ ├─ type: Identifier
  544. │ │ │ │ │ └─ name: require
  545. │ │ │ │ ├─ arguments
  546. │ │ │ │ │ ├─ 0
  547. │ │ │ │ │ │ ├─ type: BinaryOperation
  548. │ │ │ │ │ │ ├─ operator: <=
  549. │ │ │ │ │ │ ├─ left
  550. │ │ │ │ │ │ │ ├─ type: Identifier
  551. │ │ │ │ │ │ │ └─ name: now
  552. │ │ │ │ │ │ └─ right
  553. │ │ │ │ │ │ ├─ type: Identifier
  554. │ │ │ │ │ │ └─ name: closingTime
  555. │ │ │ │ │ └─ 1
  556. │ │ │ │ │ ├─ type: StringLiteral
  557. │ │ │ │ │ └─ value: The sale has ended
  558. │ │ │ │ └─ names
  559. │ │ │ ├─ 1
  560. │ │ │ │ ├─ type: ExpressionStatement
  561. │ │ │ │ └─ expression
  562. │ │ │ │ ├─ type: FunctionCall
  563. │ │ │ │ ├─ expression
  564. │ │ │ │ │ ├─ type: Identifier
  565. │ │ │ │ │ └─ name: require
  566. │ │ │ │ ├─ arguments
  567. │ │ │ │ │ ├─ 0
  568. │ │ │ │ │ │ ├─ type: BinaryOperation
  569. │ │ │ │ │ │ ├─ operator: ==
  570. │ │ │ │ │ │ ├─ left
  571. │ │ │ │ │ │ │ ├─ type: FunctionCall
  572. │ │ │ │ │ │ │ ├─ expression
  573. │ │ │ │ │ │ │ │ ├─ type: MemberAccess
  574. │ │ │ │ │ │ │ │ ├─ expression
  575. │ │ │ │ │ │ │ │ │ ├─ type: Identifier
  576. │ │ │ │ │ │ │ │ │ └─ name: tokenPurchase
  577. │ │ │ │ │ │ │ │ └─ memberName: mod
  578. │ │ │ │ │ │ │ ├─ arguments
  579. │ │ │ │ │ │ │ │ └─ 0
  580. │ │ │ │ │ │ │ │ ├─ type: Identifier
  581. │ │ │ │ │ │ │ │ └─ name: rate
  582. │ │ │ │ │ │ │ └─ names
  583. │ │ │ │ │ │ └─ right
  584. │ │ │ │ │ │ ├─ type: NumberLiteral
  585. │ │ │ │ │ │ ├─ number: 0
  586. │ │ │ │ │ │ └─ subdenomination
  587. │ │ │ │ │ └─ 1
  588. │ │ │ │ │ ├─ type: StringLiteral
  589. │ │ │ │ │ └─ value: Purchase amount should be a multiple of rate
  590. │ │ │ │ └─ names
  591. │ │ │ ├─ 2
  592. │ │ │ │ ├─ type: VariableDeclarationStatement
  593. │ │ │ │ ├─ variables
  594. │ │ │ │ │ └─ 0
  595. │ │ │ │ │ ├─ type: VariableDeclaration
  596. │ │ │ │ │ ├─ typeName
  597. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  598. │ │ │ │ │ │ └─ name: uint256
  599. │ │ │ │ │ ├─ name: balance
  600. │ │ │ │ │ ├─ storageLocation
  601. │ │ │ │ │ ├─ isStateVar: false
  602. │ │ │ │ │ └─ isIndexed: false
  603. │ │ │ │ └─ initialValue
  604. │ │ │ │ ├─ type: FunctionCall
  605. │ │ │ │ ├─ expression
  606. │ │ │ │ │ ├─ type: MemberAccess
  607. │ │ │ │ │ ├─ expression
  608. │ │ │ │ │ │ ├─ type: FunctionCall
  609. │ │ │ │ │ │ ├─ expression
  610. │ │ │ │ │ │ │ ├─ type: Identifier
  611. │ │ │ │ │ │ │ └─ name: IERC20
  612. │ │ │ │ │ │ ├─ arguments
  613. │ │ │ │ │ │ │ └─ 0
  614. │ │ │ │ │ │ │ ├─ type: Identifier
  615. │ │ │ │ │ │ │ └─ name: okgToken
  616. │ │ │ │ │ │ └─ names
  617. │ │ │ │ │ └─ memberName: balanceOf
  618. │ │ │ │ ├─ arguments
  619. │ │ │ │ │ └─ 0
  620. │ │ │ │ │ ├─ type: FunctionCall
  621. │ │ │ │ │ ├─ expression
  622. │ │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  623. │ │ │ │ │ │ └─ typeName
  624. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  625. │ │ │ │ │ │ └─ name: address
  626. │ │ │ │ │ ├─ arguments
  627. │ │ │ │ │ │ └─ 0
  628. │ │ │ │ │ │ ├─ type: Identifier
  629. │ │ │ │ │ │ └─ name: this
  630. │ │ │ │ │ └─ names
  631. │ │ │ │ └─ names
  632. │ │ │ ├─ 3
  633. │ │ │ │ ├─ type: ExpressionStatement
  634. │ │ │ │ └─ expression
  635. │ │ │ │ ├─ type: FunctionCall
  636. │ │ │ │ ├─ expression
  637. │ │ │ │ │ ├─ type: Identifier
  638. │ │ │ │ │ └─ name: require
  639. │ │ │ │ ├─ arguments
  640. │ │ │ │ │ ├─ 0
  641. │ │ │ │ │ │ ├─ type: BinaryOperation
  642. │ │ │ │ │ │ ├─ operator: <=
  643. │ │ │ │ │ │ ├─ left
  644. │ │ │ │ │ │ │ ├─ type: Identifier
  645. │ │ │ │ │ │ │ └─ name: tokenPurchase
  646. │ │ │ │ │ │ └─ right
  647. │ │ │ │ │ │ ├─ type: Identifier
  648. │ │ │ │ │ │ └─ name: balance
  649. │ │ │ │ │ └─ 1
  650. │ │ │ │ │ ├─ type: StringLiteral
  651. │ │ │ │ │ └─ value: Sufficient token not available for purchase
  652. │ │ │ │ └─ names
  653. │ │ │ ├─ 4
  654. │ │ │ │ ├─ type: VariableDeclarationStatement
  655. │ │ │ │ ├─ variables
  656. │ │ │ │ │ └─ 0
  657. │ │ │ │ │ ├─ type: VariableDeclaration
  658. │ │ │ │ │ ├─ typeName
  659. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  660. │ │ │ │ │ │ └─ name: uint256
  661. │ │ │ │ │ ├─ name: value
  662. │ │ │ │ │ ├─ storageLocation
  663. │ │ │ │ │ ├─ isStateVar: false
  664. │ │ │ │ │ └─ isIndexed: false
  665. │ │ │ │ └─ initialValue
  666. │ │ │ │ ├─ type: FunctionCall
  667. │ │ │ │ ├─ expression
  668. │ │ │ │ │ ├─ type: Identifier
  669. │ │ │ │ │ └─ name: getPrice
  670. │ │ │ │ ├─ arguments
  671. │ │ │ │ │ └─ 0
  672. │ │ │ │ │ ├─ type: Identifier
  673. │ │ │ │ │ └─ name: tokenPurchase
  674. │ │ │ │ └─ names
  675. │ │ │ ├─ 5
  676. │ │ │ │ ├─ type: VariableDeclarationStatement
  677. │ │ │ │ ├─ variables
  678. │ │ │ │ │ └─ 0
  679. │ │ │ │ │ ├─ type: VariableDeclaration
  680. │ │ │ │ │ ├─ typeName
  681. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  682. │ │ │ │ │ │ └─ name: uint256
  683. │ │ │ │ │ ├─ name: allowed
  684. │ │ │ │ │ ├─ storageLocation
  685. │ │ │ │ │ ├─ isStateVar: false
  686. │ │ │ │ │ └─ isIndexed: false
  687. │ │ │ │ └─ initialValue
  688. │ │ │ │ ├─ type: FunctionCall
  689. │ │ │ │ ├─ expression
  690. │ │ │ │ │ ├─ type: MemberAccess
  691. │ │ │ │ │ ├─ expression
  692. │ │ │ │ │ │ ├─ type: FunctionCall
  693. │ │ │ │ │ │ ├─ expression
  694. │ │ │ │ │ │ │ ├─ type: Identifier
  695. │ │ │ │ │ │ │ └─ name: IERC20
  696. │ │ │ │ │ │ ├─ arguments
  697. │ │ │ │ │ │ │ └─ 0
  698. │ │ │ │ │ │ │ ├─ type: Identifier
  699. │ │ │ │ │ │ │ └─ name: usdcToken
  700. │ │ │ │ │ │ └─ names
  701. │ │ │ │ │ └─ memberName: allowance
  702. │ │ │ │ ├─ arguments
  703. │ │ │ │ │ ├─ 0
  704. │ │ │ │ │ │ ├─ type: MemberAccess
  705. │ │ │ │ │ │ ├─ expression
  706. │ │ │ │ │ │ │ ├─ type: Identifier
  707. │ │ │ │ │ │ │ └─ name: msg
  708. │ │ │ │ │ │ └─ memberName: sender
  709. │ │ │ │ │ └─ 1
  710. │ │ │ │ │ ├─ type: FunctionCall
  711. │ │ │ │ │ ├─ expression
  712. │ │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  713. │ │ │ │ │ │ └─ typeName
  714. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  715. │ │ │ │ │ │ └─ name: address
  716. │ │ │ │ │ ├─ arguments
  717. │ │ │ │ │ │ └─ 0
  718. │ │ │ │ │ │ ├─ type: Identifier
  719. │ │ │ │ │ │ └─ name: this
  720. │ │ │ │ │ └─ names
  721. │ │ │ │ └─ names
  722. │ │ │ ├─ 6
  723. │ │ │ │ ├─ type: ExpressionStatement
  724. │ │ │ │ └─ expression
  725. │ │ │ │ ├─ type: FunctionCall
  726. │ │ │ │ ├─ expression
  727. │ │ │ │ │ ├─ type: Identifier
  728. │ │ │ │ │ └─ name: require
  729. │ │ │ │ ├─ arguments
  730. │ │ │ │ │ ├─ 0
  731. │ │ │ │ │ │ ├─ type: BinaryOperation
  732. │ │ │ │ │ │ ├─ operator: >=
  733. │ │ │ │ │ │ ├─ left
  734. │ │ │ │ │ │ │ ├─ type: Identifier
  735. │ │ │ │ │ │ │ └─ name: allowed
  736. │ │ │ │ │ │ └─ right
  737. │ │ │ │ │ │ ├─ type: Identifier
  738. │ │ │ │ │ │ └─ name: value
  739. │ │ │ │ │ └─ 1
  740. │ │ │ │ │ ├─ type: StringLiteral
  741. │ │ │ │ │ └─ value: not enough allowance provided by buyer
  742. │ │ │ │ └─ names
  743. │ │ │ ├─ 7
  744. │ │ │ │ ├─ type: ExpressionStatement
  745. │ │ │ │ └─ expression
  746. │ │ │ │ ├─ type: FunctionCall
  747. │ │ │ │ ├─ expression
  748. │ │ │ │ │ ├─ type: Identifier
  749. │ │ │ │ │ └─ name: receiveTokens
  750. │ │ │ │ ├─ arguments
  751. │ │ │ │ │ └─ 0
  752. │ │ │ │ │ ├─ type: Identifier
  753. │ │ │ │ │ └─ name: value
  754. │ │ │ │ └─ names
  755. │ │ │ ├─ 8
  756. │ │ │ │ ├─ type: ExpressionStatement
  757. │ │ │ │ └─ expression
  758. │ │ │ │ ├─ type: FunctionCall
  759. │ │ │ │ ├─ expression
  760. │ │ │ │ │ ├─ type: Identifier
  761. │ │ │ │ │ └─ name: sendTokens
  762. │ │ │ │ ├─ arguments
  763. │ │ │ │ │ └─ 0
  764. │ │ │ │ │ ├─ type: Identifier
  765. │ │ │ │ │ └─ name: tokenPurchase
  766. │ │ │ │ └─ names
  767. │ │ │ └─ 9
  768. │ │ │ ├─ type: EmitStatement
  769. │ │ │ └─ eventCall
  770. │ │ │ ├─ type: FunctionCall
  771. │ │ │ ├─ expression
  772. │ │ │ │ ├─ type: Identifier
  773. │ │ │ │ └─ name: TokenPurchased
  774. │ │ │ ├─ arguments
  775. │ │ │ │ ├─ 0
  776. │ │ │ │ │ ├─ type: MemberAccess
  777. │ │ │ │ │ ├─ expression
  778. │ │ │ │ │ │ ├─ type: Identifier
  779. │ │ │ │ │ │ └─ name: msg
  780. │ │ │ │ │ └─ memberName: sender
  781. │ │ │ │ ├─ 1
  782. │ │ │ │ │ ├─ type: Identifier
  783. │ │ │ │ │ └─ name: tokenPurchase
  784. │ │ │ │ └─ 2
  785. │ │ │ │ ├─ type: Identifier
  786. │ │ │ │ └─ name: value
  787. │ │ │ └─ names
  788. │ │ ├─ visibility: public
  789. │ │ ├─ modifiers
  790. │ │ │ └─ 0
  791. │ │ │ ├─ type: ModifierInvocation
  792. │ │ │ ├─ name: onlyWhitelisted
  793. │ │ │ └─ arguments
  794. │ │ ├─ isConstructor: false
  795. │ │ └─ stateMutability
  796. │ ├─ 13
  797. │ │ ├─ type: FunctionDefinition
  798. │ │ ├─ name: getPrice
  799. │ │ ├─ parameters
  800. │ │ │ └─ 0
  801. │ │ │ ├─ type: VariableDeclaration
  802. │ │ │ ├─ typeName
  803. │ │ │ │ ├─ type: ElementaryTypeName
  804. │ │ │ │ └─ name: uint256
  805. │ │ │ ├─ name: amount
  806. │ │ │ ├─ storageLocation
  807. │ │ │ ├─ isStateVar: false
  808. │ │ │ └─ isIndexed: false
  809. │ │ ├─ returnParameters
  810. │ │ │ └─ 0
  811. │ │ │ ├─ type: VariableDeclaration
  812. │ │ │ ├─ typeName
  813. │ │ │ │ ├─ type: ElementaryTypeName
  814. │ │ │ │ └─ name: uint256
  815. │ │ │ ├─ name
  816. │ │ │ ├─ storageLocation
  817. │ │ │ ├─ isStateVar: false
  818. │ │ │ └─ isIndexed: false
  819. │ │ ├─ body
  820. │ │ │ ├─ type: Block
  821. │ │ │ └─ statements
  822. │ │ │ └─ 0
  823. │ │ │ ├─ type: ReturnStatement
  824. │ │ │ └─ expression
  825. │ │ │ ├─ type: FunctionCall
  826. │ │ │ ├─ expression
  827. │ │ │ │ ├─ type: MemberAccess
  828. │ │ │ │ ├─ expression
  829. │ │ │ │ │ ├─ type: Identifier
  830. │ │ │ │ │ └─ name: amount
  831. │ │ │ │ └─ memberName: div
  832. │ │ │ ├─ arguments
  833. │ │ │ │ └─ 0
  834. │ │ │ │ ├─ type: Identifier
  835. │ │ │ │ └─ name: rate
  836. │ │ │ └─ names
  837. │ │ ├─ visibility: public
  838. │ │ ├─ modifiers
  839. │ │ ├─ isConstructor: false
  840. │ │ └─ stateMutability: view
  841. │ ├─ 14
  842. │ │ ├─ type: FunctionDefinition
  843. │ │ ├─ name: refundTokens
  844. │ │ ├─ parameters
  845. │ │ ├─ returnParameters
  846. │ │ ├─ body
  847. │ │ │ ├─ type: Block
  848. │ │ │ └─ statements
  849. │ │ │ ├─ 0
  850. │ │ │ │ ├─ type: VariableDeclarationStatement
  851. │ │ │ │ ├─ variables
  852. │ │ │ │ │ └─ 0
  853. │ │ │ │ │ ├─ type: VariableDeclaration
  854. │ │ │ │ │ ├─ typeName
  855. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  856. │ │ │ │ │ │ └─ name: uint256
  857. │ │ │ │ │ ├─ name: balance
  858. │ │ │ │ │ ├─ storageLocation
  859. │ │ │ │ │ ├─ isStateVar: false
  860. │ │ │ │ │ └─ isIndexed: false
  861. │ │ │ │ └─ initialValue
  862. │ │ │ │ ├─ type: FunctionCall
  863. │ │ │ │ ├─ expression
  864. │ │ │ │ │ ├─ type: MemberAccess
  865. │ │ │ │ │ ├─ expression
  866. │ │ │ │ │ │ ├─ type: FunctionCall
  867. │ │ │ │ │ │ ├─ expression
  868. │ │ │ │ │ │ │ ├─ type: Identifier
  869. │ │ │ │ │ │ │ └─ name: IERC20
  870. │ │ │ │ │ │ ├─ arguments
  871. │ │ │ │ │ │ │ └─ 0
  872. │ │ │ │ │ │ │ ├─ type: Identifier
  873. │ │ │ │ │ │ │ └─ name: okgToken
  874. │ │ │ │ │ │ └─ names
  875. │ │ │ │ │ └─ memberName: balanceOf
  876. │ │ │ │ ├─ arguments
  877. │ │ │ │ │ └─ 0
  878. │ │ │ │ │ ├─ type: FunctionCall
  879. │ │ │ │ │ ├─ expression
  880. │ │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  881. │ │ │ │ │ │ └─ typeName
  882. │ │ │ │ │ │ ├─ type: ElementaryTypeName
  883. │ │ │ │ │ │ └─ name: address
  884. │ │ │ │ │ ├─ arguments
  885. │ │ │ │ │ │ └─ 0
  886. │ │ │ │ │ │ ├─ type: Identifier
  887. │ │ │ │ │ │ └─ name: this
  888. │ │ │ │ │ └─ names
  889. │ │ │ │ └─ names
  890. │ │ │ ├─ 1
  891. │ │ │ │ ├─ type: ExpressionStatement
  892. │ │ │ │ └─ expression
  893. │ │ │ │ ├─ type: FunctionCall
  894. │ │ │ │ ├─ expression
  895. │ │ │ │ │ ├─ type: MemberAccess
  896. │ │ │ │ │ ├─ expression
  897. │ │ │ │ │ │ ├─ type: FunctionCall
  898. │ │ │ │ │ │ ├─ expression
  899. │ │ │ │ │ │ │ ├─ type: Identifier
  900. │ │ │ │ │ │ │ └─ name: IERC20
  901. │ │ │ │ │ │ ├─ arguments
  902. │ │ │ │ │ │ │ └─ 0
  903. │ │ │ │ │ │ │ ├─ type: Identifier
  904. │ │ │ │ │ │ │ └─ name: okgToken
  905. │ │ │ │ │ │ └─ names
  906. │ │ │ │ │ └─ memberName: safeTransfer
  907. │ │ │ │ ├─ arguments
  908. │ │ │ │ │ ├─ 0
  909. │ │ │ │ │ │ ├─ type: Identifier
  910. │ │ │ │ │ │ └─ name: wallet
  911. │ │ │ │ │ └─ 1
  912. │ │ │ │ │ ├─ type: Identifier
  913. │ │ │ │ │ └─ name: balance
  914. │ │ │ │ └─ names
  915. │ │ │ └─ 2
  916. │ │ │ ├─ type: EmitStatement
  917. │ │ │ └─ eventCall
  918. │ │ │ ├─ type: FunctionCall
  919. │ │ │ ├─ expression
  920. │ │ │ │ ├─ type: Identifier
  921. │ │ │ │ └─ name: TokensRefunded
  922. │ │ │ ├─ arguments
  923. │ │ │ │ ├─ 0
  924. │ │ │ │ │ ├─ type: Identifier
  925. │ │ │ │ │ └─ name: wallet
  926. │ │ │ │ └─ 1
  927. │ │ │ │ ├─ type: Identifier
  928. │ │ │ │ └─ name: balance
  929. │ │ │ └─ names
  930. │ │ ├─ visibility: public
  931. │ │ ├─ modifiers
  932. │ │ │ ├─ 0
  933. │ │ │ │ ├─ type: ModifierInvocation
  934. │ │ │ │ ├─ name: onlyOwner
  935. │ │ │ │ └─ arguments
  936. │ │ │ └─ 1
  937. │ │ │ ├─ type: ModifierInvocation
  938. │ │ │ ├─ name: saleOver
  939. │ │ │ └─ arguments
  940. │ │ ├─ isConstructor: false
  941. │ │ └─ stateMutability
  942. │ ├─ 15
  943. │ │ ├─ type: FunctionDefinition
  944. │ │ ├─ name: sendTokens
  945. │ │ ├─ parameters
  946. │ │ │ └─ 0
  947. │ │ │ ├─ type: VariableDeclaration
  948. │ │ │ ├─ typeName
  949. │ │ │ │ ├─ type: ElementaryTypeName
  950. │ │ │ │ └─ name: uint256
  951. │ │ │ ├─ name: amount
  952. │ │ │ ├─ storageLocation
  953. │ │ │ ├─ isStateVar: false
  954. │ │ │ └─ isIndexed: false
  955. │ │ ├─ returnParameters
  956. │ │ ├─ body
  957. │ │ │ ├─ type: Block
  958. │ │ │ └─ statements
  959. │ │ │ └─ 0
  960. │ │ │ ├─ type: ExpressionStatement
  961. │ │ │ └─ expression
  962. │ │ │ ├─ type: FunctionCall
  963. │ │ │ ├─ expression
  964. │ │ │ │ ├─ type: MemberAccess
  965. │ │ │ │ ├─ expression
  966. │ │ │ │ │ ├─ type: FunctionCall
  967. │ │ │ │ │ ├─ expression
  968. │ │ │ │ │ │ ├─ type: Identifier
  969. │ │ │ │ │ │ └─ name: IERC20
  970. │ │ │ │ │ ├─ arguments
  971. │ │ │ │ │ │ └─ 0
  972. │ │ │ │ │ │ ├─ type: Identifier
  973. │ │ │ │ │ │ └─ name: okgToken
  974. │ │ │ │ │ └─ names
  975. │ │ │ │ └─ memberName: safeTransfer
  976. │ │ │ ├─ arguments
  977. │ │ │ │ ├─ 0
  978. │ │ │ │ │ ├─ type: MemberAccess
  979. │ │ │ │ │ ├─ expression
  980. │ │ │ │ │ │ ├─ type: Identifier
  981. │ │ │ │ │ │ └─ name: msg
  982. │ │ │ │ │ └─ memberName: sender
  983. │ │ │ │ └─ 1
  984. │ │ │ │ ├─ type: Identifier
  985. │ │ │ │ └─ name: amount
  986. │ │ │ └─ names
  987. │ │ ├─ visibility: private
  988. │ │ ├─ modifiers
  989. │ │ ├─ isConstructor: false
  990. │ │ └─ stateMutability
  991. │ └─ 16
  992. │ ├─ type: FunctionDefinition
  993. │ ├─ name: receiveTokens
  994. │ ├─ parameters
  995. │ │ └─ 0
  996. │ │ ├─ type: VariableDeclaration
  997. │ │ ├─ typeName
  998. │ │ │ ├─ type: ElementaryTypeName
  999. │ │ │ └─ name: uint256
  1000. │ │ ├─ name: price
  1001. │ │ ├─ storageLocation
  1002. │ │ ├─ isStateVar: false
  1003. │ │ └─ isIndexed: false
  1004. │ ├─ returnParameters
  1005. │ ├─ body
  1006. │ │ ├─ type: Block
  1007. │ │ └─ statements
  1008. │ │ └─ 0
  1009. │ │ ├─ type: ExpressionStatement
  1010. │ │ └─ expression
  1011. │ │ ├─ type: FunctionCall
  1012. │ │ ├─ expression
  1013. │ │ │ ├─ type: MemberAccess
  1014. │ │ │ ├─ expression
  1015. │ │ │ │ ├─ type: FunctionCall
  1016. │ │ │ │ ├─ expression
  1017. │ │ │ │ │ ├─ type: Identifier
  1018. │ │ │ │ │ └─ name: IERC20
  1019. │ │ │ │ ├─ arguments
  1020. │ │ │ │ │ └─ 0
  1021. │ │ │ │ │ ├─ type: Identifier
  1022. │ │ │ │ │ └─ name: usdcToken
  1023. │ │ │ │ └─ names
  1024. │ │ │ └─ memberName: safeTransferFrom
  1025. │ │ ├─ arguments
  1026. │ │ │ ├─ 0
  1027. │ │ │ │ ├─ type: MemberAccess
  1028. │ │ │ │ ├─ expression
  1029. │ │ │ │ │ ├─ type: Identifier
  1030. │ │ │ │ │ └─ name: msg
  1031. │ │ │ │ └─ memberName: sender
  1032. │ │ │ ├─ 1
  1033. │ │ │ │ ├─ type: FunctionCall
  1034. │ │ │ │ ├─ expression
  1035. │ │ │ │ │ ├─ type: ElementaryTypeNameExpression
  1036. │ │ │ │ │ └─ typeName
  1037. │ │ │ │ │ ├─ type: ElementaryTypeName
  1038. │ │ │ │ │ └─ name: address
  1039. │ │ │ │ ├─ arguments
  1040. │ │ │ │ │ └─ 0
  1041. │ │ │ │ │ ├─ type: Identifier
  1042. │ │ │ │ │ └─ name: wallet
  1043. │ │ │ │ └─ names
  1044. │ │ │ └─ 2
  1045. │ │ │ ├─ type: Identifier
  1046. │ │ │ └─ name: price
  1047. │ │ └─ names
  1048. │ ├─ visibility: private
  1049. │ ├─ modifiers
  1050. │ ├─ isConstructor: false
  1051. │ └─ stateMutability
  1052. └─ kind: contract
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement