ref-finance / ref-contracts

Smart contracts for Ref Finance
MIT License
96 stars 55 forks source link

chore: migrate to version 4.0 of the SDK #34

Closed austinabell closed 10 months ago

austinabell commented 2 years ago

So there are some sim tests that fail because of an assert_one_yocto. I didn't dig into it to see if it was a fault on the test or something changed internally or from an SDK fork that I'm not aware of.

Sorry for a large diff, I also formatted the files I touched

Possible inconsistencies: AccountId is used sometimes when it probably shouldn't be (custom strings for nft token types) and String is sometimes used when it should be an AccountId. Now that AccountId is validated by default and on deserialization, you might want to audit these usages, because it's not just aliasing a string as before. AccountId has the same JSON serialization as ValidAccountId previously had.

If this or something similar comes in, can close #33