MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / getDisableControllerAck

Function getDisableControllerAck

test/helpers/signData.js:81–118  ·  view source on GitHub ↗
(stAddress, from)

Source from the content-addressed store, hash-verified

79}
80
81async function getDisableControllerAck(stAddress, from) {
82 const typedData = {
83 types: {
84 EIP712Domain: [
85 { name: 'name', type: 'string' },
86 { name: 'chainId', type: 'uint256' },
87 { name: 'verifyingContract', type: 'address' }
88 ],
89 Acknowledgment: [
90 { name: 'text', type: 'string' }
91 ],
92 },
93 primaryType: 'Acknowledgment',
94 domain: {
95 name: 'Polymath',
96 chainId: 1,
97 verifyingContract: stAddress
98 },
99 message: {
100 text: 'I acknowledge that disabling controller is a permanent and irrevocable change',
101 },
102 };
103 const result = await new Promise((resolve, reject) => {
104 web3.currentProvider.send(
105 {
106 method: 'eth_signTypedData',
107 params: [from, typedData]
108 },
109 (err, result) => {
110 if (err) {
111 return reject(err);
112 }
113 resolve(result.result);
114 }
115 );
116 });
117 return result;
118}
119
120function getSignGTMData(tmAddress, investorAddress, fromTime, toTime, expiryTime, validFrom, validTo, nonce, pk) {
121 let hash = web3.utils.soliditySha3({

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected