diff --git a/contract/Forest.Contracts.SymbolRegistrar/Forest.Contracts.SymbolRegistrar.csproj b/contract/Forest.Contracts.SymbolRegistrar/Forest.Contracts.SymbolRegistrar.csproj
index 76490d1..5d7acf8 100644
--- a/contract/Forest.Contracts.SymbolRegistrar/Forest.Contracts.SymbolRegistrar.csproj
+++ b/contract/Forest.Contracts.SymbolRegistrar/Forest.Contracts.SymbolRegistrar.csproj
@@ -19,6 +19,12 @@
Protobuf\Proto\acs0.proto
+
+ Protobuf\Proto\reference\acs1.proto
+
+
+ Protobuf\Proto\reference\acs2.proto
+
Protobuf\Proto\acs3.proto
@@ -40,9 +46,13 @@
Protobuf\Proto\reference\token_contract.proto
+
Protobuf\Proto\token_contract_impl.proto
+
+ Protobuf\Proto\reference\transaction_fee.proto
+
diff --git a/contract/Forest.Contracts.SymbolRegistrar/SymbolRegistrarContract_Action.cs b/contract/Forest.Contracts.SymbolRegistrar/SymbolRegistrarContract_Action.cs
index 4ff9f0c..d9ddbce 100644
--- a/contract/Forest.Contracts.SymbolRegistrar/SymbolRegistrarContract_Action.cs
+++ b/contract/Forest.Contracts.SymbolRegistrar/SymbolRegistrarContract_Action.cs
@@ -124,15 +124,26 @@ private void DoCreateSeed(Address to, string symbol, long expireTime = 0)
ImageUrl = seedInfo.ImageUrl
});
}
-
private void DoRenewSeed(string seedSymbol, long expireTime = 0)
{
+ if (State.TokenImplContract.Value == null)
+ {
+ State.TokenImplContract.Value = State.TokenContract.Value;
+ }
+
+ var renewInput = new ExtendSeedExpirationTimeInput
+ {
+ Symbol = seedSymbol,
+ ExpirationTime = expireTime
+ };
- State.TokenImplContract.ExtendSeedExpirationTime.Send(
- new ExtendSeedExpirationTimeInput
+ State.ProxyAccountContract.ForwardCall.Send(
+ new ForwardCallInput
{
- Symbol = seedSymbol,
- ExpirationTime = expireTime
+ ContractAddress = State.TokenContract.Value,
+ MethodName = nameof(State.TokenImplContract.ExtendSeedExpirationTime),
+ ProxyAccountHash = GetProxyAccountHash(),
+ Args = renewInput.ToByteString()
});
}
diff --git a/test/Forest.Contracts.SymbolRegistrar.Tests/SymbolRegistrarContractTests_Buy.cs b/test/Forest.Contracts.SymbolRegistrar.Tests/SymbolRegistrarContractTests_Buy.cs
index a3e4212..fc23011 100644
--- a/test/Forest.Contracts.SymbolRegistrar.Tests/SymbolRegistrarContractTests_Buy.cs
+++ b/test/Forest.Contracts.SymbolRegistrar.Tests/SymbolRegistrarContractTests_Buy.cs
@@ -313,6 +313,20 @@ public async Task Buy_existsFT_fail()
res.ShouldNotBeNull();
res.Message.ShouldContain("Symbol exists");
}
-
+
+ [Fact]
+ public async Task SeedRenew_Test ()
+ {
+ await Buy_success();
+ await User1SymbolRegistrarContractStub.RegularSeedRenew.SendAsync(new RegularSeedRenewInput()
+ {
+ SeedSymbol = "SEED-1",
+ Price = new Price()
+ {
+ Symbol = "ELF",
+ Amount = 4700000000
+ }
+ });
+ }
}
}
\ No newline at end of file