-
Notifications
You must be signed in to change notification settings - Fork 550
ArbNativeToken precompile #3186
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
base: master
Are you sure you want to change the base?
Conversation
8bd2c39
to
8e20aef
Compare
if c.State.ArbOSVersion() < params.ArbosVersion_41 { | ||
return fmt.Errorf("minting native token is not supported in ArbOS version %d", c.State.ArbOSVersion()) | ||
} | ||
|
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.
need to add gas cost (to both)
This is done with c.Burn, see examples in e.g. ArbRetryableTx
@@ -57,6 +61,46 @@ func (con ArbOwner) GetAllChainOwners(c ctx, evm mech) ([]common.Address, error) | |||
return c.State.ChainOwners().AllMembers(65536) | |||
} | |||
|
|||
// AddChainOwner adds account as a native token owner | |||
func (con ArbOwner) AddNativeTokenOwner(c ctx, evm mech, newOwner addr) error { | |||
if c.State.ArbOSVersion() < params.ArbosVersion_41 { |
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.
(note: Acces to ArbosState has code that deals with burning Gas as appropriate, so it doesn't need to be done explicitly)
Resolves NIT-3298
Pulls OffchainLabs/go-ethereum#447 and OffchainLabs/nitro-contracts#335
Other TODOs: