Exemple #1
0
def setup():
    config['test']['always_transact'] = False
    config['test']['default_contract_owner'] = True
    main(NFToken)
    global token, issuer
    token = NFToken[0]
    issuer = IssuingEntity[0]
Exemple #2
0
def setup():
    main(NFToken)
    global token, issuer, kyc
    token = NFToken[0]
    issuer = IssuingEntity[0]
    kyc = KYCRegistrar[0]
    token.mint(issuer, 1000000, 0, "0x00", {'from': a[0]})
Exemple #3
0
def setup():
    main(SecurityToken)
    global token, issuer, TestCustodian, cust
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    TestCustodian = compile_source(source)[0]
    cust = TestCustodian.deploy(a[0])
def setup():
    main(SecurityToken)
    global token, issuer, kyc
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    kyc = KYCRegistrar[0]
    token.mint(issuer, 1000000, {'from': a[0]})
Exemple #5
0
def setup():
    config['test']['always_transact'] = False
    main(NFToken)
    global token, issuer
    token = NFToken[0]
    issuer = IssuingEntity[0]
    token.mint(issuer, 1000000, 0, "0x00", {'from': a[0]})
Exemple #6
0
def setup():
    main(SecurityToken)
    global token, issuer, TestModule, module_token, module_issuer
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    TestModule = compile_source(module_source)[0]
    module_token = TestModule.deploy(a[0], token)
    module_issuer = TestModule.deploy(a[0], issuer)
Exemple #7
0
def setup():
    main(NFToken)
    global issuer, nft, cust
    nft = NFToken[0]
    issuer = IssuingEntity[0]
    cust = OwnedCustodian.deploy(a[0], [a[0]], 1)
    issuer.addCustodian(cust, {'from': a[0]})
    nft.mint(issuer, 100000, 0, "0x00", {'from': a[0]})
Exemple #8
0
def setup():
    main(SecurityToken)
    global token, issuer, cust
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    cust = OwnedCustodian.deploy(a[0], [a[0]], 1)
    issuer.addCustodian(cust, {'from': a[0]})
    token.mint(issuer, 100000, {'from': a[0]})
def setup():
    main(NFToken)
    global token, issuer
    token = NFToken[0]
    issuer = IssuingEntity[0]
    token.mint(issuer, 1000000, 0, "0x00", {'from': a[0]})
    issuer.setInvestorLimits([1, 0, 0, 0, 0, 0, 0, 0], {'from': a[0]})
    token.transfer(a[1], 1000, {'from': a[0]})
Exemple #10
0
def setup():
    config['test']['always_transact'] = False
    main(SecurityToken)
    global token, issuer, cust
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    cust = OwnedCustodian.deploy(a[0], [a[0]], 1)
    issuer.addCustodian(cust, {'from': a[0]})
Exemple #11
0
def setup():
    config['test']['always_transact'] = False
    main(NFToken)
    global token, issuer, cust
    token = NFToken[0]
    issuer = IssuingEntity[0]
    cust = OwnedCustodian.deploy(a[0], [a[0]], 1)
    issuer.addCustodian(cust, {'from': a[0]})
    token.mint(issuer, 100000, 0, "0x00", {'from': a[0]})
Exemple #12
0
def setup():
    main(SecurityToken)
    global token, issuer, nft
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    token.mint(issuer, 100000, {'from': a[0]})
    nft = NFToken.deploy(a[0], issuer, "NFToken", "TST", 1000000)
    issuer.addToken(nft, {'from': a[0]})
    nft.mint(issuer, 100000, 0, "0x00", {'from': a[0]})
def setup():
    main(SecurityToken)
    global token, issuer, kyc
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    kyc = KYCRegistrar[0]
    token.mint(issuer, 1000000, {'from': a[0]})
    issuer.setCountry(1, True, 1, [1, 0, 0, 0, 0, 0, 0, 0], {'from': a[0]})
    token.transfer(a[1], 1000, {'from': a[0]})
Exemple #14
0
def setup():
    config['test']['always_transact'] = False
    main(NFToken)
    global token, issuer, upper
    token = NFToken[0]
    issuer = IssuingEntity[0]
    token.mint(a[1], 10000, 0, "0x00", {'from': a[0]})
    token.mint(a[2], 10000, 0, "0x00", {'from': a[0]})
    token.mint(a[3], 10000, 0, "0x00", {'from': a[0]})
    upper = token.totalSupply() + 1
Exemple #15
0
def setup():
    main(NFToken)
    global token, issuer, cust
    token = NFToken[0]
    issuer = IssuingEntity[0]
    cust = OwnedCustodian.deploy(a[0], [a[0]], 1)
    issuer.addCustodian(cust, {'from': a[0]})
    token.mint(issuer, 100000, 0, "0x00", {'from': a[0]})
    token.transfer(a[2], 1000, {'from': a[0]})
    token.transfer(cust, 500, {'from': a[0]})
    token.transfer(cust, 500, {'from': a[2]})
    issuer.setEntityRestriction(cust.ownerID(), False, {'from': a[0]})
def setup():
    config['test']['always_transact'] = False
    main(SecurityToken)
    global token, issuer, ownerid, id1
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    a[0].deploy(SecurityToken, issuer, "Test", "TST", 1000000)
    a[0].deploy(OwnedCustodian, [a[0]], 1)
    for i in range(6):
        a.add()
        a[0].transfer(a[-1], "1 ether")
    issuer.addAuthority(a[-6:-3], [], 2000000000, 1, {'from': a[0]})
    ownerid = issuer.ownerID()
    id1 = issuer.getID(a[-6])
Exemple #17
0
def setup():
    main(NFToken)
    global issuer, nft, cust, module
    nft = NFToken[0]
    issuer = IssuingEntity[0]
    cust = OwnedCustodian.deploy(a[0], [a[0]], 1)
    issuer.addCustodian(cust, {'from': a[0]})
    nft.mint(a[1], 100, 0, "0x0000", {'from': a[0]})  #    1 - 100
    nft.mint(a[1], 100, 0, "0xaa01", {'from': a[0]})  # 101 - 200
    nft.mint(a[1], 100, 0, "0xaa02", {'from': a[0]})  # 201 - 300
    nft.mint(a[1], 100, 0, "0xff00", {'from': a[0]})  # 301 - 400
    nft.mint(a[1], 100, 0, "0xff01", {'from': a[0]})  # 401 - 500
    nft.mint(a[1], 100, 0, "0xff02", {'from': a[0]})  # 501 - 600
    module = compile_source(module_source)[0].deploy(a[0], nft)
    issuer.attachModule(nft, module, {'from': a[0]})
def setup():
    config['test']['always_transact'] = False
    main(SecurityToken)
    global token, nft, issuer, ownerid, id1
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    nft = a[0].deploy(NFToken, issuer, "Test NFT", "NFT", 1000000)
    issuer.addToken(nft, {'from': a[0]})
    for i in range(6):
        a.add()
        a[0].transfer(a[-1], "1 ether")
    issuer.addAuthority(a[-6:-3], [], 2000000000, 1, {'from': a[0]})
    ownerid = issuer.ownerID()
    id1 = issuer.getID(a[-6])
    token.mint(a[2], 1000, {'from': a[0]})
    nft.mint(a[2], 1000, 0, "0x00", {'from': a[0]})
Exemple #19
0
def setup():
    config['test']['always_transact'] = False
    main(SecurityToken)
    global token, issuer, ownerid, id1, id2
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    for i in range(10):
        a.add()
    sigs = (
        issuer.signatures['addAuthorityAddresses'],
        issuer.signatures['removeAuthorityAddresses'],
    )
    issuer.addAuthority([a[-2]], sigs, 2000000000, 1, {'from': a[0]})
    issuer.addAuthority([a[-1]], sigs, 2000000000, 1, {'from': a[0]})
    a[0].transfer(a[-2], "1 ether")
    a[0].transfer(a[-1], "1 ether")
    ownerid = issuer.ownerID()
    id1 = issuer.getID(a[-2])
    id2 = issuer.getID(a[-1])
Exemple #20
0
def setup():
    main(SecurityToken)
    global token, issuer
    token = SecurityToken[0]
    issuer = IssuingEntity[0]
    token.mint(issuer, 1000000, {'from': a[0]})
def setup():
    config['test']['always_transact'] = False
    main(SecurityToken)
    global token, issuer
    token = SecurityToken[0]
    issuer = IssuingEntity[0]