- [Done] Flash loan for divisible and non-divisible NFTs
- [Done] Contract to mint new NFTs from existing NFTs. The new minted NFTs represents the permission to use the original NFT.
- [Done] Ordinary rental of the right of NFT usage.
- [Done] Tenant pay compulsory collaterals, used to reward those who revoke expired rentals.
- [Done] Renter can close a following rental
- [Done] Fire events
- [Potential] Give me your NFT to borrow fungible tokens!
- [Potential] Fungible collateral flash loan?
-
Clone https://github.com/neo-project/neo-devpack-dotnet/commit/e1dae8f1f2ee066134d9e83539539c5c3fab19ec .
-
In
neo-devpack-dotnet/src/Neo.Compiler.CSharp/CompilationContext.cs
, find these codes at line 478:if (methodsExported.Any(u => u.Name == method.Name && u.Parameters.Length == method.Parameters.Length)) throw new CompilationException(symbol, DiagnosticId.MethodNameConflict, $"Duplicate method key: {method.Name},{method.Parameters.Length}.");
Replace the two lines with the following codes:
//if (methodsExported.Any(u => u.Name == method.Name && u.Parameters.Length == method.Parameters.Length)) // throw new CompilationException(symbol, DiagnosticId.MethodNameConflict, $"Duplicate method key: {method.Name},{method.Parameters.Length}."); AbiMethod? foundMethod = methodsExported.Where(u => u.Name == method.Name && u.Parameters.Length == method.Parameters.Length).FirstOrDefault(); if (foundMethod is not null) methodsExported.Remove(foundMethod);
-
run
neo-devpack-dotnet
from source code, with command line argumentsPATH_TO_NFTLoan/NFTLoan --debug
. -
It's better to check the assembly codes with command
dumpnef NFTFlashLoan.nef > NFTFlashLoan.nef.txt
if you run into weird exceptions.