@RolesAllowed(value="users") public class WalletContractREST extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
| Constructor and Description |
|---|
WalletContractREST(WalletContractService contractService) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
getAbi(String name)
Return contract abi content
|
javax.ws.rs.core.Response |
getBin(String name)
Return contract bin content
|
javax.ws.rs.core.Response |
getContract(String address,
Long networkId)
Return saved contract details by address
|
javax.ws.rs.core.Response |
removeContract(String address,
Long networkId)
Removes a contract address from default contracts displayed in wallet of
all users
|
javax.ws.rs.core.Response |
saveContract(ContractDetail contractDetail)
Save a new contract address to display it in wallet of all users and save
contract name and symbol
|
public WalletContractREST(WalletContractService contractService)
@RolesAllowed(value="users") public javax.ws.rs.core.Response getContract(String address, Long networkId)
address - token contract addressnetworkId - token contract blockchain network id@RolesAllowed(value={"rewarding","administrators"}) public javax.ws.rs.core.Response getBin(String name)
name - contract name to retrieve@RolesAllowed(value={"rewarding","administrators"}) public javax.ws.rs.core.Response getAbi(String name)
name - contract name to retrieve@RolesAllowed(value="administrators") public javax.ws.rs.core.Response saveContract(ContractDetail contractDetail)
contractDetail - contract detail to save@RolesAllowed(value="administrators") public javax.ws.rs.core.Response removeContract(String address, Long networkId)
address - cotnract address to removenetworkId - blockchain network id where contract is deployedCopyright © 2003–2019 eXo Platform SAS. All rights reserved.