ETH Merchant ERC20 / DONE
Last updated
Last updated
RPC parity: For the module to work, you must have a node installed and synchronised with the Ethereum network . https://github.com/openethereum/parity-ethereum
Go to Merchant & API -> Merchant system
Go to Ethereum ERC20 Token module settings
Fill in the Config section of this module: RPC node URL (parity) - URL to your BSC RPC node Wait confirms blocks - Number of confirmations required to confirm payment Gas price (in gwei) - price per transaction (gas price) (transactions to merge accepted funds to master address) to a master address) Contract address - The address of the contract that we accept with this module Contract ABI - ABI json of the contract you can get it in the scanner https://etherscan.io/ you need to go to the address of the contract Contract -> Code -> Contract ABI Collect token when amount greater than or equal (>=) - minimum number of tokens received on the wallet (the address is issued again in 2 days after the request is created) Master address - Address to which to collect your funds from the addresses that were issued for exchange PrivateKey service account - PrivateKey service account - Private key from the address that is responsible for the collection of funds from it the network commission is paid (for security reasons we recommend to use another wallet different from Master address) to create a wallet
To set the block from which you should start synchronising payments, run the command in the exchange-api folder: (we recommend stopping the api-http service beforehand )
Instead of 123, set your block number.
For each request we get an ETH address which will be frozen under this request for 2 days after 2 days it can be used again under another request. (the freezing period can be changed in the module itself)
The customer then pays the funds and we mark the application paid
Collect funds on Master address which is specified in the module settings for this purpose the following actions are performed:
1) Check the address how many tokens are on it now the amount should be more or equal to the amount that is configured in the module ‘Collect token when amount...’.
2) Check if there is access to transfer from our service account (PrivateKey service account) if not, we give this permission by transferring the required amount of ETH to the address from which the function will be called.
approve(:serviceAddress,totalSupply)
Be careful to control the ETH balance of your service account, the call of these functions is paid in the ETH network
3) After we have verified that we have permission to transfer funds to our Master address the owner of the transaction will be the service account also control that there is enough ETH to pay for the transaction.