[Solved] Hard coded ae address format?

How do I assign a hard coded ae address value to some field? For example this doesn’t work:
let new_task : task = {
client = Call.origin,
fl = Contract.address, //why ie ak_2gx9MEFxKvY9vMG5YnqnXWv1hCsX7rgnfvBLJS4aQurustR1rt doesn’t work???

same goes for hash:
//blockHash = #000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f,

The following contract compiles without problems using compiler version >= 3.0.0

contract Test =
  public function foo() : (address, hash) =
    (ak_2gx9MEFxKvY9vMG5YnqnXWv1hCsX7rgnfvBLJS4aQurustR1rt,
     #000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f)
1 Like

ok, yep, that works now. one question though, seems compiler is not checking for the length of the hash?

actually it does check that it is not more than 32 bytes, but it can be less, i assume it is padded with zeroes then?

If you give it an uneven number of nibbles we pad with 4 zero bits, otherwise there is no padding. So 63 or 64 hex-characters is accepted.