The page "Verify Contract" ask for "Constructor Arguments ABI-encoded".
In your case the constructor has no parameters, so you can leave such field empty.
In the general case when your constrctor has parameters you can proceed as follow:
You can use ethereumjs-abi to encode/decode the parameters for transaction calls.
Let's suppose your constructor is MyToken(address _to, uint256 _value, bool _enabled)
. The parameters types are ["address", "uint256", "bool"].
If you have created the contract MyToken("0x1234567812345678", 0x314159268, true). Then the parameters values are ["0x1234567812345678", "0x314159268", true].
Then you can encode the values with rawEncode(parameterTypes, parameterValues)
.
var abi = require('ethereumjs-abi')
var parameterTypes = ["address", "uint256", "bool"];
var parameterValues = ["0x1234567812345678", "0x314159268", true];
var encoded = abi.rawEncode(parameterTypes, parameterValues);
console.log(encoded.toString('hex'));
On execution it will output
000000000000000000000000000000000000000000000000123456781234567800000000000000000000000000000000000000000000000000000003141592680000000000000000000000000000000000000000000000000000000000000001
Best Answer
In theory, you could create your own code that creates the ABI of a contract given the source code of that contract, reading the function's name and parameters and producing a javascript/JSON output, but you would be reinventing the wheel since you would be implementing something similar to a compiler.
Web3js and Ethersjs don't do this.
You could put the contract source code in Remix and compile it and get the source code. But I guess this is not what you want since it will use solc.
You could create a tool in, like, nodejs to programmatically handle the abi generation given some contract code base, using 'solc' under the hood, but adding more functionality, like receiving source code of contracts dynamically and compiling it, taking the abi and returning it, etc. Like a backend, like Etherscan and Remix do.
Check out this project: https://github.com/smartcontractkit/solc-api