-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auto token register #3336
Add auto token register #3336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! 🚀
@@ -42,27 +42,20 @@ var ( | |||
) | |||
|
|||
type ImpersonatedOffLedgerRequestData struct { | |||
req *OffLedgerRequestData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a good change, but it should be it's own PR tbh :/
@@ -195,21 +195,21 @@ func TestFoundryNew(t *testing.T) { | |||
require.Equal(t, uint32(1), fnew.Results.FoundrySN().Value()) | |||
} | |||
|
|||
func TestFoundryModifySupply(t *testing.T) { | |||
func NativeTokenndryModifySupply(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
and I'm guessing this should start with TestNative....
@@ -42,27 +42,20 @@ var ( | |||
) | |||
|
|||
type ImpersonatedOffLedgerRequestData struct { | |||
req *OffLedgerRequestData | |||
OffLedgerRequestData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good change, but this should be its own PR 🔧
FuncDeposit = coreutil.Func("deposit") | ||
|
||
// Kept for compatibility reasons | ||
FuncFoundryCreateNew = coreutil.Func("foundryCreateNew") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get it.
if this is "kept for compatibility", shouldn't foundryDestroy
and foundryModifySupply
also be? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main reason for that was, that wasp-cli still has a foundry-create command and I wasn't sure where it is still in use. For example in some scripts or something. I didn't want to break things.
It is also still available in the magic contract, where I was very sure I could break things for 3rd party developers if I just remove it. :D
… ERC20 auto registration
730d3d3
to
249f700
Compare
Description of change
Adds an automatic ERC20 and IRC30 registration for native tokens. IRC27 will follow.
removed:
is outdated but remains:
added:
nativeTokenCreate
now combines the foundryCreation and the ERC20 token registration, therefore requirestoken name
,token symbol
andtoken decimals
as additional arguments.Furthermore, it stores IRC30 compatible metadata into the foundry output.
create-foundry
was replaced withcreate-native-token
and requires additional arguments like abovecreateNativeTokenFoundry
(nothing was removed)foundryCreateNew
andregisterERC20NativeToken
remains for compatibilityfoundryOutputRec
, which results in a wrong input commitment if metadata is defined (was not serialized correctly)It is mostly a breaking change in terms of the
account
core contract as foundry funcs were removed and the wasp-cli ascreate-foundry
was replaced.The ISCMagic has only one additional function more.
Type of change
Choose a type of change, and delete any options that are not relevant.