Here is a page for testing Conflux Portal functions. It contains code examples for testing:
- connect to ConfluxPortal
- deploy contract on Conflux Testnet
- send CFX
- deploy a ERC20 token and send the token
- get user accounts
personal_signto sign data
You can find the source code on github or just download the page and use it at your purpose.