user112354: Using Electrum desktop wallet connected to the testnet, when trying to open a channel  with the amount exceeding 0.16777215 BTC I get the following:

Could not open channel. Exception('Requested channel capacity is over protocol allowed maximum')

Is 0.16777215 BTC hardcoded in Electrum or is it determined by the testnet itself?
I noticed that on the mainnet the maximum capacity is siginificatly higher as some exchanges allow LN withdrawals of 0.5 BTC.

user134811: 
Is 0.16777215 BTC hardcoded in Electrum or is it determined by the testnet itself?

There's no such hard coded value in Electrum. The limit is imposed by the Lightning protocol:

for channels with chain_hash identifying the Bitcoin blockchain, if the four most significant bytes of amount_msat are not 0:
MUST fail the channel.


112354: <p>Using Electrum desktop wallet connected to the testnet, when trying to open a channel  with the amount exceeding 0.16777215 BTC I get the following:</p>
<blockquote>
<p>Could not open channel. Exception('Requested channel capacity is over protocol allowed maximum')</p>
</blockquote>
<p>Is 0.16777215 BTC hardcoded in Electrum or is it determined by the testnet itself?
I noticed that on the mainnet the maximum capacity is siginificatly higher as some exchanges allow LN withdrawals of 0.5 BTC.</p>
 134811: <blockquote>
<p>Is 0.16777215 BTC hardcoded in Electrum or is it determined by the testnet itself?</p>
</blockquote>
<p>There's no such hard coded value in Electrum. The limit is imposed by the <a href="https://github.com/lightning/bolts/blob/b201efe0546120c14bf154ce5f4e18da7243fe7a/02-peer-protocol.md#requirements-9" rel="nofollow noreferrer">Lightning protocol</a>:</p>
<blockquote>
<p>for channels with <code>chain_hash</code> identifying the Bitcoin blockchain, if the four most significant bytes of <code>amount_msat</code> are not 0:
MUST fail the channel.</p>
</blockquote>
