Comments (6)
@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.
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.
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.
Thanks, working now.
from py-stellar-base.
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.
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)
- Option in build to increment account sequence optionally HOT 1
- Soroban simulate transaction error HOT 2
- Soroban - binascii.Error: Non-hexadecimal digit found HOT 2
- Soroban - authorization gives IndexError HOT 8
- Failing to invoke contract function that requires authorization HOT 4
- Support for Protocol 20: Soroban HOT 1
- `parameters` should be optional when building a contract-invoking transaction HOT 1
- Drop support for Python 3.7.
- Updating the SDKs to the stable Protocol 20 release HOT 1
- Soroban - Failing to invoke function with struct parameter HOT 3
- Feature Request: Add helper functions to create SCAddress instance HOT 2
- Protocol 20: Add support for resource leeway in `simulateTransaction`
- Soroban CLI HOT 9
- Stream not successful transactions from horison HOT 2
- Add support for new fields in Soroban RPC's `sendTransaction` endpoint
- server.trade_aggregations.stream() not working HOT 4
- Required changes for passing parameters when communicating with Soroban RPC. HOT 1
- Pass the allowed_methods parameter when the Retry class is instantiated HOT 1
- Add helper to [de]serialize `Keypair` HOT 5
- Protocol 21 SDK Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-stellar-base.