have a look at the documentation :
Creating a new account
geth account new
Creates a new account and prints the address.
On the console, use:
personal.newAccount("passphrase")
Over RPC (insecure solution)
curl -X POST --data '{"jsonrpc":"2.0","method":"personal_newAccount","params":["passowrd"],"id":74}' http://localhost:8545
to use it you need to enable the personal Api geth --rpc --rpcapi "personal,eth,web3"
more details : https://github.com/ethereum/go-ethereum/wiki/Management-APIs#personal_newaccount
Sending erc-20 tokens are just calling a transfer
function for a token smart code. It's just like calling any othe function of any other smart contract.
To call a function of a contract, you need to use sendTransaction
api.
A sample code snippet for calling transfer function of a smart contract is:
var contractAbi = eth.contract(AbiOfContract);
var myContract = contractAbi.at(contractAddress);
// suppose you want to call a function named myFunction of myContract
var getData = myContract.transfer.getData(function parameters);
//finally paas this data parameter to send Transaction
web3.eth.sendTransaction({to:Contractaddress, from:Accountaddress, data: getData});
You can add other parameters like gas, gasPrice
in send transaction as well.
Best Answer
The topic is used for filtering on indexed parameters in events/logs. If you have looked at Solidity (the most popular language for writing smart contracts in Ethereum), you can write events with the following format:
The
indexed
keyword allows you to filter on it when browsing event logs. For example:would mean you are interested in events that have arg1 and arg2 with values of 1 and 2 respectively. As the documentation details, you can pass null to the first as a wildcard (to accept anything on that topic).