attach method

Contract attach(
  1. String addressOrName
)

Returns a new instance of the Contract attached to addressOrName.

This is useful if there are multiple similar or identical copies of a Contract on the network and you wish to interact with each of them.

Implementation

Contract attach(String addressOrName) {
  assert(EthUtils.isAddress(addressOrName), 'addressOrName must be valid');

  return Contract._(impl.attach(addressOrName));
}