First of all you'll need the transaction hash of the contract creation transaction. Then you can use ethereum JSON RPC to call the node and get the information of the transaction.
For the node you can use Infura
or any other you like
axios.post(NODE,
{
"jsonrpc":"2.0",
"method":"eth_getTransactionByHash",
"params":["0x3080a77bb681dd53d6b496120445a6624b0079f944b5c1a3038744596aa2228e"],
"id":1
}).then(res => {
console.log(res.result.from)
})
The response will be
OR
If using web3js you can use
web3.eth.getTransaction(transactionHash [, callback])
It will return an object
{
"hash": "0x9fc76417374aa880d4449a1f7f31ec597f00b1f6f3dd2d66f4c9c6c445836d8b",
"nonce": 2,
"blockHash": "0xef95f2f1ed3ca60b048b4bf67cde2195961e0bba6f70bcbea9a2c4e133e34b46",
"blockNumber": 3,
"transactionIndex": 0,
"from": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
"value": '123450000000000000',
"gas": 314159,
"gasPrice": '2000000000000',
"input": "0x57cb2fc4"
}
from which you can take out the from
key