Giter VIP home page Giter VIP logo

Comments (6)

overcat avatar overcat commented on July 17, 2024 2

@MT-Cash, sorry for the inconvenience.

Here is an example, if other developers come here, you can refer to it: https://github.com/StellarCN/py-stellar-base/blob/f5fa47f4d9/examples/clawback.py#L49

from py-stellar-base.

martin-thoma avatar martin-thoma commented on July 17, 2024 1

The reason why I commented is that this is still the first result when I googled an issue I had. Yes, I realize this is 6 years old and it's expected that the stuff is outdated. But it's comments like that which help other developers not to spend as much time as I did with the renaming. It would not be necessary if it was easier to look such deprecations / breaking changes up.

from py-stellar-base.

manran avatar manran commented on July 17, 2024

yes just fix the function in #21

from stellar_base.operation import *
dest = 'GCW24FUIFPC2767SOU4JI3JEAXIHYJFIJLH7GBZ2AVCBVP32SJAI53F5'
op =  SetOptions({'inflation_dest':dest,'set_flags':1})
op.xdr()

then we get b'AAAAAAAAAAUAAAABAAAAAK2uFogrxa/78nU4lG0kBdB8JKhKz/MHOgVEGr96kkCOAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'

according to XDR files and StellarXDR_const.py ,

AccountFlags = {
    0x1 : 'AUTH_REQUIRED_FLAG',
    0x2 : 'AUTH_REVOCABLE_FLAG',
    0x4 : 'AUTH_IMMUTABLE_FLAG',
}

set_flags only accept integer 1 , 2 and 4 , not a string like 'AUTH_REQUIRED'

from py-stellar-base.

Akuukis avatar Akuukis commented on July 17, 2024

Thanks, working now.

from py-stellar-base.

martin-thoma avatar martin-thoma commented on July 17, 2024

Interestingly, it's called slightly different (now): AuthorizationFlag.AUTHORIZATION_REVOCABLE https://developers.stellar.org/docs/issuing-assets/control-asset-access/#authorization-revocable

from py-stellar-base.

overcat avatar overcat commented on July 17, 2024

Hi @MT-Cash, this is an issue from 6 years ago, the content may be out of date.

from py-stellar-base.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.