import * as Hex from '@tevm/voltaire/primitives/Hex';
// Test 1: 2^3 mod 5 = 3
const input1 = Hex(
'0x' +
'0000000000000000000000000000000000000000000000000000000000000001' + // base_len = 1
'0000000000000000000000000000000000000000000000000000000000000001' + // exp_len = 1
'0000000000000000000000000000000000000000000000000000000000000001' + // mod_len = 1
'02' + '03' + '05' // base=2, exp=3, mod=5
);
// Expected: 0x03
// Test 2: 3^1 mod 5 = 3
const input2 = Hex(
'0x' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'03' + '01' + '05' // base=3, exp=1, mod=5
);
// Expected: 0x03
// Test 3: 5^0 mod 7 = 1 (zero exponent)
const input3 = Hex(
'0x' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'05' + '00' + '07' // base=5, exp=0, mod=7
);
// Expected: 0x01
// Test 4: Zero modulus error
const input4 = Hex(
'0x' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'0000000000000000000000000000000000000000000000000000000000000001' +
'02' + '03' + '00' // base=2, exp=3, mod=0
);
// Expected: Error (division by zero)