Skip to content
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

R4R: Implement BEP84 #809

Merged
merged 23 commits into from
Jan 16, 2021
Merged

R4R: Implement BEP84 #809

merged 23 commits into from
Jan 16, 2021

Conversation

yutianwu
Copy link
Contributor

Description

add a description of your changes here...

Rationale

tell us why we need these changes...

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • integration tests passed (make integration_test)
  • manual transaction test passed (cli invoke)

Already reviewed by

...

Related issues

... reference related issue #'s here ...

@yutianwu yutianwu changed the base branch from master to develop December 21, 2020 01:12
@abelliumnt abelliumnt marked this pull request as ready for review December 25, 2020 08:11
@abelliumnt abelliumnt changed the title Implement BEP100 R4R: Implement BEP100 Dec 25, 2020
// TODO: distribute fee

return sdk.ExecuteResult{
Payload: ackPackage,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need more tags here to indicate what happend in this oracle claim. We have many oracle claims for one cross chain package, need to know which one take effect and what happens inside.


// TODO: distribute fee

return sdk.ExecuteResult{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need more tags here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No ACK package return here, I guess BSC is expecting aj ack package when sync success.

@abelliumnt abelliumnt changed the title R4R: Implement BEP100 R4R: Implement BEP84 Dec 31, 2020
func (app *MirrorApp) checkMirrorSynPackage(ctx sdk.Context, mirrorPackage *types.MirrorSynPackage) uint8 {
// check expire time
if ctx.BlockHeader().Time.Unix() > int64(mirrorPackage.ExpireTime) {
return types.MirrorErrCodeExpired
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MirrorErrCodeExpired is not proper here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I mean MirrorErrCodeUnknown

symbol := types.BytesToSymbol(mirrorPackage.BEP20Symbol)
err := ctypes.ValidateIssueSymbol(symbol)
if err != nil {
return types.MirrorErrCodeUnknown
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just check all the place that use MirrorErrCodeUnknown .

"type": "array",
"items": {
"type": "record",
"name": "Mirror",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't redefine: org.binance.dex.explorer.work.domain.avro.mirror.Mirror , the name is duplicate to line 895
Can you change it to "MirrorData"?

@EnderCrypto EnderCrypto merged commit a5555a1 into develop Jan 16, 2021
@unclezoro unclezoro deleted the bep100 branch May 10, 2022 06:15
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
forcodedancing pushed a commit that referenced this pull request May 19, 2022
* implement bep100

update cosmos dependency

* add upgrade height for FixFailAckPackage

register channel

* convert to bep20 supply in sync

update token supply

* distribute fee

* the mirror and sync fee in package is already converted into BC amount

* update dependency

* enable account scripts for cross chain transfer

* register upgrade height

* send only no script execution error

* include refund package into result

* add transfer in tag

* use idx other than address as refund exclude flag

* use full refund instead of partial refund

* publish mirror related events (#813)

* update mirror config

* move deduct fee from deliverTx

* fix comments

* add missing tags

* fix transfer out fail ack handler issue

* update schmema

* update dependency

* add old total supply for mirror sync event

* fix mirror event

Co-authored-by: HaoyangLiu <[email protected]>
Copy link

@Yashekalangston24 Yashekalangston24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[- LICENSE]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants