diff --git a/pkg/compiler/native_test.go b/pkg/compiler/native_test.go index e9a0fd6ff..7aa75fdc6 100644 --- a/pkg/compiler/native_test.go +++ b/pkg/compiler/native_test.go @@ -90,7 +90,7 @@ func TestCryptoLibNamedCurve(t *testing.T) { require.EqualValues(t, native.Secp256r1, crypto.Secp256r1) } -func TestOracleResponseCodes(t *testing.T) { +func TestOracleContractValues(t *testing.T) { require.EqualValues(t, oracle.Success, transaction.Success) require.EqualValues(t, oracle.ProtocolNotSupported, transaction.ProtocolNotSupported) require.EqualValues(t, oracle.ConsensusUnreachable, transaction.ConsensusUnreachable) @@ -100,6 +100,8 @@ func TestOracleResponseCodes(t *testing.T) { require.EqualValues(t, oracle.ResponseTooLarge, transaction.ResponseTooLarge) require.EqualValues(t, oracle.InsufficientFunds, transaction.InsufficientFunds) require.EqualValues(t, oracle.Error, transaction.Error) + + require.EqualValues(t, oracle.MinimumResponseGas, native.MinimumResponseGas) } type nativeTestCase struct { diff --git a/pkg/interop/native/oracle/oracle.go b/pkg/interop/native/oracle/oracle.go index c1594d67c..d054539c3 100644 --- a/pkg/interop/native/oracle/oracle.go +++ b/pkg/interop/native/oracle/oracle.go @@ -28,6 +28,10 @@ const ( // Hash represents Oracle contract hash. const Hash = "\x58\x87\x17\x11\x7e\x0a\xa8\x10\x72\xaf\xab\x71\xd2\xdd\x89\xfe\x7c\x4b\x92\xfe" +// MinimumResponseGas is the minimum response fee permitted for request (that is +// you can't attach less than that to your request). It's 0.1 GAS at the moment. +const MinimumResponseGas = 10_000_000 + // Request makes an oracle request. It can only be successfully invoked by // deployed contract and it takes the following parameters: //